From a0d8723546fd5418e45e77df0e399a0602464acd Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Wed, 12 Apr 2023 17:34:07 +0200 Subject: [PATCH 01/59] Kibana action connectors --- Makefile | 17 +- README.md | 15 + docs/resources/kibana_action_connector.md | 58 + .../import.sh | 1 + .../resource.tf | 12 + generated/kibanaactions/.gitignore | 24 + .../kibanaactions/.openapi-generator-ignore | 23 + .../kibanaactions/.openapi-generator/FILES | 248 ++ .../kibanaactions/.openapi-generator/VERSION | 1 + generated/kibanaactions/.travis.yml | 8 + generated/kibanaactions/README.md | 264 ++ generated/kibanaactions/api/openapi.yaml | 3853 +++++++++++++++++ generated/kibanaactions/api_connectors.go | 2306 ++++++++++ generated/kibanaactions/client.go | 659 +++ generated/kibanaactions/configuration.go | 305 ++ .../docs/ActionResponseProperties.md | 212 + .../docs/AlertIdentifierMapping.md | 114 + .../kibanaactions/docs/CaseCommentMapping.md | 114 + .../docs/CaseDescriptionMapping.md | 114 + .../docs/CaseIdentifierMapping.md | 114 + .../kibanaactions/docs/CaseNameMapping.md | 114 + .../docs/ConfigPropertiesCasesWebhook.md | 380 ++ .../docs/ConfigPropertiesIndex.md | 113 + .../docs/ConfigPropertiesJira.md | 72 + .../docs/ConfigPropertiesOpsgenie.md | 51 + .../docs/ConfigPropertiesResilient.md | 72 + .../docs/ConfigPropertiesServicenow.md | 181 + .../docs/ConfigPropertiesServicenowItom.md | 155 + .../docs/ConfigPropertiesSwimlane.md | 119 + ...MappingsPropertiesForASwimlaneConnector.md | 212 + .../docs/ConnectorResponseProperties.md | 182 + ...ConnectorResponsePropertiesCasesWebhook.md | 182 + .../docs/ConnectorResponsePropertiesEmail.md | 182 + .../docs/ConnectorResponsePropertiesIndex.md | 182 + .../docs/ConnectorResponsePropertiesJira.md | 182 + .../ConnectorResponsePropertiesOpsgenie.md | 182 + .../ConnectorResponsePropertiesPagerduty.md | 182 + .../ConnectorResponsePropertiesResilient.md | 182 + .../ConnectorResponsePropertiesServerlog.md | 192 + .../ConnectorResponsePropertiesServicenow.md | 182 + ...nnectorResponsePropertiesServicenowItom.md | 182 + ...onnectorResponsePropertiesServicenowSir.md | 182 + .../docs/ConnectorResponsePropertiesSlack.md | 161 + .../ConnectorResponsePropertiesSwimlane.md | 182 + .../docs/ConnectorResponsePropertiesTeams.md | 161 + .../docs/ConnectorResponsePropertiesTines.md | 182 + .../ConnectorResponsePropertiesWebhook.md | 182 + .../ConnectorResponsePropertiesXmatters.md | 182 + .../kibanaactions/docs/ConnectorTypes.md | 43 + generated/kibanaactions/docs/ConnectorsApi.md | 1052 +++++ .../CreateConnectorRequestBodyProperties.md | 114 + .../CreateConnectorRequestCasesWebhook.md | 119 + .../docs/CreateConnectorRequestEmail.md | 114 + .../docs/CreateConnectorRequestIndex.md | 93 + .../docs/CreateConnectorRequestJira.md | 114 + .../docs/CreateConnectorRequestOpsgenie.md | 114 + .../docs/CreateConnectorRequestPagerduty.md | 114 + .../docs/CreateConnectorRequestResilient.md | 114 + .../docs/CreateConnectorRequestServerlog.md | 72 + .../docs/CreateConnectorRequestServicenow.md | 114 + .../CreateConnectorRequestServicenowItom.md | 114 + .../CreateConnectorRequestServicenowSir.md | 114 + .../docs/CreateConnectorRequestSlack.md | 93 + .../docs/CreateConnectorRequestSwimlane.md | 114 + .../docs/CreateConnectorRequestTeams.md | 93 + .../docs/CreateConnectorRequestTines.md | 114 + .../docs/CreateConnectorRequestWebhook.md | 114 + .../docs/CreateConnectorRequestXmatters.md | 114 + generated/kibanaactions/docs/Features.md | 17 + .../docs/GetConnector404Response.md | 108 + ...nnectorTypesResponseBodyPropertiesInner.md | 212 + .../GetConnectorsResponseBodyProperties.md | 218 + .../LegacyCreateConnectorRequestProperties.md | 134 + ...nnectorTypesResponseBodyPropertiesInner.md | 186 + .../docs/LegacyRunConnector200Response.md | 108 + ...LegacyRunConnectorRequestBodyProperties.md | 51 + ...acyUpdateConnectorRequestBodyProperties.md | 108 + .../kibanaactions/docs/Model401Response.md | 108 + .../kibanaactions/docs/Model404Response.md | 108 + .../kibanaactions/docs/RuleNameMapping.md | 114 + .../docs/RunConnector200Response.md | 98 + .../docs/RunConnector200ResponseData.md | 30 + .../docs/RunConnectorParamsDocuments.md | 51 + .../docs/RunConnectorParamsLevelMessage.md | 77 + .../docs/RunConnectorRequestBodyProperties.md | 51 + ...RunConnectorRequestBodyPropertiesParams.md | 98 + .../docs/RunConnectorSubactionAddevent.md | 77 + ...nnectorSubactionAddeventSubActionParams.md | 316 ++ .../docs/RunConnectorSubactionClosealert.md | 72 + ...ectorSubactionClosealertSubActionParams.md | 129 + .../docs/RunConnectorSubactionCreatealert.md | 72 + ...ctorSubactionCreatealertSubActionParams.md | 363 ++ ...eatealertSubActionParamsRespondersInner.md | 134 + ...reatealertSubActionParamsVisibleToInner.md | 129 + .../RunConnectorSubactionFieldsbyissuetype.md | 72 + ...bactionFieldsbyissuetypeSubActionParams.md | 51 + .../docs/RunConnectorSubactionGetchoices.md | 72 + ...ectorSubactionGetchoicesSubActionParams.md | 51 + .../docs/RunConnectorSubactionGetfields.md | 51 + .../docs/RunConnectorSubactionGetincident.md | 72 + ...ctorSubactionGetincidentSubActionParams.md | 51 + .../docs/RunConnectorSubactionIssue.md | 77 + ...nConnectorSubactionIssueSubActionParams.md | 51 + .../docs/RunConnectorSubactionIssues.md | 72 + ...ConnectorSubactionIssuesSubActionParams.md | 51 + .../docs/RunConnectorSubactionIssuetypes.md | 51 + .../RunConnectorSubactionPushtoservice.md | 72 + ...orSubactionPushtoserviceSubActionParams.md | 82 + ...shtoserviceSubActionParamsCommentsInner.md | 82 + ...ionPushtoserviceSubActionParamsIncident.md | 654 +++ ...htoserviceSubActionParamsIncidentDestIp.md | 30 + ...rviceSubActionParamsIncidentMalwareHash.md | 30 + ...erviceSubActionParamsIncidentMalwareUrl.md | 30 + ...oserviceSubActionParamsIncidentSourceIp.md | 30 + .../docs/SecretsPropertiesCasesWebhook.md | 82 + .../docs/SecretsPropertiesJira.md | 72 + .../docs/SecretsPropertiesOpsgenie.md | 51 + .../docs/SecretsPropertiesResilient.md | 72 + .../docs/SecretsPropertiesServicenow.md | 160 + .../docs/SecretsPropertiesSwimlane.md | 56 + .../kibanaactions/docs/SeverityMapping.md | 114 + .../kibanaactions/docs/SubactionParameters.md | 72 + .../docs/UpdateConnector400Response.md | 108 + .../UpdateConnectorRequestBodyProperties.md | 93 + .../UpdateConnectorRequestCasesWebhook.md | 98 + .../docs/UpdateConnectorRequestIndex.md | 72 + .../docs/UpdateConnectorRequestJira.md | 93 + .../docs/UpdateConnectorRequestOpsgenie.md | 93 + .../docs/UpdateConnectorRequestResilient.md | 93 + .../docs/UpdateConnectorRequestServerlog.md | 51 + .../docs/UpdateConnectorRequestServicenow.md | 93 + .../UpdateConnectorRequestServicenowItom.md | 93 + .../docs/UpdateConnectorRequestSwimlane.md | 93 + generated/kibanaactions/git_push.sh | 57 + generated/kibanaactions/model_401_response.go | 196 + generated/kibanaactions/model_404_response.go | 196 + .../model_action_response_properties.go | 343 ++ .../model_alert_identifier_mapping.go | 200 + .../model_case_comment_mapping.go | 200 + .../model_case_description_mapping.go | 200 + .../model_case_identifier_mapping.go | 200 + .../kibanaactions/model_case_name_mapping.go | 200 + .../model_config_properties_cases_webhook.go | 587 +++ .../model_config_properties_index.go | 205 + .../model_config_properties_jira.go | 144 + .../model_config_properties_opsgenie.go | 116 + .../model_config_properties_resilient.go | 144 + .../model_config_properties_servicenow.go | 309 ++ ...model_config_properties_servicenow_itom.go | 268 ++ .../model_config_properties_swimlane.go | 208 + ...ngs_properties_for_a_swimlane_connector.go | 340 ++ .../model_connector_response_properties.go | 595 +++ ...ector_response_properties_cases_webhook.go | 292 ++ ...del_connector_response_properties_email.go | 293 ++ ...del_connector_response_properties_index.go | 292 ++ ...odel_connector_response_properties_jira.go | 292 ++ ..._connector_response_properties_opsgenie.go | 292 ++ ...connector_response_properties_pagerduty.go | 293 ++ ...connector_response_properties_resilient.go | 292 ++ ...connector_response_properties_serverlog.go | 296 ++ ...onnector_response_properties_servicenow.go | 292 ++ ...tor_response_properties_servicenow_itom.go | 292 ++ ...ctor_response_properties_servicenow_sir.go | 292 ++ ...del_connector_response_properties_slack.go | 265 ++ ..._connector_response_properties_swimlane.go | 292 ++ ...del_connector_response_properties_teams.go | 265 ++ ...del_connector_response_properties_tines.go | 293 ++ ...l_connector_response_properties_webhook.go | 293 ++ ..._connector_response_properties_xmatters.go | 293 ++ .../kibanaactions/model_connector_types.go | 140 + ...reate_connector_request_body_properties.go | 595 +++ ..._create_connector_request_cases_webhook.go | 207 + .../model_create_connector_request_email.go | 200 + .../model_create_connector_request_index.go | 171 + .../model_create_connector_request_jira.go | 198 + ...model_create_connector_request_opsgenie.go | 198 + ...odel_create_connector_request_pagerduty.go | 200 + ...odel_create_connector_request_resilient.go | 198 + ...odel_create_connector_request_serverlog.go | 144 + ...del_create_connector_request_servicenow.go | 198 + ...reate_connector_request_servicenow_itom.go | 198 + ...create_connector_request_servicenow_sir.go | 198 + .../model_create_connector_request_slack.go | 172 + ...model_create_connector_request_swimlane.go | 198 + .../model_create_connector_request_teams.go | 172 + .../model_create_connector_request_tines.go | 200 + .../model_create_connector_request_webhook.go | 200 + ...model_create_connector_request_xmatters.go | 200 + generated/kibanaactions/model_features.go | 114 + .../model_get_connector_404_response.go | 196 + ...or_types_response_body_properties_inner.go | 346 ++ ...get_connectors_response_body_properties.go | 332 ++ ...acy_create_connector_request_properties.go | 236 + ...or_types_response_body_properties_inner.go | 310 ++ ...model_legacy_run_connector_200_response.go | 197 + ...y_run_connector_request_body_properties.go | 116 + ...pdate_connector_request_body_properties.go | 199 + .../kibanaactions/model_rule_name_mapping.go | 200 + .../model_run_connector_200_response.go | 180 + .../model_run_connector_200_response_data.go | 145 + .../model_run_connector_params_documents.go | 116 + ...odel_run_connector_params_level_message.go | 157 + ...l_run_connector_request_body_properties.go | 115 + ...onnector_request_body_properties_params.go | 175 + .../model_run_connector_subaction_addevent.go | 152 + ...or_subaction_addevent_sub_action_params.go | 495 +++ ...odel_run_connector_subaction_closealert.go | 143 + ..._subaction_closealert_sub_action_params.go | 227 + ...del_run_connector_subaction_createalert.go | 143 + ...subaction_createalert_sub_action_params.go | 560 +++ ...lert_sub_action_params_responders_inner.go | 236 + ...lert_sub_action_params_visible_to_inner.go | 227 + ...n_connector_subaction_fieldsbyissuetype.go | 143 + ...ion_fieldsbyissuetype_sub_action_params.go | 116 + ...odel_run_connector_subaction_getchoices.go | 143 + ..._subaction_getchoices_sub_action_params.go | 116 + ...model_run_connector_subaction_getfields.go | 116 + ...del_run_connector_subaction_getincident.go | 143 + ...subaction_getincident_sub_action_params.go | 116 + .../model_run_connector_subaction_issue.go | 152 + ...ector_subaction_issue_sub_action_params.go | 116 + .../model_run_connector_subaction_issues.go | 143 + ...ctor_subaction_issues_sub_action_params.go | 116 + ...odel_run_connector_subaction_issuetypes.go | 116 + ...l_run_connector_subaction_pushtoservice.go | 143 + ...baction_pushtoservice_sub_action_params.go | 161 + ...ervice_sub_action_params_comments_inner.go | 162 + ...ushtoservice_sub_action_params_incident.go | 972 +++++ ...vice_sub_action_params_incident_dest_ip.go | 145 + ...sub_action_params_incident_malware_hash.go | 145 + ..._sub_action_params_incident_malware_url.go | 145 + ...ce_sub_action_params_incident_source_ip.go | 145 + .../model_secrets_properties_cases_webhook.go | 162 + .../model_secrets_properties_jira.go | 144 + .../model_secrets_properties_opsgenie.go | 116 + .../model_secrets_properties_resilient.go | 144 + .../model_secrets_properties_servicenow.go | 273 ++ .../model_secrets_properties_swimlane.go | 125 + .../kibanaactions/model_severity_mapping.go | 200 + .../model_subaction_parameters.go | 415 ++ .../model_update_connector_400_response.go | 196 + ...pdate_connector_request_body_properties.go | 355 ++ ..._update_connector_request_cases_webhook.go | 179 + .../model_update_connector_request_index.go | 143 + .../model_update_connector_request_jira.go | 170 + ...model_update_connector_request_opsgenie.go | 170 + ...odel_update_connector_request_resilient.go | 170 + ...odel_update_connector_request_serverlog.go | 116 + ...del_update_connector_request_servicenow.go | 170 + ...pdate_connector_request_servicenow_itom.go | 170 + ...model_update_connector_request_swimlane.go | 170 + generated/kibanaactions/response.go | 47 + generated/kibanaactions/utils.go | 347 ++ go.mod | 2 +- go.sum | 4 +- internal/clients/api_client.go | 42 +- internal/clients/kibana/action_connector.go | 789 ++++ internal/kibana/action_connector.go | 238 + internal/models/action_connector.go | 13 + provider/provider.go | 5 +- 260 files changed, 50331 insertions(+), 11 deletions(-) create mode 100644 docs/resources/kibana_action_connector.md create mode 100644 examples/resources/elasticstack_kibana_action_connector/import.sh create mode 100644 examples/resources/elasticstack_kibana_action_connector/resource.tf create mode 100644 generated/kibanaactions/.gitignore create mode 100644 generated/kibanaactions/.openapi-generator-ignore create mode 100644 generated/kibanaactions/.openapi-generator/FILES create mode 100644 generated/kibanaactions/.openapi-generator/VERSION create mode 100644 generated/kibanaactions/.travis.yml create mode 100644 generated/kibanaactions/README.md create mode 100644 generated/kibanaactions/api/openapi.yaml create mode 100644 generated/kibanaactions/api_connectors.go create mode 100644 generated/kibanaactions/client.go create mode 100644 generated/kibanaactions/configuration.go create mode 100644 generated/kibanaactions/docs/ActionResponseProperties.md create mode 100644 generated/kibanaactions/docs/AlertIdentifierMapping.md create mode 100644 generated/kibanaactions/docs/CaseCommentMapping.md create mode 100644 generated/kibanaactions/docs/CaseDescriptionMapping.md create mode 100644 generated/kibanaactions/docs/CaseIdentifierMapping.md create mode 100644 generated/kibanaactions/docs/CaseNameMapping.md create mode 100644 generated/kibanaactions/docs/ConfigPropertiesCasesWebhook.md create mode 100644 generated/kibanaactions/docs/ConfigPropertiesIndex.md create mode 100644 generated/kibanaactions/docs/ConfigPropertiesJira.md create mode 100644 generated/kibanaactions/docs/ConfigPropertiesOpsgenie.md create mode 100644 generated/kibanaactions/docs/ConfigPropertiesResilient.md create mode 100644 generated/kibanaactions/docs/ConfigPropertiesServicenow.md create mode 100644 generated/kibanaactions/docs/ConfigPropertiesServicenowItom.md create mode 100644 generated/kibanaactions/docs/ConfigPropertiesSwimlane.md create mode 100644 generated/kibanaactions/docs/ConnectorMappingsPropertiesForASwimlaneConnector.md create mode 100644 generated/kibanaactions/docs/ConnectorResponseProperties.md create mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesCasesWebhook.md create mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesEmail.md create mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesIndex.md create mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesJira.md create mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesOpsgenie.md create mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesPagerduty.md create mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesResilient.md create mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesServerlog.md create mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesServicenow.md create mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowItom.md create mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowSir.md create mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesSlack.md create mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesSwimlane.md create mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesTeams.md create mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesTines.md create mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesWebhook.md create mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesXmatters.md create mode 100644 generated/kibanaactions/docs/ConnectorTypes.md create mode 100644 generated/kibanaactions/docs/ConnectorsApi.md create mode 100644 generated/kibanaactions/docs/CreateConnectorRequestBodyProperties.md create mode 100644 generated/kibanaactions/docs/CreateConnectorRequestCasesWebhook.md create mode 100644 generated/kibanaactions/docs/CreateConnectorRequestEmail.md create mode 100644 generated/kibanaactions/docs/CreateConnectorRequestIndex.md create mode 100644 generated/kibanaactions/docs/CreateConnectorRequestJira.md create mode 100644 generated/kibanaactions/docs/CreateConnectorRequestOpsgenie.md create mode 100644 generated/kibanaactions/docs/CreateConnectorRequestPagerduty.md create mode 100644 generated/kibanaactions/docs/CreateConnectorRequestResilient.md create mode 100644 generated/kibanaactions/docs/CreateConnectorRequestServerlog.md create mode 100644 generated/kibanaactions/docs/CreateConnectorRequestServicenow.md create mode 100644 generated/kibanaactions/docs/CreateConnectorRequestServicenowItom.md create mode 100644 generated/kibanaactions/docs/CreateConnectorRequestServicenowSir.md create mode 100644 generated/kibanaactions/docs/CreateConnectorRequestSlack.md create mode 100644 generated/kibanaactions/docs/CreateConnectorRequestSwimlane.md create mode 100644 generated/kibanaactions/docs/CreateConnectorRequestTeams.md create mode 100644 generated/kibanaactions/docs/CreateConnectorRequestTines.md create mode 100644 generated/kibanaactions/docs/CreateConnectorRequestWebhook.md create mode 100644 generated/kibanaactions/docs/CreateConnectorRequestXmatters.md create mode 100644 generated/kibanaactions/docs/Features.md create mode 100644 generated/kibanaactions/docs/GetConnector404Response.md create mode 100644 generated/kibanaactions/docs/GetConnectorTypesResponseBodyPropertiesInner.md create mode 100644 generated/kibanaactions/docs/GetConnectorsResponseBodyProperties.md create mode 100644 generated/kibanaactions/docs/LegacyCreateConnectorRequestProperties.md create mode 100644 generated/kibanaactions/docs/LegacyGetConnectorTypesResponseBodyPropertiesInner.md create mode 100644 generated/kibanaactions/docs/LegacyRunConnector200Response.md create mode 100644 generated/kibanaactions/docs/LegacyRunConnectorRequestBodyProperties.md create mode 100644 generated/kibanaactions/docs/LegacyUpdateConnectorRequestBodyProperties.md create mode 100644 generated/kibanaactions/docs/Model401Response.md create mode 100644 generated/kibanaactions/docs/Model404Response.md create mode 100644 generated/kibanaactions/docs/RuleNameMapping.md create mode 100644 generated/kibanaactions/docs/RunConnector200Response.md create mode 100644 generated/kibanaactions/docs/RunConnector200ResponseData.md create mode 100644 generated/kibanaactions/docs/RunConnectorParamsDocuments.md create mode 100644 generated/kibanaactions/docs/RunConnectorParamsLevelMessage.md create mode 100644 generated/kibanaactions/docs/RunConnectorRequestBodyProperties.md create mode 100644 generated/kibanaactions/docs/RunConnectorRequestBodyPropertiesParams.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionAddevent.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionAddeventSubActionParams.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionClosealert.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionClosealertSubActionParams.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionCreatealert.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParams.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsRespondersInner.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsVisibleToInner.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetype.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetypeSubActionParams.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionGetchoices.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionGetchoicesSubActionParams.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionGetfields.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionGetincident.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionGetincidentSubActionParams.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionIssue.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionIssueSubActionParams.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionIssues.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionIssuesSubActionParams.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionIssuetypes.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionPushtoservice.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParams.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncident.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md create mode 100644 generated/kibanaactions/docs/SecretsPropertiesCasesWebhook.md create mode 100644 generated/kibanaactions/docs/SecretsPropertiesJira.md create mode 100644 generated/kibanaactions/docs/SecretsPropertiesOpsgenie.md create mode 100644 generated/kibanaactions/docs/SecretsPropertiesResilient.md create mode 100644 generated/kibanaactions/docs/SecretsPropertiesServicenow.md create mode 100644 generated/kibanaactions/docs/SecretsPropertiesSwimlane.md create mode 100644 generated/kibanaactions/docs/SeverityMapping.md create mode 100644 generated/kibanaactions/docs/SubactionParameters.md create mode 100644 generated/kibanaactions/docs/UpdateConnector400Response.md create mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestBodyProperties.md create mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestCasesWebhook.md create mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestIndex.md create mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestJira.md create mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestOpsgenie.md create mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestResilient.md create mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestServerlog.md create mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestServicenow.md create mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestServicenowItom.md create mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestSwimlane.md create mode 100644 generated/kibanaactions/git_push.sh create mode 100644 generated/kibanaactions/model_401_response.go create mode 100644 generated/kibanaactions/model_404_response.go create mode 100644 generated/kibanaactions/model_action_response_properties.go create mode 100644 generated/kibanaactions/model_alert_identifier_mapping.go create mode 100644 generated/kibanaactions/model_case_comment_mapping.go create mode 100644 generated/kibanaactions/model_case_description_mapping.go create mode 100644 generated/kibanaactions/model_case_identifier_mapping.go create mode 100644 generated/kibanaactions/model_case_name_mapping.go create mode 100644 generated/kibanaactions/model_config_properties_cases_webhook.go create mode 100644 generated/kibanaactions/model_config_properties_index.go create mode 100644 generated/kibanaactions/model_config_properties_jira.go create mode 100644 generated/kibanaactions/model_config_properties_opsgenie.go create mode 100644 generated/kibanaactions/model_config_properties_resilient.go create mode 100644 generated/kibanaactions/model_config_properties_servicenow.go create mode 100644 generated/kibanaactions/model_config_properties_servicenow_itom.go create mode 100644 generated/kibanaactions/model_config_properties_swimlane.go create mode 100644 generated/kibanaactions/model_connector_mappings_properties_for_a_swimlane_connector.go create mode 100644 generated/kibanaactions/model_connector_response_properties.go create mode 100644 generated/kibanaactions/model_connector_response_properties_cases_webhook.go create mode 100644 generated/kibanaactions/model_connector_response_properties_email.go create mode 100644 generated/kibanaactions/model_connector_response_properties_index.go create mode 100644 generated/kibanaactions/model_connector_response_properties_jira.go create mode 100644 generated/kibanaactions/model_connector_response_properties_opsgenie.go create mode 100644 generated/kibanaactions/model_connector_response_properties_pagerduty.go create mode 100644 generated/kibanaactions/model_connector_response_properties_resilient.go create mode 100644 generated/kibanaactions/model_connector_response_properties_serverlog.go create mode 100644 generated/kibanaactions/model_connector_response_properties_servicenow.go create mode 100644 generated/kibanaactions/model_connector_response_properties_servicenow_itom.go create mode 100644 generated/kibanaactions/model_connector_response_properties_servicenow_sir.go create mode 100644 generated/kibanaactions/model_connector_response_properties_slack.go create mode 100644 generated/kibanaactions/model_connector_response_properties_swimlane.go create mode 100644 generated/kibanaactions/model_connector_response_properties_teams.go create mode 100644 generated/kibanaactions/model_connector_response_properties_tines.go create mode 100644 generated/kibanaactions/model_connector_response_properties_webhook.go create mode 100644 generated/kibanaactions/model_connector_response_properties_xmatters.go create mode 100644 generated/kibanaactions/model_connector_types.go create mode 100644 generated/kibanaactions/model_create_connector_request_body_properties.go create mode 100644 generated/kibanaactions/model_create_connector_request_cases_webhook.go create mode 100644 generated/kibanaactions/model_create_connector_request_email.go create mode 100644 generated/kibanaactions/model_create_connector_request_index.go create mode 100644 generated/kibanaactions/model_create_connector_request_jira.go create mode 100644 generated/kibanaactions/model_create_connector_request_opsgenie.go create mode 100644 generated/kibanaactions/model_create_connector_request_pagerduty.go create mode 100644 generated/kibanaactions/model_create_connector_request_resilient.go create mode 100644 generated/kibanaactions/model_create_connector_request_serverlog.go create mode 100644 generated/kibanaactions/model_create_connector_request_servicenow.go create mode 100644 generated/kibanaactions/model_create_connector_request_servicenow_itom.go create mode 100644 generated/kibanaactions/model_create_connector_request_servicenow_sir.go create mode 100644 generated/kibanaactions/model_create_connector_request_slack.go create mode 100644 generated/kibanaactions/model_create_connector_request_swimlane.go create mode 100644 generated/kibanaactions/model_create_connector_request_teams.go create mode 100644 generated/kibanaactions/model_create_connector_request_tines.go create mode 100644 generated/kibanaactions/model_create_connector_request_webhook.go create mode 100644 generated/kibanaactions/model_create_connector_request_xmatters.go create mode 100644 generated/kibanaactions/model_features.go create mode 100644 generated/kibanaactions/model_get_connector_404_response.go create mode 100644 generated/kibanaactions/model_get_connector_types_response_body_properties_inner.go create mode 100644 generated/kibanaactions/model_get_connectors_response_body_properties.go create mode 100644 generated/kibanaactions/model_legacy_create_connector_request_properties.go create mode 100644 generated/kibanaactions/model_legacy_get_connector_types_response_body_properties_inner.go create mode 100644 generated/kibanaactions/model_legacy_run_connector_200_response.go create mode 100644 generated/kibanaactions/model_legacy_run_connector_request_body_properties.go create mode 100644 generated/kibanaactions/model_legacy_update_connector_request_body_properties.go create mode 100644 generated/kibanaactions/model_rule_name_mapping.go create mode 100644 generated/kibanaactions/model_run_connector_200_response.go create mode 100644 generated/kibanaactions/model_run_connector_200_response_data.go create mode 100644 generated/kibanaactions/model_run_connector_params_documents.go create mode 100644 generated/kibanaactions/model_run_connector_params_level_message.go create mode 100644 generated/kibanaactions/model_run_connector_request_body_properties.go create mode 100644 generated/kibanaactions/model_run_connector_request_body_properties_params.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_addevent.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_addevent_sub_action_params.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_closealert.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_closealert_sub_action_params.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_createalert.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_responders_inner.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_visible_to_inner.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype_sub_action_params.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_getchoices.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_getchoices_sub_action_params.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_getfields.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_getincident.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_getincident_sub_action_params.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_issue.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_issue_sub_action_params.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_issues.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_issues_sub_action_params.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_issuetypes.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_pushtoservice.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_comments_inner.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go create mode 100644 generated/kibanaactions/model_secrets_properties_cases_webhook.go create mode 100644 generated/kibanaactions/model_secrets_properties_jira.go create mode 100644 generated/kibanaactions/model_secrets_properties_opsgenie.go create mode 100644 generated/kibanaactions/model_secrets_properties_resilient.go create mode 100644 generated/kibanaactions/model_secrets_properties_servicenow.go create mode 100644 generated/kibanaactions/model_secrets_properties_swimlane.go create mode 100644 generated/kibanaactions/model_severity_mapping.go create mode 100644 generated/kibanaactions/model_subaction_parameters.go create mode 100644 generated/kibanaactions/model_update_connector_400_response.go create mode 100644 generated/kibanaactions/model_update_connector_request_body_properties.go create mode 100644 generated/kibanaactions/model_update_connector_request_cases_webhook.go create mode 100644 generated/kibanaactions/model_update_connector_request_index.go create mode 100644 generated/kibanaactions/model_update_connector_request_jira.go create mode 100644 generated/kibanaactions/model_update_connector_request_opsgenie.go create mode 100644 generated/kibanaactions/model_update_connector_request_resilient.go create mode 100644 generated/kibanaactions/model_update_connector_request_serverlog.go create mode 100644 generated/kibanaactions/model_update_connector_request_servicenow.go create mode 100644 generated/kibanaactions/model_update_connector_request_servicenow_itom.go create mode 100644 generated/kibanaactions/model_update_connector_request_swimlane.go create mode 100644 generated/kibanaactions/response.go create mode 100644 generated/kibanaactions/utils.go create mode 100644 internal/clients/kibana/action_connector.go create mode 100644 internal/kibana/action_connector.go create mode 100644 internal/models/action_connector.go diff --git a/Makefile b/Makefile index 2d6ecc81f..8d6452b97 100644 --- a/Makefile +++ b/Makefile @@ -246,4 +246,19 @@ generate-alerting-client: ## generate Kibana alerting client -g go \ -o /local/generated/alerting @ rm -rf generated/alerting/go.mod generated/alerting/go.sum generated/alerting/test - @ go fmt ./generated/... + @ go fmt ./generated/alerting/... + +.PHONY: generate-kibana-actions +generate-kibana-actions-client: ## generate Kibana actions client + @ docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \ + -i https://raw.githubusercontent.com/elastic/kibana/$(SWAGGER_VERSION)/x-pack/plugins/actions/docs/openapi/bundled.json \ + --skip-validate-spec \ + --git-repo-id terraform-provider-elasticstack \ + --git-user-id elastic \ + -p isGoSubmodule=true \ + -p packageName=kibanaactions \ + -p generateInterfaces=true \ + -g go \ + -o /local/generated/kibanaactions + @ rm -rf generated/kibanaactions/go.mod generated/kibanaactions/go.sum generated/kibanaactions/test + @ go fmt ./generated/kibanaactions/... diff --git a/README.md b/README.md index 127f5cb9c..515f34d86 100644 --- a/README.md +++ b/README.md @@ -129,3 +129,18 @@ go mod tidy ``` Then commit the changes to `go.mod` and `go.sum`. + +### Generating Kibana clients + +Kibana clients for some APIs are generated based on Kibana OpenAPI specs. +Please see [Makefile](./Makefile) tasks for more details. + +#### Known issues +OpenAPI generator produces incorrect code for `RunConnector200ResponseData` struct +in [model_run_connector_200_response_data.go](./generated/kibanaactions/model_run_connector_200_response_data.go). +It doesn't strip curly braces from the struct field names. + +[There is a fix for the issue](https://github.com/OpenAPITools/openapi-generator/pull/13167) but it's not yet merged. +Currently the file is fixed manually. + +Also the specs don't include models for some connector types, e.g. they miss models for update requests for few connector types like `Slack`, `Webhook`, etc. diff --git a/docs/resources/kibana_action_connector.md b/docs/resources/kibana_action_connector.md new file mode 100644 index 000000000..6843d132f --- /dev/null +++ b/docs/resources/kibana_action_connector.md @@ -0,0 +1,58 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "elasticstack_kibana_action_connector Resource - terraform-provider-elasticstack" +subcategory: "" +description: |- + Creates a Kibana action connector. See https://www.elastic.co/guide/en/kibana/8.7/action-types.html +--- + +# elasticstack_kibana_action_connector (Resource) + +Creates a Kibana action connector. See https://www.elastic.co/guide/en/kibana/8.7/action-types.html + +## Example Usage + +```terraform +provider "elasticstack" { + elasticsearch {} +} + +resource "elasticstack_kibana_action_connector" "example" { + name = "%s" + config = jsonencode({ + index = ".kibana" + refresh = true + }) + connector_type_id = ".index" +} +``` + + +## Schema + +### Required + +- `config` (String) The configuration for the connector. Configuration properties vary depending on the connector type. +- `connector_type_id` (String) The ID of the connector type, e.g. `.index`. +- `name` (String) The name of the connector. While this name does not have to be unique, a distinctive name can help you identify a connector. +- `secrets` (String) The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. + +### Optional + +- `connector_id` (String) A UUID v1 or v4 to use instead of a randomly generated ID. +- `space_id` (String) An identifier for the space. If space_id is not provided, the default space is used. + +### Read-Only + +- `id` (String) The ID of this resource. +- `is_deprecated` (Boolean) Indicates whether the connector type is deprecated. +- `is_missing_secrets` (Boolean) Indicates whether secrets are missing for the connector. +- `is_preconfigured` (Boolean) Indicates whether it is a preconfigured connector. + +## Import + +Import is supported using the following syntax: + +```shell +terraform import elasticstack_kibana_action_connector.my_connector / +``` diff --git a/examples/resources/elasticstack_kibana_action_connector/import.sh b/examples/resources/elasticstack_kibana_action_connector/import.sh new file mode 100644 index 000000000..5a0f458fe --- /dev/null +++ b/examples/resources/elasticstack_kibana_action_connector/import.sh @@ -0,0 +1 @@ +terraform import elasticstack_kibana_action_connector.my_connector / diff --git a/examples/resources/elasticstack_kibana_action_connector/resource.tf b/examples/resources/elasticstack_kibana_action_connector/resource.tf new file mode 100644 index 000000000..21c1447bc --- /dev/null +++ b/examples/resources/elasticstack_kibana_action_connector/resource.tf @@ -0,0 +1,12 @@ +provider "elasticstack" { + elasticsearch {} +} + +resource "elasticstack_kibana_action_connector" "example" { + name = "%s" + config = jsonencode({ + index = ".kibana" + refresh = true + }) + connector_type_id = ".index" +} diff --git a/generated/kibanaactions/.gitignore b/generated/kibanaactions/.gitignore new file mode 100644 index 000000000..daf913b1b --- /dev/null +++ b/generated/kibanaactions/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/generated/kibanaactions/.openapi-generator-ignore b/generated/kibanaactions/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/generated/kibanaactions/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/generated/kibanaactions/.openapi-generator/FILES b/generated/kibanaactions/.openapi-generator/FILES new file mode 100644 index 000000000..1437b7472 --- /dev/null +++ b/generated/kibanaactions/.openapi-generator/FILES @@ -0,0 +1,248 @@ +.gitignore +.travis.yml +README.md +api/openapi.yaml +api_connectors.go +client.go +configuration.go +docs/ActionResponseProperties.md +docs/AlertIdentifierMapping.md +docs/CaseCommentMapping.md +docs/CaseDescriptionMapping.md +docs/CaseIdentifierMapping.md +docs/CaseNameMapping.md +docs/ConfigPropertiesCasesWebhook.md +docs/ConfigPropertiesIndex.md +docs/ConfigPropertiesJira.md +docs/ConfigPropertiesOpsgenie.md +docs/ConfigPropertiesResilient.md +docs/ConfigPropertiesServicenow.md +docs/ConfigPropertiesServicenowItom.md +docs/ConfigPropertiesSwimlane.md +docs/ConnectorMappingsPropertiesForASwimlaneConnector.md +docs/ConnectorResponseProperties.md +docs/ConnectorResponsePropertiesCasesWebhook.md +docs/ConnectorResponsePropertiesEmail.md +docs/ConnectorResponsePropertiesIndex.md +docs/ConnectorResponsePropertiesJira.md +docs/ConnectorResponsePropertiesOpsgenie.md +docs/ConnectorResponsePropertiesPagerduty.md +docs/ConnectorResponsePropertiesResilient.md +docs/ConnectorResponsePropertiesServerlog.md +docs/ConnectorResponsePropertiesServicenow.md +docs/ConnectorResponsePropertiesServicenowItom.md +docs/ConnectorResponsePropertiesServicenowSir.md +docs/ConnectorResponsePropertiesSlack.md +docs/ConnectorResponsePropertiesSwimlane.md +docs/ConnectorResponsePropertiesTeams.md +docs/ConnectorResponsePropertiesTines.md +docs/ConnectorResponsePropertiesWebhook.md +docs/ConnectorResponsePropertiesXmatters.md +docs/ConnectorTypes.md +docs/ConnectorsApi.md +docs/CreateConnectorRequestBodyProperties.md +docs/CreateConnectorRequestCasesWebhook.md +docs/CreateConnectorRequestEmail.md +docs/CreateConnectorRequestIndex.md +docs/CreateConnectorRequestJira.md +docs/CreateConnectorRequestOpsgenie.md +docs/CreateConnectorRequestPagerduty.md +docs/CreateConnectorRequestResilient.md +docs/CreateConnectorRequestServerlog.md +docs/CreateConnectorRequestServicenow.md +docs/CreateConnectorRequestServicenowItom.md +docs/CreateConnectorRequestServicenowSir.md +docs/CreateConnectorRequestSlack.md +docs/CreateConnectorRequestSwimlane.md +docs/CreateConnectorRequestTeams.md +docs/CreateConnectorRequestTines.md +docs/CreateConnectorRequestWebhook.md +docs/CreateConnectorRequestXmatters.md +docs/Features.md +docs/GetConnector404Response.md +docs/GetConnectorTypesResponseBodyPropertiesInner.md +docs/GetConnectorsResponseBodyProperties.md +docs/LegacyCreateConnectorRequestProperties.md +docs/LegacyGetConnectorTypesResponseBodyPropertiesInner.md +docs/LegacyRunConnector200Response.md +docs/LegacyRunConnectorRequestBodyProperties.md +docs/LegacyUpdateConnectorRequestBodyProperties.md +docs/Model401Response.md +docs/Model404Response.md +docs/RuleNameMapping.md +docs/RunConnector200Response.md +docs/RunConnector200ResponseData.md +docs/RunConnectorParamsDocuments.md +docs/RunConnectorParamsLevelMessage.md +docs/RunConnectorRequestBodyProperties.md +docs/RunConnectorRequestBodyPropertiesParams.md +docs/RunConnectorSubactionAddevent.md +docs/RunConnectorSubactionAddeventSubActionParams.md +docs/RunConnectorSubactionClosealert.md +docs/RunConnectorSubactionClosealertSubActionParams.md +docs/RunConnectorSubactionCreatealert.md +docs/RunConnectorSubactionCreatealertSubActionParams.md +docs/RunConnectorSubactionCreatealertSubActionParamsRespondersInner.md +docs/RunConnectorSubactionCreatealertSubActionParamsVisibleToInner.md +docs/RunConnectorSubactionFieldsbyissuetype.md +docs/RunConnectorSubactionFieldsbyissuetypeSubActionParams.md +docs/RunConnectorSubactionGetchoices.md +docs/RunConnectorSubactionGetchoicesSubActionParams.md +docs/RunConnectorSubactionGetfields.md +docs/RunConnectorSubactionGetincident.md +docs/RunConnectorSubactionGetincidentSubActionParams.md +docs/RunConnectorSubactionIssue.md +docs/RunConnectorSubactionIssueSubActionParams.md +docs/RunConnectorSubactionIssues.md +docs/RunConnectorSubactionIssuesSubActionParams.md +docs/RunConnectorSubactionIssuetypes.md +docs/RunConnectorSubactionPushtoservice.md +docs/RunConnectorSubactionPushtoserviceSubActionParams.md +docs/RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner.md +docs/RunConnectorSubactionPushtoserviceSubActionParamsIncident.md +docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md +docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md +docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md +docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md +docs/SecretsPropertiesCasesWebhook.md +docs/SecretsPropertiesJira.md +docs/SecretsPropertiesOpsgenie.md +docs/SecretsPropertiesResilient.md +docs/SecretsPropertiesServicenow.md +docs/SecretsPropertiesSwimlane.md +docs/SeverityMapping.md +docs/SubactionParameters.md +docs/UpdateConnector400Response.md +docs/UpdateConnectorRequestBodyProperties.md +docs/UpdateConnectorRequestCasesWebhook.md +docs/UpdateConnectorRequestIndex.md +docs/UpdateConnectorRequestJira.md +docs/UpdateConnectorRequestOpsgenie.md +docs/UpdateConnectorRequestResilient.md +docs/UpdateConnectorRequestServerlog.md +docs/UpdateConnectorRequestServicenow.md +docs/UpdateConnectorRequestServicenowItom.md +docs/UpdateConnectorRequestSwimlane.md +git_push.sh +go.mod +go.sum +model_401_response.go +model_404_response.go +model_action_response_properties.go +model_alert_identifier_mapping.go +model_case_comment_mapping.go +model_case_description_mapping.go +model_case_identifier_mapping.go +model_case_name_mapping.go +model_config_properties_cases_webhook.go +model_config_properties_index.go +model_config_properties_jira.go +model_config_properties_opsgenie.go +model_config_properties_resilient.go +model_config_properties_servicenow.go +model_config_properties_servicenow_itom.go +model_config_properties_swimlane.go +model_connector_mappings_properties_for_a_swimlane_connector.go +model_connector_response_properties.go +model_connector_response_properties_cases_webhook.go +model_connector_response_properties_email.go +model_connector_response_properties_index.go +model_connector_response_properties_jira.go +model_connector_response_properties_opsgenie.go +model_connector_response_properties_pagerduty.go +model_connector_response_properties_resilient.go +model_connector_response_properties_serverlog.go +model_connector_response_properties_servicenow.go +model_connector_response_properties_servicenow_itom.go +model_connector_response_properties_servicenow_sir.go +model_connector_response_properties_slack.go +model_connector_response_properties_swimlane.go +model_connector_response_properties_teams.go +model_connector_response_properties_tines.go +model_connector_response_properties_webhook.go +model_connector_response_properties_xmatters.go +model_connector_types.go +model_create_connector_request_body_properties.go +model_create_connector_request_cases_webhook.go +model_create_connector_request_email.go +model_create_connector_request_index.go +model_create_connector_request_jira.go +model_create_connector_request_opsgenie.go +model_create_connector_request_pagerduty.go +model_create_connector_request_resilient.go +model_create_connector_request_serverlog.go +model_create_connector_request_servicenow.go +model_create_connector_request_servicenow_itom.go +model_create_connector_request_servicenow_sir.go +model_create_connector_request_slack.go +model_create_connector_request_swimlane.go +model_create_connector_request_teams.go +model_create_connector_request_tines.go +model_create_connector_request_webhook.go +model_create_connector_request_xmatters.go +model_features.go +model_get_connector_404_response.go +model_get_connector_types_response_body_properties_inner.go +model_get_connectors_response_body_properties.go +model_legacy_create_connector_request_properties.go +model_legacy_get_connector_types_response_body_properties_inner.go +model_legacy_run_connector_200_response.go +model_legacy_run_connector_request_body_properties.go +model_legacy_update_connector_request_body_properties.go +model_rule_name_mapping.go +model_run_connector_200_response.go +model_run_connector_200_response_data.go +model_run_connector_params_documents.go +model_run_connector_params_level_message.go +model_run_connector_request_body_properties.go +model_run_connector_request_body_properties_params.go +model_run_connector_subaction_addevent.go +model_run_connector_subaction_addevent_sub_action_params.go +model_run_connector_subaction_closealert.go +model_run_connector_subaction_closealert_sub_action_params.go +model_run_connector_subaction_createalert.go +model_run_connector_subaction_createalert_sub_action_params.go +model_run_connector_subaction_createalert_sub_action_params_responders_inner.go +model_run_connector_subaction_createalert_sub_action_params_visible_to_inner.go +model_run_connector_subaction_fieldsbyissuetype.go +model_run_connector_subaction_fieldsbyissuetype_sub_action_params.go +model_run_connector_subaction_getchoices.go +model_run_connector_subaction_getchoices_sub_action_params.go +model_run_connector_subaction_getfields.go +model_run_connector_subaction_getincident.go +model_run_connector_subaction_getincident_sub_action_params.go +model_run_connector_subaction_issue.go +model_run_connector_subaction_issue_sub_action_params.go +model_run_connector_subaction_issues.go +model_run_connector_subaction_issues_sub_action_params.go +model_run_connector_subaction_issuetypes.go +model_run_connector_subaction_pushtoservice.go +model_run_connector_subaction_pushtoservice_sub_action_params.go +model_run_connector_subaction_pushtoservice_sub_action_params_comments_inner.go +model_run_connector_subaction_pushtoservice_sub_action_params_incident.go +model_run_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go +model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go +model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go +model_run_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go +model_secrets_properties_cases_webhook.go +model_secrets_properties_jira.go +model_secrets_properties_opsgenie.go +model_secrets_properties_resilient.go +model_secrets_properties_servicenow.go +model_secrets_properties_swimlane.go +model_severity_mapping.go +model_subaction_parameters.go +model_update_connector_400_response.go +model_update_connector_request_body_properties.go +model_update_connector_request_cases_webhook.go +model_update_connector_request_index.go +model_update_connector_request_jira.go +model_update_connector_request_opsgenie.go +model_update_connector_request_resilient.go +model_update_connector_request_serverlog.go +model_update_connector_request_servicenow.go +model_update_connector_request_servicenow_itom.go +model_update_connector_request_swimlane.go +response.go +test/api_connectors_test.go +utils.go diff --git a/generated/kibanaactions/.openapi-generator/VERSION b/generated/kibanaactions/.openapi-generator/VERSION new file mode 100644 index 000000000..c0be8a799 --- /dev/null +++ b/generated/kibanaactions/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.4.0 \ No newline at end of file diff --git a/generated/kibanaactions/.travis.yml b/generated/kibanaactions/.travis.yml new file mode 100644 index 000000000..f5cb2ce9a --- /dev/null +++ b/generated/kibanaactions/.travis.yml @@ -0,0 +1,8 @@ +language: go + +install: + - go get -d -v . + +script: + - go build -v ./ + diff --git a/generated/kibanaactions/README.md b/generated/kibanaactions/README.md new file mode 100644 index 000000000..a6dccfbf2 --- /dev/null +++ b/generated/kibanaactions/README.md @@ -0,0 +1,264 @@ +# Go API client for kibanaactions + +OpenAPI schema for Connectors endpoints + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 0.1 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.GoClientCodegen + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import kibanaactions "github.com/elastic/terraform-provider-elasticstack/kibanaactions" +``` + +To use a proxy, set the environment variable `HTTP_PROXY`: + +```golang +os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") +``` + +## Configuration of Server URL + +Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. + +### Select Server Configuration + +For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. + +```golang +ctx := context.WithValue(context.Background(), kibanaactions.ContextServerIndex, 1) +``` + +### Templated Server URL + +Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. + +```golang +ctx := context.WithValue(context.Background(), kibanaactions.ContextServerVariables, map[string]string{ + "basePath": "v2", +}) +``` + +Note, enum values are always validated and all unused variables are silently ignored. + +### URLs Configuration per Operation + +Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. +An operation is uniquely identified by `"{classname}Service.{nickname}"` string. +Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. + +```golang +ctx := context.WithValue(context.Background(), kibanaactions.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), kibanaactions.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost:5601* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ConnectorsApi* | [**CreateConnector**](docs/ConnectorsApi.md#createconnector) | **Post** /s/{spaceId}/api/actions/connector | Creates a connector. +*ConnectorsApi* | [**DeleteConnector**](docs/ConnectorsApi.md#deleteconnector) | **Delete** /s/{spaceId}/api/actions/connector/{connectorId} | Deletes a connector. +*ConnectorsApi* | [**GetConnector**](docs/ConnectorsApi.md#getconnector) | **Get** /s/{spaceId}/api/actions/connector/{connectorId} | Retrieves a connector by ID. +*ConnectorsApi* | [**GetConnectorTypes**](docs/ConnectorsApi.md#getconnectortypes) | **Get** /s/{spaceId}/api/actions/connector_types | Retrieves a list of all connector types. +*ConnectorsApi* | [**GetConnectors**](docs/ConnectorsApi.md#getconnectors) | **Get** /s/{spaceId}/api/actions/connectors | Retrieves all connectors. +*ConnectorsApi* | [**LegacyCreateConnector**](docs/ConnectorsApi.md#legacycreateconnector) | **Post** /s/{spaceId}/api/actions | Creates a connector. +*ConnectorsApi* | [**LegacyDeleteConnector**](docs/ConnectorsApi.md#legacydeleteconnector) | **Delete** /s/{spaceId}/api/actions/action/{actionId} | Deletes a connector. +*ConnectorsApi* | [**LegacyGetConnector**](docs/ConnectorsApi.md#legacygetconnector) | **Get** /s/{spaceId}/api/actions/action/{actionId} | Retrieves a connector by ID. +*ConnectorsApi* | [**LegacyGetConnectorTypes**](docs/ConnectorsApi.md#legacygetconnectortypes) | **Get** /s/{spaceId}/api/actions/list_action_types | Retrieves a list of all connector types. +*ConnectorsApi* | [**LegacyGetConnectors**](docs/ConnectorsApi.md#legacygetconnectors) | **Get** /s/{spaceId}/api/actions | Retrieves all connectors. +*ConnectorsApi* | [**LegacyRunConnector**](docs/ConnectorsApi.md#legacyrunconnector) | **Post** /s/{spaceId}/api/actions/action/{actionId}/_execute | Runs a connector. +*ConnectorsApi* | [**LegacyUpdateConnector**](docs/ConnectorsApi.md#legacyupdateconnector) | **Put** /s/{spaceId}/api/actions/action/{actionId} | Updates the attributes for a connector. +*ConnectorsApi* | [**RunConnector**](docs/ConnectorsApi.md#runconnector) | **Post** /s/{spaceId}/api/actions/connector/{connectorId}/_execute | Runs a connector. +*ConnectorsApi* | [**UpdateConnector**](docs/ConnectorsApi.md#updateconnector) | **Put** /s/{spaceId}/api/actions/connector/{connectorId} | Updates the attributes for a connector. + + +## Documentation For Models + + - [ActionResponseProperties](docs/ActionResponseProperties.md) + - [AlertIdentifierMapping](docs/AlertIdentifierMapping.md) + - [CaseCommentMapping](docs/CaseCommentMapping.md) + - [CaseDescriptionMapping](docs/CaseDescriptionMapping.md) + - [CaseIdentifierMapping](docs/CaseIdentifierMapping.md) + - [CaseNameMapping](docs/CaseNameMapping.md) + - [ConfigPropertiesCasesWebhook](docs/ConfigPropertiesCasesWebhook.md) + - [ConfigPropertiesIndex](docs/ConfigPropertiesIndex.md) + - [ConfigPropertiesJira](docs/ConfigPropertiesJira.md) + - [ConfigPropertiesOpsgenie](docs/ConfigPropertiesOpsgenie.md) + - [ConfigPropertiesResilient](docs/ConfigPropertiesResilient.md) + - [ConfigPropertiesServicenow](docs/ConfigPropertiesServicenow.md) + - [ConfigPropertiesServicenowItom](docs/ConfigPropertiesServicenowItom.md) + - [ConfigPropertiesSwimlane](docs/ConfigPropertiesSwimlane.md) + - [ConnectorMappingsPropertiesForASwimlaneConnector](docs/ConnectorMappingsPropertiesForASwimlaneConnector.md) + - [ConnectorResponseProperties](docs/ConnectorResponseProperties.md) + - [ConnectorResponsePropertiesCasesWebhook](docs/ConnectorResponsePropertiesCasesWebhook.md) + - [ConnectorResponsePropertiesEmail](docs/ConnectorResponsePropertiesEmail.md) + - [ConnectorResponsePropertiesIndex](docs/ConnectorResponsePropertiesIndex.md) + - [ConnectorResponsePropertiesJira](docs/ConnectorResponsePropertiesJira.md) + - [ConnectorResponsePropertiesOpsgenie](docs/ConnectorResponsePropertiesOpsgenie.md) + - [ConnectorResponsePropertiesPagerduty](docs/ConnectorResponsePropertiesPagerduty.md) + - [ConnectorResponsePropertiesResilient](docs/ConnectorResponsePropertiesResilient.md) + - [ConnectorResponsePropertiesServerlog](docs/ConnectorResponsePropertiesServerlog.md) + - [ConnectorResponsePropertiesServicenow](docs/ConnectorResponsePropertiesServicenow.md) + - [ConnectorResponsePropertiesServicenowItom](docs/ConnectorResponsePropertiesServicenowItom.md) + - [ConnectorResponsePropertiesServicenowSir](docs/ConnectorResponsePropertiesServicenowSir.md) + - [ConnectorResponsePropertiesSlack](docs/ConnectorResponsePropertiesSlack.md) + - [ConnectorResponsePropertiesSwimlane](docs/ConnectorResponsePropertiesSwimlane.md) + - [ConnectorResponsePropertiesTeams](docs/ConnectorResponsePropertiesTeams.md) + - [ConnectorResponsePropertiesTines](docs/ConnectorResponsePropertiesTines.md) + - [ConnectorResponsePropertiesWebhook](docs/ConnectorResponsePropertiesWebhook.md) + - [ConnectorResponsePropertiesXmatters](docs/ConnectorResponsePropertiesXmatters.md) + - [ConnectorTypes](docs/ConnectorTypes.md) + - [CreateConnectorRequestBodyProperties](docs/CreateConnectorRequestBodyProperties.md) + - [CreateConnectorRequestCasesWebhook](docs/CreateConnectorRequestCasesWebhook.md) + - [CreateConnectorRequestEmail](docs/CreateConnectorRequestEmail.md) + - [CreateConnectorRequestIndex](docs/CreateConnectorRequestIndex.md) + - [CreateConnectorRequestJira](docs/CreateConnectorRequestJira.md) + - [CreateConnectorRequestOpsgenie](docs/CreateConnectorRequestOpsgenie.md) + - [CreateConnectorRequestPagerduty](docs/CreateConnectorRequestPagerduty.md) + - [CreateConnectorRequestResilient](docs/CreateConnectorRequestResilient.md) + - [CreateConnectorRequestServerlog](docs/CreateConnectorRequestServerlog.md) + - [CreateConnectorRequestServicenow](docs/CreateConnectorRequestServicenow.md) + - [CreateConnectorRequestServicenowItom](docs/CreateConnectorRequestServicenowItom.md) + - [CreateConnectorRequestServicenowSir](docs/CreateConnectorRequestServicenowSir.md) + - [CreateConnectorRequestSlack](docs/CreateConnectorRequestSlack.md) + - [CreateConnectorRequestSwimlane](docs/CreateConnectorRequestSwimlane.md) + - [CreateConnectorRequestTeams](docs/CreateConnectorRequestTeams.md) + - [CreateConnectorRequestTines](docs/CreateConnectorRequestTines.md) + - [CreateConnectorRequestWebhook](docs/CreateConnectorRequestWebhook.md) + - [CreateConnectorRequestXmatters](docs/CreateConnectorRequestXmatters.md) + - [Features](docs/Features.md) + - [GetConnector404Response](docs/GetConnector404Response.md) + - [GetConnectorTypesResponseBodyPropertiesInner](docs/GetConnectorTypesResponseBodyPropertiesInner.md) + - [GetConnectorsResponseBodyProperties](docs/GetConnectorsResponseBodyProperties.md) + - [LegacyCreateConnectorRequestProperties](docs/LegacyCreateConnectorRequestProperties.md) + - [LegacyGetConnectorTypesResponseBodyPropertiesInner](docs/LegacyGetConnectorTypesResponseBodyPropertiesInner.md) + - [LegacyRunConnector200Response](docs/LegacyRunConnector200Response.md) + - [LegacyRunConnectorRequestBodyProperties](docs/LegacyRunConnectorRequestBodyProperties.md) + - [LegacyUpdateConnectorRequestBodyProperties](docs/LegacyUpdateConnectorRequestBodyProperties.md) + - [Model401Response](docs/Model401Response.md) + - [Model404Response](docs/Model404Response.md) + - [RuleNameMapping](docs/RuleNameMapping.md) + - [RunConnector200Response](docs/RunConnector200Response.md) + - [RunConnector200ResponseData](docs/RunConnector200ResponseData.md) + - [RunConnectorParamsDocuments](docs/RunConnectorParamsDocuments.md) + - [RunConnectorParamsLevelMessage](docs/RunConnectorParamsLevelMessage.md) + - [RunConnectorRequestBodyProperties](docs/RunConnectorRequestBodyProperties.md) + - [RunConnectorRequestBodyPropertiesParams](docs/RunConnectorRequestBodyPropertiesParams.md) + - [RunConnectorSubactionAddevent](docs/RunConnectorSubactionAddevent.md) + - [RunConnectorSubactionAddeventSubActionParams](docs/RunConnectorSubactionAddeventSubActionParams.md) + - [RunConnectorSubactionClosealert](docs/RunConnectorSubactionClosealert.md) + - [RunConnectorSubactionClosealertSubActionParams](docs/RunConnectorSubactionClosealertSubActionParams.md) + - [RunConnectorSubactionCreatealert](docs/RunConnectorSubactionCreatealert.md) + - [RunConnectorSubactionCreatealertSubActionParams](docs/RunConnectorSubactionCreatealertSubActionParams.md) + - [RunConnectorSubactionCreatealertSubActionParamsRespondersInner](docs/RunConnectorSubactionCreatealertSubActionParamsRespondersInner.md) + - [RunConnectorSubactionCreatealertSubActionParamsVisibleToInner](docs/RunConnectorSubactionCreatealertSubActionParamsVisibleToInner.md) + - [RunConnectorSubactionFieldsbyissuetype](docs/RunConnectorSubactionFieldsbyissuetype.md) + - [RunConnectorSubactionFieldsbyissuetypeSubActionParams](docs/RunConnectorSubactionFieldsbyissuetypeSubActionParams.md) + - [RunConnectorSubactionGetchoices](docs/RunConnectorSubactionGetchoices.md) + - [RunConnectorSubactionGetchoicesSubActionParams](docs/RunConnectorSubactionGetchoicesSubActionParams.md) + - [RunConnectorSubactionGetfields](docs/RunConnectorSubactionGetfields.md) + - [RunConnectorSubactionGetincident](docs/RunConnectorSubactionGetincident.md) + - [RunConnectorSubactionGetincidentSubActionParams](docs/RunConnectorSubactionGetincidentSubActionParams.md) + - [RunConnectorSubactionIssue](docs/RunConnectorSubactionIssue.md) + - [RunConnectorSubactionIssueSubActionParams](docs/RunConnectorSubactionIssueSubActionParams.md) + - [RunConnectorSubactionIssues](docs/RunConnectorSubactionIssues.md) + - [RunConnectorSubactionIssuesSubActionParams](docs/RunConnectorSubactionIssuesSubActionParams.md) + - [RunConnectorSubactionIssuetypes](docs/RunConnectorSubactionIssuetypes.md) + - [RunConnectorSubactionPushtoservice](docs/RunConnectorSubactionPushtoservice.md) + - [RunConnectorSubactionPushtoserviceSubActionParams](docs/RunConnectorSubactionPushtoserviceSubActionParams.md) + - [RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner](docs/RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner.md) + - [RunConnectorSubactionPushtoserviceSubActionParamsIncident](docs/RunConnectorSubactionPushtoserviceSubActionParamsIncident.md) + - [RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp](docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md) + - [RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash](docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md) + - [RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl](docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md) + - [RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp](docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md) + - [SecretsPropertiesCasesWebhook](docs/SecretsPropertiesCasesWebhook.md) + - [SecretsPropertiesJira](docs/SecretsPropertiesJira.md) + - [SecretsPropertiesOpsgenie](docs/SecretsPropertiesOpsgenie.md) + - [SecretsPropertiesResilient](docs/SecretsPropertiesResilient.md) + - [SecretsPropertiesServicenow](docs/SecretsPropertiesServicenow.md) + - [SecretsPropertiesSwimlane](docs/SecretsPropertiesSwimlane.md) + - [SeverityMapping](docs/SeverityMapping.md) + - [SubactionParameters](docs/SubactionParameters.md) + - [UpdateConnector400Response](docs/UpdateConnector400Response.md) + - [UpdateConnectorRequestBodyProperties](docs/UpdateConnectorRequestBodyProperties.md) + - [UpdateConnectorRequestCasesWebhook](docs/UpdateConnectorRequestCasesWebhook.md) + - [UpdateConnectorRequestIndex](docs/UpdateConnectorRequestIndex.md) + - [UpdateConnectorRequestJira](docs/UpdateConnectorRequestJira.md) + - [UpdateConnectorRequestOpsgenie](docs/UpdateConnectorRequestOpsgenie.md) + - [UpdateConnectorRequestResilient](docs/UpdateConnectorRequestResilient.md) + - [UpdateConnectorRequestServerlog](docs/UpdateConnectorRequestServerlog.md) + - [UpdateConnectorRequestServicenow](docs/UpdateConnectorRequestServicenow.md) + - [UpdateConnectorRequestServicenowItom](docs/UpdateConnectorRequestServicenowItom.md) + - [UpdateConnectorRequestSwimlane](docs/UpdateConnectorRequestSwimlane.md) + + +## Documentation For Authorization + + + +### basicAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +### apiKeyAuth + +- **Type**: API key +- **API key parameter name**: ApiKey +- **Location**: HTTP header + +Note, each API key must be added to a map of `map[string]APIKey` where the key is: ApiKey and passed in as the auth context for each request. + + +## Documentation for Utility Methods + +Due to the fact that model structure members are all pointers, this package contains +a number of utility functions to easily obtain pointers to values of basic types. +Each of these functions takes a value of the given basic type and returns a pointer to it: + +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` + +## Author + + + diff --git a/generated/kibanaactions/api/openapi.yaml b/generated/kibanaactions/api/openapi.yaml new file mode 100644 index 000000000..22c2ea871 --- /dev/null +++ b/generated/kibanaactions/api/openapi.yaml @@ -0,0 +1,3853 @@ +openapi: 3.0.1 +info: + contact: + name: Connectors Team + description: OpenAPI schema for Connectors endpoints + license: + name: Elastic License 2.0 + url: https://www.elastic.co/licensing/elastic-license + title: Connectors + version: "0.1" +servers: +- description: local + url: http://localhost:5601 +security: +- basicAuth: [] +- apiKeyAuth: [] +tags: +- description: Connector APIs enable you to create and manage connectors. + name: connectors +paths: + /s/{spaceId}/api/actions/connector: + post: + description: | + You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + operationId: createConnector + parameters: + - description: Cross-site request forgery protection + explode: false + in: header + name: kbn-xsrf + required: true + schema: + type: string + style: simple + - description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + requestBody: + content: + application/json: + examples: + createIndexConnectorRequest: + $ref: '#/components/examples/create_index_connector_request' + value: null + schema: + $ref: '#/components/schemas/Create_connector_request_body_properties' + required: true + responses: + "200": + content: + application/json: + examples: + createIndexConnectorResponse: + $ref: '#/components/examples/create_index_connector_response' + value: null + schema: + $ref: '#/components/schemas/connector_response_properties' + description: Indicates a successful call. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + description: Authorization information is missing or invalid. + servers: + - url: https://localhost:5601 + summary: Creates a connector. + tags: + - connectors + servers: + - url: https://localhost:5601 + /s/{spaceId}/api/actions/connector/{connectorId}: + delete: + description: | + You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be recovered. + operationId: deleteConnector + parameters: + - description: Cross-site request forgery protection + explode: false + in: header + name: kbn-xsrf + required: true + schema: + type: string + style: simple + - description: An identifier for the connector. + explode: false + in: path + name: connectorId + required: true + schema: + example: df770e30-8b8b-11ed-a780-3b746c987a81 + type: string + style: simple + - description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + responses: + "204": + description: Indicates a successful call. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + description: Authorization information is missing or invalid. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/getConnector_404_response' + description: Object is not found. + servers: + - url: https://localhost:5601 + summary: Deletes a connector. + tags: + - connectors + get: + description: | + You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + operationId: getConnector + parameters: + - description: An identifier for the connector. + explode: false + in: path + name: connectorId + required: true + schema: + example: df770e30-8b8b-11ed-a780-3b746c987a81 + type: string + style: simple + - description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + responses: + "200": + content: + application/json: + examples: + getConnectorResponse: + $ref: '#/components/examples/get_connector_response' + value: null + schema: + $ref: '#/components/schemas/connector_response_properties' + description: Indicates a successful call. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + description: Authorization information is missing or invalid. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/getConnector_404_response' + description: Object is not found. + servers: + - url: https://localhost:5601 + summary: Retrieves a connector by ID. + tags: + - connectors + put: + description: | + You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + operationId: updateConnector + parameters: + - description: Cross-site request forgery protection + explode: false + in: header + name: kbn-xsrf + required: true + schema: + type: string + style: simple + - description: An identifier for the connector. + explode: false + in: path + name: connectorId + required: true + schema: + example: df770e30-8b8b-11ed-a780-3b746c987a81 + type: string + style: simple + - description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + requestBody: + content: + application/json: + examples: + updateIndexConnectorRequest: + $ref: '#/components/examples/update_index_connector_request' + value: null + schema: + $ref: '#/components/schemas/Update_connector_request_body_properties' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/connector_response_properties' + description: Indicates a successful call. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/updateConnector_400_response' + description: Indicates a bad request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + description: Authorization information is missing or invalid. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/404_response' + description: Object is not found. + servers: + - url: https://localhost:5601 + summary: Updates the attributes for a connector. + tags: + - connectors + servers: + - url: https://localhost:5601 + /s/{spaceId}/api/actions/connectors: + get: + description: | + You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + operationId: getConnectors + parameters: + - description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + responses: + "200": + content: + application/json: + examples: + getConnectorsResponse: + $ref: '#/components/examples/get_connectors_response' + value: null + schema: + items: + $ref: '#/components/schemas/Get_connectors_response_body_properties' + type: array + description: Indicates a successful call. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + description: Authorization information is missing or invalid. + servers: + - url: https://localhost:5601 + summary: Retrieves all connectors. + tags: + - connectors + servers: + - url: https://localhost:5601 + /s/{spaceId}/api/actions/connector_types: + get: + description: | + You do not need any Kibana feature privileges to run this API. + operationId: getConnectorTypes + parameters: + - description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + - description: A filter to limit the retrieved connector types to those that + support a specific feature (such as alerting or cases). + explode: true + in: query + name: feature_id + required: false + schema: + $ref: '#/components/schemas/features' + style: form + responses: + "200": + content: + application/json: + examples: + getConnectorTypesResponse: + $ref: '#/components/examples/get_connector_types_response' + value: null + schema: + description: The properties vary for each connector type. + items: + $ref: '#/components/schemas/Get_connector_types_response_body_properties_inner' + title: Get connector types response body properties + type: array + description: Indicates a successful call. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + description: Authorization information is missing or invalid. + servers: + - url: https://localhost:5601 + summary: Retrieves a list of all connector types. + tags: + - connectors + servers: + - url: https://localhost:5601 + /s/{spaceId}/api/actions/connector/{connectorId}/_execute: + post: + description: | + You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. If you use an index connector, you must also have `all`, `create`, `index`, or `write` indices privileges. + operationId: runConnector + parameters: + - description: Cross-site request forgery protection + explode: false + in: header + name: kbn-xsrf + required: true + schema: + type: string + style: simple + - description: An identifier for the connector. + explode: false + in: path + name: connectorId + required: true + schema: + example: df770e30-8b8b-11ed-a780-3b746c987a81 + type: string + style: simple + - description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + requestBody: + content: + application/json: + examples: + runIndexConnectorRequest: + $ref: '#/components/examples/run_index_connector_request' + value: null + runJiraConnectorRequest: + $ref: '#/components/examples/run_jira_connector_request' + value: null + runServerLogConnectorRequest: + $ref: '#/components/examples/run_server_log_connector_request' + value: null + runServiceNowITOMConnectorRequest: + $ref: '#/components/examples/run_servicenow_itom_connector_request' + value: null + runSwimlaneConnectorRequest: + $ref: '#/components/examples/run_swimlane_connector_request' + value: null + schema: + $ref: '#/components/schemas/Run_connector_request_body_properties' + required: true + responses: + "200": + content: + application/json: + examples: + runIndexConnectorResponse: + $ref: '#/components/examples/run_index_connector_response' + value: null + runJiraConnectorResponse: + $ref: '#/components/examples/run_jira_connector_response' + value: null + runServerLogConnectorResponse: + $ref: '#/components/examples/run_server_log_connector_response' + value: null + runServiceNowITOMConnectorResponse: + $ref: '#/components/examples/run_servicenow_itom_connector_response' + value: null + runSwimlaneConnectorResponse: + $ref: '#/components/examples/run_swimlane_connector_response' + value: null + schema: + $ref: '#/components/schemas/runConnector_200_response' + description: Indicates a successful call. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + description: Authorization information is missing or invalid. + servers: + - url: https://localhost:5601 + summary: Runs a connector. + tags: + - connectors + servers: + - url: https://localhost:5601 + /s/{spaceId}/api/actions/action/{actionId}: + delete: + deprecated: true + description: | + Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, it cannot be recovered. + operationId: legacyDeleteConnector + parameters: + - description: Cross-site request forgery protection + explode: false + in: header + name: kbn-xsrf + required: true + schema: + type: string + style: simple + - description: An identifier for the action. + explode: false + in: path + name: actionId + required: true + schema: + example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad + type: string + style: simple + - description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + responses: + "204": + description: Indicates a successful call. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + description: Authorization information is missing or invalid. + servers: + - url: https://localhost:5601 + summary: Deletes a connector. + tags: + - connectors + get: + deprecated: true + description: Deprecated in 7.13.0. Use the get connector API instead. + operationId: legacyGetConnector + parameters: + - description: An identifier for the action. + explode: false + in: path + name: actionId + required: true + schema: + example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad + type: string + style: simple + - description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/action_response_properties' + description: Indicates a successful call. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + description: Authorization information is missing or invalid. + servers: + - url: https://localhost:5601 + summary: Retrieves a connector by ID. + tags: + - connectors + put: + deprecated: true + description: Deprecated in 7.13.0. Use the update connector API instead. + operationId: legacyUpdateConnector + parameters: + - description: Cross-site request forgery protection + explode: false + in: header + name: kbn-xsrf + required: true + schema: + type: string + style: simple + - description: An identifier for the action. + explode: false + in: path + name: actionId + required: true + schema: + example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad + type: string + style: simple + - description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Legacy_update_connector_request_body_properties' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/action_response_properties' + description: Indicates a successful call. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/404_response' + description: Object is not found. + servers: + - url: https://localhost:5601 + summary: Updates the attributes for a connector. + tags: + - connectors + servers: + - url: https://localhost:5601 + /s/{spaceId}/api/actions: + get: + deprecated: true + description: Deprecated in 7.13.0. Use the get all connectors API instead. + operationId: legacyGetConnectors + parameters: + - description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/action_response_properties' + type: array + description: Indicates a successful call. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + description: Authorization information is missing or invalid. + servers: + - url: https://localhost:5601 + summary: Retrieves all connectors. + tags: + - connectors + post: + deprecated: true + description: Deprecated in 7.13.0. Use the create connector API instead. + operationId: legacyCreateConnector + parameters: + - description: Cross-site request forgery protection + explode: false + in: header + name: kbn-xsrf + required: true + schema: + type: string + style: simple + - description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Legacy_create_connector_request_properties' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/action_response_properties' + description: Indicates a successful call. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + description: Authorization information is missing or invalid. + servers: + - url: https://localhost:5601 + summary: Creates a connector. + tags: + - connectors + servers: + - url: https://localhost:5601 + /s/{spaceId}/api/actions/list_action_types: + get: + deprecated: true + description: Deprecated in 7.13.0. Use the get all connector types API instead. + operationId: legacyGetConnectorTypes + parameters: + - description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + description: The properties vary for each connector type. + items: + $ref: '#/components/schemas/Legacy_get_connector_types_response_body_properties_inner' + title: Legacy get connector types response body properties + type: array + description: Indicates a successful call. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + description: Authorization information is missing or invalid. + servers: + - url: https://localhost:5601 + summary: Retrieves a list of all connector types. + tags: + - connectors + servers: + - url: https://localhost:5601 + /s/{spaceId}/api/actions/action/{actionId}/_execute: + post: + deprecated: true + description: Deprecated in 7.13.0. Use the run connector API instead. + operationId: legacyRunConnector + parameters: + - description: Cross-site request forgery protection + explode: false + in: header + name: kbn-xsrf + required: true + schema: + type: string + style: simple + - description: An identifier for the action. + explode: false + in: path + name: actionId + required: true + schema: + example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad + type: string + style: simple + - description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Legacy_run_connector_request_body_properties' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/legacyRunConnector_200_response' + description: Indicates a successful call. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + description: Authorization information is missing or invalid. + servers: + - url: https://localhost:5601 + summary: Runs a connector. + tags: + - connectors + servers: + - url: https://localhost:5601 +components: + examples: + create_index_connector_request: + summary: Create an index connector. + value: + name: my-connector + connector_type_id: .index + config: + index: test-index + create_index_connector_response: + summary: A new index connector. + value: + id: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad + connector_type_id: .index + name: my-connector + config: + index: test-index + refresh: false + executionTimeField: null + is_preconfigured: false + is_deprecated: false + is_missing_secrets: false + get_connector_response: + summary: A list of connector types + value: + id: df770e30-8b8b-11ed-a780-3b746c987a81 + name: my_server_log_connector + config: {} + connector_type_id: .server-log + is_preconfigured: false + is_deprecated: false + is_missing_secrets: false + update_index_connector_request: + summary: Update an index connector. + value: + name: updated-connector + config: + index: updated-index + get_connectors_response: + summary: A list of connectors + value: + - id: preconfigured-email-connector + name: my-preconfigured-email-notification + connector_type_id: .email + is_preconfigured: true + is_deprecated: false + referenced_by_count: 0 + - id: e07d0c80-8b8b-11ed-a780-3b746c987a81 + name: my-index-connector + config: + index: test-index + refresh: false + executionTimeField: null + connector_type_id: .index + is_preconfigured: false + is_deprecated: false + referenced_by_count: 2 + is_missing_secrets: false + get_connector_types_response: + summary: A list of connector types + value: + - id: .swimlane + name: Swimlane + enabled: true + enabled_in_config: true + enabled_in_license: true + minimum_license_required: gold + supported_feature_ids: + - alerting + - cases + - siem + - id: .index + name: Index + enabled: true + enabled_in_config: true + enabled_in_license: true + minimum_license_required: basic + supported_feature_ids: + - alerting + - uptime + - siem + - id: .server-log + name: Server log + enabled: true + enabled_in_config: true + enabled_in_license: true + minimum_license_required: basic + supported_feature_ids: + - alerting + - uptime + run_index_connector_request: + summary: Run an index connector. + value: + params: + documents: + - id: my_doc_id + name: my_doc_name + message: "hello, world" + run_jira_connector_request: + summary: Run a Jira connector to retrieve the list of issue types. + value: + params: + subAction: issueTypes + run_server_log_connector_request: + summary: Run a server log connector. + value: + params: + level: warn + message: Test warning message. + run_servicenow_itom_connector_request: + summary: Run a ServiceNow ITOM connector to retrieve the list of choices. + value: + params: + subAction: getChoices + subActionParams: + fields: + - severity + - urgency + run_swimlane_connector_request: + summary: Run a Swimlane connector to create an incident. + value: + params: + subAction: pushToService + subActionParams: + comments: + - commentId: 1 + comment: A comment about the incident. + incident: + caseId: "1000" + caseName: Case name + description: Description of the incident. + run_index_connector_response: + summary: Response from running an index connector. + value: + connector_id: fd38c600-96a5-11ed-bb79-353b74189cba + data: + errors: false + items: + - create: + _id: 4JtvwYUBrcyxt2NnfW3y + _index: my-index + _primary_term: 1 + _seq_no: 0 + _shards: + failed: 0 + successful: 1 + total: 2 + _version: 1 + result: created + status: 201 + took: 135 + status: ok + run_jira_connector_response: + summary: Response from retrieving the list of issue types for a Jira connector. + value: + connector_id: b3aad810-edbe-11ec-82d1-11348ecbf4a6 + data: + - id: 10024 + name: Improvement + - id: 10006 + name: Task + - id: 10007 + name: Sub-task + - id: 10025 + name: New Feature + - id: 10023 + name: Bug + - id: 10000 + name: Epic + status: ok + run_server_log_connector_response: + summary: Response from running a server log connector. + value: + connector_id: 7fc7b9a0-ecc9-11ec-8736-e7d63118c907 + status: ok + run_servicenow_itom_connector_response: + summary: Response from retrieving the list of choices for a ServiceNow ITOM + connector. + value: + connector_id: 9d9be270-2fd2-11ed-b0e0-87533c532698 + data: + - dependent_value: "" + element: severity + label: Critical + value: 1 + - dependent_value: "" + element: severity + label: Major + value: 2 + - dependent_value: "" + element: severity + label: Minor + value: 3 + - dependent_value: "" + element: severity + label: Warning + value: 4 + - dependent_value: "" + element: severity + label: OK + value: 5 + - dependent_value: "" + element: severity + label: Clear + value: 0 + - dependent_value: "" + element: urgency + label: 1 - High + value: 1 + - dependent_value: "" + element: urgency + label: 2 - Medium + value: 2 + - dependent_value: "" + element: urgency + label: 3 - Low + value: 3 + status: ok + run_swimlane_connector_response: + summary: Response from creating a Swimlane incident. + value: + connector_id: a4746470-2f94-11ed-b0e0-87533c532698 + data: + id: aKPmBHWzmdRQtx6Mx + title: TEST-457 + url: https://elastic.swimlane.url.us/record/aNcL2xniGHGpa2AHb/aKPmBHWzmdRQtx6Mx + pushedDate: 2022-09-08T16:52:27.866Z + comments: + - commentId: 1 + pushedDate: 2022-09-08T16:52:27.865Z + status: ok + parameters: + kbn_xsrf: + description: Cross-site request forgery protection + explode: false + in: header + name: kbn-xsrf + required: true + schema: + type: string + style: simple + space_id: + description: "An identifier for the space. If `/s/` and the identifier are omitted\ + \ from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + connector_id: + description: An identifier for the connector. + explode: false + in: path + name: connectorId + required: true + schema: + example: df770e30-8b8b-11ed-a780-3b746c987a81 + type: string + style: simple + action_id: + description: An identifier for the action. + explode: false + in: path + name: actionId + required: true + schema: + example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad + type: string + style: simple + schemas: + config_properties_cases_webhook: + description: Defines properties for connectors when type is `.cases-webhook`. + properties: + createCommentJson: + description: | + A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. + example: "{\"body\":{\"[object Object]\":null}}" + type: string + createCommentMethod: + default: put + description: | + The REST API HTTP request method to create a case comment in the third-party system. Valid values are `patch`, `post`, and `put`. + enum: + - patch + - post + - put + type: string + createCommentUrl: + description: | + The REST API URL to create a case comment by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts setting`, add the hostname to the allowed hosts. + example: "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}/comment" + type: string + createIncidentJson: + description: | + A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. + example: "{\"fields\":{\"summary\":{\"[object Object]\":null},\"description\"\ + :{\"[object Object]\":null},\"labels\":{\"[object Object]\":null}}}" + type: string + createIncidentMethod: + default: post + description: | + The REST API HTTP request method to create a case in the third-party system. Valid values are `patch`, `post`, and `put`. + enum: + - patch + - post + - put + type: string + createIncidentResponseKey: + description: The JSON key in the create case response that contains the + external case ID. + type: string + createIncidentUrl: + description: | + The REST API URL to create a case in the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. + type: string + getIncidentResponseExternalTitleKey: + description: The JSON key in get case response that contains the external + case title. + type: string + getIncidentUrl: + description: | + The REST API URL to get the case by ID from the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. You can use a variable to add the external system ID to the URL. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. + example: "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}" + type: string + hasAuth: + default: true + description: "If true, a username and password for login type authentication\ + \ must be provided." + type: boolean + headers: + description: | + A set of key-value pairs sent as headers with the request URLs for the create case, update case, get case, and create comment methods. + type: string + updateIncidentJson: + description: | + The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. + example: "{\"fields\":{\"summary\":{\"[object Object]\":null},\"description\"\ + :{\"[object Object]\":null},\"labels\":{\"[object Object]\":null}}}" + type: string + updateIncidentMethod: + default: put + description: | + The REST API HTTP request method to update the case in the third-party system. Valid values are `patch`, `post`, and `put`. + enum: + - patch + - post + - put + type: string + updateIncidentUrl: + description: | + The REST API URL to update the case by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. + example: "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.ID}}}" + type: string + viewIncidentUrl: + description: | + The URL to view the case in the external system. You can use variables to add the external system ID or external system title to the URL. + example: "https://testing-jira.atlassian.net/browse/{{{external.system.title}}}" + type: string + required: + - createIncidentJson + - createIncidentResponseKey + - createIncidentUrl + - getIncidentResponseExternalTitleKey + - getIncidentUrl + - updateIncidentJson + - updateIncidentUrl + - viewIncidentUrl + title: Connector request properties for Webhook - Case Management connector + type: object + secrets_properties_cases_webhook: + properties: + password: + description: "The password for HTTP basic authentication. If `hasAuth` is\ + \ set to `true`, this property is required." + type: string + user: + description: "The username for HTTP basic authentication. If `hasAuth` is\ + \ set to `true`, this property is required." + type: string + title: Connector secrets properties for Webhook - Case Management connector + type: object + create_connector_request_cases_webhook: + description: | + The Webhook - Case Management connector uses axios to send POST, PUT, and GET requests to a case management RESTful API web service. + properties: + config: + $ref: '#/components/schemas/config_properties_cases_webhook' + connector_type_id: + description: The type of connector. + enum: + - .cases-webhook + example: .cases-webhook + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/secrets_properties_cases_webhook' + required: + - config + - connector_type_id + - name + title: Create Webhook - Case Managment connector request + type: object + config_properties_email: + additionalProperties: true + description: Defines properties for connectors when type is `.email`. + title: Connector request properties for an email connector + type: object + secrets_properties_email: + additionalProperties: true + description: Defines secrets for connectors when type is `.email`. + title: Connector secrets properties for an email connector + type: object + create_connector_request_email: + description: | + The email connector uses the SMTP protocol to send mail messages, using an integration of Nodemailer. An exception is Microsoft Exchange, which uses HTTP protocol for sending emails, Send mail. Email message text is sent as both plain text and html text. + properties: + config: + additionalProperties: true + description: Defines properties for connectors when type is `.email`. + title: Connector request properties for an email connector + type: object + connector_type_id: + description: The type of connector. + enum: + - .email + example: .email + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + additionalProperties: true + description: Defines secrets for connectors when type is `.email`. + title: Connector secrets properties for an email connector + type: object + required: + - config + - connector_type_id + - name + - secrets + title: Create email connector request + type: object + config_properties_index: + description: Defines properties for connectors when type is `.index`. + properties: + executionTimeField: + description: Specifies a field that will contain the time the alert condition + was detected. + nullable: true + type: string + index: + description: The Elasticsearch index to be written to. + type: string + refresh: + default: false + description: | + The refresh policy for the write request, which affects when changes are made visible to search. Refer to the refresh setting for Elasticsearch document APIs. + type: boolean + required: + - index + title: Connector request properties for an index connector + type: object + create_connector_request_index: + description: The index connector indexes a document into Elasticsearch. + properties: + config: + $ref: '#/components/schemas/config_properties_index' + connector_type_id: + description: The type of connector. + enum: + - .index + example: .index + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + required: + - config + - connector_type_id + - name + title: Create index connector request + type: object + config_properties_jira: + description: Defines properties for connectors when type is `.jira`. + properties: + apiUrl: + description: The Jira instance URL. + type: string + projectKey: + description: The Jira project key. + type: string + required: + - apiUrl + - projectKey + title: Connector request properties for a Jira connector + type: object + secrets_properties_jira: + description: Defines secrets for connectors when type is `.jira`. + properties: + apiToken: + description: The Jira API authentication token for HTTP basic authentication. + type: string + email: + description: The account email for HTTP Basic authentication. + type: string + required: + - apiToken + - email + title: Connector secrets properties for a Jira connector + type: object + create_connector_request_jira: + description: The Jira connector uses the REST API v2 to create Jira issues. + properties: + config: + $ref: '#/components/schemas/config_properties_jira' + connector_type_id: + description: The type of connector. + enum: + - .jira + example: .jira + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/secrets_properties_jira' + required: + - config + - connector_type_id + - name + - secrets + title: Create Jira connector request + type: object + config_properties_opsgenie: + description: Defines properties for connectors when type is `.opsgenie`. + properties: + apiUrl: + description: | + The Opsgenie URL. For example, `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. + type: string + required: + - apiUrl + title: Connector request properties for an Opsgenie connector + type: object + secrets_properties_opsgenie: + description: Defines secrets for connectors when type is `.opsgenie`. + properties: + apiKey: + description: The Opsgenie API authentication key for HTTP Basic authentication. + type: string + required: + - apiKey + title: Connector secrets properties for an Opsgenie connector + type: object + create_connector_request_opsgenie: + description: The Opsgenie connector uses the Opsgenie alert API. + properties: + config: + $ref: '#/components/schemas/config_properties_opsgenie' + connector_type_id: + description: The type of connector. + enum: + - .opsgenie + example: .opsgenie + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/secrets_properties_opsgenie' + required: + - config + - connector_type_id + - name + - secrets + title: Create Opsgenie connector request + type: object + config_properties_pagerduty: + additionalProperties: true + description: Defines properties for connectors when type is `.pagerduty`. + title: Connector request properties for a PagerDuty connector + type: object + secrets_properties_pagerduty: + additionalProperties: true + description: Defines secrets for connectors when type is `.pagerduty`. + title: Connector secrets properties for a PagerDuty connector + type: object + create_connector_request_pagerduty: + description: | + The PagerDuty connector uses the v2 Events API to trigger, acknowledge, and resolve PagerDuty alerts. + properties: + config: + additionalProperties: true + description: Defines properties for connectors when type is `.pagerduty`. + title: Connector request properties for a PagerDuty connector + type: object + connector_type_id: + description: The type of connector. + enum: + - .pagerduty + example: .pagerduty + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + additionalProperties: true + description: Defines secrets for connectors when type is `.pagerduty`. + title: Connector secrets properties for a PagerDuty connector + type: object + required: + - config + - connector_type_id + - name + - secrets + title: Create PagerDuty connector request + type: object + config_properties_resilient: + description: Defines properties for connectors when type is `.resilient`. + properties: + apiUrl: + description: The IBM Resilient instance URL. + type: string + orgId: + description: The IBM Resilient organization ID. + type: string + required: + - apiUrl + - orgId + title: Connector request properties for a IBM Resilient connector + type: object + secrets_properties_resilient: + description: Defines secrets for connectors when type is `.resilient`. + properties: + apiKeyId: + description: The authentication key ID for HTTP Basic authentication. + type: string + apiKeySecret: + description: The authentication key secret for HTTP Basic authentication. + type: string + required: + - apiKeyId + - apiKeySecret + title: Connector secrets properties for IBM Resilient connector + type: object + create_connector_request_resilient: + description: The IBM Resilient connector uses the RESILIENT REST v2 to create + IBM Resilient incidents. + properties: + config: + $ref: '#/components/schemas/config_properties_resilient' + connector_type_id: + description: The type of connector. + enum: + - .resilient + example: .resilient + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/secrets_properties_resilient' + required: + - config + - connector_type_id + - name + - secrets + title: Create IBM Resilient connector request + type: object + create_connector_request_serverlog: + description: This connector writes an entry to the Kibana server log. + properties: + connector_type_id: + description: The type of connector. + enum: + - .server-log + example: .server-log + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + required: + - connector_type_id + - name + title: Create server log connector request + type: object + config_properties_servicenow: + description: Defines properties for connectors when type is `.servicenow`. + properties: + apiUrl: + description: The ServiceNow instance URL. + type: string + clientId: + description: | + The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. + type: string + isOAuth: + default: false + description: | + The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). + type: boolean + jwtKeyId: + description: | + The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. + type: string + userIdentifierValue: + description: | + The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. + type: string + usesTableApi: + default: true + description: | + Determines whether the connector uses the Table API or the Import Set API. This property is supported only for ServiceNow ITSM and ServiceNow SecOps connectors. NOTE: If this property is set to `false`, the Elastic application should be installed in ServiceNow. + type: boolean + required: + - apiUrl + title: Connector request properties for a ServiceNow ITSM connector + type: object + secrets_properties_servicenow: + description: "Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`,\ + \ or `.servicenow-itom`." + properties: + clientSecret: + description: The client secret assigned to your OAuth application. This + property is required when `isOAuth` is `true`. + type: string + password: + description: The password for HTTP basic authentication. This property is + required when `isOAuth` is `false`. + type: string + privateKey: + description: The RSA private key that you created for use in ServiceNow. + This property is required when `isOAuth` is `true`. + type: string + privateKeyPassword: + description: The password for the RSA private key. This property is required + when `isOAuth` is `true` and you set a password on your private key. + type: string + username: + description: The username for HTTP basic authentication. This property is + required when `isOAuth` is `false`. + type: string + title: "Connector secrets properties for ServiceNow ITOM, ServiceNow ITSM, and\ + \ ServiceNow SecOps connectors" + type: object + create_connector_request_servicenow: + description: | + The ServiceNow ITSM connector uses the import set API to create ServiceNow incidents. You can use the connector for rule actions and cases. + properties: + config: + $ref: '#/components/schemas/config_properties_servicenow' + connector_type_id: + description: The type of connector. + enum: + - .servicenow + example: .servicenow + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/secrets_properties_servicenow' + required: + - config + - connector_type_id + - name + - secrets + title: Create ServiceNow ITSM connector request + type: object + config_properties_servicenow_itom: + description: Defines properties for connectors when type is `.servicenow`. + properties: + apiUrl: + description: The ServiceNow instance URL. + type: string + clientId: + description: | + The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. + type: string + isOAuth: + default: false + description: | + The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). + type: boolean + jwtKeyId: + description: | + The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. + type: string + userIdentifierValue: + description: | + The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. + type: string + required: + - apiUrl + title: Connector request properties for a ServiceNow ITSM connector + type: object + create_connector_request_servicenow_itom: + description: | + The ServiceNow ITOM connector uses the event API to create ServiceNow events. You can use the connector for rule actions. + properties: + config: + $ref: '#/components/schemas/config_properties_servicenow_itom' + connector_type_id: + description: The type of connector. + enum: + - .servicenow-itom + example: .servicenow-itom + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/secrets_properties_servicenow' + required: + - config + - connector_type_id + - name + - secrets + title: Create ServiceNow ITOM connector request + type: object + create_connector_request_servicenow_sir: + description: | + The ServiceNow SecOps connector uses the import set API to create ServiceNow security incidents. You can use the connector for rule actions and cases. + properties: + config: + $ref: '#/components/schemas/config_properties_servicenow' + connector_type_id: + description: The type of connector. + enum: + - .servicenow-sir + example: .servicenow-sir + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/secrets_properties_servicenow' + required: + - config + - connector_type_id + - name + - secrets + title: Create ServiceNow SecOps connector request + type: object + secrets_properties_slack: + additionalProperties: true + description: Defines secrets for connectors when type is `.slack`. + title: Connector secrets properties for a Slack connector + type: object + create_connector_request_slack: + description: The Slack connector uses Slack Incoming Webhooks. + properties: + connector_type_id: + description: The type of connector. + enum: + - .slack + example: .slack + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + additionalProperties: true + description: Defines secrets for connectors when type is `.slack`. + title: Connector secrets properties for a Slack connector + type: object + required: + - connector_type_id + - name + - secrets + title: Create Slack connector request + type: object + config_properties_swimlane: + description: Defines properties for connectors when type is `.swimlane`. + properties: + apiUrl: + description: The Swimlane instance URL. + type: string + appId: + description: The Swimlane application ID. + type: string + connectorType: + description: "The type of connector. Valid values are `all`, `alerts`, and\ + \ `cases`." + enum: + - all + - alerts + - cases + type: string + mappings: + $ref: '#/components/schemas/Connector_mappings_properties_for_a_Swimlane_connector' + required: + - apiUrl + - appId + - connectorType + title: Connector request properties for a Swimlane connector + type: object + secrets_properties_swimlane: + description: Defines secrets for connectors when type is `.swimlane`. + properties: + apiToken: + description: Swimlane API authentication token. + type: string + title: Connector secrets properties for a Swimlane connector + type: object + create_connector_request_swimlane: + description: The Swimlane connector uses the Swimlane REST API to create Swimlane + records. + properties: + config: + $ref: '#/components/schemas/config_properties_swimlane' + connector_type_id: + description: The type of connector. + enum: + - .swimlane + example: .swimlane + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/secrets_properties_swimlane' + required: + - config + - connector_type_id + - name + - secrets + title: Create Swimlane connector request + type: object + secrets_properties_teams: + additionalProperties: true + description: Defines secrets for connectors when type is `.teams`. + title: Connector secrets properties for a Microsoft Teams connector + type: object + create_connector_request_teams: + description: The Microsoft Teams connector uses Incoming Webhooks. + properties: + connector_type_id: + description: The type of connector. + enum: + - .teams + example: .teams + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + additionalProperties: true + description: Defines secrets for connectors when type is `.teams`. + title: Connector secrets properties for a Microsoft Teams connector + type: object + required: + - connector_type_id + - name + - secrets + title: Create Microsoft Teams connector request + type: object + config_properties_tines: + additionalProperties: true + description: Defines properties for connectors when type is `.tines`. + title: Connector request properties for a Tines connector + type: object + secrets_properties_tines: + additionalProperties: true + description: Defines secrets for connectors when type is `.tines`. + title: Connector secrets properties for a Tines connector + type: object + create_connector_request_tines: + description: | + The Tines connector uses Tines Webhook actions to send events via POST request. + properties: + config: + additionalProperties: true + description: Defines properties for connectors when type is `.tines`. + title: Connector request properties for a Tines connector + type: object + connector_type_id: + description: The type of connector. + enum: + - .tines + example: .tines + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + additionalProperties: true + description: Defines secrets for connectors when type is `.tines`. + title: Connector secrets properties for a Tines connector + type: object + required: + - config + - connector_type_id + - name + - secrets + title: Create Tines connector request + type: object + config_properties_webhook: + additionalProperties: true + description: Defines properties for connectors when type is `.webhook`. + title: Connector request properties for a Webhook connector + type: object + secrets_properties_webhook: + additionalProperties: true + description: Defines secrets for connectors when type is `.webhook`. + title: Connector secrets properties for a Webhook connector + type: object + create_connector_request_webhook: + description: | + The Webhook connector uses axios to send a POST or PUT request to a web service. + properties: + config: + additionalProperties: true + description: Defines properties for connectors when type is `.webhook`. + title: Connector request properties for a Webhook connector + type: object + connector_type_id: + description: The type of connector. + enum: + - .webhook + example: .webhook + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + additionalProperties: true + description: Defines secrets for connectors when type is `.webhook`. + title: Connector secrets properties for a Webhook connector + type: object + required: + - config + - connector_type_id + - name + - secrets + title: Create Webhook connector request + type: object + config_properties_xmatters: + additionalProperties: true + description: Defines properties for connectors when type is `.xmatters`. + title: Connector request properties for a xMatters connector + type: object + secrets_properties_xmatters: + additionalProperties: true + description: Defines secrets for connectors when type is `.xmatters`. + title: Connector secrets properties for an xMatters connector + type: object + create_connector_request_xmatters: + description: | + The xMatters connector uses the xMatters Workflow for Elastic to send actionable alerts to on-call xMatters resources. + properties: + config: + additionalProperties: true + description: Defines properties for connectors when type is `.xmatters`. + title: Connector request properties for a xMatters connector + type: object + connector_type_id: + description: The type of connector. + enum: + - .xmatters + example: .xmatters + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + additionalProperties: true + description: Defines secrets for connectors when type is `.xmatters`. + title: Connector secrets properties for an xMatters connector + type: object + required: + - config + - connector_type_id + - name + - secrets + title: Create xMatters connector request + type: object + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true, the\ + \ `config` and `is_missing_secrets` properties are omitted from the response." + example: false + type: boolean + connector_response_properties_cases_webhook: + properties: + config: + $ref: '#/components/schemas/config_properties_cases_webhook' + connector_type_id: + description: The type of connector. + enum: + - .cases-webhook + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true,\ + \ the `config` and `is_missing_secrets` properties are omitted from the\ + \ response." + example: false + type: boolean + name: + description: The display name for the connector. + type: string + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + title: Connector request properties for a Webhook - Case Management connector + type: object + connector_response_properties_email: + properties: + config: + additionalProperties: true + description: Defines properties for connectors when type is `.email`. + title: Connector request properties for an email connector + type: object + connector_type_id: + description: The type of connector. + enum: + - .email + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true,\ + \ the `config` and `is_missing_secrets` properties are omitted from the\ + \ response." + example: false + type: boolean + name: + description: The display name for the connector. + type: string + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + title: Connector response properties for an email connector + type: object + connector_response_properties_index: + properties: + config: + $ref: '#/components/schemas/config_properties_index' + connector_type_id: + description: The type of connector. + enum: + - .index + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true,\ + \ the `config` and `is_missing_secrets` properties are omitted from the\ + \ response." + example: false + type: boolean + name: + description: The display name for the connector. + type: string + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + title: Connector response properties for an index connector + type: object + connector_response_properties_jira: + properties: + config: + $ref: '#/components/schemas/config_properties_jira' + connector_type_id: + description: The type of connector. + enum: + - .jira + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true,\ + \ the `config` and `is_missing_secrets` properties are omitted from the\ + \ response." + example: false + type: boolean + name: + description: The display name for the connector. + type: string + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + title: Connector response properties for a Jira connector + type: object + connector_response_properties_opsgenie: + properties: + config: + $ref: '#/components/schemas/config_properties_opsgenie' + connector_type_id: + description: The type of connector. + enum: + - .opsgenie + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true,\ + \ the `config` and `is_missing_secrets` properties are omitted from the\ + \ response." + example: false + type: boolean + name: + description: The display name for the connector. + type: string + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + title: Connector response properties for an Opsgenie connector + type: object + connector_response_properties_pagerduty: + properties: + config: + additionalProperties: true + description: Defines properties for connectors when type is `.pagerduty`. + title: Connector request properties for a PagerDuty connector + type: object + connector_type_id: + description: The type of connector. + enum: + - .pagerduty + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true,\ + \ the `config` and `is_missing_secrets` properties are omitted from the\ + \ response." + example: false + type: boolean + name: + description: The display name for the connector. + type: string + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + title: Connector response properties for a PagerDuty connector + type: object + connector_response_properties_resilient: + properties: + config: + $ref: '#/components/schemas/config_properties_resilient' + connector_type_id: + description: The type of connector. + enum: + - .resilient + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true,\ + \ the `config` and `is_missing_secrets` properties are omitted from the\ + \ response." + example: false + type: boolean + name: + description: The display name for the connector. + type: string + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + title: Connector response properties for a IBM Resilient connector + type: object + connector_response_properties_serverlog: + properties: + config: + nullable: true + type: object + connector_type_id: + description: The type of connector. + enum: + - .server-log + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true,\ + \ the `config` and `is_missing_secrets` properties are omitted from the\ + \ response." + example: false + type: boolean + name: + description: The display name for the connector. + type: string + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + title: Connector response properties for a server log connector + type: object + connector_response_properties_servicenow: + properties: + config: + $ref: '#/components/schemas/config_properties_servicenow' + connector_type_id: + description: The type of connector. + enum: + - .servicenow + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true,\ + \ the `config` and `is_missing_secrets` properties are omitted from the\ + \ response." + example: false + type: boolean + name: + description: The display name for the connector. + type: string + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + title: Connector response properties for a ServiceNow ITSM connector + type: object + connector_response_properties_servicenow_itom: + properties: + config: + $ref: '#/components/schemas/config_properties_servicenow_itom' + connector_type_id: + description: The type of connector. + enum: + - .servicenow-itom + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true,\ + \ the `config` and `is_missing_secrets` properties are omitted from the\ + \ response." + example: false + type: boolean + name: + description: The display name for the connector. + type: string + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + title: Connector response properties for a ServiceNow ITOM connector + type: object + connector_response_properties_servicenow_sir: + properties: + config: + $ref: '#/components/schemas/config_properties_servicenow' + connector_type_id: + description: The type of connector. + enum: + - .servicenow-sir + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true,\ + \ the `config` and `is_missing_secrets` properties are omitted from the\ + \ response." + example: false + type: boolean + name: + description: The display name for the connector. + type: string + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + title: Connector response properties for a ServiceNow SecOps connector + type: object + connector_response_properties_slack: + properties: + connector_type_id: + description: The type of connector. + enum: + - .slack + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true,\ + \ the `config` and `is_missing_secrets` properties are omitted from the\ + \ response." + example: false + type: boolean + name: + description: The display name for the connector. + type: string + required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + title: Connector response properties for a Slack connector + type: object + connector_response_properties_swimlane: + properties: + config: + $ref: '#/components/schemas/config_properties_swimlane' + connector_type_id: + description: The type of connector. + enum: + - .swimlane + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true,\ + \ the `config` and `is_missing_secrets` properties are omitted from the\ + \ response." + example: false + type: boolean + name: + description: The display name for the connector. + type: string + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + title: Connector response properties for a Swimlane connector + type: object + connector_response_properties_teams: + properties: + connector_type_id: + description: The type of connector. + enum: + - .teams + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true,\ + \ the `config` and `is_missing_secrets` properties are omitted from the\ + \ response." + example: false + type: boolean + name: + description: The display name for the connector. + type: string + required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + title: Connector response properties for a Microsoft Teams connector + type: object + connector_response_properties_tines: + properties: + config: + additionalProperties: true + description: Defines properties for connectors when type is `.tines`. + title: Connector request properties for a Tines connector + type: object + connector_type_id: + description: The type of connector. + enum: + - .tines + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true,\ + \ the `config` and `is_missing_secrets` properties are omitted from the\ + \ response." + example: false + type: boolean + name: + description: The display name for the connector. + type: string + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + title: Connector response properties for a Tines connector + type: object + connector_response_properties_webhook: + properties: + config: + additionalProperties: true + description: Defines properties for connectors when type is `.webhook`. + title: Connector request properties for a Webhook connector + type: object + connector_type_id: + description: The type of connector. + enum: + - .webhook + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true,\ + \ the `config` and `is_missing_secrets` properties are omitted from the\ + \ response." + example: false + type: boolean + name: + description: The display name for the connector. + type: string + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + title: Connector response properties for a Webhook connector + type: object + connector_response_properties_xmatters: + properties: + config: + additionalProperties: true + description: Defines properties for connectors when type is `.xmatters`. + title: Connector request properties for a xMatters connector + type: object + connector_type_id: + description: The type of connector. + enum: + - .xmatters + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true,\ + \ the `config` and `is_missing_secrets` properties are omitted from the\ + \ response." + example: false + type: boolean + name: + description: The display name for the connector. + type: string + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + title: Connector response properties for an xMatters connector + type: object + connector_response_properties: + description: The properties vary depending on the connector type. + discriminator: + propertyName: connector_type_id + oneOf: + - $ref: '#/components/schemas/connector_response_properties_cases_webhook' + - $ref: '#/components/schemas/connector_response_properties_email' + - $ref: '#/components/schemas/connector_response_properties_index' + - $ref: '#/components/schemas/connector_response_properties_jira' + - $ref: '#/components/schemas/connector_response_properties_opsgenie' + - $ref: '#/components/schemas/connector_response_properties_pagerduty' + - $ref: '#/components/schemas/connector_response_properties_resilient' + - $ref: '#/components/schemas/connector_response_properties_serverlog' + - $ref: '#/components/schemas/connector_response_properties_servicenow' + - $ref: '#/components/schemas/connector_response_properties_servicenow_itom' + - $ref: '#/components/schemas/connector_response_properties_servicenow_sir' + - $ref: '#/components/schemas/connector_response_properties_slack' + - $ref: '#/components/schemas/connector_response_properties_swimlane' + - $ref: '#/components/schemas/connector_response_properties_teams' + - $ref: '#/components/schemas/connector_response_properties_tines' + - $ref: '#/components/schemas/connector_response_properties_webhook' + - $ref: '#/components/schemas/connector_response_properties_xmatters' + title: Connector response properties + "401_response": + properties: + error: + enum: + - Unauthorized + example: Unauthorized + type: string + message: + type: string + statusCode: + enum: + - 401 + example: 401 + type: integer + title: Unsuccessful rule API response + type: object + update_connector_request_cases_webhook: + properties: + config: + $ref: '#/components/schemas/config_properties_cases_webhook' + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/secrets_properties_cases_webhook' + required: + - config + - name + title: Update Webhook - Case Managment connector request + type: object + update_connector_request_index: + properties: + config: + $ref: '#/components/schemas/config_properties_index' + name: + description: The display name for the connector. + type: string + required: + - config + - name + title: Update index connector request + type: object + update_connector_request_jira: + properties: + config: + $ref: '#/components/schemas/config_properties_jira' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/secrets_properties_jira' + required: + - config + - name + - secrets + title: Update Jira connector request + type: object + update_connector_request_opsgenie: + properties: + config: + $ref: '#/components/schemas/config_properties_opsgenie' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/secrets_properties_opsgenie' + required: + - config + - name + - secrets + title: Update Opsgenie connector request + type: object + update_connector_request_resilient: + properties: + config: + $ref: '#/components/schemas/config_properties_resilient' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/secrets_properties_resilient' + required: + - config + - name + - secrets + title: Update IBM Resilient connector request + type: object + update_connector_request_serverlog: + properties: + name: + description: The display name for the connector. + type: string + required: + - name + title: Update server log connector request + type: object + update_connector_request_servicenow: + properties: + config: + $ref: '#/components/schemas/config_properties_servicenow' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/secrets_properties_servicenow' + required: + - config + - name + - secrets + title: Update ServiceNow ITSM connector or ServiceNow SecOps request + type: object + update_connector_request_servicenow_itom: + properties: + config: + $ref: '#/components/schemas/config_properties_servicenow_itom' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/secrets_properties_servicenow' + required: + - config + - name + - secrets + title: Create ServiceNow ITOM connector request + type: object + update_connector_request_swimlane: + properties: + config: + $ref: '#/components/schemas/config_properties_swimlane' + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/secrets_properties_swimlane' + required: + - config + - name + - secrets + title: Update Swimlane connector request + type: object + "404_response": + properties: + error: + enum: + - Not Found + example: Not Found + type: string + message: + example: "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not\ + \ found" + type: string + statusCode: + enum: + - 404 + example: 404 + type: integer + type: object + connector_types: + description: "The type of connector. For example, `.email`, `.index`, `.jira`,\ + \ `.opsgenie`, or `.server-log`." + enum: + - .cases-webhook + - .email + - .index + - .jira + - .opsgenie + - .pagerduty + - .resilient + - .servicenow + - .servicenow-itom + - .servicenow-sir + - .server-log + - .slack + - .swimlane + - .teams + - .tines + - .webhook + - .xmatters + example: .server-log + title: Connector types + type: string + features: + description: | + The feature that uses the connector. Valid values are `alerting`, `cases`, `uptime`, and `siem`. + enum: + - alerting + - cases + - uptime + - siem + type: string + run_connector_params_documents: + description: Test an action that indexes a document into Elasticsearch. + properties: + documents: + description: The documents in JSON format for index connectors. + items: + additionalProperties: true + type: object + type: array + required: + - documents + title: Index connector parameters + type: object + run_connector_params_level_message: + description: Test an action that writes an entry to the Kibana server log. + properties: + level: + default: info + description: The log level of the message for server log connectors. + enum: + - debug + - error + - fatal + - info + - trace + - warn + type: string + message: + description: The message for server log connectors. + type: string + required: + - message + title: Server log connector parameters + type: object + run_connector_subaction_addevent: + description: The `addEvent` subaction for ServiceNow ITOM connectors. + properties: + subAction: + description: The action to test. + enum: + - addEvent + type: string + subActionParams: + $ref: '#/components/schemas/run_connector_subaction_addevent_subActionParams' + required: + - subAction + title: The addEvent subaction + type: object + run_connector_subaction_closealert: + description: The `closeAlert` subaction for Opsgenie connectors. + properties: + subAction: + description: The action to test. + enum: + - closeAlert + type: string + subActionParams: + $ref: '#/components/schemas/run_connector_subaction_closealert_subActionParams' + required: + - subAction + - subActionParams + title: The closeAlert subaction + type: object + run_connector_subaction_createalert: + description: The `createAlert` subaction for Opsgenie connectors. + properties: + subAction: + description: The action to test. + enum: + - createAlert + type: string + subActionParams: + $ref: '#/components/schemas/run_connector_subaction_createalert_subActionParams' + required: + - subAction + - subActionParams + title: The createAlert subaction + type: object + run_connector_subaction_fieldsbyissuetype: + description: The `fieldsByIssueType` subaction for Jira connectors. + properties: + subAction: + description: The action to test. + enum: + - fieldsByIssueType + type: string + subActionParams: + $ref: '#/components/schemas/run_connector_subaction_fieldsbyissuetype_subActionParams' + required: + - subAction + - subActionParams + title: The fieldsByIssueType subaction + type: object + run_connector_subaction_getchoices: + description: "The `getChoices` subaction for ServiceNow ITOM, ServiceNow ITSM,\ + \ and ServiceNow SecOps connectors." + properties: + subAction: + description: The action to test. + enum: + - getChoices + type: string + subActionParams: + $ref: '#/components/schemas/run_connector_subaction_getchoices_subActionParams' + required: + - subAction + - subActionParams + title: The getChoices subaction + type: object + run_connector_subaction_getfields: + description: "The `getFields` subaction for Jira, ServiceNow ITSM, and ServiceNow\ + \ SecOps connectors." + properties: + subAction: + description: The action to test. + enum: + - getFields + type: string + required: + - subAction + title: The getFields subaction + type: object + run_connector_subaction_getincident: + description: "The `getIncident` subaction for Jira, ServiceNow ITSM, and ServiceNow\ + \ SecOps connectors." + properties: + subAction: + description: The action to test. + enum: + - getIncident + type: string + subActionParams: + $ref: '#/components/schemas/run_connector_subaction_getincident_subActionParams' + required: + - subAction + - subActionParams + title: The getIncident subaction + type: object + run_connector_subaction_issue: + description: The `issue` subaction for Jira connectors. + properties: + subAction: + description: The action to test. + enum: + - issue + type: string + subActionParams: + $ref: '#/components/schemas/run_connector_subaction_issue_subActionParams' + required: + - subAction + title: The issue subaction + type: object + run_connector_subaction_issues: + description: The `issues` subaction for Jira connectors. + properties: + subAction: + description: The action to test. + enum: + - issues + type: string + subActionParams: + $ref: '#/components/schemas/run_connector_subaction_issues_subActionParams' + required: + - subAction + - subActionParams + title: The issues subaction + type: object + run_connector_subaction_issuetypes: + description: The `issueTypes` subaction for Jira connectors. + properties: + subAction: + description: The action to test. + enum: + - issueTypes + type: string + required: + - subAction + title: The issueTypes subaction + type: object + run_connector_subaction_pushtoservice: + description: "The `pushToService` subaction for Jira, ServiceNow ITSM, ServiceNow\ + \ SecOps, and Swimlane connectors." + properties: + subAction: + description: The action to test. + enum: + - pushToService + type: string + subActionParams: + $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams' + required: + - subAction + - subActionParams + title: The pushToService subaction + type: object + action_response_properties: + description: The properties vary depending on the action type. + example: + isPreconfigured: true + isDeprecated: true + actionTypeId: actionTypeId + name: name + id: id + config: "{}" + isMissingSecrets: true + properties: + actionTypeId: + type: string + config: + type: object + id: + type: string + isDeprecated: + description: Indicates whether the action type is deprecated. + type: boolean + isMissingSecrets: + description: Indicates whether secrets are missing for the action. + type: boolean + isPreconfigured: + description: Indicates whether it is a preconfigured action. + type: boolean + name: + type: string + title: Action response properties + type: object + Create_connector_request_body_properties: + description: The properties vary depending on the connector type. + discriminator: + propertyName: connector_type_id + oneOf: + - $ref: '#/components/schemas/create_connector_request_cases_webhook' + - $ref: '#/components/schemas/create_connector_request_email' + - $ref: '#/components/schemas/create_connector_request_index' + - $ref: '#/components/schemas/create_connector_request_jira' + - $ref: '#/components/schemas/create_connector_request_opsgenie' + - $ref: '#/components/schemas/create_connector_request_pagerduty' + - $ref: '#/components/schemas/create_connector_request_resilient' + - $ref: '#/components/schemas/create_connector_request_serverlog' + - $ref: '#/components/schemas/create_connector_request_servicenow' + - $ref: '#/components/schemas/create_connector_request_servicenow_itom' + - $ref: '#/components/schemas/create_connector_request_servicenow_sir' + - $ref: '#/components/schemas/create_connector_request_slack' + - $ref: '#/components/schemas/create_connector_request_swimlane' + - $ref: '#/components/schemas/create_connector_request_teams' + - $ref: '#/components/schemas/create_connector_request_tines' + - $ref: '#/components/schemas/create_connector_request_webhook' + - $ref: '#/components/schemas/create_connector_request_xmatters' + title: Create connector request body properties + getConnector_404_response: + properties: + error: + example: Not Found + type: string + message: + example: "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not\ + \ found" + type: string + statusCode: + example: 404 + type: integer + type: object + Update_connector_request_body_properties: + description: The properties vary depending on the connector type. + oneOf: + - $ref: '#/components/schemas/update_connector_request_cases_webhook' + - $ref: '#/components/schemas/update_connector_request_index' + - $ref: '#/components/schemas/update_connector_request_jira' + - $ref: '#/components/schemas/update_connector_request_opsgenie' + - $ref: '#/components/schemas/update_connector_request_resilient' + - $ref: '#/components/schemas/update_connector_request_serverlog' + - $ref: '#/components/schemas/update_connector_request_servicenow' + - $ref: '#/components/schemas/update_connector_request_servicenow_itom' + - $ref: '#/components/schemas/update_connector_request_swimlane' + title: Update connector request body properties + updateConnector_400_response: + properties: + error: + example: Bad Request + type: string + message: + example: "error validating action type config: [index]: expected value of\ + \ type [string] but got [undefined]" + type: string + statusCode: + example: 400 + type: integer + type: object + Get_connectors_response_body_properties: + description: The properties vary for each connector type. + example: + is_missing_secrets: false + is_deprecated: false + is_preconfigured: false + name: my-connector + referenced_by_count: 2 + id: b0766e10-d190-11ec-b04c-776c77d14fca + config: + key: "" + connector_type_id: .server-log + properties: + connector_type_id: + $ref: '#/components/schemas/connector_types' + config: + additionalProperties: true + description: The configuration for the connector. Configuration properties + vary depending on the connector type. + nullable: true + type: object + id: + description: The identifier for the connector. + example: b0766e10-d190-11ec-b04c-776c77d14fca + type: string + is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + is_missing_secrets: + description: Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + is_preconfigured: + description: "Indicates whether it is a preconfigured connector. If true,\ + \ the `config` and `is_missing_secrets` properties are omitted from the\ + \ response." + example: false + type: boolean + name: + description: The display name for the connector. + example: my-connector + type: string + referenced_by_count: + default: 0 + description: "Indicates the number of saved objects that reference the connector.\ + \ If `is_preconfigured` is true, this value is not calculated." + example: 2 + type: integer + required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + - referenced_by_count + title: Get connectors response body properties + type: object + Get_connector_types_response_body_properties_inner: + example: + supported_feature_ids: + - alerting + - uptime + - siem + name: Index + enabled_in_license: true + id: .server-log + enabled_in_config: true + minimum_license_required: basic + enabled: true + properties: + enabled: + description: Indicates whether the connector type is enabled in Kibana. + example: true + type: boolean + enabled_in_config: + description: Indicates whether the connector type is enabled in the Kibana + `.yml` file. + example: true + type: boolean + enabled_in_license: + description: Indicates whether the connector is enabled in the license. + example: true + type: boolean + id: + $ref: '#/components/schemas/connector_types' + minimum_license_required: + description: The license that is required to use the connector type. + example: basic + type: string + name: + description: The name of the connector type. + example: Index + type: string + supported_feature_ids: + description: The Kibana features that are supported by the connector type. + example: + - alerting + - uptime + - siem + items: + $ref: '#/components/schemas/features' + type: array + type: object + Subaction_parameters: + description: Test an action that involves a subaction. + discriminator: + propertyName: subAction + oneOf: + - $ref: '#/components/schemas/run_connector_subaction_addevent' + - $ref: '#/components/schemas/run_connector_subaction_closealert' + - $ref: '#/components/schemas/run_connector_subaction_createalert' + - $ref: '#/components/schemas/run_connector_subaction_fieldsbyissuetype' + - $ref: '#/components/schemas/run_connector_subaction_getchoices' + - $ref: '#/components/schemas/run_connector_subaction_getfields' + - $ref: '#/components/schemas/run_connector_subaction_getincident' + - $ref: '#/components/schemas/run_connector_subaction_issue' + - $ref: '#/components/schemas/run_connector_subaction_issues' + - $ref: '#/components/schemas/run_connector_subaction_issuetypes' + - $ref: '#/components/schemas/run_connector_subaction_pushtoservice' + title: Subaction parameters + Run_connector_request_body_properties_params: + oneOf: + - $ref: '#/components/schemas/run_connector_params_documents' + - $ref: '#/components/schemas/run_connector_params_level_message' + - $ref: '#/components/schemas/Subaction_parameters' + Run_connector_request_body_properties: + description: The properties vary depending on the connector type. + properties: + params: + $ref: '#/components/schemas/Run_connector_request_body_properties_params' + required: + - params + title: Run connector request body properties + type: object + runConnector_200_response_data: + oneOf: + - additionalProperties: true + description: Information returned from the action. + type: object + - description: An array of information returned from the action. + items: + type: object + type: array + runConnector_200_response: + example: + data: null + connector_id: connector_id + status: error + properties: + connector_id: + description: The identifier for the connector. + type: string + data: + $ref: '#/components/schemas/runConnector_200_response_data' + status: + description: The status of the action. + enum: + - error + - ok + type: string + required: + - connector_id + - status + type: object + Legacy_update_connector_request_body_properties: + description: The properties vary depending on the connector type. + properties: + config: + description: The new connector configuration. Configuration properties vary + depending on the connector type. + type: object + name: + description: The new name for the connector. + type: string + secrets: + description: The updated secrets configuration for the connector. Secrets + properties vary depending on the connector type. + type: object + title: Legacy update connector request body properties + type: object + Legacy_create_connector_request_properties: + properties: + actionTypeId: + description: The connector type identifier. + type: string + config: + description: The configuration for the connector. Configuration properties + vary depending on the connector type. + type: object + name: + description: The display name for the connector. + type: string + secrets: + description: | + The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. NOTE: Remember these values. You must provide them each time you update the connector. + type: object + title: Legacy create connector request properties + type: object + Legacy_get_connector_types_response_body_properties_inner: + example: + enabledInConfig: true + name: name + enabledInLicense: true + id: id + minimumLicenseRequired: minimumLicenseRequired + enabled: true + properties: + enabled: + description: Indicates whether the connector type is enabled in Kibana. + type: boolean + enabledInConfig: + description: Indicates whether the connector type is enabled in the Kibana + `.yml` file. + type: boolean + enabledInLicense: + description: Indicates whether the connector is enabled in the license. + example: true + type: boolean + id: + description: The unique identifier for the connector type. + type: string + minimumLicenseRequired: + description: The license that is required to use the connector type. + type: string + name: + description: The name of the connector type. + type: string + type: object + Legacy_run_connector_request_body_properties: + description: The properties vary depending on the connector type. + properties: + params: + description: The parameters of the connector. Parameter properties vary + depending on the connector type. + type: object + required: + - params + title: Legacy run connector request body properties + type: object + legacyRunConnector_200_response: + example: + data: null + actionId: actionId + status: status + properties: + actionId: + type: string + data: + $ref: '#/components/schemas/runConnector_200_response_data' + status: + description: The status of the action. + type: string + type: object + Alert_identifier_mapping: + description: Mapping for the alert ID. + properties: + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string + required: + - fieldType + - id + - key + - name + title: Alert identifier mapping + type: object + Case_identifier_mapping: + description: Mapping for the case ID. + properties: + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string + required: + - fieldType + - id + - key + - name + title: Case identifier mapping + type: object + Case_name_mapping: + description: Mapping for the case name. + properties: + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string + required: + - fieldType + - id + - key + - name + title: Case name mapping + type: object + Case_comment_mapping: + description: Mapping for the case comments. + properties: + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string + required: + - fieldType + - id + - key + - name + title: Case comment mapping + type: object + Case_description_mapping: + description: Mapping for the case description. + properties: + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string + required: + - fieldType + - id + - key + - name + title: Case description mapping + type: object + Rule_name_mapping: + description: Mapping for the name of the alert's rule. + properties: + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string + required: + - fieldType + - id + - key + - name + title: Rule name mapping + type: object + Severity_mapping: + description: Mapping for the severity. + properties: + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string + required: + - fieldType + - id + - key + - name + title: Severity mapping + type: object + Connector_mappings_properties_for_a_Swimlane_connector: + description: The field mapping. + properties: + alertIdConfig: + $ref: '#/components/schemas/Alert_identifier_mapping' + caseIdConfig: + $ref: '#/components/schemas/Case_identifier_mapping' + caseNameConfig: + $ref: '#/components/schemas/Case_name_mapping' + commentsConfig: + $ref: '#/components/schemas/Case_comment_mapping' + descriptionConfig: + $ref: '#/components/schemas/Case_description_mapping' + ruleNameConfig: + $ref: '#/components/schemas/Rule_name_mapping' + severityConfig: + $ref: '#/components/schemas/Severity_mapping' + title: Connector mappings properties for a Swimlane connector + type: object + run_connector_subaction_addevent_subActionParams: + description: The set of configuration properties for the action. + properties: + additional_info: + description: Additional information about the event. + type: string + description: + description: The details about the event. + type: string + event_class: + description: A specific instance of the source. + type: string + message_key: + description: All actions sharing this key are associated with the same ServiceNow + alert. The default value is `:`. + type: string + metric_name: + description: The name of the metric. + type: string + node: + description: The host that the event was triggered for. + type: string + resource: + description: The name of the resource. + type: string + severity: + description: The severity of the event. + type: string + source: + description: The name of the event source type. + type: string + time_of_event: + description: The time of the event. + type: string + type: + description: The type of event. + type: string + type: object + run_connector_subaction_closealert_subActionParams: + properties: + alias: + description: The unique identifier used for alert deduplication in Opsgenie. + The alias must match the value used when creating the alert. + type: string + note: + description: Additional information for the alert. + type: string + source: + description: The display name for the source of the alert. + type: string + user: + description: The display name for the owner. + type: string + required: + - alias + type: object + run_connector_subaction_createalert_subActionParams_responders_inner: + properties: + id: + description: The identifier for the entity. + type: string + name: + description: The name of the entity. + type: string + type: + description: "The type of responders, in this case `escalation`." + enum: + - escalation + - schedule + - team + - user + type: string + username: + description: A valid email address for the user. + type: string + type: object + run_connector_subaction_createalert_subActionParams_visibleTo_inner: + properties: + id: + description: The identifier for the entity. + type: string + name: + description: The name of the entity. + type: string + type: + description: Valid values are `team` and `user`. + enum: + - team + - user + type: string + username: + description: The user name. This property is required only when the `type` + is `user`. + type: string + required: + - type + type: object + run_connector_subaction_createalert_subActionParams: + properties: + actions: + description: The custom actions available to the alert. + items: + type: string + type: array + alias: + description: The unique identifier used for alert deduplication in Opsgenie. + type: string + description: + description: A description that provides detailed information about the + alert. + type: string + details: + additionalProperties: true + description: The custom properties of the alert. + example: + key1: value1 + key2: value2 + type: object + entity: + description: "The domain of the alert. For example, the application or server\ + \ name." + type: string + message: + description: The alert message. + type: string + note: + description: Additional information for the alert. + type: string + priority: + description: The priority level for the alert. + enum: + - P1 + - P2 + - P3 + - P4 + - P5 + type: string + responders: + description: | + The entities to receive notifications about the alert. If `type` is `user`, either `id` or `username` is required. If `type` is `team`, either `id` or `name` is required. + items: + $ref: '#/components/schemas/run_connector_subaction_createalert_subActionParams_responders_inner' + type: array + source: + description: The display name for the source of the alert. + type: string + tags: + description: The tags for the alert. + items: + type: string + type: array + user: + description: The display name for the owner. + type: string + visibleTo: + description: "The teams and users that the alert will be visible to without\ + \ sending a notification. Only one of `id`, `name`, or `username` is required." + items: + $ref: '#/components/schemas/run_connector_subaction_createalert_subActionParams_visibleTo_inner' + type: array + required: + - message + type: object + run_connector_subaction_fieldsbyissuetype_subActionParams: + properties: + id: + description: The Jira issue type identifier. + example: "10024" + type: string + required: + - id + type: object + run_connector_subaction_getchoices_subActionParams: + description: The set of configuration properties for the action. + properties: + fields: + description: An array of fields. + items: + type: string + type: array + required: + - fields + type: object + run_connector_subaction_getincident_subActionParams: + properties: + externalId: + description: "The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier." + example: "71778" + type: string + required: + - externalId + type: object + run_connector_subaction_issue_subActionParams: + properties: + id: + description: The Jira issue identifier. + example: "71778" + type: string + required: + - id + type: object + run_connector_subaction_issues_subActionParams: + properties: + title: + description: The title of the Jira issue. + type: string + required: + - title + type: object + run_connector_subaction_pushtoservice_subActionParams_comments_inner: + properties: + comment: + description: "A comment related to the incident. For example, describe how\ + \ to troubleshoot the issue." + type: string + commentId: + description: A unique identifier for the comment. + type: integer + type: object + run_connector_subaction_pushtoservice_subActionParams_incident_dest_ip: + description: | + A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. + oneOf: + - type: string + - items: + type: string + type: array + run_connector_subaction_pushtoservice_subActionParams_incident_malware_hash: + description: A list of malware hashes related to the security incident for ServiceNow + SecOps connectors. The hashes are added as observables to the security incident. + oneOf: + - type: string + - items: + type: string + type: array + run_connector_subaction_pushtoservice_subActionParams_incident_malware_url: + description: A list of malware URLs related to the security incident for ServiceNow + SecOps connectors. The URLs are added as observables to the security incident. + oneOf: + - type: string + - items: + type: string + type: array + type: string + run_connector_subaction_pushtoservice_subActionParams_incident_source_ip: + description: A list of source IP addresses related to the security incident + for ServiceNow SecOps connectors. The IPs are added as observables to the + security incident. + oneOf: + - type: string + - items: + type: string + type: array + run_connector_subaction_pushtoservice_subActionParams_incident: + description: "Information necessary to create or update a Jira, ServiceNow ITSM,\ + \ ServiveNow SecOps, or Swimlane incident." + properties: + alertId: + description: The alert identifier for Swimlane connectors. + type: string + caseId: + description: The case identifier for the incident for Swimlane connectors. + type: string + caseName: + description: The case name for the incident for Swimlane connectors. + type: string + category: + description: The category of the incident for ServiceNow ITSM and ServiceNow + SecOps connectors. + type: string + correlation_display: + description: A descriptive label of the alert for correlation purposes for + ServiceNow ITSM and ServiceNow SecOps connectors. + type: string + correlation_id: + description: | + The correlation identifier for the security incident for ServiceNow ITSM and ServiveNow SecOps connectors. Connectors using the same correlation ID are associated with the same ServiceNow incident. This value determines whether a new ServiceNow incident is created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the correlation ID value in ServiceNow. The maximum character length for this value is 100 characters. NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that ServiceNow creates a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, ServiceNow creates and continually updates a single incident record for the alert. + type: string + description: + description: "The description of the incident for Jira, ServiceNow ITSM,\ + \ ServiceNow SecOps, and Swimlane connectors." + type: string + dest_ip: + $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams_incident_dest_ip' + externalId: + description: | + The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. If present, the incident is updated. Otherwise, a new incident is created. + type: string + impact: + description: The impact of the incident for ServiceNow ITSM connectors. + type: string + issueType: + description: "The type of incident for Jira connectors. For example, 10006.\ + \ To obtain the list of valid values, set `subAction` to `issueTypes`." + type: integer + labels: + description: | + The labels for the incident for Jira connectors. NOTE: Labels cannot contain spaces. + items: + type: string + type: array + malware_hash: + $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams_incident_malware_hash' + malware_url: + $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams_incident_malware_url' + parent: + description: The ID or key of the parent issue for Jira connectors. Applies + only to `Sub-task` types of issues. + type: string + priority: + description: The priority of the incident in Jira and ServiceNow SecOps + connectors. + type: string + ruleName: + description: The rule name for Swimlane connectors. + type: string + severity: + description: The severity of the incident for ServiceNow ITSM and Swimlane + connectors. + type: string + short_description: + description: | + A short description of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. It is used for searching the contents of the knowledge base. + type: string + source_ip: + $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams_incident_source_ip' + subcategory: + description: The subcategory of the incident for ServiceNow ITSM and ServiceNow + SecOps connectors. + type: string + summary: + description: A summary of the incident for Jira connectors. + type: string + title: + description: | + A title for the incident for Jira connectors. It is used for searching the contents of the knowledge base. + type: string + urgency: + description: The urgency of the incident for ServiceNow ITSM connectors. + type: string + type: object + run_connector_subaction_pushtoservice_subActionParams: + description: The set of configuration properties for the action. + properties: + comments: + description: "Additional information that is sent to Jira, ServiceNow ITSM,\ + \ ServiceNow SecOps, or Swimlane." + items: + $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams_comments_inner' + type: array + incident: + $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams_incident' + type: object + securitySchemes: + basicAuth: + scheme: basic + type: http + apiKeyAuth: + in: header + name: ApiKey + type: apiKey diff --git a/generated/kibanaactions/api_connectors.go b/generated/kibanaactions/api_connectors.go new file mode 100644 index 000000000..c0ad753df --- /dev/null +++ b/generated/kibanaactions/api_connectors.go @@ -0,0 +1,2306 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +type ConnectorsApi interface { + + /* + CreateConnector Creates a connector. + + You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiCreateConnectorRequest + */ + CreateConnector(ctx context.Context, spaceId string) ApiCreateConnectorRequest + + // CreateConnectorExecute executes the request + // @return ConnectorResponseProperties + CreateConnectorExecute(r ApiCreateConnectorRequest) (*ConnectorResponseProperties, *http.Response, error) + + /* + DeleteConnector Deletes a connector. + + You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be recovered. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param connectorId An identifier for the connector. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiDeleteConnectorRequest + */ + DeleteConnector(ctx context.Context, connectorId string, spaceId string) ApiDeleteConnectorRequest + + // DeleteConnectorExecute executes the request + DeleteConnectorExecute(r ApiDeleteConnectorRequest) (*http.Response, error) + + /* + GetConnector Retrieves a connector by ID. + + You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param connectorId An identifier for the connector. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiGetConnectorRequest + */ + GetConnector(ctx context.Context, connectorId string, spaceId string) ApiGetConnectorRequest + + // GetConnectorExecute executes the request + // @return ConnectorResponseProperties + GetConnectorExecute(r ApiGetConnectorRequest) (*ConnectorResponseProperties, *http.Response, error) + + /* + GetConnectorTypes Retrieves a list of all connector types. + + You do not need any Kibana feature privileges to run this API. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiGetConnectorTypesRequest + */ + GetConnectorTypes(ctx context.Context, spaceId string) ApiGetConnectorTypesRequest + + // GetConnectorTypesExecute executes the request + // @return []GetConnectorTypesResponseBodyPropertiesInner + GetConnectorTypesExecute(r ApiGetConnectorTypesRequest) ([]GetConnectorTypesResponseBodyPropertiesInner, *http.Response, error) + + /* + GetConnectors Retrieves all connectors. + + You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiGetConnectorsRequest + */ + GetConnectors(ctx context.Context, spaceId string) ApiGetConnectorsRequest + + // GetConnectorsExecute executes the request + // @return []GetConnectorsResponseBodyProperties + GetConnectorsExecute(r ApiGetConnectorsRequest) ([]GetConnectorsResponseBodyProperties, *http.Response, error) + + /* + LegacyCreateConnector Creates a connector. + + Deprecated in 7.13.0. Use the create connector API instead. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiLegacyCreateConnectorRequest + + Deprecated + */ + LegacyCreateConnector(ctx context.Context, spaceId string) ApiLegacyCreateConnectorRequest + + // LegacyCreateConnectorExecute executes the request + // @return ActionResponseProperties + // Deprecated + LegacyCreateConnectorExecute(r ApiLegacyCreateConnectorRequest) (*ActionResponseProperties, *http.Response, error) + + /* + LegacyDeleteConnector Deletes a connector. + + Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, it cannot be recovered. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param actionId An identifier for the action. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiLegacyDeleteConnectorRequest + + Deprecated + */ + LegacyDeleteConnector(ctx context.Context, actionId string, spaceId string) ApiLegacyDeleteConnectorRequest + + // LegacyDeleteConnectorExecute executes the request + // Deprecated + LegacyDeleteConnectorExecute(r ApiLegacyDeleteConnectorRequest) (*http.Response, error) + + /* + LegacyGetConnector Retrieves a connector by ID. + + Deprecated in 7.13.0. Use the get connector API instead. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param actionId An identifier for the action. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiLegacyGetConnectorRequest + + Deprecated + */ + LegacyGetConnector(ctx context.Context, actionId string, spaceId string) ApiLegacyGetConnectorRequest + + // LegacyGetConnectorExecute executes the request + // @return ActionResponseProperties + // Deprecated + LegacyGetConnectorExecute(r ApiLegacyGetConnectorRequest) (*ActionResponseProperties, *http.Response, error) + + /* + LegacyGetConnectorTypes Retrieves a list of all connector types. + + Deprecated in 7.13.0. Use the get all connector types API instead. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiLegacyGetConnectorTypesRequest + + Deprecated + */ + LegacyGetConnectorTypes(ctx context.Context, spaceId string) ApiLegacyGetConnectorTypesRequest + + // LegacyGetConnectorTypesExecute executes the request + // @return []LegacyGetConnectorTypesResponseBodyPropertiesInner + // Deprecated + LegacyGetConnectorTypesExecute(r ApiLegacyGetConnectorTypesRequest) ([]LegacyGetConnectorTypesResponseBodyPropertiesInner, *http.Response, error) + + /* + LegacyGetConnectors Retrieves all connectors. + + Deprecated in 7.13.0. Use the get all connectors API instead. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiLegacyGetConnectorsRequest + + Deprecated + */ + LegacyGetConnectors(ctx context.Context, spaceId string) ApiLegacyGetConnectorsRequest + + // LegacyGetConnectorsExecute executes the request + // @return []ActionResponseProperties + // Deprecated + LegacyGetConnectorsExecute(r ApiLegacyGetConnectorsRequest) ([]ActionResponseProperties, *http.Response, error) + + /* + LegacyRunConnector Runs a connector. + + Deprecated in 7.13.0. Use the run connector API instead. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param actionId An identifier for the action. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiLegacyRunConnectorRequest + + Deprecated + */ + LegacyRunConnector(ctx context.Context, actionId string, spaceId string) ApiLegacyRunConnectorRequest + + // LegacyRunConnectorExecute executes the request + // @return LegacyRunConnector200Response + // Deprecated + LegacyRunConnectorExecute(r ApiLegacyRunConnectorRequest) (*LegacyRunConnector200Response, *http.Response, error) + + /* + LegacyUpdateConnector Updates the attributes for a connector. + + Deprecated in 7.13.0. Use the update connector API instead. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param actionId An identifier for the action. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiLegacyUpdateConnectorRequest + + Deprecated + */ + LegacyUpdateConnector(ctx context.Context, actionId string, spaceId string) ApiLegacyUpdateConnectorRequest + + // LegacyUpdateConnectorExecute executes the request + // @return ActionResponseProperties + // Deprecated + LegacyUpdateConnectorExecute(r ApiLegacyUpdateConnectorRequest) (*ActionResponseProperties, *http.Response, error) + + /* + RunConnector Runs a connector. + + You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. If you use an index connector, you must also have `all`, `create`, `index`, or `write` indices privileges. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param connectorId An identifier for the connector. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiRunConnectorRequest + */ + RunConnector(ctx context.Context, connectorId string, spaceId string) ApiRunConnectorRequest + + // RunConnectorExecute executes the request + // @return RunConnector200Response + RunConnectorExecute(r ApiRunConnectorRequest) (*RunConnector200Response, *http.Response, error) + + /* + UpdateConnector Updates the attributes for a connector. + + You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param connectorId An identifier for the connector. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiUpdateConnectorRequest + */ + UpdateConnector(ctx context.Context, connectorId string, spaceId string) ApiUpdateConnectorRequest + + // UpdateConnectorExecute executes the request + // @return ConnectorResponseProperties + UpdateConnectorExecute(r ApiUpdateConnectorRequest) (*ConnectorResponseProperties, *http.Response, error) +} + +// ConnectorsApiService ConnectorsApi service +type ConnectorsApiService service + +type ApiCreateConnectorRequest struct { + ctx context.Context + ApiService ConnectorsApi + kbnXsrf *string + spaceId string + createConnectorRequestBodyProperties *CreateConnectorRequestBodyProperties +} + +// Cross-site request forgery protection +func (r ApiCreateConnectorRequest) KbnXsrf(kbnXsrf string) ApiCreateConnectorRequest { + r.kbnXsrf = &kbnXsrf + return r +} + +func (r ApiCreateConnectorRequest) CreateConnectorRequestBodyProperties(createConnectorRequestBodyProperties CreateConnectorRequestBodyProperties) ApiCreateConnectorRequest { + r.createConnectorRequestBodyProperties = &createConnectorRequestBodyProperties + return r +} + +func (r ApiCreateConnectorRequest) Execute() (*ConnectorResponseProperties, *http.Response, error) { + return r.ApiService.CreateConnectorExecute(r) +} + +/* +CreateConnector Creates a connector. + +You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiCreateConnectorRequest +*/ +func (a *ConnectorsApiService) CreateConnector(ctx context.Context, spaceId string) ApiCreateConnectorRequest { + return ApiCreateConnectorRequest{ + ApiService: a, + ctx: ctx, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return ConnectorResponseProperties +func (a *ConnectorsApiService) CreateConnectorExecute(r ApiCreateConnectorRequest) (*ConnectorResponseProperties, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ConnectorResponseProperties + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.CreateConnector") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/actions/connector" + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.kbnXsrf == nil { + return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") + } + if r.createConnectorRequestBodyProperties == nil { + return localVarReturnValue, nil, reportError("createConnectorRequestBodyProperties is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + // body params + localVarPostBody = r.createConnectorRequestBodyProperties + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["ApiKey"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Model401Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteConnectorRequest struct { + ctx context.Context + ApiService ConnectorsApi + kbnXsrf *string + connectorId string + spaceId string +} + +// Cross-site request forgery protection +func (r ApiDeleteConnectorRequest) KbnXsrf(kbnXsrf string) ApiDeleteConnectorRequest { + r.kbnXsrf = &kbnXsrf + return r +} + +func (r ApiDeleteConnectorRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteConnectorExecute(r) +} + +/* +DeleteConnector Deletes a connector. + +You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be recovered. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param connectorId An identifier for the connector. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiDeleteConnectorRequest +*/ +func (a *ConnectorsApiService) DeleteConnector(ctx context.Context, connectorId string, spaceId string) ApiDeleteConnectorRequest { + return ApiDeleteConnectorRequest{ + ApiService: a, + ctx: ctx, + connectorId: connectorId, + spaceId: spaceId, + } +} + +// Execute executes the request +func (a *ConnectorsApiService) DeleteConnectorExecute(r ApiDeleteConnectorRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.DeleteConnector") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/actions/connector/{connectorId}" + localVarPath = strings.Replace(localVarPath, "{"+"connectorId"+"}", url.PathEscape(parameterValueToString(r.connectorId, "connectorId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.kbnXsrf == nil { + return nil, reportError("kbnXsrf is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["ApiKey"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Model401Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GetConnector404Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetConnectorRequest struct { + ctx context.Context + ApiService ConnectorsApi + connectorId string + spaceId string +} + +func (r ApiGetConnectorRequest) Execute() (*ConnectorResponseProperties, *http.Response, error) { + return r.ApiService.GetConnectorExecute(r) +} + +/* +GetConnector Retrieves a connector by ID. + +You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param connectorId An identifier for the connector. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiGetConnectorRequest +*/ +func (a *ConnectorsApiService) GetConnector(ctx context.Context, connectorId string, spaceId string) ApiGetConnectorRequest { + return ApiGetConnectorRequest{ + ApiService: a, + ctx: ctx, + connectorId: connectorId, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return ConnectorResponseProperties +func (a *ConnectorsApiService) GetConnectorExecute(r ApiGetConnectorRequest) (*ConnectorResponseProperties, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ConnectorResponseProperties + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.GetConnector") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/actions/connector/{connectorId}" + localVarPath = strings.Replace(localVarPath, "{"+"connectorId"+"}", url.PathEscape(parameterValueToString(r.connectorId, "connectorId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["ApiKey"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Model401Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GetConnector404Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetConnectorTypesRequest struct { + ctx context.Context + ApiService ConnectorsApi + spaceId string + featureId *Features +} + +// A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases). +func (r ApiGetConnectorTypesRequest) FeatureId(featureId Features) ApiGetConnectorTypesRequest { + r.featureId = &featureId + return r +} + +func (r ApiGetConnectorTypesRequest) Execute() ([]GetConnectorTypesResponseBodyPropertiesInner, *http.Response, error) { + return r.ApiService.GetConnectorTypesExecute(r) +} + +/* +GetConnectorTypes Retrieves a list of all connector types. + +You do not need any Kibana feature privileges to run this API. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiGetConnectorTypesRequest +*/ +func (a *ConnectorsApiService) GetConnectorTypes(ctx context.Context, spaceId string) ApiGetConnectorTypesRequest { + return ApiGetConnectorTypesRequest{ + ApiService: a, + ctx: ctx, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return []GetConnectorTypesResponseBodyPropertiesInner +func (a *ConnectorsApiService) GetConnectorTypesExecute(r ApiGetConnectorTypesRequest) ([]GetConnectorTypesResponseBodyPropertiesInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []GetConnectorTypesResponseBodyPropertiesInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.GetConnectorTypes") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/actions/connector_types" + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.featureId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "feature_id", r.featureId, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["ApiKey"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Model401Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetConnectorsRequest struct { + ctx context.Context + ApiService ConnectorsApi + spaceId string +} + +func (r ApiGetConnectorsRequest) Execute() ([]GetConnectorsResponseBodyProperties, *http.Response, error) { + return r.ApiService.GetConnectorsExecute(r) +} + +/* +GetConnectors Retrieves all connectors. + +You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiGetConnectorsRequest +*/ +func (a *ConnectorsApiService) GetConnectors(ctx context.Context, spaceId string) ApiGetConnectorsRequest { + return ApiGetConnectorsRequest{ + ApiService: a, + ctx: ctx, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return []GetConnectorsResponseBodyProperties +func (a *ConnectorsApiService) GetConnectorsExecute(r ApiGetConnectorsRequest) ([]GetConnectorsResponseBodyProperties, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []GetConnectorsResponseBodyProperties + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.GetConnectors") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/actions/connectors" + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["ApiKey"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Model401Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiLegacyCreateConnectorRequest struct { + ctx context.Context + ApiService ConnectorsApi + kbnXsrf *string + spaceId string + legacyCreateConnectorRequestProperties *LegacyCreateConnectorRequestProperties +} + +// Cross-site request forgery protection +func (r ApiLegacyCreateConnectorRequest) KbnXsrf(kbnXsrf string) ApiLegacyCreateConnectorRequest { + r.kbnXsrf = &kbnXsrf + return r +} + +func (r ApiLegacyCreateConnectorRequest) LegacyCreateConnectorRequestProperties(legacyCreateConnectorRequestProperties LegacyCreateConnectorRequestProperties) ApiLegacyCreateConnectorRequest { + r.legacyCreateConnectorRequestProperties = &legacyCreateConnectorRequestProperties + return r +} + +func (r ApiLegacyCreateConnectorRequest) Execute() (*ActionResponseProperties, *http.Response, error) { + return r.ApiService.LegacyCreateConnectorExecute(r) +} + +/* +LegacyCreateConnector Creates a connector. + +Deprecated in 7.13.0. Use the create connector API instead. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiLegacyCreateConnectorRequest + +Deprecated +*/ +func (a *ConnectorsApiService) LegacyCreateConnector(ctx context.Context, spaceId string) ApiLegacyCreateConnectorRequest { + return ApiLegacyCreateConnectorRequest{ + ApiService: a, + ctx: ctx, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return ActionResponseProperties +// +// Deprecated +func (a *ConnectorsApiService) LegacyCreateConnectorExecute(r ApiLegacyCreateConnectorRequest) (*ActionResponseProperties, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ActionResponseProperties + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.LegacyCreateConnector") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/actions" + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.kbnXsrf == nil { + return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") + } + if r.legacyCreateConnectorRequestProperties == nil { + return localVarReturnValue, nil, reportError("legacyCreateConnectorRequestProperties is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + // body params + localVarPostBody = r.legacyCreateConnectorRequestProperties + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["ApiKey"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Model401Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiLegacyDeleteConnectorRequest struct { + ctx context.Context + ApiService ConnectorsApi + kbnXsrf *string + actionId string + spaceId string +} + +// Cross-site request forgery protection +func (r ApiLegacyDeleteConnectorRequest) KbnXsrf(kbnXsrf string) ApiLegacyDeleteConnectorRequest { + r.kbnXsrf = &kbnXsrf + return r +} + +func (r ApiLegacyDeleteConnectorRequest) Execute() (*http.Response, error) { + return r.ApiService.LegacyDeleteConnectorExecute(r) +} + +/* +LegacyDeleteConnector Deletes a connector. + +Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, it cannot be recovered. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param actionId An identifier for the action. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiLegacyDeleteConnectorRequest + +Deprecated +*/ +func (a *ConnectorsApiService) LegacyDeleteConnector(ctx context.Context, actionId string, spaceId string) ApiLegacyDeleteConnectorRequest { + return ApiLegacyDeleteConnectorRequest{ + ApiService: a, + ctx: ctx, + actionId: actionId, + spaceId: spaceId, + } +} + +// Execute executes the request +// Deprecated +func (a *ConnectorsApiService) LegacyDeleteConnectorExecute(r ApiLegacyDeleteConnectorRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.LegacyDeleteConnector") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/actions/action/{actionId}" + localVarPath = strings.Replace(localVarPath, "{"+"actionId"+"}", url.PathEscape(parameterValueToString(r.actionId, "actionId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.kbnXsrf == nil { + return nil, reportError("kbnXsrf is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["ApiKey"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Model401Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiLegacyGetConnectorRequest struct { + ctx context.Context + ApiService ConnectorsApi + actionId string + spaceId string +} + +func (r ApiLegacyGetConnectorRequest) Execute() (*ActionResponseProperties, *http.Response, error) { + return r.ApiService.LegacyGetConnectorExecute(r) +} + +/* +LegacyGetConnector Retrieves a connector by ID. + +Deprecated in 7.13.0. Use the get connector API instead. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param actionId An identifier for the action. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiLegacyGetConnectorRequest + +Deprecated +*/ +func (a *ConnectorsApiService) LegacyGetConnector(ctx context.Context, actionId string, spaceId string) ApiLegacyGetConnectorRequest { + return ApiLegacyGetConnectorRequest{ + ApiService: a, + ctx: ctx, + actionId: actionId, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return ActionResponseProperties +// +// Deprecated +func (a *ConnectorsApiService) LegacyGetConnectorExecute(r ApiLegacyGetConnectorRequest) (*ActionResponseProperties, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ActionResponseProperties + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.LegacyGetConnector") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/actions/action/{actionId}" + localVarPath = strings.Replace(localVarPath, "{"+"actionId"+"}", url.PathEscape(parameterValueToString(r.actionId, "actionId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["ApiKey"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Model401Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiLegacyGetConnectorTypesRequest struct { + ctx context.Context + ApiService ConnectorsApi + spaceId string +} + +func (r ApiLegacyGetConnectorTypesRequest) Execute() ([]LegacyGetConnectorTypesResponseBodyPropertiesInner, *http.Response, error) { + return r.ApiService.LegacyGetConnectorTypesExecute(r) +} + +/* +LegacyGetConnectorTypes Retrieves a list of all connector types. + +Deprecated in 7.13.0. Use the get all connector types API instead. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiLegacyGetConnectorTypesRequest + +Deprecated +*/ +func (a *ConnectorsApiService) LegacyGetConnectorTypes(ctx context.Context, spaceId string) ApiLegacyGetConnectorTypesRequest { + return ApiLegacyGetConnectorTypesRequest{ + ApiService: a, + ctx: ctx, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return []LegacyGetConnectorTypesResponseBodyPropertiesInner +// +// Deprecated +func (a *ConnectorsApiService) LegacyGetConnectorTypesExecute(r ApiLegacyGetConnectorTypesRequest) ([]LegacyGetConnectorTypesResponseBodyPropertiesInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []LegacyGetConnectorTypesResponseBodyPropertiesInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.LegacyGetConnectorTypes") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/actions/list_action_types" + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["ApiKey"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Model401Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiLegacyGetConnectorsRequest struct { + ctx context.Context + ApiService ConnectorsApi + spaceId string +} + +func (r ApiLegacyGetConnectorsRequest) Execute() ([]ActionResponseProperties, *http.Response, error) { + return r.ApiService.LegacyGetConnectorsExecute(r) +} + +/* +LegacyGetConnectors Retrieves all connectors. + +Deprecated in 7.13.0. Use the get all connectors API instead. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiLegacyGetConnectorsRequest + +Deprecated +*/ +func (a *ConnectorsApiService) LegacyGetConnectors(ctx context.Context, spaceId string) ApiLegacyGetConnectorsRequest { + return ApiLegacyGetConnectorsRequest{ + ApiService: a, + ctx: ctx, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return []ActionResponseProperties +// +// Deprecated +func (a *ConnectorsApiService) LegacyGetConnectorsExecute(r ApiLegacyGetConnectorsRequest) ([]ActionResponseProperties, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ActionResponseProperties + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.LegacyGetConnectors") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/actions" + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["ApiKey"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Model401Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiLegacyRunConnectorRequest struct { + ctx context.Context + ApiService ConnectorsApi + kbnXsrf *string + actionId string + spaceId string + legacyRunConnectorRequestBodyProperties *LegacyRunConnectorRequestBodyProperties +} + +// Cross-site request forgery protection +func (r ApiLegacyRunConnectorRequest) KbnXsrf(kbnXsrf string) ApiLegacyRunConnectorRequest { + r.kbnXsrf = &kbnXsrf + return r +} + +func (r ApiLegacyRunConnectorRequest) LegacyRunConnectorRequestBodyProperties(legacyRunConnectorRequestBodyProperties LegacyRunConnectorRequestBodyProperties) ApiLegacyRunConnectorRequest { + r.legacyRunConnectorRequestBodyProperties = &legacyRunConnectorRequestBodyProperties + return r +} + +func (r ApiLegacyRunConnectorRequest) Execute() (*LegacyRunConnector200Response, *http.Response, error) { + return r.ApiService.LegacyRunConnectorExecute(r) +} + +/* +LegacyRunConnector Runs a connector. + +Deprecated in 7.13.0. Use the run connector API instead. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param actionId An identifier for the action. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiLegacyRunConnectorRequest + +Deprecated +*/ +func (a *ConnectorsApiService) LegacyRunConnector(ctx context.Context, actionId string, spaceId string) ApiLegacyRunConnectorRequest { + return ApiLegacyRunConnectorRequest{ + ApiService: a, + ctx: ctx, + actionId: actionId, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return LegacyRunConnector200Response +// +// Deprecated +func (a *ConnectorsApiService) LegacyRunConnectorExecute(r ApiLegacyRunConnectorRequest) (*LegacyRunConnector200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LegacyRunConnector200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.LegacyRunConnector") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/actions/action/{actionId}/_execute" + localVarPath = strings.Replace(localVarPath, "{"+"actionId"+"}", url.PathEscape(parameterValueToString(r.actionId, "actionId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.kbnXsrf == nil { + return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") + } + if r.legacyRunConnectorRequestBodyProperties == nil { + return localVarReturnValue, nil, reportError("legacyRunConnectorRequestBodyProperties is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + // body params + localVarPostBody = r.legacyRunConnectorRequestBodyProperties + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["ApiKey"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Model401Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiLegacyUpdateConnectorRequest struct { + ctx context.Context + ApiService ConnectorsApi + kbnXsrf *string + actionId string + spaceId string + legacyUpdateConnectorRequestBodyProperties *LegacyUpdateConnectorRequestBodyProperties +} + +// Cross-site request forgery protection +func (r ApiLegacyUpdateConnectorRequest) KbnXsrf(kbnXsrf string) ApiLegacyUpdateConnectorRequest { + r.kbnXsrf = &kbnXsrf + return r +} + +func (r ApiLegacyUpdateConnectorRequest) LegacyUpdateConnectorRequestBodyProperties(legacyUpdateConnectorRequestBodyProperties LegacyUpdateConnectorRequestBodyProperties) ApiLegacyUpdateConnectorRequest { + r.legacyUpdateConnectorRequestBodyProperties = &legacyUpdateConnectorRequestBodyProperties + return r +} + +func (r ApiLegacyUpdateConnectorRequest) Execute() (*ActionResponseProperties, *http.Response, error) { + return r.ApiService.LegacyUpdateConnectorExecute(r) +} + +/* +LegacyUpdateConnector Updates the attributes for a connector. + +Deprecated in 7.13.0. Use the update connector API instead. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param actionId An identifier for the action. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiLegacyUpdateConnectorRequest + +Deprecated +*/ +func (a *ConnectorsApiService) LegacyUpdateConnector(ctx context.Context, actionId string, spaceId string) ApiLegacyUpdateConnectorRequest { + return ApiLegacyUpdateConnectorRequest{ + ApiService: a, + ctx: ctx, + actionId: actionId, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return ActionResponseProperties +// +// Deprecated +func (a *ConnectorsApiService) LegacyUpdateConnectorExecute(r ApiLegacyUpdateConnectorRequest) (*ActionResponseProperties, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ActionResponseProperties + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.LegacyUpdateConnector") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/actions/action/{actionId}" + localVarPath = strings.Replace(localVarPath, "{"+"actionId"+"}", url.PathEscape(parameterValueToString(r.actionId, "actionId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.kbnXsrf == nil { + return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") + } + if r.legacyUpdateConnectorRequestBodyProperties == nil { + return localVarReturnValue, nil, reportError("legacyUpdateConnectorRequestBodyProperties is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + // body params + localVarPostBody = r.legacyUpdateConnectorRequestBodyProperties + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["ApiKey"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v Model404Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRunConnectorRequest struct { + ctx context.Context + ApiService ConnectorsApi + kbnXsrf *string + connectorId string + spaceId string + runConnectorRequestBodyProperties *RunConnectorRequestBodyProperties +} + +// Cross-site request forgery protection +func (r ApiRunConnectorRequest) KbnXsrf(kbnXsrf string) ApiRunConnectorRequest { + r.kbnXsrf = &kbnXsrf + return r +} + +func (r ApiRunConnectorRequest) RunConnectorRequestBodyProperties(runConnectorRequestBodyProperties RunConnectorRequestBodyProperties) ApiRunConnectorRequest { + r.runConnectorRequestBodyProperties = &runConnectorRequestBodyProperties + return r +} + +func (r ApiRunConnectorRequest) Execute() (*RunConnector200Response, *http.Response, error) { + return r.ApiService.RunConnectorExecute(r) +} + +/* +RunConnector Runs a connector. + +You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. If you use an index connector, you must also have `all`, `create`, `index`, or `write` indices privileges. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param connectorId An identifier for the connector. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiRunConnectorRequest +*/ +func (a *ConnectorsApiService) RunConnector(ctx context.Context, connectorId string, spaceId string) ApiRunConnectorRequest { + return ApiRunConnectorRequest{ + ApiService: a, + ctx: ctx, + connectorId: connectorId, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return RunConnector200Response +func (a *ConnectorsApiService) RunConnectorExecute(r ApiRunConnectorRequest) (*RunConnector200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RunConnector200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.RunConnector") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/actions/connector/{connectorId}/_execute" + localVarPath = strings.Replace(localVarPath, "{"+"connectorId"+"}", url.PathEscape(parameterValueToString(r.connectorId, "connectorId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.kbnXsrf == nil { + return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") + } + if r.runConnectorRequestBodyProperties == nil { + return localVarReturnValue, nil, reportError("runConnectorRequestBodyProperties is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + // body params + localVarPostBody = r.runConnectorRequestBodyProperties + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["ApiKey"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Model401Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateConnectorRequest struct { + ctx context.Context + ApiService ConnectorsApi + kbnXsrf *string + connectorId string + spaceId string + updateConnectorRequestBodyProperties *UpdateConnectorRequestBodyProperties +} + +// Cross-site request forgery protection +func (r ApiUpdateConnectorRequest) KbnXsrf(kbnXsrf string) ApiUpdateConnectorRequest { + r.kbnXsrf = &kbnXsrf + return r +} + +func (r ApiUpdateConnectorRequest) UpdateConnectorRequestBodyProperties(updateConnectorRequestBodyProperties UpdateConnectorRequestBodyProperties) ApiUpdateConnectorRequest { + r.updateConnectorRequestBodyProperties = &updateConnectorRequestBodyProperties + return r +} + +func (r ApiUpdateConnectorRequest) Execute() (*ConnectorResponseProperties, *http.Response, error) { + return r.ApiService.UpdateConnectorExecute(r) +} + +/* +UpdateConnector Updates the attributes for a connector. + +You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param connectorId An identifier for the connector. + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiUpdateConnectorRequest +*/ +func (a *ConnectorsApiService) UpdateConnector(ctx context.Context, connectorId string, spaceId string) ApiUpdateConnectorRequest { + return ApiUpdateConnectorRequest{ + ApiService: a, + ctx: ctx, + connectorId: connectorId, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return ConnectorResponseProperties +func (a *ConnectorsApiService) UpdateConnectorExecute(r ApiUpdateConnectorRequest) (*ConnectorResponseProperties, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ConnectorResponseProperties + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.UpdateConnector") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/actions/connector/{connectorId}" + localVarPath = strings.Replace(localVarPath, "{"+"connectorId"+"}", url.PathEscape(parameterValueToString(r.connectorId, "connectorId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.kbnXsrf == nil { + return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") + } + if r.updateConnectorRequestBodyProperties == nil { + return localVarReturnValue, nil, reportError("updateConnectorRequestBodyProperties is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + // body params + localVarPostBody = r.updateConnectorRequestBodyProperties + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKeyAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["ApiKey"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateConnector400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Model401Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Model404Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/generated/kibanaactions/client.go b/generated/kibanaactions/client.go new file mode 100644 index 000000000..1bfbc80ed --- /dev/null +++ b/generated/kibanaactions/client.go @@ -0,0 +1,659 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" +) + +var ( + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") +) + +// APIClient manages communication with the Connectors API v0.1 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + ConnectorsApi ConnectorsApi +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.ConnectorsApi = (*ConnectorsApiService)(&c.common) + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +func parameterValueToString(obj interface{}, key string) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) + } + var param, ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap, err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t, ok := obj.(MappedNullable); ok { + dataMap, err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i := 0; i < lenIndValue; i++ { + var arrayValue = indValue.Index(i) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType) + } + return + + case reflect.Map: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + iter := indValue.MapRange() + for iter.Next() { + k, v := iter.Key(), iter.Value() + parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType) + } + return + + case reflect.Interface: + fallthrough + case reflect.Ptr: + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType) + return + + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } + } + + switch valuesMap := headerOrQueryParams.(type) { + case url.Values: + if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { + valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) + } else { + valuesMap.Add(keyPrefix, value) + } + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *Configuration { + return c.cfg +} + +type formFile struct { + fileBytes []byte + fileName string + formFileName string +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + formFiles []formFile) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + // Basic HTTP Authentication + if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { + localVarRequest.SetBasicAuth(auth.UserName, auth.Password) + } + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if xmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if jsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + err = file.Close() + if err != nil { + return err + } + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if jsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if xmlCheck.MatchString(contentType) { + err = xml.NewEncoder(bodyBuf).Encode(body) + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericOpenAPIError Provides access to the body, error and model on returned errors. +type GenericOpenAPIError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericOpenAPIError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericOpenAPIError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericOpenAPIError) Model() interface{} { + return e.model +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + + // status title (detail) + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/generated/kibanaactions/configuration.go b/generated/kibanaactions/configuration.go new file mode 100644 index 000000000..493a7a22a --- /dev/null +++ b/generated/kibanaactions/configuration.go @@ -0,0 +1,305 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "context" + "fmt" + "net/http" + "strings" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextBasicAuth takes BasicAuth as authentication for the request. + ContextBasicAuth = contextKey("basic") + + // ContextAPIKeys takes a string apikey as authentication for the request + ContextAPIKeys = contextKey("apiKeys") + + // ContextServerIndex uses a server configuration from the index. + ContextServerIndex = contextKey("serverIndex") + + // ContextOperationServerIndices uses a server configuration from the index mapping. + ContextOperationServerIndices = contextKey("serverOperationIndices") + + // ContextServerVariables overrides a server configuration variables. + ContextServerVariables = contextKey("serverVariables") + + // ContextOperationServerVariables overrides a server configuration variables using operation specific values. + ContextOperationServerVariables = contextKey("serverOperationVariables") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +// ServerVariable stores the information about a server variable +type ServerVariable struct { + Description string + DefaultValue string + EnumValues []string +} + +// ServerConfiguration stores the information about a server +type ServerConfiguration struct { + URL string + Description string + Variables map[string]ServerVariable +} + +// ServerConfigurations stores multiple ServerConfiguration items +type ServerConfigurations []ServerConfiguration + +// Configuration stores the configuration of the API client +type Configuration struct { + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + Debug bool `json:"debug,omitempty"` + Servers ServerConfigurations + OperationServers map[string]ServerConfigurations + HTTPClient *http.Client +} + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *Configuration { + cfg := &Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Servers: ServerConfigurations{ + { + URL: "http://localhost:5601", + Description: "local", + }, + }, + OperationServers: map[string]ServerConfigurations{ + "ConnectorsApiService.CreateConnector": { + { + URL: "https://localhost:5601", + Description: "No description provided", + }, + }, + "ConnectorsApiService.DeleteConnector": { + { + URL: "https://localhost:5601", + Description: "No description provided", + }, + }, + "ConnectorsApiService.GetConnector": { + { + URL: "https://localhost:5601", + Description: "No description provided", + }, + }, + "ConnectorsApiService.GetConnectorTypes": { + { + URL: "https://localhost:5601", + Description: "No description provided", + }, + }, + "ConnectorsApiService.GetConnectors": { + { + URL: "https://localhost:5601", + Description: "No description provided", + }, + }, + "ConnectorsApiService.LegacyCreateConnector": { + { + URL: "https://localhost:5601", + Description: "No description provided", + }, + }, + "ConnectorsApiService.LegacyDeleteConnector": { + { + URL: "https://localhost:5601", + Description: "No description provided", + }, + }, + "ConnectorsApiService.LegacyGetConnector": { + { + URL: "https://localhost:5601", + Description: "No description provided", + }, + }, + "ConnectorsApiService.LegacyGetConnectorTypes": { + { + URL: "https://localhost:5601", + Description: "No description provided", + }, + }, + "ConnectorsApiService.LegacyGetConnectors": { + { + URL: "https://localhost:5601", + Description: "No description provided", + }, + }, + "ConnectorsApiService.LegacyRunConnector": { + { + URL: "https://localhost:5601", + Description: "No description provided", + }, + }, + "ConnectorsApiService.LegacyUpdateConnector": { + { + URL: "https://localhost:5601", + Description: "No description provided", + }, + }, + "ConnectorsApiService.RunConnector": { + { + URL: "https://localhost:5601", + Description: "No description provided", + }, + }, + "ConnectorsApiService.UpdateConnector": { + { + URL: "https://localhost:5601", + Description: "No description provided", + }, + }, + }, + } + return cfg +} + +// AddDefaultHeader adds a new HTTP header to the default header in the request +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} + +// URL formats template on a index using given variables +func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { + if index < 0 || len(sc) <= index { + return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) + } + server := sc[index] + url := server.URL + + // go through variables and replace placeholders + for name, variable := range server.Variables { + if value, ok := variables[name]; ok { + found := bool(len(variable.EnumValues) == 0) + for _, enumValue := range variable.EnumValues { + if value == enumValue { + found = true + } + } + if !found { + return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) + } + url = strings.Replace(url, "{"+name+"}", value, -1) + } else { + url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) + } + } + return url, nil +} + +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { + return c.Servers.URL(index, variables) +} + +func getServerIndex(ctx context.Context) (int, error) { + si := ctx.Value(ContextServerIndex) + if si != nil { + if index, ok := si.(int); ok { + return index, nil + } + return 0, reportError("Invalid type %T should be int", si) + } + return 0, nil +} + +func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { + osi := ctx.Value(ContextOperationServerIndices) + if osi != nil { + if operationIndices, ok := osi.(map[string]int); !ok { + return 0, reportError("Invalid type %T should be map[string]int", osi) + } else { + index, ok := operationIndices[endpoint] + if ok { + return index, nil + } + } + } + return getServerIndex(ctx) +} + +func getServerVariables(ctx context.Context) (map[string]string, error) { + sv := ctx.Value(ContextServerVariables) + if sv != nil { + if variables, ok := sv.(map[string]string); ok { + return variables, nil + } + return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) + } + return nil, nil +} + +func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { + osv := ctx.Value(ContextOperationServerVariables) + if osv != nil { + if operationVariables, ok := osv.(map[string]map[string]string); !ok { + return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) + } else { + variables, ok := operationVariables[endpoint] + if ok { + return variables, nil + } + } + } + return getServerVariables(ctx) +} + +// ServerURLWithContext returns a new server URL given an endpoint +func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { + sc, ok := c.OperationServers[endpoint] + if !ok { + sc = c.Servers + } + + if ctx == nil { + return sc.URL(0, nil) + } + + index, err := getServerOperationIndex(ctx, endpoint) + if err != nil { + return "", err + } + + variables, err := getServerOperationVariables(ctx, endpoint) + if err != nil { + return "", err + } + + return sc.URL(index, variables) +} diff --git a/generated/kibanaactions/docs/ActionResponseProperties.md b/generated/kibanaactions/docs/ActionResponseProperties.md new file mode 100644 index 000000000..f85473696 --- /dev/null +++ b/generated/kibanaactions/docs/ActionResponseProperties.md @@ -0,0 +1,212 @@ +# ActionResponseProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActionTypeId** | Pointer to **string** | | [optional] +**Config** | Pointer to **map[string]interface{}** | | [optional] +**Id** | Pointer to **string** | | [optional] +**IsDeprecated** | Pointer to **bool** | Indicates whether the action type is deprecated. | [optional] +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the action. | [optional] +**IsPreconfigured** | Pointer to **bool** | Indicates whether it is a preconfigured action. | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### NewActionResponseProperties + +`func NewActionResponseProperties() *ActionResponseProperties` + +NewActionResponseProperties instantiates a new ActionResponseProperties object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewActionResponsePropertiesWithDefaults + +`func NewActionResponsePropertiesWithDefaults() *ActionResponseProperties` + +NewActionResponsePropertiesWithDefaults instantiates a new ActionResponseProperties object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetActionTypeId + +`func (o *ActionResponseProperties) GetActionTypeId() string` + +GetActionTypeId returns the ActionTypeId field if non-nil, zero value otherwise. + +### GetActionTypeIdOk + +`func (o *ActionResponseProperties) GetActionTypeIdOk() (*string, bool)` + +GetActionTypeIdOk returns a tuple with the ActionTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActionTypeId + +`func (o *ActionResponseProperties) SetActionTypeId(v string)` + +SetActionTypeId sets ActionTypeId field to given value. + +### HasActionTypeId + +`func (o *ActionResponseProperties) HasActionTypeId() bool` + +HasActionTypeId returns a boolean if a field has been set. + +### GetConfig + +`func (o *ActionResponseProperties) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *ActionResponseProperties) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *ActionResponseProperties) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + +### HasConfig + +`func (o *ActionResponseProperties) HasConfig() bool` + +HasConfig returns a boolean if a field has been set. + +### GetId + +`func (o *ActionResponseProperties) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ActionResponseProperties) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ActionResponseProperties) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *ActionResponseProperties) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetIsDeprecated + +`func (o *ActionResponseProperties) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ActionResponseProperties) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ActionResponseProperties) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + +### HasIsDeprecated + +`func (o *ActionResponseProperties) HasIsDeprecated() bool` + +HasIsDeprecated returns a boolean if a field has been set. + +### GetIsMissingSecrets + +`func (o *ActionResponseProperties) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ActionResponseProperties) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ActionResponseProperties) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ActionResponseProperties) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ActionResponseProperties) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ActionResponseProperties) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ActionResponseProperties) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + +### HasIsPreconfigured + +`func (o *ActionResponseProperties) HasIsPreconfigured() bool` + +HasIsPreconfigured returns a boolean if a field has been set. + +### GetName + +`func (o *ActionResponseProperties) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ActionResponseProperties) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ActionResponseProperties) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ActionResponseProperties) HasName() bool` + +HasName returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/AlertIdentifierMapping.md b/generated/kibanaactions/docs/AlertIdentifierMapping.md new file mode 100644 index 000000000..9a5c1898e --- /dev/null +++ b/generated/kibanaactions/docs/AlertIdentifierMapping.md @@ -0,0 +1,114 @@ +# AlertIdentifierMapping + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FieldType** | **string** | The type of field in Swimlane. | +**Id** | **string** | The identifier for the field in Swimlane. | +**Key** | **string** | The key for the field in Swimlane. | +**Name** | **string** | The name of the field in Swimlane. | + +## Methods + +### NewAlertIdentifierMapping + +`func NewAlertIdentifierMapping(fieldType string, id string, key string, name string, ) *AlertIdentifierMapping` + +NewAlertIdentifierMapping instantiates a new AlertIdentifierMapping object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAlertIdentifierMappingWithDefaults + +`func NewAlertIdentifierMappingWithDefaults() *AlertIdentifierMapping` + +NewAlertIdentifierMappingWithDefaults instantiates a new AlertIdentifierMapping object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFieldType + +`func (o *AlertIdentifierMapping) GetFieldType() string` + +GetFieldType returns the FieldType field if non-nil, zero value otherwise. + +### GetFieldTypeOk + +`func (o *AlertIdentifierMapping) GetFieldTypeOk() (*string, bool)` + +GetFieldTypeOk returns a tuple with the FieldType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFieldType + +`func (o *AlertIdentifierMapping) SetFieldType(v string)` + +SetFieldType sets FieldType field to given value. + + +### GetId + +`func (o *AlertIdentifierMapping) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *AlertIdentifierMapping) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *AlertIdentifierMapping) SetId(v string)` + +SetId sets Id field to given value. + + +### GetKey + +`func (o *AlertIdentifierMapping) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *AlertIdentifierMapping) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *AlertIdentifierMapping) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetName + +`func (o *AlertIdentifierMapping) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AlertIdentifierMapping) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *AlertIdentifierMapping) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CaseCommentMapping.md b/generated/kibanaactions/docs/CaseCommentMapping.md new file mode 100644 index 000000000..cb47fa08c --- /dev/null +++ b/generated/kibanaactions/docs/CaseCommentMapping.md @@ -0,0 +1,114 @@ +# CaseCommentMapping + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FieldType** | **string** | The type of field in Swimlane. | +**Id** | **string** | The identifier for the field in Swimlane. | +**Key** | **string** | The key for the field in Swimlane. | +**Name** | **string** | The name of the field in Swimlane. | + +## Methods + +### NewCaseCommentMapping + +`func NewCaseCommentMapping(fieldType string, id string, key string, name string, ) *CaseCommentMapping` + +NewCaseCommentMapping instantiates a new CaseCommentMapping object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCaseCommentMappingWithDefaults + +`func NewCaseCommentMappingWithDefaults() *CaseCommentMapping` + +NewCaseCommentMappingWithDefaults instantiates a new CaseCommentMapping object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFieldType + +`func (o *CaseCommentMapping) GetFieldType() string` + +GetFieldType returns the FieldType field if non-nil, zero value otherwise. + +### GetFieldTypeOk + +`func (o *CaseCommentMapping) GetFieldTypeOk() (*string, bool)` + +GetFieldTypeOk returns a tuple with the FieldType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFieldType + +`func (o *CaseCommentMapping) SetFieldType(v string)` + +SetFieldType sets FieldType field to given value. + + +### GetId + +`func (o *CaseCommentMapping) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CaseCommentMapping) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CaseCommentMapping) SetId(v string)` + +SetId sets Id field to given value. + + +### GetKey + +`func (o *CaseCommentMapping) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *CaseCommentMapping) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *CaseCommentMapping) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetName + +`func (o *CaseCommentMapping) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CaseCommentMapping) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CaseCommentMapping) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CaseDescriptionMapping.md b/generated/kibanaactions/docs/CaseDescriptionMapping.md new file mode 100644 index 000000000..6771caef9 --- /dev/null +++ b/generated/kibanaactions/docs/CaseDescriptionMapping.md @@ -0,0 +1,114 @@ +# CaseDescriptionMapping + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FieldType** | **string** | The type of field in Swimlane. | +**Id** | **string** | The identifier for the field in Swimlane. | +**Key** | **string** | The key for the field in Swimlane. | +**Name** | **string** | The name of the field in Swimlane. | + +## Methods + +### NewCaseDescriptionMapping + +`func NewCaseDescriptionMapping(fieldType string, id string, key string, name string, ) *CaseDescriptionMapping` + +NewCaseDescriptionMapping instantiates a new CaseDescriptionMapping object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCaseDescriptionMappingWithDefaults + +`func NewCaseDescriptionMappingWithDefaults() *CaseDescriptionMapping` + +NewCaseDescriptionMappingWithDefaults instantiates a new CaseDescriptionMapping object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFieldType + +`func (o *CaseDescriptionMapping) GetFieldType() string` + +GetFieldType returns the FieldType field if non-nil, zero value otherwise. + +### GetFieldTypeOk + +`func (o *CaseDescriptionMapping) GetFieldTypeOk() (*string, bool)` + +GetFieldTypeOk returns a tuple with the FieldType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFieldType + +`func (o *CaseDescriptionMapping) SetFieldType(v string)` + +SetFieldType sets FieldType field to given value. + + +### GetId + +`func (o *CaseDescriptionMapping) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CaseDescriptionMapping) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CaseDescriptionMapping) SetId(v string)` + +SetId sets Id field to given value. + + +### GetKey + +`func (o *CaseDescriptionMapping) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *CaseDescriptionMapping) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *CaseDescriptionMapping) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetName + +`func (o *CaseDescriptionMapping) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CaseDescriptionMapping) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CaseDescriptionMapping) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CaseIdentifierMapping.md b/generated/kibanaactions/docs/CaseIdentifierMapping.md new file mode 100644 index 000000000..a639b3227 --- /dev/null +++ b/generated/kibanaactions/docs/CaseIdentifierMapping.md @@ -0,0 +1,114 @@ +# CaseIdentifierMapping + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FieldType** | **string** | The type of field in Swimlane. | +**Id** | **string** | The identifier for the field in Swimlane. | +**Key** | **string** | The key for the field in Swimlane. | +**Name** | **string** | The name of the field in Swimlane. | + +## Methods + +### NewCaseIdentifierMapping + +`func NewCaseIdentifierMapping(fieldType string, id string, key string, name string, ) *CaseIdentifierMapping` + +NewCaseIdentifierMapping instantiates a new CaseIdentifierMapping object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCaseIdentifierMappingWithDefaults + +`func NewCaseIdentifierMappingWithDefaults() *CaseIdentifierMapping` + +NewCaseIdentifierMappingWithDefaults instantiates a new CaseIdentifierMapping object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFieldType + +`func (o *CaseIdentifierMapping) GetFieldType() string` + +GetFieldType returns the FieldType field if non-nil, zero value otherwise. + +### GetFieldTypeOk + +`func (o *CaseIdentifierMapping) GetFieldTypeOk() (*string, bool)` + +GetFieldTypeOk returns a tuple with the FieldType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFieldType + +`func (o *CaseIdentifierMapping) SetFieldType(v string)` + +SetFieldType sets FieldType field to given value. + + +### GetId + +`func (o *CaseIdentifierMapping) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CaseIdentifierMapping) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CaseIdentifierMapping) SetId(v string)` + +SetId sets Id field to given value. + + +### GetKey + +`func (o *CaseIdentifierMapping) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *CaseIdentifierMapping) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *CaseIdentifierMapping) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetName + +`func (o *CaseIdentifierMapping) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CaseIdentifierMapping) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CaseIdentifierMapping) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CaseNameMapping.md b/generated/kibanaactions/docs/CaseNameMapping.md new file mode 100644 index 000000000..b5a52679a --- /dev/null +++ b/generated/kibanaactions/docs/CaseNameMapping.md @@ -0,0 +1,114 @@ +# CaseNameMapping + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FieldType** | **string** | The type of field in Swimlane. | +**Id** | **string** | The identifier for the field in Swimlane. | +**Key** | **string** | The key for the field in Swimlane. | +**Name** | **string** | The name of the field in Swimlane. | + +## Methods + +### NewCaseNameMapping + +`func NewCaseNameMapping(fieldType string, id string, key string, name string, ) *CaseNameMapping` + +NewCaseNameMapping instantiates a new CaseNameMapping object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCaseNameMappingWithDefaults + +`func NewCaseNameMappingWithDefaults() *CaseNameMapping` + +NewCaseNameMappingWithDefaults instantiates a new CaseNameMapping object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFieldType + +`func (o *CaseNameMapping) GetFieldType() string` + +GetFieldType returns the FieldType field if non-nil, zero value otherwise. + +### GetFieldTypeOk + +`func (o *CaseNameMapping) GetFieldTypeOk() (*string, bool)` + +GetFieldTypeOk returns a tuple with the FieldType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFieldType + +`func (o *CaseNameMapping) SetFieldType(v string)` + +SetFieldType sets FieldType field to given value. + + +### GetId + +`func (o *CaseNameMapping) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CaseNameMapping) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CaseNameMapping) SetId(v string)` + +SetId sets Id field to given value. + + +### GetKey + +`func (o *CaseNameMapping) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *CaseNameMapping) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *CaseNameMapping) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetName + +`func (o *CaseNameMapping) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CaseNameMapping) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CaseNameMapping) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConfigPropertiesCasesWebhook.md b/generated/kibanaactions/docs/ConfigPropertiesCasesWebhook.md new file mode 100644 index 000000000..c7a8897e0 --- /dev/null +++ b/generated/kibanaactions/docs/ConfigPropertiesCasesWebhook.md @@ -0,0 +1,380 @@ +# ConfigPropertiesCasesWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreateCommentJson** | Pointer to **string** | A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. | [optional] +**CreateCommentMethod** | Pointer to **string** | The REST API HTTP request method to create a case comment in the third-party system. Valid values are `patch`, `post`, and `put`. | [optional] [default to "put"] +**CreateCommentUrl** | Pointer to **string** | The REST API URL to create a case comment by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts setting`, add the hostname to the allowed hosts. | [optional] +**CreateIncidentJson** | **string** | A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. | +**CreateIncidentMethod** | Pointer to **string** | The REST API HTTP request method to create a case in the third-party system. Valid values are `patch`, `post`, and `put`. | [optional] [default to "post"] +**CreateIncidentResponseKey** | **string** | The JSON key in the create case response that contains the external case ID. | +**CreateIncidentUrl** | **string** | The REST API URL to create a case in the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. | +**GetIncidentResponseExternalTitleKey** | **string** | The JSON key in get case response that contains the external case title. | +**GetIncidentUrl** | **string** | The REST API URL to get the case by ID from the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. You can use a variable to add the external system ID to the URL. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. | +**HasAuth** | Pointer to **bool** | If true, a username and password for login type authentication must be provided. | [optional] [default to true] +**Headers** | Pointer to **string** | A set of key-value pairs sent as headers with the request URLs for the create case, update case, get case, and create comment methods. | [optional] +**UpdateIncidentJson** | **string** | The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. | +**UpdateIncidentMethod** | Pointer to **string** | The REST API HTTP request method to update the case in the third-party system. Valid values are `patch`, `post`, and `put`. | [optional] [default to "put"] +**UpdateIncidentUrl** | **string** | The REST API URL to update the case by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. | +**ViewIncidentUrl** | **string** | The URL to view the case in the external system. You can use variables to add the external system ID or external system title to the URL. | + +## Methods + +### NewConfigPropertiesCasesWebhook + +`func NewConfigPropertiesCasesWebhook(createIncidentJson string, createIncidentResponseKey string, createIncidentUrl string, getIncidentResponseExternalTitleKey string, getIncidentUrl string, updateIncidentJson string, updateIncidentUrl string, viewIncidentUrl string, ) *ConfigPropertiesCasesWebhook` + +NewConfigPropertiesCasesWebhook instantiates a new ConfigPropertiesCasesWebhook object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConfigPropertiesCasesWebhookWithDefaults + +`func NewConfigPropertiesCasesWebhookWithDefaults() *ConfigPropertiesCasesWebhook` + +NewConfigPropertiesCasesWebhookWithDefaults instantiates a new ConfigPropertiesCasesWebhook object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCreateCommentJson + +`func (o *ConfigPropertiesCasesWebhook) GetCreateCommentJson() string` + +GetCreateCommentJson returns the CreateCommentJson field if non-nil, zero value otherwise. + +### GetCreateCommentJsonOk + +`func (o *ConfigPropertiesCasesWebhook) GetCreateCommentJsonOk() (*string, bool)` + +GetCreateCommentJsonOk returns a tuple with the CreateCommentJson field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreateCommentJson + +`func (o *ConfigPropertiesCasesWebhook) SetCreateCommentJson(v string)` + +SetCreateCommentJson sets CreateCommentJson field to given value. + +### HasCreateCommentJson + +`func (o *ConfigPropertiesCasesWebhook) HasCreateCommentJson() bool` + +HasCreateCommentJson returns a boolean if a field has been set. + +### GetCreateCommentMethod + +`func (o *ConfigPropertiesCasesWebhook) GetCreateCommentMethod() string` + +GetCreateCommentMethod returns the CreateCommentMethod field if non-nil, zero value otherwise. + +### GetCreateCommentMethodOk + +`func (o *ConfigPropertiesCasesWebhook) GetCreateCommentMethodOk() (*string, bool)` + +GetCreateCommentMethodOk returns a tuple with the CreateCommentMethod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreateCommentMethod + +`func (o *ConfigPropertiesCasesWebhook) SetCreateCommentMethod(v string)` + +SetCreateCommentMethod sets CreateCommentMethod field to given value. + +### HasCreateCommentMethod + +`func (o *ConfigPropertiesCasesWebhook) HasCreateCommentMethod() bool` + +HasCreateCommentMethod returns a boolean if a field has been set. + +### GetCreateCommentUrl + +`func (o *ConfigPropertiesCasesWebhook) GetCreateCommentUrl() string` + +GetCreateCommentUrl returns the CreateCommentUrl field if non-nil, zero value otherwise. + +### GetCreateCommentUrlOk + +`func (o *ConfigPropertiesCasesWebhook) GetCreateCommentUrlOk() (*string, bool)` + +GetCreateCommentUrlOk returns a tuple with the CreateCommentUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreateCommentUrl + +`func (o *ConfigPropertiesCasesWebhook) SetCreateCommentUrl(v string)` + +SetCreateCommentUrl sets CreateCommentUrl field to given value. + +### HasCreateCommentUrl + +`func (o *ConfigPropertiesCasesWebhook) HasCreateCommentUrl() bool` + +HasCreateCommentUrl returns a boolean if a field has been set. + +### GetCreateIncidentJson + +`func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentJson() string` + +GetCreateIncidentJson returns the CreateIncidentJson field if non-nil, zero value otherwise. + +### GetCreateIncidentJsonOk + +`func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentJsonOk() (*string, bool)` + +GetCreateIncidentJsonOk returns a tuple with the CreateIncidentJson field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreateIncidentJson + +`func (o *ConfigPropertiesCasesWebhook) SetCreateIncidentJson(v string)` + +SetCreateIncidentJson sets CreateIncidentJson field to given value. + + +### GetCreateIncidentMethod + +`func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentMethod() string` + +GetCreateIncidentMethod returns the CreateIncidentMethod field if non-nil, zero value otherwise. + +### GetCreateIncidentMethodOk + +`func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentMethodOk() (*string, bool)` + +GetCreateIncidentMethodOk returns a tuple with the CreateIncidentMethod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreateIncidentMethod + +`func (o *ConfigPropertiesCasesWebhook) SetCreateIncidentMethod(v string)` + +SetCreateIncidentMethod sets CreateIncidentMethod field to given value. + +### HasCreateIncidentMethod + +`func (o *ConfigPropertiesCasesWebhook) HasCreateIncidentMethod() bool` + +HasCreateIncidentMethod returns a boolean if a field has been set. + +### GetCreateIncidentResponseKey + +`func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentResponseKey() string` + +GetCreateIncidentResponseKey returns the CreateIncidentResponseKey field if non-nil, zero value otherwise. + +### GetCreateIncidentResponseKeyOk + +`func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentResponseKeyOk() (*string, bool)` + +GetCreateIncidentResponseKeyOk returns a tuple with the CreateIncidentResponseKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreateIncidentResponseKey + +`func (o *ConfigPropertiesCasesWebhook) SetCreateIncidentResponseKey(v string)` + +SetCreateIncidentResponseKey sets CreateIncidentResponseKey field to given value. + + +### GetCreateIncidentUrl + +`func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentUrl() string` + +GetCreateIncidentUrl returns the CreateIncidentUrl field if non-nil, zero value otherwise. + +### GetCreateIncidentUrlOk + +`func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentUrlOk() (*string, bool)` + +GetCreateIncidentUrlOk returns a tuple with the CreateIncidentUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreateIncidentUrl + +`func (o *ConfigPropertiesCasesWebhook) SetCreateIncidentUrl(v string)` + +SetCreateIncidentUrl sets CreateIncidentUrl field to given value. + + +### GetGetIncidentResponseExternalTitleKey + +`func (o *ConfigPropertiesCasesWebhook) GetGetIncidentResponseExternalTitleKey() string` + +GetGetIncidentResponseExternalTitleKey returns the GetIncidentResponseExternalTitleKey field if non-nil, zero value otherwise. + +### GetGetIncidentResponseExternalTitleKeyOk + +`func (o *ConfigPropertiesCasesWebhook) GetGetIncidentResponseExternalTitleKeyOk() (*string, bool)` + +GetGetIncidentResponseExternalTitleKeyOk returns a tuple with the GetIncidentResponseExternalTitleKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGetIncidentResponseExternalTitleKey + +`func (o *ConfigPropertiesCasesWebhook) SetGetIncidentResponseExternalTitleKey(v string)` + +SetGetIncidentResponseExternalTitleKey sets GetIncidentResponseExternalTitleKey field to given value. + + +### GetGetIncidentUrl + +`func (o *ConfigPropertiesCasesWebhook) GetGetIncidentUrl() string` + +GetGetIncidentUrl returns the GetIncidentUrl field if non-nil, zero value otherwise. + +### GetGetIncidentUrlOk + +`func (o *ConfigPropertiesCasesWebhook) GetGetIncidentUrlOk() (*string, bool)` + +GetGetIncidentUrlOk returns a tuple with the GetIncidentUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGetIncidentUrl + +`func (o *ConfigPropertiesCasesWebhook) SetGetIncidentUrl(v string)` + +SetGetIncidentUrl sets GetIncidentUrl field to given value. + + +### GetHasAuth + +`func (o *ConfigPropertiesCasesWebhook) GetHasAuth() bool` + +GetHasAuth returns the HasAuth field if non-nil, zero value otherwise. + +### GetHasAuthOk + +`func (o *ConfigPropertiesCasesWebhook) GetHasAuthOk() (*bool, bool)` + +GetHasAuthOk returns a tuple with the HasAuth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHasAuth + +`func (o *ConfigPropertiesCasesWebhook) SetHasAuth(v bool)` + +SetHasAuth sets HasAuth field to given value. + +### HasHasAuth + +`func (o *ConfigPropertiesCasesWebhook) HasHasAuth() bool` + +HasHasAuth returns a boolean if a field has been set. + +### GetHeaders + +`func (o *ConfigPropertiesCasesWebhook) GetHeaders() string` + +GetHeaders returns the Headers field if non-nil, zero value otherwise. + +### GetHeadersOk + +`func (o *ConfigPropertiesCasesWebhook) GetHeadersOk() (*string, bool)` + +GetHeadersOk returns a tuple with the Headers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeaders + +`func (o *ConfigPropertiesCasesWebhook) SetHeaders(v string)` + +SetHeaders sets Headers field to given value. + +### HasHeaders + +`func (o *ConfigPropertiesCasesWebhook) HasHeaders() bool` + +HasHeaders returns a boolean if a field has been set. + +### GetUpdateIncidentJson + +`func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentJson() string` + +GetUpdateIncidentJson returns the UpdateIncidentJson field if non-nil, zero value otherwise. + +### GetUpdateIncidentJsonOk + +`func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentJsonOk() (*string, bool)` + +GetUpdateIncidentJsonOk returns a tuple with the UpdateIncidentJson field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdateIncidentJson + +`func (o *ConfigPropertiesCasesWebhook) SetUpdateIncidentJson(v string)` + +SetUpdateIncidentJson sets UpdateIncidentJson field to given value. + + +### GetUpdateIncidentMethod + +`func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentMethod() string` + +GetUpdateIncidentMethod returns the UpdateIncidentMethod field if non-nil, zero value otherwise. + +### GetUpdateIncidentMethodOk + +`func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentMethodOk() (*string, bool)` + +GetUpdateIncidentMethodOk returns a tuple with the UpdateIncidentMethod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdateIncidentMethod + +`func (o *ConfigPropertiesCasesWebhook) SetUpdateIncidentMethod(v string)` + +SetUpdateIncidentMethod sets UpdateIncidentMethod field to given value. + +### HasUpdateIncidentMethod + +`func (o *ConfigPropertiesCasesWebhook) HasUpdateIncidentMethod() bool` + +HasUpdateIncidentMethod returns a boolean if a field has been set. + +### GetUpdateIncidentUrl + +`func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentUrl() string` + +GetUpdateIncidentUrl returns the UpdateIncidentUrl field if non-nil, zero value otherwise. + +### GetUpdateIncidentUrlOk + +`func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentUrlOk() (*string, bool)` + +GetUpdateIncidentUrlOk returns a tuple with the UpdateIncidentUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdateIncidentUrl + +`func (o *ConfigPropertiesCasesWebhook) SetUpdateIncidentUrl(v string)` + +SetUpdateIncidentUrl sets UpdateIncidentUrl field to given value. + + +### GetViewIncidentUrl + +`func (o *ConfigPropertiesCasesWebhook) GetViewIncidentUrl() string` + +GetViewIncidentUrl returns the ViewIncidentUrl field if non-nil, zero value otherwise. + +### GetViewIncidentUrlOk + +`func (o *ConfigPropertiesCasesWebhook) GetViewIncidentUrlOk() (*string, bool)` + +GetViewIncidentUrlOk returns a tuple with the ViewIncidentUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetViewIncidentUrl + +`func (o *ConfigPropertiesCasesWebhook) SetViewIncidentUrl(v string)` + +SetViewIncidentUrl sets ViewIncidentUrl field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConfigPropertiesIndex.md b/generated/kibanaactions/docs/ConfigPropertiesIndex.md new file mode 100644 index 000000000..c524f25d4 --- /dev/null +++ b/generated/kibanaactions/docs/ConfigPropertiesIndex.md @@ -0,0 +1,113 @@ +# ConfigPropertiesIndex + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ExecutionTimeField** | Pointer to **NullableString** | Specifies a field that will contain the time the alert condition was detected. | [optional] +**Index** | **string** | The Elasticsearch index to be written to. | +**Refresh** | Pointer to **bool** | The refresh policy for the write request, which affects when changes are made visible to search. Refer to the refresh setting for Elasticsearch document APIs. | [optional] [default to false] + +## Methods + +### NewConfigPropertiesIndex + +`func NewConfigPropertiesIndex(index string, ) *ConfigPropertiesIndex` + +NewConfigPropertiesIndex instantiates a new ConfigPropertiesIndex object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConfigPropertiesIndexWithDefaults + +`func NewConfigPropertiesIndexWithDefaults() *ConfigPropertiesIndex` + +NewConfigPropertiesIndexWithDefaults instantiates a new ConfigPropertiesIndex object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetExecutionTimeField + +`func (o *ConfigPropertiesIndex) GetExecutionTimeField() string` + +GetExecutionTimeField returns the ExecutionTimeField field if non-nil, zero value otherwise. + +### GetExecutionTimeFieldOk + +`func (o *ConfigPropertiesIndex) GetExecutionTimeFieldOk() (*string, bool)` + +GetExecutionTimeFieldOk returns a tuple with the ExecutionTimeField field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExecutionTimeField + +`func (o *ConfigPropertiesIndex) SetExecutionTimeField(v string)` + +SetExecutionTimeField sets ExecutionTimeField field to given value. + +### HasExecutionTimeField + +`func (o *ConfigPropertiesIndex) HasExecutionTimeField() bool` + +HasExecutionTimeField returns a boolean if a field has been set. + +### SetExecutionTimeFieldNil + +`func (o *ConfigPropertiesIndex) SetExecutionTimeFieldNil(b bool)` + + SetExecutionTimeFieldNil sets the value for ExecutionTimeField to be an explicit nil + +### UnsetExecutionTimeField +`func (o *ConfigPropertiesIndex) UnsetExecutionTimeField()` + +UnsetExecutionTimeField ensures that no value is present for ExecutionTimeField, not even an explicit nil +### GetIndex + +`func (o *ConfigPropertiesIndex) GetIndex() string` + +GetIndex returns the Index field if non-nil, zero value otherwise. + +### GetIndexOk + +`func (o *ConfigPropertiesIndex) GetIndexOk() (*string, bool)` + +GetIndexOk returns a tuple with the Index field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIndex + +`func (o *ConfigPropertiesIndex) SetIndex(v string)` + +SetIndex sets Index field to given value. + + +### GetRefresh + +`func (o *ConfigPropertiesIndex) GetRefresh() bool` + +GetRefresh returns the Refresh field if non-nil, zero value otherwise. + +### GetRefreshOk + +`func (o *ConfigPropertiesIndex) GetRefreshOk() (*bool, bool)` + +GetRefreshOk returns a tuple with the Refresh field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefresh + +`func (o *ConfigPropertiesIndex) SetRefresh(v bool)` + +SetRefresh sets Refresh field to given value. + +### HasRefresh + +`func (o *ConfigPropertiesIndex) HasRefresh() bool` + +HasRefresh returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConfigPropertiesJira.md b/generated/kibanaactions/docs/ConfigPropertiesJira.md new file mode 100644 index 000000000..5e704f1c2 --- /dev/null +++ b/generated/kibanaactions/docs/ConfigPropertiesJira.md @@ -0,0 +1,72 @@ +# ConfigPropertiesJira + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiUrl** | **string** | The Jira instance URL. | +**ProjectKey** | **string** | The Jira project key. | + +## Methods + +### NewConfigPropertiesJira + +`func NewConfigPropertiesJira(apiUrl string, projectKey string, ) *ConfigPropertiesJira` + +NewConfigPropertiesJira instantiates a new ConfigPropertiesJira object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConfigPropertiesJiraWithDefaults + +`func NewConfigPropertiesJiraWithDefaults() *ConfigPropertiesJira` + +NewConfigPropertiesJiraWithDefaults instantiates a new ConfigPropertiesJira object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiUrl + +`func (o *ConfigPropertiesJira) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *ConfigPropertiesJira) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *ConfigPropertiesJira) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + + +### GetProjectKey + +`func (o *ConfigPropertiesJira) GetProjectKey() string` + +GetProjectKey returns the ProjectKey field if non-nil, zero value otherwise. + +### GetProjectKeyOk + +`func (o *ConfigPropertiesJira) GetProjectKeyOk() (*string, bool)` + +GetProjectKeyOk returns a tuple with the ProjectKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProjectKey + +`func (o *ConfigPropertiesJira) SetProjectKey(v string)` + +SetProjectKey sets ProjectKey field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConfigPropertiesOpsgenie.md b/generated/kibanaactions/docs/ConfigPropertiesOpsgenie.md new file mode 100644 index 000000000..77f85a0f7 --- /dev/null +++ b/generated/kibanaactions/docs/ConfigPropertiesOpsgenie.md @@ -0,0 +1,51 @@ +# ConfigPropertiesOpsgenie + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiUrl** | **string** | The Opsgenie URL. For example, `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. | + +## Methods + +### NewConfigPropertiesOpsgenie + +`func NewConfigPropertiesOpsgenie(apiUrl string, ) *ConfigPropertiesOpsgenie` + +NewConfigPropertiesOpsgenie instantiates a new ConfigPropertiesOpsgenie object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConfigPropertiesOpsgenieWithDefaults + +`func NewConfigPropertiesOpsgenieWithDefaults() *ConfigPropertiesOpsgenie` + +NewConfigPropertiesOpsgenieWithDefaults instantiates a new ConfigPropertiesOpsgenie object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiUrl + +`func (o *ConfigPropertiesOpsgenie) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *ConfigPropertiesOpsgenie) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *ConfigPropertiesOpsgenie) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConfigPropertiesResilient.md b/generated/kibanaactions/docs/ConfigPropertiesResilient.md new file mode 100644 index 000000000..3573cc5dd --- /dev/null +++ b/generated/kibanaactions/docs/ConfigPropertiesResilient.md @@ -0,0 +1,72 @@ +# ConfigPropertiesResilient + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiUrl** | **string** | The IBM Resilient instance URL. | +**OrgId** | **string** | The IBM Resilient organization ID. | + +## Methods + +### NewConfigPropertiesResilient + +`func NewConfigPropertiesResilient(apiUrl string, orgId string, ) *ConfigPropertiesResilient` + +NewConfigPropertiesResilient instantiates a new ConfigPropertiesResilient object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConfigPropertiesResilientWithDefaults + +`func NewConfigPropertiesResilientWithDefaults() *ConfigPropertiesResilient` + +NewConfigPropertiesResilientWithDefaults instantiates a new ConfigPropertiesResilient object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiUrl + +`func (o *ConfigPropertiesResilient) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *ConfigPropertiesResilient) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *ConfigPropertiesResilient) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + + +### GetOrgId + +`func (o *ConfigPropertiesResilient) GetOrgId() string` + +GetOrgId returns the OrgId field if non-nil, zero value otherwise. + +### GetOrgIdOk + +`func (o *ConfigPropertiesResilient) GetOrgIdOk() (*string, bool)` + +GetOrgIdOk returns a tuple with the OrgId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrgId + +`func (o *ConfigPropertiesResilient) SetOrgId(v string)` + +SetOrgId sets OrgId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConfigPropertiesServicenow.md b/generated/kibanaactions/docs/ConfigPropertiesServicenow.md new file mode 100644 index 000000000..07413b9ba --- /dev/null +++ b/generated/kibanaactions/docs/ConfigPropertiesServicenow.md @@ -0,0 +1,181 @@ +# ConfigPropertiesServicenow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiUrl** | **string** | The ServiceNow instance URL. | +**ClientId** | Pointer to **string** | The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. | [optional] +**IsOAuth** | Pointer to **bool** | The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). | [optional] [default to false] +**JwtKeyId** | Pointer to **string** | The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. | [optional] +**UserIdentifierValue** | Pointer to **string** | The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. | [optional] +**UsesTableApi** | Pointer to **bool** | Determines whether the connector uses the Table API or the Import Set API. This property is supported only for ServiceNow ITSM and ServiceNow SecOps connectors. NOTE: If this property is set to `false`, the Elastic application should be installed in ServiceNow. | [optional] [default to true] + +## Methods + +### NewConfigPropertiesServicenow + +`func NewConfigPropertiesServicenow(apiUrl string, ) *ConfigPropertiesServicenow` + +NewConfigPropertiesServicenow instantiates a new ConfigPropertiesServicenow object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConfigPropertiesServicenowWithDefaults + +`func NewConfigPropertiesServicenowWithDefaults() *ConfigPropertiesServicenow` + +NewConfigPropertiesServicenowWithDefaults instantiates a new ConfigPropertiesServicenow object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiUrl + +`func (o *ConfigPropertiesServicenow) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *ConfigPropertiesServicenow) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *ConfigPropertiesServicenow) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + + +### GetClientId + +`func (o *ConfigPropertiesServicenow) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *ConfigPropertiesServicenow) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *ConfigPropertiesServicenow) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + +### HasClientId + +`func (o *ConfigPropertiesServicenow) HasClientId() bool` + +HasClientId returns a boolean if a field has been set. + +### GetIsOAuth + +`func (o *ConfigPropertiesServicenow) GetIsOAuth() bool` + +GetIsOAuth returns the IsOAuth field if non-nil, zero value otherwise. + +### GetIsOAuthOk + +`func (o *ConfigPropertiesServicenow) GetIsOAuthOk() (*bool, bool)` + +GetIsOAuthOk returns a tuple with the IsOAuth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsOAuth + +`func (o *ConfigPropertiesServicenow) SetIsOAuth(v bool)` + +SetIsOAuth sets IsOAuth field to given value. + +### HasIsOAuth + +`func (o *ConfigPropertiesServicenow) HasIsOAuth() bool` + +HasIsOAuth returns a boolean if a field has been set. + +### GetJwtKeyId + +`func (o *ConfigPropertiesServicenow) GetJwtKeyId() string` + +GetJwtKeyId returns the JwtKeyId field if non-nil, zero value otherwise. + +### GetJwtKeyIdOk + +`func (o *ConfigPropertiesServicenow) GetJwtKeyIdOk() (*string, bool)` + +GetJwtKeyIdOk returns a tuple with the JwtKeyId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJwtKeyId + +`func (o *ConfigPropertiesServicenow) SetJwtKeyId(v string)` + +SetJwtKeyId sets JwtKeyId field to given value. + +### HasJwtKeyId + +`func (o *ConfigPropertiesServicenow) HasJwtKeyId() bool` + +HasJwtKeyId returns a boolean if a field has been set. + +### GetUserIdentifierValue + +`func (o *ConfigPropertiesServicenow) GetUserIdentifierValue() string` + +GetUserIdentifierValue returns the UserIdentifierValue field if non-nil, zero value otherwise. + +### GetUserIdentifierValueOk + +`func (o *ConfigPropertiesServicenow) GetUserIdentifierValueOk() (*string, bool)` + +GetUserIdentifierValueOk returns a tuple with the UserIdentifierValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserIdentifierValue + +`func (o *ConfigPropertiesServicenow) SetUserIdentifierValue(v string)` + +SetUserIdentifierValue sets UserIdentifierValue field to given value. + +### HasUserIdentifierValue + +`func (o *ConfigPropertiesServicenow) HasUserIdentifierValue() bool` + +HasUserIdentifierValue returns a boolean if a field has been set. + +### GetUsesTableApi + +`func (o *ConfigPropertiesServicenow) GetUsesTableApi() bool` + +GetUsesTableApi returns the UsesTableApi field if non-nil, zero value otherwise. + +### GetUsesTableApiOk + +`func (o *ConfigPropertiesServicenow) GetUsesTableApiOk() (*bool, bool)` + +GetUsesTableApiOk returns a tuple with the UsesTableApi field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsesTableApi + +`func (o *ConfigPropertiesServicenow) SetUsesTableApi(v bool)` + +SetUsesTableApi sets UsesTableApi field to given value. + +### HasUsesTableApi + +`func (o *ConfigPropertiesServicenow) HasUsesTableApi() bool` + +HasUsesTableApi returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConfigPropertiesServicenowItom.md b/generated/kibanaactions/docs/ConfigPropertiesServicenowItom.md new file mode 100644 index 000000000..fee66e3db --- /dev/null +++ b/generated/kibanaactions/docs/ConfigPropertiesServicenowItom.md @@ -0,0 +1,155 @@ +# ConfigPropertiesServicenowItom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiUrl** | **string** | The ServiceNow instance URL. | +**ClientId** | Pointer to **string** | The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. | [optional] +**IsOAuth** | Pointer to **bool** | The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). | [optional] [default to false] +**JwtKeyId** | Pointer to **string** | The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. | [optional] +**UserIdentifierValue** | Pointer to **string** | The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. | [optional] + +## Methods + +### NewConfigPropertiesServicenowItom + +`func NewConfigPropertiesServicenowItom(apiUrl string, ) *ConfigPropertiesServicenowItom` + +NewConfigPropertiesServicenowItom instantiates a new ConfigPropertiesServicenowItom object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConfigPropertiesServicenowItomWithDefaults + +`func NewConfigPropertiesServicenowItomWithDefaults() *ConfigPropertiesServicenowItom` + +NewConfigPropertiesServicenowItomWithDefaults instantiates a new ConfigPropertiesServicenowItom object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiUrl + +`func (o *ConfigPropertiesServicenowItom) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *ConfigPropertiesServicenowItom) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *ConfigPropertiesServicenowItom) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + + +### GetClientId + +`func (o *ConfigPropertiesServicenowItom) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *ConfigPropertiesServicenowItom) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *ConfigPropertiesServicenowItom) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + +### HasClientId + +`func (o *ConfigPropertiesServicenowItom) HasClientId() bool` + +HasClientId returns a boolean if a field has been set. + +### GetIsOAuth + +`func (o *ConfigPropertiesServicenowItom) GetIsOAuth() bool` + +GetIsOAuth returns the IsOAuth field if non-nil, zero value otherwise. + +### GetIsOAuthOk + +`func (o *ConfigPropertiesServicenowItom) GetIsOAuthOk() (*bool, bool)` + +GetIsOAuthOk returns a tuple with the IsOAuth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsOAuth + +`func (o *ConfigPropertiesServicenowItom) SetIsOAuth(v bool)` + +SetIsOAuth sets IsOAuth field to given value. + +### HasIsOAuth + +`func (o *ConfigPropertiesServicenowItom) HasIsOAuth() bool` + +HasIsOAuth returns a boolean if a field has been set. + +### GetJwtKeyId + +`func (o *ConfigPropertiesServicenowItom) GetJwtKeyId() string` + +GetJwtKeyId returns the JwtKeyId field if non-nil, zero value otherwise. + +### GetJwtKeyIdOk + +`func (o *ConfigPropertiesServicenowItom) GetJwtKeyIdOk() (*string, bool)` + +GetJwtKeyIdOk returns a tuple with the JwtKeyId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJwtKeyId + +`func (o *ConfigPropertiesServicenowItom) SetJwtKeyId(v string)` + +SetJwtKeyId sets JwtKeyId field to given value. + +### HasJwtKeyId + +`func (o *ConfigPropertiesServicenowItom) HasJwtKeyId() bool` + +HasJwtKeyId returns a boolean if a field has been set. + +### GetUserIdentifierValue + +`func (o *ConfigPropertiesServicenowItom) GetUserIdentifierValue() string` + +GetUserIdentifierValue returns the UserIdentifierValue field if non-nil, zero value otherwise. + +### GetUserIdentifierValueOk + +`func (o *ConfigPropertiesServicenowItom) GetUserIdentifierValueOk() (*string, bool)` + +GetUserIdentifierValueOk returns a tuple with the UserIdentifierValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserIdentifierValue + +`func (o *ConfigPropertiesServicenowItom) SetUserIdentifierValue(v string)` + +SetUserIdentifierValue sets UserIdentifierValue field to given value. + +### HasUserIdentifierValue + +`func (o *ConfigPropertiesServicenowItom) HasUserIdentifierValue() bool` + +HasUserIdentifierValue returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConfigPropertiesSwimlane.md b/generated/kibanaactions/docs/ConfigPropertiesSwimlane.md new file mode 100644 index 000000000..a020066bf --- /dev/null +++ b/generated/kibanaactions/docs/ConfigPropertiesSwimlane.md @@ -0,0 +1,119 @@ +# ConfigPropertiesSwimlane + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiUrl** | **string** | The Swimlane instance URL. | +**AppId** | **string** | The Swimlane application ID. | +**ConnectorType** | **string** | The type of connector. Valid values are `all`, `alerts`, and `cases`. | +**Mappings** | Pointer to [**ConnectorMappingsPropertiesForASwimlaneConnector**](ConnectorMappingsPropertiesForASwimlaneConnector.md) | | [optional] + +## Methods + +### NewConfigPropertiesSwimlane + +`func NewConfigPropertiesSwimlane(apiUrl string, appId string, connectorType string, ) *ConfigPropertiesSwimlane` + +NewConfigPropertiesSwimlane instantiates a new ConfigPropertiesSwimlane object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConfigPropertiesSwimlaneWithDefaults + +`func NewConfigPropertiesSwimlaneWithDefaults() *ConfigPropertiesSwimlane` + +NewConfigPropertiesSwimlaneWithDefaults instantiates a new ConfigPropertiesSwimlane object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiUrl + +`func (o *ConfigPropertiesSwimlane) GetApiUrl() string` + +GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. + +### GetApiUrlOk + +`func (o *ConfigPropertiesSwimlane) GetApiUrlOk() (*string, bool)` + +GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiUrl + +`func (o *ConfigPropertiesSwimlane) SetApiUrl(v string)` + +SetApiUrl sets ApiUrl field to given value. + + +### GetAppId + +`func (o *ConfigPropertiesSwimlane) GetAppId() string` + +GetAppId returns the AppId field if non-nil, zero value otherwise. + +### GetAppIdOk + +`func (o *ConfigPropertiesSwimlane) GetAppIdOk() (*string, bool)` + +GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAppId + +`func (o *ConfigPropertiesSwimlane) SetAppId(v string)` + +SetAppId sets AppId field to given value. + + +### GetConnectorType + +`func (o *ConfigPropertiesSwimlane) GetConnectorType() string` + +GetConnectorType returns the ConnectorType field if non-nil, zero value otherwise. + +### GetConnectorTypeOk + +`func (o *ConfigPropertiesSwimlane) GetConnectorTypeOk() (*string, bool)` + +GetConnectorTypeOk returns a tuple with the ConnectorType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorType + +`func (o *ConfigPropertiesSwimlane) SetConnectorType(v string)` + +SetConnectorType sets ConnectorType field to given value. + + +### GetMappings + +`func (o *ConfigPropertiesSwimlane) GetMappings() ConnectorMappingsPropertiesForASwimlaneConnector` + +GetMappings returns the Mappings field if non-nil, zero value otherwise. + +### GetMappingsOk + +`func (o *ConfigPropertiesSwimlane) GetMappingsOk() (*ConnectorMappingsPropertiesForASwimlaneConnector, bool)` + +GetMappingsOk returns a tuple with the Mappings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMappings + +`func (o *ConfigPropertiesSwimlane) SetMappings(v ConnectorMappingsPropertiesForASwimlaneConnector)` + +SetMappings sets Mappings field to given value. + +### HasMappings + +`func (o *ConfigPropertiesSwimlane) HasMappings() bool` + +HasMappings returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorMappingsPropertiesForASwimlaneConnector.md b/generated/kibanaactions/docs/ConnectorMappingsPropertiesForASwimlaneConnector.md new file mode 100644 index 000000000..78d2db0b5 --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorMappingsPropertiesForASwimlaneConnector.md @@ -0,0 +1,212 @@ +# ConnectorMappingsPropertiesForASwimlaneConnector + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AlertIdConfig** | Pointer to [**AlertIdentifierMapping**](AlertIdentifierMapping.md) | | [optional] +**CaseIdConfig** | Pointer to [**CaseIdentifierMapping**](CaseIdentifierMapping.md) | | [optional] +**CaseNameConfig** | Pointer to [**CaseNameMapping**](CaseNameMapping.md) | | [optional] +**CommentsConfig** | Pointer to [**CaseCommentMapping**](CaseCommentMapping.md) | | [optional] +**DescriptionConfig** | Pointer to [**CaseDescriptionMapping**](CaseDescriptionMapping.md) | | [optional] +**RuleNameConfig** | Pointer to [**RuleNameMapping**](RuleNameMapping.md) | | [optional] +**SeverityConfig** | Pointer to [**SeverityMapping**](SeverityMapping.md) | | [optional] + +## Methods + +### NewConnectorMappingsPropertiesForASwimlaneConnector + +`func NewConnectorMappingsPropertiesForASwimlaneConnector() *ConnectorMappingsPropertiesForASwimlaneConnector` + +NewConnectorMappingsPropertiesForASwimlaneConnector instantiates a new ConnectorMappingsPropertiesForASwimlaneConnector object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorMappingsPropertiesForASwimlaneConnectorWithDefaults + +`func NewConnectorMappingsPropertiesForASwimlaneConnectorWithDefaults() *ConnectorMappingsPropertiesForASwimlaneConnector` + +NewConnectorMappingsPropertiesForASwimlaneConnectorWithDefaults instantiates a new ConnectorMappingsPropertiesForASwimlaneConnector object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAlertIdConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetAlertIdConfig() AlertIdentifierMapping` + +GetAlertIdConfig returns the AlertIdConfig field if non-nil, zero value otherwise. + +### GetAlertIdConfigOk + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetAlertIdConfigOk() (*AlertIdentifierMapping, bool)` + +GetAlertIdConfigOk returns a tuple with the AlertIdConfig field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlertIdConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetAlertIdConfig(v AlertIdentifierMapping)` + +SetAlertIdConfig sets AlertIdConfig field to given value. + +### HasAlertIdConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasAlertIdConfig() bool` + +HasAlertIdConfig returns a boolean if a field has been set. + +### GetCaseIdConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCaseIdConfig() CaseIdentifierMapping` + +GetCaseIdConfig returns the CaseIdConfig field if non-nil, zero value otherwise. + +### GetCaseIdConfigOk + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCaseIdConfigOk() (*CaseIdentifierMapping, bool)` + +GetCaseIdConfigOk returns a tuple with the CaseIdConfig field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCaseIdConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetCaseIdConfig(v CaseIdentifierMapping)` + +SetCaseIdConfig sets CaseIdConfig field to given value. + +### HasCaseIdConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasCaseIdConfig() bool` + +HasCaseIdConfig returns a boolean if a field has been set. + +### GetCaseNameConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCaseNameConfig() CaseNameMapping` + +GetCaseNameConfig returns the CaseNameConfig field if non-nil, zero value otherwise. + +### GetCaseNameConfigOk + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCaseNameConfigOk() (*CaseNameMapping, bool)` + +GetCaseNameConfigOk returns a tuple with the CaseNameConfig field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCaseNameConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetCaseNameConfig(v CaseNameMapping)` + +SetCaseNameConfig sets CaseNameConfig field to given value. + +### HasCaseNameConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasCaseNameConfig() bool` + +HasCaseNameConfig returns a boolean if a field has been set. + +### GetCommentsConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCommentsConfig() CaseCommentMapping` + +GetCommentsConfig returns the CommentsConfig field if non-nil, zero value otherwise. + +### GetCommentsConfigOk + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCommentsConfigOk() (*CaseCommentMapping, bool)` + +GetCommentsConfigOk returns a tuple with the CommentsConfig field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommentsConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetCommentsConfig(v CaseCommentMapping)` + +SetCommentsConfig sets CommentsConfig field to given value. + +### HasCommentsConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasCommentsConfig() bool` + +HasCommentsConfig returns a boolean if a field has been set. + +### GetDescriptionConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetDescriptionConfig() CaseDescriptionMapping` + +GetDescriptionConfig returns the DescriptionConfig field if non-nil, zero value otherwise. + +### GetDescriptionConfigOk + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetDescriptionConfigOk() (*CaseDescriptionMapping, bool)` + +GetDescriptionConfigOk returns a tuple with the DescriptionConfig field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescriptionConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetDescriptionConfig(v CaseDescriptionMapping)` + +SetDescriptionConfig sets DescriptionConfig field to given value. + +### HasDescriptionConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasDescriptionConfig() bool` + +HasDescriptionConfig returns a boolean if a field has been set. + +### GetRuleNameConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetRuleNameConfig() RuleNameMapping` + +GetRuleNameConfig returns the RuleNameConfig field if non-nil, zero value otherwise. + +### GetRuleNameConfigOk + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetRuleNameConfigOk() (*RuleNameMapping, bool)` + +GetRuleNameConfigOk returns a tuple with the RuleNameConfig field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRuleNameConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetRuleNameConfig(v RuleNameMapping)` + +SetRuleNameConfig sets RuleNameConfig field to given value. + +### HasRuleNameConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasRuleNameConfig() bool` + +HasRuleNameConfig returns a boolean if a field has been set. + +### GetSeverityConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetSeverityConfig() SeverityMapping` + +GetSeverityConfig returns the SeverityConfig field if non-nil, zero value otherwise. + +### GetSeverityConfigOk + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetSeverityConfigOk() (*SeverityMapping, bool)` + +GetSeverityConfigOk returns a tuple with the SeverityConfig field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeverityConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetSeverityConfig(v SeverityMapping)` + +SetSeverityConfig sets SeverityConfig field to given value. + +### HasSeverityConfig + +`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasSeverityConfig() bool` + +HasSeverityConfig returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorResponseProperties.md b/generated/kibanaactions/docs/ConnectorResponseProperties.md new file mode 100644 index 000000000..fc9e31f5d --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorResponseProperties.md @@ -0,0 +1,182 @@ +# ConnectorResponseProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.xmatters`. | +**ConnectorTypeId** | **string** | The type of connector. | +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewConnectorResponseProperties + +`func NewConnectorResponseProperties(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponseProperties` + +NewConnectorResponseProperties instantiates a new ConnectorResponseProperties object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponsePropertiesWithDefaults + +`func NewConnectorResponsePropertiesWithDefaults() *ConnectorResponseProperties` + +NewConnectorResponsePropertiesWithDefaults instantiates a new ConnectorResponseProperties object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *ConnectorResponseProperties) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *ConnectorResponseProperties) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *ConnectorResponseProperties) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *ConnectorResponseProperties) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *ConnectorResponseProperties) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *ConnectorResponseProperties) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetId + +`func (o *ConnectorResponseProperties) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorResponseProperties) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorResponseProperties) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *ConnectorResponseProperties) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ConnectorResponseProperties) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ConnectorResponseProperties) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *ConnectorResponseProperties) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ConnectorResponseProperties) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ConnectorResponseProperties) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ConnectorResponseProperties) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ConnectorResponseProperties) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ConnectorResponseProperties) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ConnectorResponseProperties) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *ConnectorResponseProperties) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorResponseProperties) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorResponseProperties) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesCasesWebhook.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesCasesWebhook.md new file mode 100644 index 000000000..312fe881b --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesCasesWebhook.md @@ -0,0 +1,182 @@ +# ConnectorResponsePropertiesCasesWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesCasesWebhook**](ConfigPropertiesCasesWebhook.md) | | +**ConnectorTypeId** | **string** | The type of connector. | +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewConnectorResponsePropertiesCasesWebhook + +`func NewConnectorResponsePropertiesCasesWebhook(config ConfigPropertiesCasesWebhook, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesCasesWebhook` + +NewConnectorResponsePropertiesCasesWebhook instantiates a new ConnectorResponsePropertiesCasesWebhook object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponsePropertiesCasesWebhookWithDefaults + +`func NewConnectorResponsePropertiesCasesWebhookWithDefaults() *ConnectorResponsePropertiesCasesWebhook` + +NewConnectorResponsePropertiesCasesWebhookWithDefaults instantiates a new ConnectorResponsePropertiesCasesWebhook object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *ConnectorResponsePropertiesCasesWebhook) GetConfig() ConfigPropertiesCasesWebhook` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *ConnectorResponsePropertiesCasesWebhook) GetConfigOk() (*ConfigPropertiesCasesWebhook, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *ConnectorResponsePropertiesCasesWebhook) SetConfig(v ConfigPropertiesCasesWebhook)` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *ConnectorResponsePropertiesCasesWebhook) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *ConnectorResponsePropertiesCasesWebhook) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *ConnectorResponsePropertiesCasesWebhook) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetId + +`func (o *ConnectorResponsePropertiesCasesWebhook) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorResponsePropertiesCasesWebhook) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorResponsePropertiesCasesWebhook) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *ConnectorResponsePropertiesCasesWebhook) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ConnectorResponsePropertiesCasesWebhook) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ConnectorResponsePropertiesCasesWebhook) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesCasesWebhook) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ConnectorResponsePropertiesCasesWebhook) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesCasesWebhook) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ConnectorResponsePropertiesCasesWebhook) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ConnectorResponsePropertiesCasesWebhook) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ConnectorResponsePropertiesCasesWebhook) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ConnectorResponsePropertiesCasesWebhook) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *ConnectorResponsePropertiesCasesWebhook) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorResponsePropertiesCasesWebhook) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorResponsePropertiesCasesWebhook) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesEmail.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesEmail.md new file mode 100644 index 000000000..8ec48945c --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesEmail.md @@ -0,0 +1,182 @@ +# ConnectorResponsePropertiesEmail + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.email`. | +**ConnectorTypeId** | **string** | The type of connector. | +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewConnectorResponsePropertiesEmail + +`func NewConnectorResponsePropertiesEmail(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesEmail` + +NewConnectorResponsePropertiesEmail instantiates a new ConnectorResponsePropertiesEmail object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponsePropertiesEmailWithDefaults + +`func NewConnectorResponsePropertiesEmailWithDefaults() *ConnectorResponsePropertiesEmail` + +NewConnectorResponsePropertiesEmailWithDefaults instantiates a new ConnectorResponsePropertiesEmail object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *ConnectorResponsePropertiesEmail) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *ConnectorResponsePropertiesEmail) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *ConnectorResponsePropertiesEmail) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *ConnectorResponsePropertiesEmail) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *ConnectorResponsePropertiesEmail) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *ConnectorResponsePropertiesEmail) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetId + +`func (o *ConnectorResponsePropertiesEmail) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorResponsePropertiesEmail) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorResponsePropertiesEmail) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *ConnectorResponsePropertiesEmail) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ConnectorResponsePropertiesEmail) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ConnectorResponsePropertiesEmail) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesEmail) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ConnectorResponsePropertiesEmail) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesEmail) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ConnectorResponsePropertiesEmail) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ConnectorResponsePropertiesEmail) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ConnectorResponsePropertiesEmail) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ConnectorResponsePropertiesEmail) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *ConnectorResponsePropertiesEmail) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorResponsePropertiesEmail) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorResponsePropertiesEmail) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesIndex.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesIndex.md new file mode 100644 index 000000000..7022f0ca4 --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesIndex.md @@ -0,0 +1,182 @@ +# ConnectorResponsePropertiesIndex + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesIndex**](ConfigPropertiesIndex.md) | | +**ConnectorTypeId** | **string** | The type of connector. | +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewConnectorResponsePropertiesIndex + +`func NewConnectorResponsePropertiesIndex(config ConfigPropertiesIndex, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesIndex` + +NewConnectorResponsePropertiesIndex instantiates a new ConnectorResponsePropertiesIndex object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponsePropertiesIndexWithDefaults + +`func NewConnectorResponsePropertiesIndexWithDefaults() *ConnectorResponsePropertiesIndex` + +NewConnectorResponsePropertiesIndexWithDefaults instantiates a new ConnectorResponsePropertiesIndex object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *ConnectorResponsePropertiesIndex) GetConfig() ConfigPropertiesIndex` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *ConnectorResponsePropertiesIndex) GetConfigOk() (*ConfigPropertiesIndex, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *ConnectorResponsePropertiesIndex) SetConfig(v ConfigPropertiesIndex)` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *ConnectorResponsePropertiesIndex) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *ConnectorResponsePropertiesIndex) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *ConnectorResponsePropertiesIndex) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetId + +`func (o *ConnectorResponsePropertiesIndex) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorResponsePropertiesIndex) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorResponsePropertiesIndex) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *ConnectorResponsePropertiesIndex) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ConnectorResponsePropertiesIndex) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ConnectorResponsePropertiesIndex) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesIndex) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ConnectorResponsePropertiesIndex) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesIndex) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ConnectorResponsePropertiesIndex) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ConnectorResponsePropertiesIndex) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ConnectorResponsePropertiesIndex) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ConnectorResponsePropertiesIndex) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *ConnectorResponsePropertiesIndex) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorResponsePropertiesIndex) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorResponsePropertiesIndex) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesJira.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesJira.md new file mode 100644 index 000000000..4b5c455f8 --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesJira.md @@ -0,0 +1,182 @@ +# ConnectorResponsePropertiesJira + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesJira**](ConfigPropertiesJira.md) | | +**ConnectorTypeId** | **string** | The type of connector. | +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewConnectorResponsePropertiesJira + +`func NewConnectorResponsePropertiesJira(config ConfigPropertiesJira, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesJira` + +NewConnectorResponsePropertiesJira instantiates a new ConnectorResponsePropertiesJira object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponsePropertiesJiraWithDefaults + +`func NewConnectorResponsePropertiesJiraWithDefaults() *ConnectorResponsePropertiesJira` + +NewConnectorResponsePropertiesJiraWithDefaults instantiates a new ConnectorResponsePropertiesJira object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *ConnectorResponsePropertiesJira) GetConfig() ConfigPropertiesJira` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *ConnectorResponsePropertiesJira) GetConfigOk() (*ConfigPropertiesJira, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *ConnectorResponsePropertiesJira) SetConfig(v ConfigPropertiesJira)` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *ConnectorResponsePropertiesJira) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *ConnectorResponsePropertiesJira) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *ConnectorResponsePropertiesJira) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetId + +`func (o *ConnectorResponsePropertiesJira) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorResponsePropertiesJira) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorResponsePropertiesJira) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *ConnectorResponsePropertiesJira) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ConnectorResponsePropertiesJira) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ConnectorResponsePropertiesJira) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesJira) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ConnectorResponsePropertiesJira) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesJira) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ConnectorResponsePropertiesJira) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ConnectorResponsePropertiesJira) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ConnectorResponsePropertiesJira) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ConnectorResponsePropertiesJira) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *ConnectorResponsePropertiesJira) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorResponsePropertiesJira) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorResponsePropertiesJira) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesOpsgenie.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesOpsgenie.md new file mode 100644 index 000000000..56ed8deaf --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesOpsgenie.md @@ -0,0 +1,182 @@ +# ConnectorResponsePropertiesOpsgenie + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesOpsgenie**](ConfigPropertiesOpsgenie.md) | | +**ConnectorTypeId** | **string** | The type of connector. | +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewConnectorResponsePropertiesOpsgenie + +`func NewConnectorResponsePropertiesOpsgenie(config ConfigPropertiesOpsgenie, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesOpsgenie` + +NewConnectorResponsePropertiesOpsgenie instantiates a new ConnectorResponsePropertiesOpsgenie object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponsePropertiesOpsgenieWithDefaults + +`func NewConnectorResponsePropertiesOpsgenieWithDefaults() *ConnectorResponsePropertiesOpsgenie` + +NewConnectorResponsePropertiesOpsgenieWithDefaults instantiates a new ConnectorResponsePropertiesOpsgenie object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *ConnectorResponsePropertiesOpsgenie) GetConfig() ConfigPropertiesOpsgenie` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *ConnectorResponsePropertiesOpsgenie) GetConfigOk() (*ConfigPropertiesOpsgenie, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *ConnectorResponsePropertiesOpsgenie) SetConfig(v ConfigPropertiesOpsgenie)` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *ConnectorResponsePropertiesOpsgenie) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *ConnectorResponsePropertiesOpsgenie) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *ConnectorResponsePropertiesOpsgenie) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetId + +`func (o *ConnectorResponsePropertiesOpsgenie) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorResponsePropertiesOpsgenie) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorResponsePropertiesOpsgenie) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *ConnectorResponsePropertiesOpsgenie) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ConnectorResponsePropertiesOpsgenie) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ConnectorResponsePropertiesOpsgenie) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesOpsgenie) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ConnectorResponsePropertiesOpsgenie) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesOpsgenie) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ConnectorResponsePropertiesOpsgenie) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ConnectorResponsePropertiesOpsgenie) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ConnectorResponsePropertiesOpsgenie) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ConnectorResponsePropertiesOpsgenie) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *ConnectorResponsePropertiesOpsgenie) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorResponsePropertiesOpsgenie) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorResponsePropertiesOpsgenie) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesPagerduty.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesPagerduty.md new file mode 100644 index 000000000..11d780bc5 --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesPagerduty.md @@ -0,0 +1,182 @@ +# ConnectorResponsePropertiesPagerduty + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.pagerduty`. | +**ConnectorTypeId** | **string** | The type of connector. | +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewConnectorResponsePropertiesPagerduty + +`func NewConnectorResponsePropertiesPagerduty(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesPagerduty` + +NewConnectorResponsePropertiesPagerduty instantiates a new ConnectorResponsePropertiesPagerduty object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponsePropertiesPagerdutyWithDefaults + +`func NewConnectorResponsePropertiesPagerdutyWithDefaults() *ConnectorResponsePropertiesPagerduty` + +NewConnectorResponsePropertiesPagerdutyWithDefaults instantiates a new ConnectorResponsePropertiesPagerduty object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *ConnectorResponsePropertiesPagerduty) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *ConnectorResponsePropertiesPagerduty) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *ConnectorResponsePropertiesPagerduty) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *ConnectorResponsePropertiesPagerduty) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *ConnectorResponsePropertiesPagerduty) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *ConnectorResponsePropertiesPagerduty) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetId + +`func (o *ConnectorResponsePropertiesPagerduty) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorResponsePropertiesPagerduty) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorResponsePropertiesPagerduty) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *ConnectorResponsePropertiesPagerduty) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ConnectorResponsePropertiesPagerduty) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ConnectorResponsePropertiesPagerduty) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesPagerduty) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ConnectorResponsePropertiesPagerduty) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesPagerduty) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ConnectorResponsePropertiesPagerduty) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ConnectorResponsePropertiesPagerduty) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ConnectorResponsePropertiesPagerduty) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ConnectorResponsePropertiesPagerduty) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *ConnectorResponsePropertiesPagerduty) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorResponsePropertiesPagerduty) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorResponsePropertiesPagerduty) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesResilient.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesResilient.md new file mode 100644 index 000000000..2f1351883 --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesResilient.md @@ -0,0 +1,182 @@ +# ConnectorResponsePropertiesResilient + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesResilient**](ConfigPropertiesResilient.md) | | +**ConnectorTypeId** | **string** | The type of connector. | +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewConnectorResponsePropertiesResilient + +`func NewConnectorResponsePropertiesResilient(config ConfigPropertiesResilient, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesResilient` + +NewConnectorResponsePropertiesResilient instantiates a new ConnectorResponsePropertiesResilient object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponsePropertiesResilientWithDefaults + +`func NewConnectorResponsePropertiesResilientWithDefaults() *ConnectorResponsePropertiesResilient` + +NewConnectorResponsePropertiesResilientWithDefaults instantiates a new ConnectorResponsePropertiesResilient object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *ConnectorResponsePropertiesResilient) GetConfig() ConfigPropertiesResilient` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *ConnectorResponsePropertiesResilient) GetConfigOk() (*ConfigPropertiesResilient, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *ConnectorResponsePropertiesResilient) SetConfig(v ConfigPropertiesResilient)` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *ConnectorResponsePropertiesResilient) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *ConnectorResponsePropertiesResilient) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *ConnectorResponsePropertiesResilient) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetId + +`func (o *ConnectorResponsePropertiesResilient) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorResponsePropertiesResilient) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorResponsePropertiesResilient) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *ConnectorResponsePropertiesResilient) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ConnectorResponsePropertiesResilient) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ConnectorResponsePropertiesResilient) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesResilient) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ConnectorResponsePropertiesResilient) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesResilient) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ConnectorResponsePropertiesResilient) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ConnectorResponsePropertiesResilient) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ConnectorResponsePropertiesResilient) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ConnectorResponsePropertiesResilient) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *ConnectorResponsePropertiesResilient) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorResponsePropertiesResilient) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorResponsePropertiesResilient) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesServerlog.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesServerlog.md new file mode 100644 index 000000000..1406ab7fa --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesServerlog.md @@ -0,0 +1,192 @@ +# ConnectorResponsePropertiesServerlog + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | **map[string]interface{}** | | +**ConnectorTypeId** | **string** | The type of connector. | +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewConnectorResponsePropertiesServerlog + +`func NewConnectorResponsePropertiesServerlog(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesServerlog` + +NewConnectorResponsePropertiesServerlog instantiates a new ConnectorResponsePropertiesServerlog object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponsePropertiesServerlogWithDefaults + +`func NewConnectorResponsePropertiesServerlogWithDefaults() *ConnectorResponsePropertiesServerlog` + +NewConnectorResponsePropertiesServerlogWithDefaults instantiates a new ConnectorResponsePropertiesServerlog object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *ConnectorResponsePropertiesServerlog) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *ConnectorResponsePropertiesServerlog) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *ConnectorResponsePropertiesServerlog) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + + +### SetConfigNil + +`func (o *ConnectorResponsePropertiesServerlog) SetConfigNil(b bool)` + + SetConfigNil sets the value for Config to be an explicit nil + +### UnsetConfig +`func (o *ConnectorResponsePropertiesServerlog) UnsetConfig()` + +UnsetConfig ensures that no value is present for Config, not even an explicit nil +### GetConnectorTypeId + +`func (o *ConnectorResponsePropertiesServerlog) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *ConnectorResponsePropertiesServerlog) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *ConnectorResponsePropertiesServerlog) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetId + +`func (o *ConnectorResponsePropertiesServerlog) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorResponsePropertiesServerlog) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorResponsePropertiesServerlog) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *ConnectorResponsePropertiesServerlog) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ConnectorResponsePropertiesServerlog) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ConnectorResponsePropertiesServerlog) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesServerlog) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ConnectorResponsePropertiesServerlog) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesServerlog) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ConnectorResponsePropertiesServerlog) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ConnectorResponsePropertiesServerlog) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ConnectorResponsePropertiesServerlog) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ConnectorResponsePropertiesServerlog) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *ConnectorResponsePropertiesServerlog) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorResponsePropertiesServerlog) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorResponsePropertiesServerlog) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenow.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenow.md new file mode 100644 index 000000000..3d2d84495 --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenow.md @@ -0,0 +1,182 @@ +# ConnectorResponsePropertiesServicenow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesServicenow**](ConfigPropertiesServicenow.md) | | +**ConnectorTypeId** | **string** | The type of connector. | +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewConnectorResponsePropertiesServicenow + +`func NewConnectorResponsePropertiesServicenow(config ConfigPropertiesServicenow, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesServicenow` + +NewConnectorResponsePropertiesServicenow instantiates a new ConnectorResponsePropertiesServicenow object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponsePropertiesServicenowWithDefaults + +`func NewConnectorResponsePropertiesServicenowWithDefaults() *ConnectorResponsePropertiesServicenow` + +NewConnectorResponsePropertiesServicenowWithDefaults instantiates a new ConnectorResponsePropertiesServicenow object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *ConnectorResponsePropertiesServicenow) GetConfig() ConfigPropertiesServicenow` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *ConnectorResponsePropertiesServicenow) GetConfigOk() (*ConfigPropertiesServicenow, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *ConnectorResponsePropertiesServicenow) SetConfig(v ConfigPropertiesServicenow)` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *ConnectorResponsePropertiesServicenow) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *ConnectorResponsePropertiesServicenow) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *ConnectorResponsePropertiesServicenow) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetId + +`func (o *ConnectorResponsePropertiesServicenow) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorResponsePropertiesServicenow) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorResponsePropertiesServicenow) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *ConnectorResponsePropertiesServicenow) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ConnectorResponsePropertiesServicenow) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ConnectorResponsePropertiesServicenow) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesServicenow) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ConnectorResponsePropertiesServicenow) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesServicenow) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ConnectorResponsePropertiesServicenow) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ConnectorResponsePropertiesServicenow) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ConnectorResponsePropertiesServicenow) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ConnectorResponsePropertiesServicenow) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *ConnectorResponsePropertiesServicenow) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorResponsePropertiesServicenow) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorResponsePropertiesServicenow) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowItom.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowItom.md new file mode 100644 index 000000000..9cbf251d0 --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowItom.md @@ -0,0 +1,182 @@ +# ConnectorResponsePropertiesServicenowItom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesServicenowItom**](ConfigPropertiesServicenowItom.md) | | +**ConnectorTypeId** | **string** | The type of connector. | +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewConnectorResponsePropertiesServicenowItom + +`func NewConnectorResponsePropertiesServicenowItom(config ConfigPropertiesServicenowItom, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesServicenowItom` + +NewConnectorResponsePropertiesServicenowItom instantiates a new ConnectorResponsePropertiesServicenowItom object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponsePropertiesServicenowItomWithDefaults + +`func NewConnectorResponsePropertiesServicenowItomWithDefaults() *ConnectorResponsePropertiesServicenowItom` + +NewConnectorResponsePropertiesServicenowItomWithDefaults instantiates a new ConnectorResponsePropertiesServicenowItom object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *ConnectorResponsePropertiesServicenowItom) GetConfig() ConfigPropertiesServicenowItom` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *ConnectorResponsePropertiesServicenowItom) GetConfigOk() (*ConfigPropertiesServicenowItom, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *ConnectorResponsePropertiesServicenowItom) SetConfig(v ConfigPropertiesServicenowItom)` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *ConnectorResponsePropertiesServicenowItom) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *ConnectorResponsePropertiesServicenowItom) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *ConnectorResponsePropertiesServicenowItom) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetId + +`func (o *ConnectorResponsePropertiesServicenowItom) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorResponsePropertiesServicenowItom) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorResponsePropertiesServicenowItom) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *ConnectorResponsePropertiesServicenowItom) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ConnectorResponsePropertiesServicenowItom) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ConnectorResponsePropertiesServicenowItom) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesServicenowItom) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ConnectorResponsePropertiesServicenowItom) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesServicenowItom) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ConnectorResponsePropertiesServicenowItom) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ConnectorResponsePropertiesServicenowItom) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ConnectorResponsePropertiesServicenowItom) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ConnectorResponsePropertiesServicenowItom) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *ConnectorResponsePropertiesServicenowItom) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorResponsePropertiesServicenowItom) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorResponsePropertiesServicenowItom) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowSir.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowSir.md new file mode 100644 index 000000000..e7ff1fc5d --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowSir.md @@ -0,0 +1,182 @@ +# ConnectorResponsePropertiesServicenowSir + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesServicenow**](ConfigPropertiesServicenow.md) | | +**ConnectorTypeId** | **string** | The type of connector. | +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewConnectorResponsePropertiesServicenowSir + +`func NewConnectorResponsePropertiesServicenowSir(config ConfigPropertiesServicenow, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesServicenowSir` + +NewConnectorResponsePropertiesServicenowSir instantiates a new ConnectorResponsePropertiesServicenowSir object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponsePropertiesServicenowSirWithDefaults + +`func NewConnectorResponsePropertiesServicenowSirWithDefaults() *ConnectorResponsePropertiesServicenowSir` + +NewConnectorResponsePropertiesServicenowSirWithDefaults instantiates a new ConnectorResponsePropertiesServicenowSir object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *ConnectorResponsePropertiesServicenowSir) GetConfig() ConfigPropertiesServicenow` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *ConnectorResponsePropertiesServicenowSir) GetConfigOk() (*ConfigPropertiesServicenow, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *ConnectorResponsePropertiesServicenowSir) SetConfig(v ConfigPropertiesServicenow)` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *ConnectorResponsePropertiesServicenowSir) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *ConnectorResponsePropertiesServicenowSir) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *ConnectorResponsePropertiesServicenowSir) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetId + +`func (o *ConnectorResponsePropertiesServicenowSir) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorResponsePropertiesServicenowSir) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorResponsePropertiesServicenowSir) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *ConnectorResponsePropertiesServicenowSir) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ConnectorResponsePropertiesServicenowSir) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ConnectorResponsePropertiesServicenowSir) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesServicenowSir) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ConnectorResponsePropertiesServicenowSir) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesServicenowSir) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ConnectorResponsePropertiesServicenowSir) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ConnectorResponsePropertiesServicenowSir) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ConnectorResponsePropertiesServicenowSir) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ConnectorResponsePropertiesServicenowSir) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *ConnectorResponsePropertiesServicenowSir) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorResponsePropertiesServicenowSir) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorResponsePropertiesServicenowSir) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesSlack.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesSlack.md new file mode 100644 index 000000000..f88435d2b --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesSlack.md @@ -0,0 +1,161 @@ +# ConnectorResponsePropertiesSlack + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConnectorTypeId** | **string** | The type of connector. | +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewConnectorResponsePropertiesSlack + +`func NewConnectorResponsePropertiesSlack(connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesSlack` + +NewConnectorResponsePropertiesSlack instantiates a new ConnectorResponsePropertiesSlack object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponsePropertiesSlackWithDefaults + +`func NewConnectorResponsePropertiesSlackWithDefaults() *ConnectorResponsePropertiesSlack` + +NewConnectorResponsePropertiesSlackWithDefaults instantiates a new ConnectorResponsePropertiesSlack object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConnectorTypeId + +`func (o *ConnectorResponsePropertiesSlack) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *ConnectorResponsePropertiesSlack) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *ConnectorResponsePropertiesSlack) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetId + +`func (o *ConnectorResponsePropertiesSlack) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorResponsePropertiesSlack) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorResponsePropertiesSlack) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *ConnectorResponsePropertiesSlack) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ConnectorResponsePropertiesSlack) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ConnectorResponsePropertiesSlack) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesSlack) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ConnectorResponsePropertiesSlack) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesSlack) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ConnectorResponsePropertiesSlack) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ConnectorResponsePropertiesSlack) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ConnectorResponsePropertiesSlack) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ConnectorResponsePropertiesSlack) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *ConnectorResponsePropertiesSlack) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorResponsePropertiesSlack) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorResponsePropertiesSlack) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesSwimlane.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesSwimlane.md new file mode 100644 index 000000000..53886014d --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesSwimlane.md @@ -0,0 +1,182 @@ +# ConnectorResponsePropertiesSwimlane + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesSwimlane**](ConfigPropertiesSwimlane.md) | | +**ConnectorTypeId** | **string** | The type of connector. | +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewConnectorResponsePropertiesSwimlane + +`func NewConnectorResponsePropertiesSwimlane(config ConfigPropertiesSwimlane, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesSwimlane` + +NewConnectorResponsePropertiesSwimlane instantiates a new ConnectorResponsePropertiesSwimlane object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponsePropertiesSwimlaneWithDefaults + +`func NewConnectorResponsePropertiesSwimlaneWithDefaults() *ConnectorResponsePropertiesSwimlane` + +NewConnectorResponsePropertiesSwimlaneWithDefaults instantiates a new ConnectorResponsePropertiesSwimlane object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *ConnectorResponsePropertiesSwimlane) GetConfig() ConfigPropertiesSwimlane` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *ConnectorResponsePropertiesSwimlane) GetConfigOk() (*ConfigPropertiesSwimlane, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *ConnectorResponsePropertiesSwimlane) SetConfig(v ConfigPropertiesSwimlane)` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *ConnectorResponsePropertiesSwimlane) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *ConnectorResponsePropertiesSwimlane) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *ConnectorResponsePropertiesSwimlane) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetId + +`func (o *ConnectorResponsePropertiesSwimlane) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorResponsePropertiesSwimlane) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorResponsePropertiesSwimlane) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *ConnectorResponsePropertiesSwimlane) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ConnectorResponsePropertiesSwimlane) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ConnectorResponsePropertiesSwimlane) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesSwimlane) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ConnectorResponsePropertiesSwimlane) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesSwimlane) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ConnectorResponsePropertiesSwimlane) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ConnectorResponsePropertiesSwimlane) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ConnectorResponsePropertiesSwimlane) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ConnectorResponsePropertiesSwimlane) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *ConnectorResponsePropertiesSwimlane) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorResponsePropertiesSwimlane) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorResponsePropertiesSwimlane) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesTeams.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesTeams.md new file mode 100644 index 000000000..09f88d03a --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesTeams.md @@ -0,0 +1,161 @@ +# ConnectorResponsePropertiesTeams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConnectorTypeId** | **string** | The type of connector. | +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewConnectorResponsePropertiesTeams + +`func NewConnectorResponsePropertiesTeams(connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesTeams` + +NewConnectorResponsePropertiesTeams instantiates a new ConnectorResponsePropertiesTeams object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponsePropertiesTeamsWithDefaults + +`func NewConnectorResponsePropertiesTeamsWithDefaults() *ConnectorResponsePropertiesTeams` + +NewConnectorResponsePropertiesTeamsWithDefaults instantiates a new ConnectorResponsePropertiesTeams object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConnectorTypeId + +`func (o *ConnectorResponsePropertiesTeams) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *ConnectorResponsePropertiesTeams) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *ConnectorResponsePropertiesTeams) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetId + +`func (o *ConnectorResponsePropertiesTeams) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorResponsePropertiesTeams) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorResponsePropertiesTeams) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *ConnectorResponsePropertiesTeams) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ConnectorResponsePropertiesTeams) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ConnectorResponsePropertiesTeams) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesTeams) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ConnectorResponsePropertiesTeams) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesTeams) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ConnectorResponsePropertiesTeams) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ConnectorResponsePropertiesTeams) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ConnectorResponsePropertiesTeams) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ConnectorResponsePropertiesTeams) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *ConnectorResponsePropertiesTeams) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorResponsePropertiesTeams) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorResponsePropertiesTeams) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesTines.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesTines.md new file mode 100644 index 000000000..e3e66ce75 --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesTines.md @@ -0,0 +1,182 @@ +# ConnectorResponsePropertiesTines + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.tines`. | +**ConnectorTypeId** | **string** | The type of connector. | +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewConnectorResponsePropertiesTines + +`func NewConnectorResponsePropertiesTines(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesTines` + +NewConnectorResponsePropertiesTines instantiates a new ConnectorResponsePropertiesTines object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponsePropertiesTinesWithDefaults + +`func NewConnectorResponsePropertiesTinesWithDefaults() *ConnectorResponsePropertiesTines` + +NewConnectorResponsePropertiesTinesWithDefaults instantiates a new ConnectorResponsePropertiesTines object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *ConnectorResponsePropertiesTines) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *ConnectorResponsePropertiesTines) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *ConnectorResponsePropertiesTines) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *ConnectorResponsePropertiesTines) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *ConnectorResponsePropertiesTines) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *ConnectorResponsePropertiesTines) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetId + +`func (o *ConnectorResponsePropertiesTines) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorResponsePropertiesTines) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorResponsePropertiesTines) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *ConnectorResponsePropertiesTines) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ConnectorResponsePropertiesTines) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ConnectorResponsePropertiesTines) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesTines) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ConnectorResponsePropertiesTines) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesTines) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ConnectorResponsePropertiesTines) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ConnectorResponsePropertiesTines) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ConnectorResponsePropertiesTines) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ConnectorResponsePropertiesTines) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *ConnectorResponsePropertiesTines) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorResponsePropertiesTines) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorResponsePropertiesTines) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesWebhook.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesWebhook.md new file mode 100644 index 000000000..0578d3a8b --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesWebhook.md @@ -0,0 +1,182 @@ +# ConnectorResponsePropertiesWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.webhook`. | +**ConnectorTypeId** | **string** | The type of connector. | +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewConnectorResponsePropertiesWebhook + +`func NewConnectorResponsePropertiesWebhook(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesWebhook` + +NewConnectorResponsePropertiesWebhook instantiates a new ConnectorResponsePropertiesWebhook object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponsePropertiesWebhookWithDefaults + +`func NewConnectorResponsePropertiesWebhookWithDefaults() *ConnectorResponsePropertiesWebhook` + +NewConnectorResponsePropertiesWebhookWithDefaults instantiates a new ConnectorResponsePropertiesWebhook object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *ConnectorResponsePropertiesWebhook) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *ConnectorResponsePropertiesWebhook) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *ConnectorResponsePropertiesWebhook) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *ConnectorResponsePropertiesWebhook) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *ConnectorResponsePropertiesWebhook) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *ConnectorResponsePropertiesWebhook) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetId + +`func (o *ConnectorResponsePropertiesWebhook) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorResponsePropertiesWebhook) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorResponsePropertiesWebhook) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *ConnectorResponsePropertiesWebhook) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ConnectorResponsePropertiesWebhook) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ConnectorResponsePropertiesWebhook) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesWebhook) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ConnectorResponsePropertiesWebhook) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesWebhook) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ConnectorResponsePropertiesWebhook) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ConnectorResponsePropertiesWebhook) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ConnectorResponsePropertiesWebhook) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ConnectorResponsePropertiesWebhook) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *ConnectorResponsePropertiesWebhook) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorResponsePropertiesWebhook) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorResponsePropertiesWebhook) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesXmatters.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesXmatters.md new file mode 100644 index 000000000..6eba5164b --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesXmatters.md @@ -0,0 +1,182 @@ +# ConnectorResponsePropertiesXmatters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.xmatters`. | +**ConnectorTypeId** | **string** | The type of connector. | +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewConnectorResponsePropertiesXmatters + +`func NewConnectorResponsePropertiesXmatters(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesXmatters` + +NewConnectorResponsePropertiesXmatters instantiates a new ConnectorResponsePropertiesXmatters object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponsePropertiesXmattersWithDefaults + +`func NewConnectorResponsePropertiesXmattersWithDefaults() *ConnectorResponsePropertiesXmatters` + +NewConnectorResponsePropertiesXmattersWithDefaults instantiates a new ConnectorResponsePropertiesXmatters object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *ConnectorResponsePropertiesXmatters) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *ConnectorResponsePropertiesXmatters) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *ConnectorResponsePropertiesXmatters) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *ConnectorResponsePropertiesXmatters) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *ConnectorResponsePropertiesXmatters) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *ConnectorResponsePropertiesXmatters) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetId + +`func (o *ConnectorResponsePropertiesXmatters) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorResponsePropertiesXmatters) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorResponsePropertiesXmatters) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *ConnectorResponsePropertiesXmatters) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *ConnectorResponsePropertiesXmatters) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *ConnectorResponsePropertiesXmatters) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesXmatters) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *ConnectorResponsePropertiesXmatters) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *ConnectorResponsePropertiesXmatters) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *ConnectorResponsePropertiesXmatters) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *ConnectorResponsePropertiesXmatters) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *ConnectorResponsePropertiesXmatters) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *ConnectorResponsePropertiesXmatters) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *ConnectorResponsePropertiesXmatters) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorResponsePropertiesXmatters) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorResponsePropertiesXmatters) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorTypes.md b/generated/kibanaactions/docs/ConnectorTypes.md new file mode 100644 index 000000000..905aa4c79 --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorTypes.md @@ -0,0 +1,43 @@ +# ConnectorTypes + +## Enum + + +* `CASES_WEBHOOK` (value: `".cases-webhook"`) + +* `EMAIL` (value: `".email"`) + +* `INDEX` (value: `".index"`) + +* `JIRA` (value: `".jira"`) + +* `OPSGENIE` (value: `".opsgenie"`) + +* `PAGERDUTY` (value: `".pagerduty"`) + +* `RESILIENT` (value: `".resilient"`) + +* `SERVICENOW` (value: `".servicenow"`) + +* `SERVICENOW_ITOM` (value: `".servicenow-itom"`) + +* `SERVICENOW_SIR` (value: `".servicenow-sir"`) + +* `SERVER_LOG` (value: `".server-log"`) + +* `SLACK` (value: `".slack"`) + +* `SWIMLANE` (value: `".swimlane"`) + +* `TEAMS` (value: `".teams"`) + +* `TINES` (value: `".tines"`) + +* `WEBHOOK` (value: `".webhook"`) + +* `XMATTERS` (value: `".xmatters"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/ConnectorsApi.md b/generated/kibanaactions/docs/ConnectorsApi.md new file mode 100644 index 000000000..98d260d62 --- /dev/null +++ b/generated/kibanaactions/docs/ConnectorsApi.md @@ -0,0 +1,1052 @@ +# \ConnectorsApi + +All URIs are relative to *http://localhost:5601* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateConnector**](ConnectorsApi.md#CreateConnector) | **Post** /s/{spaceId}/api/actions/connector | Creates a connector. +[**DeleteConnector**](ConnectorsApi.md#DeleteConnector) | **Delete** /s/{spaceId}/api/actions/connector/{connectorId} | Deletes a connector. +[**GetConnector**](ConnectorsApi.md#GetConnector) | **Get** /s/{spaceId}/api/actions/connector/{connectorId} | Retrieves a connector by ID. +[**GetConnectorTypes**](ConnectorsApi.md#GetConnectorTypes) | **Get** /s/{spaceId}/api/actions/connector_types | Retrieves a list of all connector types. +[**GetConnectors**](ConnectorsApi.md#GetConnectors) | **Get** /s/{spaceId}/api/actions/connectors | Retrieves all connectors. +[**LegacyCreateConnector**](ConnectorsApi.md#LegacyCreateConnector) | **Post** /s/{spaceId}/api/actions | Creates a connector. +[**LegacyDeleteConnector**](ConnectorsApi.md#LegacyDeleteConnector) | **Delete** /s/{spaceId}/api/actions/action/{actionId} | Deletes a connector. +[**LegacyGetConnector**](ConnectorsApi.md#LegacyGetConnector) | **Get** /s/{spaceId}/api/actions/action/{actionId} | Retrieves a connector by ID. +[**LegacyGetConnectorTypes**](ConnectorsApi.md#LegacyGetConnectorTypes) | **Get** /s/{spaceId}/api/actions/list_action_types | Retrieves a list of all connector types. +[**LegacyGetConnectors**](ConnectorsApi.md#LegacyGetConnectors) | **Get** /s/{spaceId}/api/actions | Retrieves all connectors. +[**LegacyRunConnector**](ConnectorsApi.md#LegacyRunConnector) | **Post** /s/{spaceId}/api/actions/action/{actionId}/_execute | Runs a connector. +[**LegacyUpdateConnector**](ConnectorsApi.md#LegacyUpdateConnector) | **Put** /s/{spaceId}/api/actions/action/{actionId} | Updates the attributes for a connector. +[**RunConnector**](ConnectorsApi.md#RunConnector) | **Post** /s/{spaceId}/api/actions/connector/{connectorId}/_execute | Runs a connector. +[**UpdateConnector**](ConnectorsApi.md#UpdateConnector) | **Put** /s/{spaceId}/api/actions/connector/{connectorId} | Updates the attributes for a connector. + + + +## CreateConnector + +> ConnectorResponseProperties CreateConnector(ctx, spaceId).KbnXsrf(kbnXsrf).CreateConnectorRequestBodyProperties(createConnectorRequestBodyProperties).Execute() + +Creates a connector. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" +) + +func main() { + kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection + spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + createConnectorRequestBodyProperties := openapiclient.Create_connector_request_body_properties{CreateConnectorRequestCasesWebhook: openapiclient.NewCreateConnectorRequestCasesWebhook(*openapiclient.NewConfigPropertiesCasesWebhook("{"fields":{"summary":{"[object Object]":null},"description":{"[object Object]":null},"labels":{"[object Object]":null}}}", "CreateIncidentResponseKey_example", "CreateIncidentUrl_example", "GetIncidentResponseExternalTitleKey_example", "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}", "{"fields":{"summary":{"[object Object]":null},"description":{"[object Object]":null},"labels":{"[object Object]":null}}}", "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.ID}}}", "https://testing-jira.atlassian.net/browse/{{{external.system.title}}}"), ".cases-webhook", "my-connector")} // CreateConnectorRequestBodyProperties | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConnectorsApi.CreateConnector(context.Background(), spaceId).KbnXsrf(kbnXsrf).CreateConnectorRequestBodyProperties(createConnectorRequestBodyProperties).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.CreateConnector``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateConnector`: ConnectorResponseProperties + fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.CreateConnector`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateConnectorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **kbnXsrf** | **string** | Cross-site request forgery protection | + + **createConnectorRequestBodyProperties** | [**CreateConnectorRequestBodyProperties**](CreateConnectorRequestBodyProperties.md) | | + +### Return type + +[**ConnectorResponseProperties**](ConnectorResponseProperties.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteConnector + +> DeleteConnector(ctx, connectorId, spaceId).KbnXsrf(kbnXsrf).Execute() + +Deletes a connector. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" +) + +func main() { + kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection + connectorId := "df770e30-8b8b-11ed-a780-3b746c987a81" // string | An identifier for the connector. + spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ConnectorsApi.DeleteConnector(context.Background(), connectorId, spaceId).KbnXsrf(kbnXsrf).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.DeleteConnector``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**connectorId** | **string** | An identifier for the connector. | +**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteConnectorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **kbnXsrf** | **string** | Cross-site request forgery protection | + + + +### Return type + + (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetConnector + +> ConnectorResponseProperties GetConnector(ctx, connectorId, spaceId).Execute() + +Retrieves a connector by ID. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" +) + +func main() { + connectorId := "df770e30-8b8b-11ed-a780-3b746c987a81" // string | An identifier for the connector. + spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConnectorsApi.GetConnector(context.Background(), connectorId, spaceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.GetConnector``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetConnector`: ConnectorResponseProperties + fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.GetConnector`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**connectorId** | **string** | An identifier for the connector. | +**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetConnectorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**ConnectorResponseProperties**](ConnectorResponseProperties.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetConnectorTypes + +> []GetConnectorTypesResponseBodyPropertiesInner GetConnectorTypes(ctx, spaceId).FeatureId(featureId).Execute() + +Retrieves a list of all connector types. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" +) + +func main() { + spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + featureId := openapiclient.features("alerting") // Features | A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases). (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConnectorsApi.GetConnectorTypes(context.Background(), spaceId).FeatureId(featureId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.GetConnectorTypes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetConnectorTypes`: []GetConnectorTypesResponseBodyPropertiesInner + fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.GetConnectorTypes`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetConnectorTypesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **featureId** | [**Features**](Features.md) | A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases). | + +### Return type + +[**[]GetConnectorTypesResponseBodyPropertiesInner**](GetConnectorTypesResponseBodyPropertiesInner.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetConnectors + +> []GetConnectorsResponseBodyProperties GetConnectors(ctx, spaceId).Execute() + +Retrieves all connectors. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" +) + +func main() { + spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConnectorsApi.GetConnectors(context.Background(), spaceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.GetConnectors``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetConnectors`: []GetConnectorsResponseBodyProperties + fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.GetConnectors`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetConnectorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**[]GetConnectorsResponseBodyProperties**](GetConnectorsResponseBodyProperties.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## LegacyCreateConnector + +> ActionResponseProperties LegacyCreateConnector(ctx, spaceId).KbnXsrf(kbnXsrf).LegacyCreateConnectorRequestProperties(legacyCreateConnectorRequestProperties).Execute() + +Creates a connector. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" +) + +func main() { + kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection + spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + legacyCreateConnectorRequestProperties := *openapiclient.NewLegacyCreateConnectorRequestProperties() // LegacyCreateConnectorRequestProperties | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConnectorsApi.LegacyCreateConnector(context.Background(), spaceId).KbnXsrf(kbnXsrf).LegacyCreateConnectorRequestProperties(legacyCreateConnectorRequestProperties).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.LegacyCreateConnector``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LegacyCreateConnector`: ActionResponseProperties + fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.LegacyCreateConnector`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLegacyCreateConnectorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **kbnXsrf** | **string** | Cross-site request forgery protection | + + **legacyCreateConnectorRequestProperties** | [**LegacyCreateConnectorRequestProperties**](LegacyCreateConnectorRequestProperties.md) | | + +### Return type + +[**ActionResponseProperties**](ActionResponseProperties.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## LegacyDeleteConnector + +> LegacyDeleteConnector(ctx, actionId, spaceId).KbnXsrf(kbnXsrf).Execute() + +Deletes a connector. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" +) + +func main() { + kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection + actionId := "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad" // string | An identifier for the action. + spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ConnectorsApi.LegacyDeleteConnector(context.Background(), actionId, spaceId).KbnXsrf(kbnXsrf).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.LegacyDeleteConnector``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**actionId** | **string** | An identifier for the action. | +**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLegacyDeleteConnectorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **kbnXsrf** | **string** | Cross-site request forgery protection | + + + +### Return type + + (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## LegacyGetConnector + +> ActionResponseProperties LegacyGetConnector(ctx, actionId, spaceId).Execute() + +Retrieves a connector by ID. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" +) + +func main() { + actionId := "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad" // string | An identifier for the action. + spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConnectorsApi.LegacyGetConnector(context.Background(), actionId, spaceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.LegacyGetConnector``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LegacyGetConnector`: ActionResponseProperties + fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.LegacyGetConnector`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**actionId** | **string** | An identifier for the action. | +**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLegacyGetConnectorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**ActionResponseProperties**](ActionResponseProperties.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## LegacyGetConnectorTypes + +> []LegacyGetConnectorTypesResponseBodyPropertiesInner LegacyGetConnectorTypes(ctx, spaceId).Execute() + +Retrieves a list of all connector types. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" +) + +func main() { + spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConnectorsApi.LegacyGetConnectorTypes(context.Background(), spaceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.LegacyGetConnectorTypes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LegacyGetConnectorTypes`: []LegacyGetConnectorTypesResponseBodyPropertiesInner + fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.LegacyGetConnectorTypes`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLegacyGetConnectorTypesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**[]LegacyGetConnectorTypesResponseBodyPropertiesInner**](LegacyGetConnectorTypesResponseBodyPropertiesInner.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## LegacyGetConnectors + +> []ActionResponseProperties LegacyGetConnectors(ctx, spaceId).Execute() + +Retrieves all connectors. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" +) + +func main() { + spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConnectorsApi.LegacyGetConnectors(context.Background(), spaceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.LegacyGetConnectors``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LegacyGetConnectors`: []ActionResponseProperties + fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.LegacyGetConnectors`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLegacyGetConnectorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**[]ActionResponseProperties**](ActionResponseProperties.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## LegacyRunConnector + +> LegacyRunConnector200Response LegacyRunConnector(ctx, actionId, spaceId).KbnXsrf(kbnXsrf).LegacyRunConnectorRequestBodyProperties(legacyRunConnectorRequestBodyProperties).Execute() + +Runs a connector. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" +) + +func main() { + kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection + actionId := "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad" // string | An identifier for the action. + spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + legacyRunConnectorRequestBodyProperties := *openapiclient.NewLegacyRunConnectorRequestBodyProperties(map[string]interface{}(123)) // LegacyRunConnectorRequestBodyProperties | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConnectorsApi.LegacyRunConnector(context.Background(), actionId, spaceId).KbnXsrf(kbnXsrf).LegacyRunConnectorRequestBodyProperties(legacyRunConnectorRequestBodyProperties).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.LegacyRunConnector``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LegacyRunConnector`: LegacyRunConnector200Response + fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.LegacyRunConnector`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**actionId** | **string** | An identifier for the action. | +**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLegacyRunConnectorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **kbnXsrf** | **string** | Cross-site request forgery protection | + + + **legacyRunConnectorRequestBodyProperties** | [**LegacyRunConnectorRequestBodyProperties**](LegacyRunConnectorRequestBodyProperties.md) | | + +### Return type + +[**LegacyRunConnector200Response**](LegacyRunConnector200Response.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## LegacyUpdateConnector + +> ActionResponseProperties LegacyUpdateConnector(ctx, actionId, spaceId).KbnXsrf(kbnXsrf).LegacyUpdateConnectorRequestBodyProperties(legacyUpdateConnectorRequestBodyProperties).Execute() + +Updates the attributes for a connector. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" +) + +func main() { + kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection + actionId := "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad" // string | An identifier for the action. + spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + legacyUpdateConnectorRequestBodyProperties := *openapiclient.NewLegacyUpdateConnectorRequestBodyProperties() // LegacyUpdateConnectorRequestBodyProperties | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConnectorsApi.LegacyUpdateConnector(context.Background(), actionId, spaceId).KbnXsrf(kbnXsrf).LegacyUpdateConnectorRequestBodyProperties(legacyUpdateConnectorRequestBodyProperties).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.LegacyUpdateConnector``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LegacyUpdateConnector`: ActionResponseProperties + fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.LegacyUpdateConnector`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**actionId** | **string** | An identifier for the action. | +**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLegacyUpdateConnectorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **kbnXsrf** | **string** | Cross-site request forgery protection | + + + **legacyUpdateConnectorRequestBodyProperties** | [**LegacyUpdateConnectorRequestBodyProperties**](LegacyUpdateConnectorRequestBodyProperties.md) | | + +### Return type + +[**ActionResponseProperties**](ActionResponseProperties.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RunConnector + +> RunConnector200Response RunConnector(ctx, connectorId, spaceId).KbnXsrf(kbnXsrf).RunConnectorRequestBodyProperties(runConnectorRequestBodyProperties).Execute() + +Runs a connector. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" +) + +func main() { + kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection + connectorId := "df770e30-8b8b-11ed-a780-3b746c987a81" // string | An identifier for the connector. + spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + runConnectorRequestBodyProperties := *openapiclient.NewRunConnectorRequestBodyProperties(openapiclient.Run_connector_request_body_properties_params{RunConnectorParamsDocuments: openapiclient.NewRunConnectorParamsDocuments([]map[string]interface{}{map[string]interface{}{"key": interface{}(123)}})}) // RunConnectorRequestBodyProperties | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConnectorsApi.RunConnector(context.Background(), connectorId, spaceId).KbnXsrf(kbnXsrf).RunConnectorRequestBodyProperties(runConnectorRequestBodyProperties).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.RunConnector``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RunConnector`: RunConnector200Response + fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.RunConnector`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**connectorId** | **string** | An identifier for the connector. | +**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRunConnectorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **kbnXsrf** | **string** | Cross-site request forgery protection | + + + **runConnectorRequestBodyProperties** | [**RunConnectorRequestBodyProperties**](RunConnectorRequestBodyProperties.md) | | + +### Return type + +[**RunConnector200Response**](RunConnector200Response.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateConnector + +> ConnectorResponseProperties UpdateConnector(ctx, connectorId, spaceId).KbnXsrf(kbnXsrf).UpdateConnectorRequestBodyProperties(updateConnectorRequestBodyProperties).Execute() + +Updates the attributes for a connector. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" +) + +func main() { + kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection + connectorId := "df770e30-8b8b-11ed-a780-3b746c987a81" // string | An identifier for the connector. + spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + updateConnectorRequestBodyProperties := openapiclient.Update_connector_request_body_properties{UpdateConnectorRequestCasesWebhook: openapiclient.NewUpdateConnectorRequestCasesWebhook(*openapiclient.NewConfigPropertiesCasesWebhook("{"fields":{"summary":{"[object Object]":null},"description":{"[object Object]":null},"labels":{"[object Object]":null}}}", "CreateIncidentResponseKey_example", "CreateIncidentUrl_example", "GetIncidentResponseExternalTitleKey_example", "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}", "{"fields":{"summary":{"[object Object]":null},"description":{"[object Object]":null},"labels":{"[object Object]":null}}}", "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.ID}}}", "https://testing-jira.atlassian.net/browse/{{{external.system.title}}}"), "my-connector")} // UpdateConnectorRequestBodyProperties | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConnectorsApi.UpdateConnector(context.Background(), connectorId, spaceId).KbnXsrf(kbnXsrf).UpdateConnectorRequestBodyProperties(updateConnectorRequestBodyProperties).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.UpdateConnector``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateConnector`: ConnectorResponseProperties + fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.UpdateConnector`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**connectorId** | **string** | An identifier for the connector. | +**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateConnectorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **kbnXsrf** | **string** | Cross-site request forgery protection | + + + **updateConnectorRequestBodyProperties** | [**UpdateConnectorRequestBodyProperties**](UpdateConnectorRequestBodyProperties.md) | | + +### Return type + +[**ConnectorResponseProperties**](ConnectorResponseProperties.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/generated/kibanaactions/docs/CreateConnectorRequestBodyProperties.md b/generated/kibanaactions/docs/CreateConnectorRequestBodyProperties.md new file mode 100644 index 000000000..e9c3ff651 --- /dev/null +++ b/generated/kibanaactions/docs/CreateConnectorRequestBodyProperties.md @@ -0,0 +1,114 @@ +# CreateConnectorRequestBodyProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.xmatters`. | +**ConnectorTypeId** | **string** | The type of connector. | +**Name** | **string** | The display name for the connector. | +**Secrets** | **map[string]interface{}** | Defines secrets for connectors when type is `.xmatters`. | + +## Methods + +### NewCreateConnectorRequestBodyProperties + +`func NewCreateConnectorRequestBodyProperties(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}, ) *CreateConnectorRequestBodyProperties` + +NewCreateConnectorRequestBodyProperties instantiates a new CreateConnectorRequestBodyProperties object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateConnectorRequestBodyPropertiesWithDefaults + +`func NewCreateConnectorRequestBodyPropertiesWithDefaults() *CreateConnectorRequestBodyProperties` + +NewCreateConnectorRequestBodyPropertiesWithDefaults instantiates a new CreateConnectorRequestBodyProperties object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *CreateConnectorRequestBodyProperties) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *CreateConnectorRequestBodyProperties) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *CreateConnectorRequestBodyProperties) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *CreateConnectorRequestBodyProperties) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *CreateConnectorRequestBodyProperties) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *CreateConnectorRequestBodyProperties) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetName + +`func (o *CreateConnectorRequestBodyProperties) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateConnectorRequestBodyProperties) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateConnectorRequestBodyProperties) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *CreateConnectorRequestBodyProperties) GetSecrets() map[string]interface{}` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *CreateConnectorRequestBodyProperties) GetSecretsOk() (*map[string]interface{}, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *CreateConnectorRequestBodyProperties) SetSecrets(v map[string]interface{})` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CreateConnectorRequestCasesWebhook.md b/generated/kibanaactions/docs/CreateConnectorRequestCasesWebhook.md new file mode 100644 index 000000000..b9a2f3e9b --- /dev/null +++ b/generated/kibanaactions/docs/CreateConnectorRequestCasesWebhook.md @@ -0,0 +1,119 @@ +# CreateConnectorRequestCasesWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesCasesWebhook**](ConfigPropertiesCasesWebhook.md) | | +**ConnectorTypeId** | **string** | The type of connector. | +**Name** | **string** | The display name for the connector. | +**Secrets** | Pointer to [**SecretsPropertiesCasesWebhook**](SecretsPropertiesCasesWebhook.md) | | [optional] + +## Methods + +### NewCreateConnectorRequestCasesWebhook + +`func NewCreateConnectorRequestCasesWebhook(config ConfigPropertiesCasesWebhook, connectorTypeId string, name string, ) *CreateConnectorRequestCasesWebhook` + +NewCreateConnectorRequestCasesWebhook instantiates a new CreateConnectorRequestCasesWebhook object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateConnectorRequestCasesWebhookWithDefaults + +`func NewCreateConnectorRequestCasesWebhookWithDefaults() *CreateConnectorRequestCasesWebhook` + +NewCreateConnectorRequestCasesWebhookWithDefaults instantiates a new CreateConnectorRequestCasesWebhook object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *CreateConnectorRequestCasesWebhook) GetConfig() ConfigPropertiesCasesWebhook` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *CreateConnectorRequestCasesWebhook) GetConfigOk() (*ConfigPropertiesCasesWebhook, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *CreateConnectorRequestCasesWebhook) SetConfig(v ConfigPropertiesCasesWebhook)` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *CreateConnectorRequestCasesWebhook) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *CreateConnectorRequestCasesWebhook) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *CreateConnectorRequestCasesWebhook) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetName + +`func (o *CreateConnectorRequestCasesWebhook) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateConnectorRequestCasesWebhook) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateConnectorRequestCasesWebhook) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *CreateConnectorRequestCasesWebhook) GetSecrets() SecretsPropertiesCasesWebhook` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *CreateConnectorRequestCasesWebhook) GetSecretsOk() (*SecretsPropertiesCasesWebhook, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *CreateConnectorRequestCasesWebhook) SetSecrets(v SecretsPropertiesCasesWebhook)` + +SetSecrets sets Secrets field to given value. + +### HasSecrets + +`func (o *CreateConnectorRequestCasesWebhook) HasSecrets() bool` + +HasSecrets returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CreateConnectorRequestEmail.md b/generated/kibanaactions/docs/CreateConnectorRequestEmail.md new file mode 100644 index 000000000..d505849e4 --- /dev/null +++ b/generated/kibanaactions/docs/CreateConnectorRequestEmail.md @@ -0,0 +1,114 @@ +# CreateConnectorRequestEmail + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.email`. | +**ConnectorTypeId** | **string** | The type of connector. | +**Name** | **string** | The display name for the connector. | +**Secrets** | **map[string]interface{}** | Defines secrets for connectors when type is `.email`. | + +## Methods + +### NewCreateConnectorRequestEmail + +`func NewCreateConnectorRequestEmail(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}, ) *CreateConnectorRequestEmail` + +NewCreateConnectorRequestEmail instantiates a new CreateConnectorRequestEmail object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateConnectorRequestEmailWithDefaults + +`func NewCreateConnectorRequestEmailWithDefaults() *CreateConnectorRequestEmail` + +NewCreateConnectorRequestEmailWithDefaults instantiates a new CreateConnectorRequestEmail object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *CreateConnectorRequestEmail) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *CreateConnectorRequestEmail) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *CreateConnectorRequestEmail) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *CreateConnectorRequestEmail) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *CreateConnectorRequestEmail) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *CreateConnectorRequestEmail) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetName + +`func (o *CreateConnectorRequestEmail) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateConnectorRequestEmail) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateConnectorRequestEmail) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *CreateConnectorRequestEmail) GetSecrets() map[string]interface{}` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *CreateConnectorRequestEmail) GetSecretsOk() (*map[string]interface{}, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *CreateConnectorRequestEmail) SetSecrets(v map[string]interface{})` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CreateConnectorRequestIndex.md b/generated/kibanaactions/docs/CreateConnectorRequestIndex.md new file mode 100644 index 000000000..83a09caf6 --- /dev/null +++ b/generated/kibanaactions/docs/CreateConnectorRequestIndex.md @@ -0,0 +1,93 @@ +# CreateConnectorRequestIndex + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesIndex**](ConfigPropertiesIndex.md) | | +**ConnectorTypeId** | **string** | The type of connector. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewCreateConnectorRequestIndex + +`func NewCreateConnectorRequestIndex(config ConfigPropertiesIndex, connectorTypeId string, name string, ) *CreateConnectorRequestIndex` + +NewCreateConnectorRequestIndex instantiates a new CreateConnectorRequestIndex object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateConnectorRequestIndexWithDefaults + +`func NewCreateConnectorRequestIndexWithDefaults() *CreateConnectorRequestIndex` + +NewCreateConnectorRequestIndexWithDefaults instantiates a new CreateConnectorRequestIndex object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *CreateConnectorRequestIndex) GetConfig() ConfigPropertiesIndex` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *CreateConnectorRequestIndex) GetConfigOk() (*ConfigPropertiesIndex, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *CreateConnectorRequestIndex) SetConfig(v ConfigPropertiesIndex)` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *CreateConnectorRequestIndex) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *CreateConnectorRequestIndex) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *CreateConnectorRequestIndex) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetName + +`func (o *CreateConnectorRequestIndex) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateConnectorRequestIndex) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateConnectorRequestIndex) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CreateConnectorRequestJira.md b/generated/kibanaactions/docs/CreateConnectorRequestJira.md new file mode 100644 index 000000000..f79f71f44 --- /dev/null +++ b/generated/kibanaactions/docs/CreateConnectorRequestJira.md @@ -0,0 +1,114 @@ +# CreateConnectorRequestJira + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesJira**](ConfigPropertiesJira.md) | | +**ConnectorTypeId** | **string** | The type of connector. | +**Name** | **string** | The display name for the connector. | +**Secrets** | [**SecretsPropertiesJira**](SecretsPropertiesJira.md) | | + +## Methods + +### NewCreateConnectorRequestJira + +`func NewCreateConnectorRequestJira(config ConfigPropertiesJira, connectorTypeId string, name string, secrets SecretsPropertiesJira, ) *CreateConnectorRequestJira` + +NewCreateConnectorRequestJira instantiates a new CreateConnectorRequestJira object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateConnectorRequestJiraWithDefaults + +`func NewCreateConnectorRequestJiraWithDefaults() *CreateConnectorRequestJira` + +NewCreateConnectorRequestJiraWithDefaults instantiates a new CreateConnectorRequestJira object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *CreateConnectorRequestJira) GetConfig() ConfigPropertiesJira` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *CreateConnectorRequestJira) GetConfigOk() (*ConfigPropertiesJira, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *CreateConnectorRequestJira) SetConfig(v ConfigPropertiesJira)` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *CreateConnectorRequestJira) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *CreateConnectorRequestJira) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *CreateConnectorRequestJira) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetName + +`func (o *CreateConnectorRequestJira) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateConnectorRequestJira) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateConnectorRequestJira) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *CreateConnectorRequestJira) GetSecrets() SecretsPropertiesJira` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *CreateConnectorRequestJira) GetSecretsOk() (*SecretsPropertiesJira, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *CreateConnectorRequestJira) SetSecrets(v SecretsPropertiesJira)` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CreateConnectorRequestOpsgenie.md b/generated/kibanaactions/docs/CreateConnectorRequestOpsgenie.md new file mode 100644 index 000000000..4c968540c --- /dev/null +++ b/generated/kibanaactions/docs/CreateConnectorRequestOpsgenie.md @@ -0,0 +1,114 @@ +# CreateConnectorRequestOpsgenie + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesOpsgenie**](ConfigPropertiesOpsgenie.md) | | +**ConnectorTypeId** | **string** | The type of connector. | +**Name** | **string** | The display name for the connector. | +**Secrets** | [**SecretsPropertiesOpsgenie**](SecretsPropertiesOpsgenie.md) | | + +## Methods + +### NewCreateConnectorRequestOpsgenie + +`func NewCreateConnectorRequestOpsgenie(config ConfigPropertiesOpsgenie, connectorTypeId string, name string, secrets SecretsPropertiesOpsgenie, ) *CreateConnectorRequestOpsgenie` + +NewCreateConnectorRequestOpsgenie instantiates a new CreateConnectorRequestOpsgenie object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateConnectorRequestOpsgenieWithDefaults + +`func NewCreateConnectorRequestOpsgenieWithDefaults() *CreateConnectorRequestOpsgenie` + +NewCreateConnectorRequestOpsgenieWithDefaults instantiates a new CreateConnectorRequestOpsgenie object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *CreateConnectorRequestOpsgenie) GetConfig() ConfigPropertiesOpsgenie` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *CreateConnectorRequestOpsgenie) GetConfigOk() (*ConfigPropertiesOpsgenie, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *CreateConnectorRequestOpsgenie) SetConfig(v ConfigPropertiesOpsgenie)` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *CreateConnectorRequestOpsgenie) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *CreateConnectorRequestOpsgenie) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *CreateConnectorRequestOpsgenie) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetName + +`func (o *CreateConnectorRequestOpsgenie) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateConnectorRequestOpsgenie) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateConnectorRequestOpsgenie) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *CreateConnectorRequestOpsgenie) GetSecrets() SecretsPropertiesOpsgenie` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *CreateConnectorRequestOpsgenie) GetSecretsOk() (*SecretsPropertiesOpsgenie, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *CreateConnectorRequestOpsgenie) SetSecrets(v SecretsPropertiesOpsgenie)` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CreateConnectorRequestPagerduty.md b/generated/kibanaactions/docs/CreateConnectorRequestPagerduty.md new file mode 100644 index 000000000..ac97fdd5c --- /dev/null +++ b/generated/kibanaactions/docs/CreateConnectorRequestPagerduty.md @@ -0,0 +1,114 @@ +# CreateConnectorRequestPagerduty + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.pagerduty`. | +**ConnectorTypeId** | **string** | The type of connector. | +**Name** | **string** | The display name for the connector. | +**Secrets** | **map[string]interface{}** | Defines secrets for connectors when type is `.pagerduty`. | + +## Methods + +### NewCreateConnectorRequestPagerduty + +`func NewCreateConnectorRequestPagerduty(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}, ) *CreateConnectorRequestPagerduty` + +NewCreateConnectorRequestPagerduty instantiates a new CreateConnectorRequestPagerduty object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateConnectorRequestPagerdutyWithDefaults + +`func NewCreateConnectorRequestPagerdutyWithDefaults() *CreateConnectorRequestPagerduty` + +NewCreateConnectorRequestPagerdutyWithDefaults instantiates a new CreateConnectorRequestPagerduty object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *CreateConnectorRequestPagerduty) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *CreateConnectorRequestPagerduty) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *CreateConnectorRequestPagerduty) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *CreateConnectorRequestPagerduty) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *CreateConnectorRequestPagerduty) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *CreateConnectorRequestPagerduty) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetName + +`func (o *CreateConnectorRequestPagerduty) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateConnectorRequestPagerduty) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateConnectorRequestPagerduty) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *CreateConnectorRequestPagerduty) GetSecrets() map[string]interface{}` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *CreateConnectorRequestPagerduty) GetSecretsOk() (*map[string]interface{}, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *CreateConnectorRequestPagerduty) SetSecrets(v map[string]interface{})` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CreateConnectorRequestResilient.md b/generated/kibanaactions/docs/CreateConnectorRequestResilient.md new file mode 100644 index 000000000..d9729d0cf --- /dev/null +++ b/generated/kibanaactions/docs/CreateConnectorRequestResilient.md @@ -0,0 +1,114 @@ +# CreateConnectorRequestResilient + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesResilient**](ConfigPropertiesResilient.md) | | +**ConnectorTypeId** | **string** | The type of connector. | +**Name** | **string** | The display name for the connector. | +**Secrets** | [**SecretsPropertiesResilient**](SecretsPropertiesResilient.md) | | + +## Methods + +### NewCreateConnectorRequestResilient + +`func NewCreateConnectorRequestResilient(config ConfigPropertiesResilient, connectorTypeId string, name string, secrets SecretsPropertiesResilient, ) *CreateConnectorRequestResilient` + +NewCreateConnectorRequestResilient instantiates a new CreateConnectorRequestResilient object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateConnectorRequestResilientWithDefaults + +`func NewCreateConnectorRequestResilientWithDefaults() *CreateConnectorRequestResilient` + +NewCreateConnectorRequestResilientWithDefaults instantiates a new CreateConnectorRequestResilient object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *CreateConnectorRequestResilient) GetConfig() ConfigPropertiesResilient` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *CreateConnectorRequestResilient) GetConfigOk() (*ConfigPropertiesResilient, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *CreateConnectorRequestResilient) SetConfig(v ConfigPropertiesResilient)` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *CreateConnectorRequestResilient) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *CreateConnectorRequestResilient) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *CreateConnectorRequestResilient) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetName + +`func (o *CreateConnectorRequestResilient) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateConnectorRequestResilient) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateConnectorRequestResilient) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *CreateConnectorRequestResilient) GetSecrets() SecretsPropertiesResilient` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *CreateConnectorRequestResilient) GetSecretsOk() (*SecretsPropertiesResilient, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *CreateConnectorRequestResilient) SetSecrets(v SecretsPropertiesResilient)` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CreateConnectorRequestServerlog.md b/generated/kibanaactions/docs/CreateConnectorRequestServerlog.md new file mode 100644 index 000000000..95eaf5cbc --- /dev/null +++ b/generated/kibanaactions/docs/CreateConnectorRequestServerlog.md @@ -0,0 +1,72 @@ +# CreateConnectorRequestServerlog + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConnectorTypeId** | **string** | The type of connector. | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewCreateConnectorRequestServerlog + +`func NewCreateConnectorRequestServerlog(connectorTypeId string, name string, ) *CreateConnectorRequestServerlog` + +NewCreateConnectorRequestServerlog instantiates a new CreateConnectorRequestServerlog object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateConnectorRequestServerlogWithDefaults + +`func NewCreateConnectorRequestServerlogWithDefaults() *CreateConnectorRequestServerlog` + +NewCreateConnectorRequestServerlogWithDefaults instantiates a new CreateConnectorRequestServerlog object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConnectorTypeId + +`func (o *CreateConnectorRequestServerlog) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *CreateConnectorRequestServerlog) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *CreateConnectorRequestServerlog) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetName + +`func (o *CreateConnectorRequestServerlog) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateConnectorRequestServerlog) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateConnectorRequestServerlog) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CreateConnectorRequestServicenow.md b/generated/kibanaactions/docs/CreateConnectorRequestServicenow.md new file mode 100644 index 000000000..c6d0d4403 --- /dev/null +++ b/generated/kibanaactions/docs/CreateConnectorRequestServicenow.md @@ -0,0 +1,114 @@ +# CreateConnectorRequestServicenow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesServicenow**](ConfigPropertiesServicenow.md) | | +**ConnectorTypeId** | **string** | The type of connector. | +**Name** | **string** | The display name for the connector. | +**Secrets** | [**SecretsPropertiesServicenow**](SecretsPropertiesServicenow.md) | | + +## Methods + +### NewCreateConnectorRequestServicenow + +`func NewCreateConnectorRequestServicenow(config ConfigPropertiesServicenow, connectorTypeId string, name string, secrets SecretsPropertiesServicenow, ) *CreateConnectorRequestServicenow` + +NewCreateConnectorRequestServicenow instantiates a new CreateConnectorRequestServicenow object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateConnectorRequestServicenowWithDefaults + +`func NewCreateConnectorRequestServicenowWithDefaults() *CreateConnectorRequestServicenow` + +NewCreateConnectorRequestServicenowWithDefaults instantiates a new CreateConnectorRequestServicenow object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *CreateConnectorRequestServicenow) GetConfig() ConfigPropertiesServicenow` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *CreateConnectorRequestServicenow) GetConfigOk() (*ConfigPropertiesServicenow, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *CreateConnectorRequestServicenow) SetConfig(v ConfigPropertiesServicenow)` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *CreateConnectorRequestServicenow) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *CreateConnectorRequestServicenow) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *CreateConnectorRequestServicenow) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetName + +`func (o *CreateConnectorRequestServicenow) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateConnectorRequestServicenow) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateConnectorRequestServicenow) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *CreateConnectorRequestServicenow) GetSecrets() SecretsPropertiesServicenow` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *CreateConnectorRequestServicenow) GetSecretsOk() (*SecretsPropertiesServicenow, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *CreateConnectorRequestServicenow) SetSecrets(v SecretsPropertiesServicenow)` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CreateConnectorRequestServicenowItom.md b/generated/kibanaactions/docs/CreateConnectorRequestServicenowItom.md new file mode 100644 index 000000000..c4c13f29b --- /dev/null +++ b/generated/kibanaactions/docs/CreateConnectorRequestServicenowItom.md @@ -0,0 +1,114 @@ +# CreateConnectorRequestServicenowItom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesServicenowItom**](ConfigPropertiesServicenowItom.md) | | +**ConnectorTypeId** | **string** | The type of connector. | +**Name** | **string** | The display name for the connector. | +**Secrets** | [**SecretsPropertiesServicenow**](SecretsPropertiesServicenow.md) | | + +## Methods + +### NewCreateConnectorRequestServicenowItom + +`func NewCreateConnectorRequestServicenowItom(config ConfigPropertiesServicenowItom, connectorTypeId string, name string, secrets SecretsPropertiesServicenow, ) *CreateConnectorRequestServicenowItom` + +NewCreateConnectorRequestServicenowItom instantiates a new CreateConnectorRequestServicenowItom object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateConnectorRequestServicenowItomWithDefaults + +`func NewCreateConnectorRequestServicenowItomWithDefaults() *CreateConnectorRequestServicenowItom` + +NewCreateConnectorRequestServicenowItomWithDefaults instantiates a new CreateConnectorRequestServicenowItom object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *CreateConnectorRequestServicenowItom) GetConfig() ConfigPropertiesServicenowItom` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *CreateConnectorRequestServicenowItom) GetConfigOk() (*ConfigPropertiesServicenowItom, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *CreateConnectorRequestServicenowItom) SetConfig(v ConfigPropertiesServicenowItom)` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *CreateConnectorRequestServicenowItom) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *CreateConnectorRequestServicenowItom) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *CreateConnectorRequestServicenowItom) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetName + +`func (o *CreateConnectorRequestServicenowItom) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateConnectorRequestServicenowItom) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateConnectorRequestServicenowItom) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *CreateConnectorRequestServicenowItom) GetSecrets() SecretsPropertiesServicenow` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *CreateConnectorRequestServicenowItom) GetSecretsOk() (*SecretsPropertiesServicenow, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *CreateConnectorRequestServicenowItom) SetSecrets(v SecretsPropertiesServicenow)` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CreateConnectorRequestServicenowSir.md b/generated/kibanaactions/docs/CreateConnectorRequestServicenowSir.md new file mode 100644 index 000000000..f5ea005ef --- /dev/null +++ b/generated/kibanaactions/docs/CreateConnectorRequestServicenowSir.md @@ -0,0 +1,114 @@ +# CreateConnectorRequestServicenowSir + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesServicenow**](ConfigPropertiesServicenow.md) | | +**ConnectorTypeId** | **string** | The type of connector. | +**Name** | **string** | The display name for the connector. | +**Secrets** | [**SecretsPropertiesServicenow**](SecretsPropertiesServicenow.md) | | + +## Methods + +### NewCreateConnectorRequestServicenowSir + +`func NewCreateConnectorRequestServicenowSir(config ConfigPropertiesServicenow, connectorTypeId string, name string, secrets SecretsPropertiesServicenow, ) *CreateConnectorRequestServicenowSir` + +NewCreateConnectorRequestServicenowSir instantiates a new CreateConnectorRequestServicenowSir object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateConnectorRequestServicenowSirWithDefaults + +`func NewCreateConnectorRequestServicenowSirWithDefaults() *CreateConnectorRequestServicenowSir` + +NewCreateConnectorRequestServicenowSirWithDefaults instantiates a new CreateConnectorRequestServicenowSir object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *CreateConnectorRequestServicenowSir) GetConfig() ConfigPropertiesServicenow` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *CreateConnectorRequestServicenowSir) GetConfigOk() (*ConfigPropertiesServicenow, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *CreateConnectorRequestServicenowSir) SetConfig(v ConfigPropertiesServicenow)` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *CreateConnectorRequestServicenowSir) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *CreateConnectorRequestServicenowSir) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *CreateConnectorRequestServicenowSir) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetName + +`func (o *CreateConnectorRequestServicenowSir) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateConnectorRequestServicenowSir) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateConnectorRequestServicenowSir) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *CreateConnectorRequestServicenowSir) GetSecrets() SecretsPropertiesServicenow` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *CreateConnectorRequestServicenowSir) GetSecretsOk() (*SecretsPropertiesServicenow, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *CreateConnectorRequestServicenowSir) SetSecrets(v SecretsPropertiesServicenow)` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CreateConnectorRequestSlack.md b/generated/kibanaactions/docs/CreateConnectorRequestSlack.md new file mode 100644 index 000000000..431c8db64 --- /dev/null +++ b/generated/kibanaactions/docs/CreateConnectorRequestSlack.md @@ -0,0 +1,93 @@ +# CreateConnectorRequestSlack + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConnectorTypeId** | **string** | The type of connector. | +**Name** | **string** | The display name for the connector. | +**Secrets** | **map[string]interface{}** | Defines secrets for connectors when type is `.slack`. | + +## Methods + +### NewCreateConnectorRequestSlack + +`func NewCreateConnectorRequestSlack(connectorTypeId string, name string, secrets map[string]interface{}, ) *CreateConnectorRequestSlack` + +NewCreateConnectorRequestSlack instantiates a new CreateConnectorRequestSlack object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateConnectorRequestSlackWithDefaults + +`func NewCreateConnectorRequestSlackWithDefaults() *CreateConnectorRequestSlack` + +NewCreateConnectorRequestSlackWithDefaults instantiates a new CreateConnectorRequestSlack object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConnectorTypeId + +`func (o *CreateConnectorRequestSlack) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *CreateConnectorRequestSlack) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *CreateConnectorRequestSlack) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetName + +`func (o *CreateConnectorRequestSlack) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateConnectorRequestSlack) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateConnectorRequestSlack) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *CreateConnectorRequestSlack) GetSecrets() map[string]interface{}` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *CreateConnectorRequestSlack) GetSecretsOk() (*map[string]interface{}, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *CreateConnectorRequestSlack) SetSecrets(v map[string]interface{})` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CreateConnectorRequestSwimlane.md b/generated/kibanaactions/docs/CreateConnectorRequestSwimlane.md new file mode 100644 index 000000000..fb78402cf --- /dev/null +++ b/generated/kibanaactions/docs/CreateConnectorRequestSwimlane.md @@ -0,0 +1,114 @@ +# CreateConnectorRequestSwimlane + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesSwimlane**](ConfigPropertiesSwimlane.md) | | +**ConnectorTypeId** | **string** | The type of connector. | +**Name** | **string** | The display name for the connector. | +**Secrets** | [**SecretsPropertiesSwimlane**](SecretsPropertiesSwimlane.md) | | + +## Methods + +### NewCreateConnectorRequestSwimlane + +`func NewCreateConnectorRequestSwimlane(config ConfigPropertiesSwimlane, connectorTypeId string, name string, secrets SecretsPropertiesSwimlane, ) *CreateConnectorRequestSwimlane` + +NewCreateConnectorRequestSwimlane instantiates a new CreateConnectorRequestSwimlane object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateConnectorRequestSwimlaneWithDefaults + +`func NewCreateConnectorRequestSwimlaneWithDefaults() *CreateConnectorRequestSwimlane` + +NewCreateConnectorRequestSwimlaneWithDefaults instantiates a new CreateConnectorRequestSwimlane object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *CreateConnectorRequestSwimlane) GetConfig() ConfigPropertiesSwimlane` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *CreateConnectorRequestSwimlane) GetConfigOk() (*ConfigPropertiesSwimlane, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *CreateConnectorRequestSwimlane) SetConfig(v ConfigPropertiesSwimlane)` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *CreateConnectorRequestSwimlane) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *CreateConnectorRequestSwimlane) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *CreateConnectorRequestSwimlane) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetName + +`func (o *CreateConnectorRequestSwimlane) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateConnectorRequestSwimlane) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateConnectorRequestSwimlane) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *CreateConnectorRequestSwimlane) GetSecrets() SecretsPropertiesSwimlane` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *CreateConnectorRequestSwimlane) GetSecretsOk() (*SecretsPropertiesSwimlane, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *CreateConnectorRequestSwimlane) SetSecrets(v SecretsPropertiesSwimlane)` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CreateConnectorRequestTeams.md b/generated/kibanaactions/docs/CreateConnectorRequestTeams.md new file mode 100644 index 000000000..682deb579 --- /dev/null +++ b/generated/kibanaactions/docs/CreateConnectorRequestTeams.md @@ -0,0 +1,93 @@ +# CreateConnectorRequestTeams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConnectorTypeId** | **string** | The type of connector. | +**Name** | **string** | The display name for the connector. | +**Secrets** | **map[string]interface{}** | Defines secrets for connectors when type is `.teams`. | + +## Methods + +### NewCreateConnectorRequestTeams + +`func NewCreateConnectorRequestTeams(connectorTypeId string, name string, secrets map[string]interface{}, ) *CreateConnectorRequestTeams` + +NewCreateConnectorRequestTeams instantiates a new CreateConnectorRequestTeams object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateConnectorRequestTeamsWithDefaults + +`func NewCreateConnectorRequestTeamsWithDefaults() *CreateConnectorRequestTeams` + +NewCreateConnectorRequestTeamsWithDefaults instantiates a new CreateConnectorRequestTeams object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConnectorTypeId + +`func (o *CreateConnectorRequestTeams) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *CreateConnectorRequestTeams) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *CreateConnectorRequestTeams) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetName + +`func (o *CreateConnectorRequestTeams) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateConnectorRequestTeams) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateConnectorRequestTeams) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *CreateConnectorRequestTeams) GetSecrets() map[string]interface{}` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *CreateConnectorRequestTeams) GetSecretsOk() (*map[string]interface{}, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *CreateConnectorRequestTeams) SetSecrets(v map[string]interface{})` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CreateConnectorRequestTines.md b/generated/kibanaactions/docs/CreateConnectorRequestTines.md new file mode 100644 index 000000000..23851e441 --- /dev/null +++ b/generated/kibanaactions/docs/CreateConnectorRequestTines.md @@ -0,0 +1,114 @@ +# CreateConnectorRequestTines + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.tines`. | +**ConnectorTypeId** | **string** | The type of connector. | +**Name** | **string** | The display name for the connector. | +**Secrets** | **map[string]interface{}** | Defines secrets for connectors when type is `.tines`. | + +## Methods + +### NewCreateConnectorRequestTines + +`func NewCreateConnectorRequestTines(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}, ) *CreateConnectorRequestTines` + +NewCreateConnectorRequestTines instantiates a new CreateConnectorRequestTines object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateConnectorRequestTinesWithDefaults + +`func NewCreateConnectorRequestTinesWithDefaults() *CreateConnectorRequestTines` + +NewCreateConnectorRequestTinesWithDefaults instantiates a new CreateConnectorRequestTines object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *CreateConnectorRequestTines) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *CreateConnectorRequestTines) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *CreateConnectorRequestTines) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *CreateConnectorRequestTines) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *CreateConnectorRequestTines) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *CreateConnectorRequestTines) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetName + +`func (o *CreateConnectorRequestTines) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateConnectorRequestTines) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateConnectorRequestTines) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *CreateConnectorRequestTines) GetSecrets() map[string]interface{}` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *CreateConnectorRequestTines) GetSecretsOk() (*map[string]interface{}, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *CreateConnectorRequestTines) SetSecrets(v map[string]interface{})` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CreateConnectorRequestWebhook.md b/generated/kibanaactions/docs/CreateConnectorRequestWebhook.md new file mode 100644 index 000000000..3de369955 --- /dev/null +++ b/generated/kibanaactions/docs/CreateConnectorRequestWebhook.md @@ -0,0 +1,114 @@ +# CreateConnectorRequestWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.webhook`. | +**ConnectorTypeId** | **string** | The type of connector. | +**Name** | **string** | The display name for the connector. | +**Secrets** | **map[string]interface{}** | Defines secrets for connectors when type is `.webhook`. | + +## Methods + +### NewCreateConnectorRequestWebhook + +`func NewCreateConnectorRequestWebhook(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}, ) *CreateConnectorRequestWebhook` + +NewCreateConnectorRequestWebhook instantiates a new CreateConnectorRequestWebhook object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateConnectorRequestWebhookWithDefaults + +`func NewCreateConnectorRequestWebhookWithDefaults() *CreateConnectorRequestWebhook` + +NewCreateConnectorRequestWebhookWithDefaults instantiates a new CreateConnectorRequestWebhook object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *CreateConnectorRequestWebhook) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *CreateConnectorRequestWebhook) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *CreateConnectorRequestWebhook) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *CreateConnectorRequestWebhook) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *CreateConnectorRequestWebhook) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *CreateConnectorRequestWebhook) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetName + +`func (o *CreateConnectorRequestWebhook) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateConnectorRequestWebhook) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateConnectorRequestWebhook) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *CreateConnectorRequestWebhook) GetSecrets() map[string]interface{}` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *CreateConnectorRequestWebhook) GetSecretsOk() (*map[string]interface{}, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *CreateConnectorRequestWebhook) SetSecrets(v map[string]interface{})` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/CreateConnectorRequestXmatters.md b/generated/kibanaactions/docs/CreateConnectorRequestXmatters.md new file mode 100644 index 000000000..1c75fceee --- /dev/null +++ b/generated/kibanaactions/docs/CreateConnectorRequestXmatters.md @@ -0,0 +1,114 @@ +# CreateConnectorRequestXmatters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.xmatters`. | +**ConnectorTypeId** | **string** | The type of connector. | +**Name** | **string** | The display name for the connector. | +**Secrets** | **map[string]interface{}** | Defines secrets for connectors when type is `.xmatters`. | + +## Methods + +### NewCreateConnectorRequestXmatters + +`func NewCreateConnectorRequestXmatters(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}, ) *CreateConnectorRequestXmatters` + +NewCreateConnectorRequestXmatters instantiates a new CreateConnectorRequestXmatters object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateConnectorRequestXmattersWithDefaults + +`func NewCreateConnectorRequestXmattersWithDefaults() *CreateConnectorRequestXmatters` + +NewCreateConnectorRequestXmattersWithDefaults instantiates a new CreateConnectorRequestXmatters object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *CreateConnectorRequestXmatters) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *CreateConnectorRequestXmatters) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *CreateConnectorRequestXmatters) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + + +### GetConnectorTypeId + +`func (o *CreateConnectorRequestXmatters) GetConnectorTypeId() string` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *CreateConnectorRequestXmatters) GetConnectorTypeIdOk() (*string, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *CreateConnectorRequestXmatters) SetConnectorTypeId(v string)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetName + +`func (o *CreateConnectorRequestXmatters) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateConnectorRequestXmatters) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateConnectorRequestXmatters) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *CreateConnectorRequestXmatters) GetSecrets() map[string]interface{}` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *CreateConnectorRequestXmatters) GetSecretsOk() (*map[string]interface{}, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *CreateConnectorRequestXmatters) SetSecrets(v map[string]interface{})` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/Features.md b/generated/kibanaactions/docs/Features.md new file mode 100644 index 000000000..571d97c2a --- /dev/null +++ b/generated/kibanaactions/docs/Features.md @@ -0,0 +1,17 @@ +# Features + +## Enum + + +* `ALERTING` (value: `"alerting"`) + +* `CASES` (value: `"cases"`) + +* `UPTIME` (value: `"uptime"`) + +* `SIEM` (value: `"siem"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/GetConnector404Response.md b/generated/kibanaactions/docs/GetConnector404Response.md new file mode 100644 index 000000000..b07a86dd4 --- /dev/null +++ b/generated/kibanaactions/docs/GetConnector404Response.md @@ -0,0 +1,108 @@ +# GetConnector404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] +**StatusCode** | Pointer to **int32** | | [optional] + +## Methods + +### NewGetConnector404Response + +`func NewGetConnector404Response() *GetConnector404Response` + +NewGetConnector404Response instantiates a new GetConnector404Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetConnector404ResponseWithDefaults + +`func NewGetConnector404ResponseWithDefaults() *GetConnector404Response` + +NewGetConnector404ResponseWithDefaults instantiates a new GetConnector404Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetError + +`func (o *GetConnector404Response) GetError() string` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *GetConnector404Response) GetErrorOk() (*string, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *GetConnector404Response) SetError(v string)` + +SetError sets Error field to given value. + +### HasError + +`func (o *GetConnector404Response) HasError() bool` + +HasError returns a boolean if a field has been set. + +### GetMessage + +`func (o *GetConnector404Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *GetConnector404Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *GetConnector404Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *GetConnector404Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetStatusCode + +`func (o *GetConnector404Response) GetStatusCode() int32` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *GetConnector404Response) GetStatusCodeOk() (*int32, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *GetConnector404Response) SetStatusCode(v int32)` + +SetStatusCode sets StatusCode field to given value. + +### HasStatusCode + +`func (o *GetConnector404Response) HasStatusCode() bool` + +HasStatusCode returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/GetConnectorTypesResponseBodyPropertiesInner.md b/generated/kibanaactions/docs/GetConnectorTypesResponseBodyPropertiesInner.md new file mode 100644 index 000000000..2d833ac96 --- /dev/null +++ b/generated/kibanaactions/docs/GetConnectorTypesResponseBodyPropertiesInner.md @@ -0,0 +1,212 @@ +# GetConnectorTypesResponseBodyPropertiesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | Indicates whether the connector type is enabled in Kibana. | [optional] +**EnabledInConfig** | Pointer to **bool** | Indicates whether the connector type is enabled in the Kibana `.yml` file. | [optional] +**EnabledInLicense** | Pointer to **bool** | Indicates whether the connector is enabled in the license. | [optional] +**Id** | Pointer to [**ConnectorTypes**](ConnectorTypes.md) | | [optional] +**MinimumLicenseRequired** | Pointer to **string** | The license that is required to use the connector type. | [optional] +**Name** | Pointer to **string** | The name of the connector type. | [optional] +**SupportedFeatureIds** | Pointer to [**[]Features**](Features.md) | The Kibana features that are supported by the connector type. | [optional] + +## Methods + +### NewGetConnectorTypesResponseBodyPropertiesInner + +`func NewGetConnectorTypesResponseBodyPropertiesInner() *GetConnectorTypesResponseBodyPropertiesInner` + +NewGetConnectorTypesResponseBodyPropertiesInner instantiates a new GetConnectorTypesResponseBodyPropertiesInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetConnectorTypesResponseBodyPropertiesInnerWithDefaults + +`func NewGetConnectorTypesResponseBodyPropertiesInnerWithDefaults() *GetConnectorTypesResponseBodyPropertiesInner` + +NewGetConnectorTypesResponseBodyPropertiesInnerWithDefaults instantiates a new GetConnectorTypesResponseBodyPropertiesInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetEnabledInConfig + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledInConfig() bool` + +GetEnabledInConfig returns the EnabledInConfig field if non-nil, zero value otherwise. + +### GetEnabledInConfigOk + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledInConfigOk() (*bool, bool)` + +GetEnabledInConfigOk returns a tuple with the EnabledInConfig field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabledInConfig + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) SetEnabledInConfig(v bool)` + +SetEnabledInConfig sets EnabledInConfig field to given value. + +### HasEnabledInConfig + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) HasEnabledInConfig() bool` + +HasEnabledInConfig returns a boolean if a field has been set. + +### GetEnabledInLicense + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledInLicense() bool` + +GetEnabledInLicense returns the EnabledInLicense field if non-nil, zero value otherwise. + +### GetEnabledInLicenseOk + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledInLicenseOk() (*bool, bool)` + +GetEnabledInLicenseOk returns a tuple with the EnabledInLicense field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabledInLicense + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) SetEnabledInLicense(v bool)` + +SetEnabledInLicense sets EnabledInLicense field to given value. + +### HasEnabledInLicense + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) HasEnabledInLicense() bool` + +HasEnabledInLicense returns a boolean if a field has been set. + +### GetId + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetId() ConnectorTypes` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetIdOk() (*ConnectorTypes, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) SetId(v ConnectorTypes)` + +SetId sets Id field to given value. + +### HasId + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetMinimumLicenseRequired + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetMinimumLicenseRequired() string` + +GetMinimumLicenseRequired returns the MinimumLicenseRequired field if non-nil, zero value otherwise. + +### GetMinimumLicenseRequiredOk + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetMinimumLicenseRequiredOk() (*string, bool)` + +GetMinimumLicenseRequiredOk returns a tuple with the MinimumLicenseRequired field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMinimumLicenseRequired + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) SetMinimumLicenseRequired(v string)` + +SetMinimumLicenseRequired sets MinimumLicenseRequired field to given value. + +### HasMinimumLicenseRequired + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) HasMinimumLicenseRequired() bool` + +HasMinimumLicenseRequired returns a boolean if a field has been set. + +### GetName + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetSupportedFeatureIds + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetSupportedFeatureIds() []Features` + +GetSupportedFeatureIds returns the SupportedFeatureIds field if non-nil, zero value otherwise. + +### GetSupportedFeatureIdsOk + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetSupportedFeatureIdsOk() (*[]Features, bool)` + +GetSupportedFeatureIdsOk returns a tuple with the SupportedFeatureIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSupportedFeatureIds + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) SetSupportedFeatureIds(v []Features)` + +SetSupportedFeatureIds sets SupportedFeatureIds field to given value. + +### HasSupportedFeatureIds + +`func (o *GetConnectorTypesResponseBodyPropertiesInner) HasSupportedFeatureIds() bool` + +HasSupportedFeatureIds returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/GetConnectorsResponseBodyProperties.md b/generated/kibanaactions/docs/GetConnectorsResponseBodyProperties.md new file mode 100644 index 000000000..ec44cbfcf --- /dev/null +++ b/generated/kibanaactions/docs/GetConnectorsResponseBodyProperties.md @@ -0,0 +1,218 @@ +# GetConnectorsResponseBodyProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConnectorTypeId** | [**ConnectorTypes**](ConnectorTypes.md) | | +**Config** | Pointer to **map[string]interface{}** | The configuration for the connector. Configuration properties vary depending on the connector type. | [optional] +**Id** | **string** | The identifier for the connector. | +**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | +**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | +**Name** | **string** | The display name for the connector. | +**ReferencedByCount** | **int32** | Indicates the number of saved objects that reference the connector. If `is_preconfigured` is true, this value is not calculated. | [default to 0] + +## Methods + +### NewGetConnectorsResponseBodyProperties + +`func NewGetConnectorsResponseBodyProperties(connectorTypeId ConnectorTypes, id string, isDeprecated bool, isPreconfigured bool, name string, referencedByCount int32, ) *GetConnectorsResponseBodyProperties` + +NewGetConnectorsResponseBodyProperties instantiates a new GetConnectorsResponseBodyProperties object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetConnectorsResponseBodyPropertiesWithDefaults + +`func NewGetConnectorsResponseBodyPropertiesWithDefaults() *GetConnectorsResponseBodyProperties` + +NewGetConnectorsResponseBodyPropertiesWithDefaults instantiates a new GetConnectorsResponseBodyProperties object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConnectorTypeId + +`func (o *GetConnectorsResponseBodyProperties) GetConnectorTypeId() ConnectorTypes` + +GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. + +### GetConnectorTypeIdOk + +`func (o *GetConnectorsResponseBodyProperties) GetConnectorTypeIdOk() (*ConnectorTypes, bool)` + +GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorTypeId + +`func (o *GetConnectorsResponseBodyProperties) SetConnectorTypeId(v ConnectorTypes)` + +SetConnectorTypeId sets ConnectorTypeId field to given value. + + +### GetConfig + +`func (o *GetConnectorsResponseBodyProperties) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *GetConnectorsResponseBodyProperties) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *GetConnectorsResponseBodyProperties) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + +### HasConfig + +`func (o *GetConnectorsResponseBodyProperties) HasConfig() bool` + +HasConfig returns a boolean if a field has been set. + +### SetConfigNil + +`func (o *GetConnectorsResponseBodyProperties) SetConfigNil(b bool)` + + SetConfigNil sets the value for Config to be an explicit nil + +### UnsetConfig +`func (o *GetConnectorsResponseBodyProperties) UnsetConfig()` + +UnsetConfig ensures that no value is present for Config, not even an explicit nil +### GetId + +`func (o *GetConnectorsResponseBodyProperties) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *GetConnectorsResponseBodyProperties) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *GetConnectorsResponseBodyProperties) SetId(v string)` + +SetId sets Id field to given value. + + +### GetIsDeprecated + +`func (o *GetConnectorsResponseBodyProperties) GetIsDeprecated() bool` + +GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. + +### GetIsDeprecatedOk + +`func (o *GetConnectorsResponseBodyProperties) GetIsDeprecatedOk() (*bool, bool)` + +GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDeprecated + +`func (o *GetConnectorsResponseBodyProperties) SetIsDeprecated(v bool)` + +SetIsDeprecated sets IsDeprecated field to given value. + + +### GetIsMissingSecrets + +`func (o *GetConnectorsResponseBodyProperties) GetIsMissingSecrets() bool` + +GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. + +### GetIsMissingSecretsOk + +`func (o *GetConnectorsResponseBodyProperties) GetIsMissingSecretsOk() (*bool, bool)` + +GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMissingSecrets + +`func (o *GetConnectorsResponseBodyProperties) SetIsMissingSecrets(v bool)` + +SetIsMissingSecrets sets IsMissingSecrets field to given value. + +### HasIsMissingSecrets + +`func (o *GetConnectorsResponseBodyProperties) HasIsMissingSecrets() bool` + +HasIsMissingSecrets returns a boolean if a field has been set. + +### GetIsPreconfigured + +`func (o *GetConnectorsResponseBodyProperties) GetIsPreconfigured() bool` + +GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. + +### GetIsPreconfiguredOk + +`func (o *GetConnectorsResponseBodyProperties) GetIsPreconfiguredOk() (*bool, bool)` + +GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPreconfigured + +`func (o *GetConnectorsResponseBodyProperties) SetIsPreconfigured(v bool)` + +SetIsPreconfigured sets IsPreconfigured field to given value. + + +### GetName + +`func (o *GetConnectorsResponseBodyProperties) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GetConnectorsResponseBodyProperties) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *GetConnectorsResponseBodyProperties) SetName(v string)` + +SetName sets Name field to given value. + + +### GetReferencedByCount + +`func (o *GetConnectorsResponseBodyProperties) GetReferencedByCount() int32` + +GetReferencedByCount returns the ReferencedByCount field if non-nil, zero value otherwise. + +### GetReferencedByCountOk + +`func (o *GetConnectorsResponseBodyProperties) GetReferencedByCountOk() (*int32, bool)` + +GetReferencedByCountOk returns a tuple with the ReferencedByCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferencedByCount + +`func (o *GetConnectorsResponseBodyProperties) SetReferencedByCount(v int32)` + +SetReferencedByCount sets ReferencedByCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/LegacyCreateConnectorRequestProperties.md b/generated/kibanaactions/docs/LegacyCreateConnectorRequestProperties.md new file mode 100644 index 000000000..2f2156054 --- /dev/null +++ b/generated/kibanaactions/docs/LegacyCreateConnectorRequestProperties.md @@ -0,0 +1,134 @@ +# LegacyCreateConnectorRequestProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActionTypeId** | Pointer to **string** | The connector type identifier. | [optional] +**Config** | Pointer to **map[string]interface{}** | The configuration for the connector. Configuration properties vary depending on the connector type. | [optional] +**Name** | Pointer to **string** | The display name for the connector. | [optional] +**Secrets** | Pointer to **map[string]interface{}** | The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. NOTE: Remember these values. You must provide them each time you update the connector. | [optional] + +## Methods + +### NewLegacyCreateConnectorRequestProperties + +`func NewLegacyCreateConnectorRequestProperties() *LegacyCreateConnectorRequestProperties` + +NewLegacyCreateConnectorRequestProperties instantiates a new LegacyCreateConnectorRequestProperties object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLegacyCreateConnectorRequestPropertiesWithDefaults + +`func NewLegacyCreateConnectorRequestPropertiesWithDefaults() *LegacyCreateConnectorRequestProperties` + +NewLegacyCreateConnectorRequestPropertiesWithDefaults instantiates a new LegacyCreateConnectorRequestProperties object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetActionTypeId + +`func (o *LegacyCreateConnectorRequestProperties) GetActionTypeId() string` + +GetActionTypeId returns the ActionTypeId field if non-nil, zero value otherwise. + +### GetActionTypeIdOk + +`func (o *LegacyCreateConnectorRequestProperties) GetActionTypeIdOk() (*string, bool)` + +GetActionTypeIdOk returns a tuple with the ActionTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActionTypeId + +`func (o *LegacyCreateConnectorRequestProperties) SetActionTypeId(v string)` + +SetActionTypeId sets ActionTypeId field to given value. + +### HasActionTypeId + +`func (o *LegacyCreateConnectorRequestProperties) HasActionTypeId() bool` + +HasActionTypeId returns a boolean if a field has been set. + +### GetConfig + +`func (o *LegacyCreateConnectorRequestProperties) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *LegacyCreateConnectorRequestProperties) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *LegacyCreateConnectorRequestProperties) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + +### HasConfig + +`func (o *LegacyCreateConnectorRequestProperties) HasConfig() bool` + +HasConfig returns a boolean if a field has been set. + +### GetName + +`func (o *LegacyCreateConnectorRequestProperties) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *LegacyCreateConnectorRequestProperties) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *LegacyCreateConnectorRequestProperties) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *LegacyCreateConnectorRequestProperties) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetSecrets + +`func (o *LegacyCreateConnectorRequestProperties) GetSecrets() map[string]interface{}` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *LegacyCreateConnectorRequestProperties) GetSecretsOk() (*map[string]interface{}, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *LegacyCreateConnectorRequestProperties) SetSecrets(v map[string]interface{})` + +SetSecrets sets Secrets field to given value. + +### HasSecrets + +`func (o *LegacyCreateConnectorRequestProperties) HasSecrets() bool` + +HasSecrets returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/LegacyGetConnectorTypesResponseBodyPropertiesInner.md b/generated/kibanaactions/docs/LegacyGetConnectorTypesResponseBodyPropertiesInner.md new file mode 100644 index 000000000..32c56b2ed --- /dev/null +++ b/generated/kibanaactions/docs/LegacyGetConnectorTypesResponseBodyPropertiesInner.md @@ -0,0 +1,186 @@ +# LegacyGetConnectorTypesResponseBodyPropertiesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | Indicates whether the connector type is enabled in Kibana. | [optional] +**EnabledInConfig** | Pointer to **bool** | Indicates whether the connector type is enabled in the Kibana `.yml` file. | [optional] +**EnabledInLicense** | Pointer to **bool** | Indicates whether the connector is enabled in the license. | [optional] +**Id** | Pointer to **string** | The unique identifier for the connector type. | [optional] +**MinimumLicenseRequired** | Pointer to **string** | The license that is required to use the connector type. | [optional] +**Name** | Pointer to **string** | The name of the connector type. | [optional] + +## Methods + +### NewLegacyGetConnectorTypesResponseBodyPropertiesInner + +`func NewLegacyGetConnectorTypesResponseBodyPropertiesInner() *LegacyGetConnectorTypesResponseBodyPropertiesInner` + +NewLegacyGetConnectorTypesResponseBodyPropertiesInner instantiates a new LegacyGetConnectorTypesResponseBodyPropertiesInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLegacyGetConnectorTypesResponseBodyPropertiesInnerWithDefaults + +`func NewLegacyGetConnectorTypesResponseBodyPropertiesInnerWithDefaults() *LegacyGetConnectorTypesResponseBodyPropertiesInner` + +NewLegacyGetConnectorTypesResponseBodyPropertiesInnerWithDefaults instantiates a new LegacyGetConnectorTypesResponseBodyPropertiesInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetEnabledInConfig + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledInConfig() bool` + +GetEnabledInConfig returns the EnabledInConfig field if non-nil, zero value otherwise. + +### GetEnabledInConfigOk + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledInConfigOk() (*bool, bool)` + +GetEnabledInConfigOk returns a tuple with the EnabledInConfig field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabledInConfig + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetEnabledInConfig(v bool)` + +SetEnabledInConfig sets EnabledInConfig field to given value. + +### HasEnabledInConfig + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasEnabledInConfig() bool` + +HasEnabledInConfig returns a boolean if a field has been set. + +### GetEnabledInLicense + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledInLicense() bool` + +GetEnabledInLicense returns the EnabledInLicense field if non-nil, zero value otherwise. + +### GetEnabledInLicenseOk + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledInLicenseOk() (*bool, bool)` + +GetEnabledInLicenseOk returns a tuple with the EnabledInLicense field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabledInLicense + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetEnabledInLicense(v bool)` + +SetEnabledInLicense sets EnabledInLicense field to given value. + +### HasEnabledInLicense + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasEnabledInLicense() bool` + +HasEnabledInLicense returns a boolean if a field has been set. + +### GetId + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetMinimumLicenseRequired + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetMinimumLicenseRequired() string` + +GetMinimumLicenseRequired returns the MinimumLicenseRequired field if non-nil, zero value otherwise. + +### GetMinimumLicenseRequiredOk + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetMinimumLicenseRequiredOk() (*string, bool)` + +GetMinimumLicenseRequiredOk returns a tuple with the MinimumLicenseRequired field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMinimumLicenseRequired + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetMinimumLicenseRequired(v string)` + +SetMinimumLicenseRequired sets MinimumLicenseRequired field to given value. + +### HasMinimumLicenseRequired + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasMinimumLicenseRequired() bool` + +HasMinimumLicenseRequired returns a boolean if a field has been set. + +### GetName + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasName() bool` + +HasName returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/LegacyRunConnector200Response.md b/generated/kibanaactions/docs/LegacyRunConnector200Response.md new file mode 100644 index 000000000..17ca58a2e --- /dev/null +++ b/generated/kibanaactions/docs/LegacyRunConnector200Response.md @@ -0,0 +1,108 @@ +# LegacyRunConnector200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActionId** | Pointer to **string** | | [optional] +**Data** | Pointer to [**RunConnector200ResponseData**](RunConnector200ResponseData.md) | | [optional] +**Status** | Pointer to **string** | The status of the action. | [optional] + +## Methods + +### NewLegacyRunConnector200Response + +`func NewLegacyRunConnector200Response() *LegacyRunConnector200Response` + +NewLegacyRunConnector200Response instantiates a new LegacyRunConnector200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLegacyRunConnector200ResponseWithDefaults + +`func NewLegacyRunConnector200ResponseWithDefaults() *LegacyRunConnector200Response` + +NewLegacyRunConnector200ResponseWithDefaults instantiates a new LegacyRunConnector200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetActionId + +`func (o *LegacyRunConnector200Response) GetActionId() string` + +GetActionId returns the ActionId field if non-nil, zero value otherwise. + +### GetActionIdOk + +`func (o *LegacyRunConnector200Response) GetActionIdOk() (*string, bool)` + +GetActionIdOk returns a tuple with the ActionId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActionId + +`func (o *LegacyRunConnector200Response) SetActionId(v string)` + +SetActionId sets ActionId field to given value. + +### HasActionId + +`func (o *LegacyRunConnector200Response) HasActionId() bool` + +HasActionId returns a boolean if a field has been set. + +### GetData + +`func (o *LegacyRunConnector200Response) GetData() RunConnector200ResponseData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LegacyRunConnector200Response) GetDataOk() (*RunConnector200ResponseData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *LegacyRunConnector200Response) SetData(v RunConnector200ResponseData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *LegacyRunConnector200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetStatus + +`func (o *LegacyRunConnector200Response) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *LegacyRunConnector200Response) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *LegacyRunConnector200Response) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *LegacyRunConnector200Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/LegacyRunConnectorRequestBodyProperties.md b/generated/kibanaactions/docs/LegacyRunConnectorRequestBodyProperties.md new file mode 100644 index 000000000..99b4047b7 --- /dev/null +++ b/generated/kibanaactions/docs/LegacyRunConnectorRequestBodyProperties.md @@ -0,0 +1,51 @@ +# LegacyRunConnectorRequestBodyProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Params** | **map[string]interface{}** | The parameters of the connector. Parameter properties vary depending on the connector type. | + +## Methods + +### NewLegacyRunConnectorRequestBodyProperties + +`func NewLegacyRunConnectorRequestBodyProperties(params map[string]interface{}, ) *LegacyRunConnectorRequestBodyProperties` + +NewLegacyRunConnectorRequestBodyProperties instantiates a new LegacyRunConnectorRequestBodyProperties object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLegacyRunConnectorRequestBodyPropertiesWithDefaults + +`func NewLegacyRunConnectorRequestBodyPropertiesWithDefaults() *LegacyRunConnectorRequestBodyProperties` + +NewLegacyRunConnectorRequestBodyPropertiesWithDefaults instantiates a new LegacyRunConnectorRequestBodyProperties object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetParams + +`func (o *LegacyRunConnectorRequestBodyProperties) GetParams() map[string]interface{}` + +GetParams returns the Params field if non-nil, zero value otherwise. + +### GetParamsOk + +`func (o *LegacyRunConnectorRequestBodyProperties) GetParamsOk() (*map[string]interface{}, bool)` + +GetParamsOk returns a tuple with the Params field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParams + +`func (o *LegacyRunConnectorRequestBodyProperties) SetParams(v map[string]interface{})` + +SetParams sets Params field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/LegacyUpdateConnectorRequestBodyProperties.md b/generated/kibanaactions/docs/LegacyUpdateConnectorRequestBodyProperties.md new file mode 100644 index 000000000..ec69e2209 --- /dev/null +++ b/generated/kibanaactions/docs/LegacyUpdateConnectorRequestBodyProperties.md @@ -0,0 +1,108 @@ +# LegacyUpdateConnectorRequestBodyProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | Pointer to **map[string]interface{}** | The new connector configuration. Configuration properties vary depending on the connector type. | [optional] +**Name** | Pointer to **string** | The new name for the connector. | [optional] +**Secrets** | Pointer to **map[string]interface{}** | The updated secrets configuration for the connector. Secrets properties vary depending on the connector type. | [optional] + +## Methods + +### NewLegacyUpdateConnectorRequestBodyProperties + +`func NewLegacyUpdateConnectorRequestBodyProperties() *LegacyUpdateConnectorRequestBodyProperties` + +NewLegacyUpdateConnectorRequestBodyProperties instantiates a new LegacyUpdateConnectorRequestBodyProperties object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLegacyUpdateConnectorRequestBodyPropertiesWithDefaults + +`func NewLegacyUpdateConnectorRequestBodyPropertiesWithDefaults() *LegacyUpdateConnectorRequestBodyProperties` + +NewLegacyUpdateConnectorRequestBodyPropertiesWithDefaults instantiates a new LegacyUpdateConnectorRequestBodyProperties object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *LegacyUpdateConnectorRequestBodyProperties) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *LegacyUpdateConnectorRequestBodyProperties) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *LegacyUpdateConnectorRequestBodyProperties) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + +### HasConfig + +`func (o *LegacyUpdateConnectorRequestBodyProperties) HasConfig() bool` + +HasConfig returns a boolean if a field has been set. + +### GetName + +`func (o *LegacyUpdateConnectorRequestBodyProperties) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *LegacyUpdateConnectorRequestBodyProperties) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *LegacyUpdateConnectorRequestBodyProperties) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *LegacyUpdateConnectorRequestBodyProperties) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetSecrets + +`func (o *LegacyUpdateConnectorRequestBodyProperties) GetSecrets() map[string]interface{}` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *LegacyUpdateConnectorRequestBodyProperties) GetSecretsOk() (*map[string]interface{}, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *LegacyUpdateConnectorRequestBodyProperties) SetSecrets(v map[string]interface{})` + +SetSecrets sets Secrets field to given value. + +### HasSecrets + +`func (o *LegacyUpdateConnectorRequestBodyProperties) HasSecrets() bool` + +HasSecrets returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/Model401Response.md b/generated/kibanaactions/docs/Model401Response.md new file mode 100644 index 000000000..a53c5cd69 --- /dev/null +++ b/generated/kibanaactions/docs/Model401Response.md @@ -0,0 +1,108 @@ +# Model401Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] +**StatusCode** | Pointer to **int32** | | [optional] + +## Methods + +### NewModel401Response + +`func NewModel401Response() *Model401Response` + +NewModel401Response instantiates a new Model401Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewModel401ResponseWithDefaults + +`func NewModel401ResponseWithDefaults() *Model401Response` + +NewModel401ResponseWithDefaults instantiates a new Model401Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetError + +`func (o *Model401Response) GetError() string` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *Model401Response) GetErrorOk() (*string, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *Model401Response) SetError(v string)` + +SetError sets Error field to given value. + +### HasError + +`func (o *Model401Response) HasError() bool` + +HasError returns a boolean if a field has been set. + +### GetMessage + +`func (o *Model401Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *Model401Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *Model401Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *Model401Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetStatusCode + +`func (o *Model401Response) GetStatusCode() int32` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *Model401Response) GetStatusCodeOk() (*int32, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *Model401Response) SetStatusCode(v int32)` + +SetStatusCode sets StatusCode field to given value. + +### HasStatusCode + +`func (o *Model401Response) HasStatusCode() bool` + +HasStatusCode returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/Model404Response.md b/generated/kibanaactions/docs/Model404Response.md new file mode 100644 index 000000000..1bfd84837 --- /dev/null +++ b/generated/kibanaactions/docs/Model404Response.md @@ -0,0 +1,108 @@ +# Model404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] +**StatusCode** | Pointer to **int32** | | [optional] + +## Methods + +### NewModel404Response + +`func NewModel404Response() *Model404Response` + +NewModel404Response instantiates a new Model404Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewModel404ResponseWithDefaults + +`func NewModel404ResponseWithDefaults() *Model404Response` + +NewModel404ResponseWithDefaults instantiates a new Model404Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetError + +`func (o *Model404Response) GetError() string` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *Model404Response) GetErrorOk() (*string, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *Model404Response) SetError(v string)` + +SetError sets Error field to given value. + +### HasError + +`func (o *Model404Response) HasError() bool` + +HasError returns a boolean if a field has been set. + +### GetMessage + +`func (o *Model404Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *Model404Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *Model404Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *Model404Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetStatusCode + +`func (o *Model404Response) GetStatusCode() int32` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *Model404Response) GetStatusCodeOk() (*int32, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *Model404Response) SetStatusCode(v int32)` + +SetStatusCode sets StatusCode field to given value. + +### HasStatusCode + +`func (o *Model404Response) HasStatusCode() bool` + +HasStatusCode returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RuleNameMapping.md b/generated/kibanaactions/docs/RuleNameMapping.md new file mode 100644 index 000000000..268f13731 --- /dev/null +++ b/generated/kibanaactions/docs/RuleNameMapping.md @@ -0,0 +1,114 @@ +# RuleNameMapping + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FieldType** | **string** | The type of field in Swimlane. | +**Id** | **string** | The identifier for the field in Swimlane. | +**Key** | **string** | The key for the field in Swimlane. | +**Name** | **string** | The name of the field in Swimlane. | + +## Methods + +### NewRuleNameMapping + +`func NewRuleNameMapping(fieldType string, id string, key string, name string, ) *RuleNameMapping` + +NewRuleNameMapping instantiates a new RuleNameMapping object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRuleNameMappingWithDefaults + +`func NewRuleNameMappingWithDefaults() *RuleNameMapping` + +NewRuleNameMappingWithDefaults instantiates a new RuleNameMapping object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFieldType + +`func (o *RuleNameMapping) GetFieldType() string` + +GetFieldType returns the FieldType field if non-nil, zero value otherwise. + +### GetFieldTypeOk + +`func (o *RuleNameMapping) GetFieldTypeOk() (*string, bool)` + +GetFieldTypeOk returns a tuple with the FieldType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFieldType + +`func (o *RuleNameMapping) SetFieldType(v string)` + +SetFieldType sets FieldType field to given value. + + +### GetId + +`func (o *RuleNameMapping) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RuleNameMapping) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *RuleNameMapping) SetId(v string)` + +SetId sets Id field to given value. + + +### GetKey + +`func (o *RuleNameMapping) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *RuleNameMapping) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *RuleNameMapping) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetName + +`func (o *RuleNameMapping) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *RuleNameMapping) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *RuleNameMapping) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnector200Response.md b/generated/kibanaactions/docs/RunConnector200Response.md new file mode 100644 index 000000000..8f052cbe0 --- /dev/null +++ b/generated/kibanaactions/docs/RunConnector200Response.md @@ -0,0 +1,98 @@ +# RunConnector200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConnectorId** | **string** | The identifier for the connector. | +**Data** | Pointer to [**RunConnector200ResponseData**](RunConnector200ResponseData.md) | | [optional] +**Status** | **string** | The status of the action. | + +## Methods + +### NewRunConnector200Response + +`func NewRunConnector200Response(connectorId string, status string, ) *RunConnector200Response` + +NewRunConnector200Response instantiates a new RunConnector200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnector200ResponseWithDefaults + +`func NewRunConnector200ResponseWithDefaults() *RunConnector200Response` + +NewRunConnector200ResponseWithDefaults instantiates a new RunConnector200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConnectorId + +`func (o *RunConnector200Response) GetConnectorId() string` + +GetConnectorId returns the ConnectorId field if non-nil, zero value otherwise. + +### GetConnectorIdOk + +`func (o *RunConnector200Response) GetConnectorIdOk() (*string, bool)` + +GetConnectorIdOk returns a tuple with the ConnectorId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorId + +`func (o *RunConnector200Response) SetConnectorId(v string)` + +SetConnectorId sets ConnectorId field to given value. + + +### GetData + +`func (o *RunConnector200Response) GetData() RunConnector200ResponseData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RunConnector200Response) GetDataOk() (*RunConnector200ResponseData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *RunConnector200Response) SetData(v RunConnector200ResponseData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *RunConnector200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetStatus + +`func (o *RunConnector200Response) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *RunConnector200Response) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *RunConnector200Response) SetStatus(v string)` + +SetStatus sets Status field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnector200ResponseData.md b/generated/kibanaactions/docs/RunConnector200ResponseData.md new file mode 100644 index 000000000..328a89d2a --- /dev/null +++ b/generated/kibanaactions/docs/RunConnector200ResponseData.md @@ -0,0 +1,30 @@ +# RunConnector200ResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewRunConnector200ResponseData + +`func NewRunConnector200ResponseData() *RunConnector200ResponseData` + +NewRunConnector200ResponseData instantiates a new RunConnector200ResponseData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnector200ResponseDataWithDefaults + +`func NewRunConnector200ResponseDataWithDefaults() *RunConnector200ResponseData` + +NewRunConnector200ResponseDataWithDefaults instantiates a new RunConnector200ResponseData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorParamsDocuments.md b/generated/kibanaactions/docs/RunConnectorParamsDocuments.md new file mode 100644 index 000000000..f94c70607 --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorParamsDocuments.md @@ -0,0 +1,51 @@ +# RunConnectorParamsDocuments + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Documents** | **[]map[string]interface{}** | The documents in JSON format for index connectors. | + +## Methods + +### NewRunConnectorParamsDocuments + +`func NewRunConnectorParamsDocuments(documents []map[string]interface{}, ) *RunConnectorParamsDocuments` + +NewRunConnectorParamsDocuments instantiates a new RunConnectorParamsDocuments object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorParamsDocumentsWithDefaults + +`func NewRunConnectorParamsDocumentsWithDefaults() *RunConnectorParamsDocuments` + +NewRunConnectorParamsDocumentsWithDefaults instantiates a new RunConnectorParamsDocuments object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDocuments + +`func (o *RunConnectorParamsDocuments) GetDocuments() []map[string]interface{}` + +GetDocuments returns the Documents field if non-nil, zero value otherwise. + +### GetDocumentsOk + +`func (o *RunConnectorParamsDocuments) GetDocumentsOk() (*[]map[string]interface{}, bool)` + +GetDocumentsOk returns a tuple with the Documents field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDocuments + +`func (o *RunConnectorParamsDocuments) SetDocuments(v []map[string]interface{})` + +SetDocuments sets Documents field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorParamsLevelMessage.md b/generated/kibanaactions/docs/RunConnectorParamsLevelMessage.md new file mode 100644 index 000000000..8350cddae --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorParamsLevelMessage.md @@ -0,0 +1,77 @@ +# RunConnectorParamsLevelMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Level** | Pointer to **string** | The log level of the message for server log connectors. | [optional] [default to "info"] +**Message** | **string** | The message for server log connectors. | + +## Methods + +### NewRunConnectorParamsLevelMessage + +`func NewRunConnectorParamsLevelMessage(message string, ) *RunConnectorParamsLevelMessage` + +NewRunConnectorParamsLevelMessage instantiates a new RunConnectorParamsLevelMessage object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorParamsLevelMessageWithDefaults + +`func NewRunConnectorParamsLevelMessageWithDefaults() *RunConnectorParamsLevelMessage` + +NewRunConnectorParamsLevelMessageWithDefaults instantiates a new RunConnectorParamsLevelMessage object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLevel + +`func (o *RunConnectorParamsLevelMessage) GetLevel() string` + +GetLevel returns the Level field if non-nil, zero value otherwise. + +### GetLevelOk + +`func (o *RunConnectorParamsLevelMessage) GetLevelOk() (*string, bool)` + +GetLevelOk returns a tuple with the Level field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLevel + +`func (o *RunConnectorParamsLevelMessage) SetLevel(v string)` + +SetLevel sets Level field to given value. + +### HasLevel + +`func (o *RunConnectorParamsLevelMessage) HasLevel() bool` + +HasLevel returns a boolean if a field has been set. + +### GetMessage + +`func (o *RunConnectorParamsLevelMessage) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *RunConnectorParamsLevelMessage) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *RunConnectorParamsLevelMessage) SetMessage(v string)` + +SetMessage sets Message field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorRequestBodyProperties.md b/generated/kibanaactions/docs/RunConnectorRequestBodyProperties.md new file mode 100644 index 000000000..c0bcc5adc --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorRequestBodyProperties.md @@ -0,0 +1,51 @@ +# RunConnectorRequestBodyProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Params** | [**RunConnectorRequestBodyPropertiesParams**](RunConnectorRequestBodyPropertiesParams.md) | | + +## Methods + +### NewRunConnectorRequestBodyProperties + +`func NewRunConnectorRequestBodyProperties(params RunConnectorRequestBodyPropertiesParams, ) *RunConnectorRequestBodyProperties` + +NewRunConnectorRequestBodyProperties instantiates a new RunConnectorRequestBodyProperties object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorRequestBodyPropertiesWithDefaults + +`func NewRunConnectorRequestBodyPropertiesWithDefaults() *RunConnectorRequestBodyProperties` + +NewRunConnectorRequestBodyPropertiesWithDefaults instantiates a new RunConnectorRequestBodyProperties object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetParams + +`func (o *RunConnectorRequestBodyProperties) GetParams() RunConnectorRequestBodyPropertiesParams` + +GetParams returns the Params field if non-nil, zero value otherwise. + +### GetParamsOk + +`func (o *RunConnectorRequestBodyProperties) GetParamsOk() (*RunConnectorRequestBodyPropertiesParams, bool)` + +GetParamsOk returns a tuple with the Params field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParams + +`func (o *RunConnectorRequestBodyProperties) SetParams(v RunConnectorRequestBodyPropertiesParams)` + +SetParams sets Params field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorRequestBodyPropertiesParams.md b/generated/kibanaactions/docs/RunConnectorRequestBodyPropertiesParams.md new file mode 100644 index 000000000..9143c339a --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorRequestBodyPropertiesParams.md @@ -0,0 +1,98 @@ +# RunConnectorRequestBodyPropertiesParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Documents** | **[]map[string]interface{}** | The documents in JSON format for index connectors. | +**Level** | Pointer to **string** | The log level of the message for server log connectors. | [optional] [default to "info"] +**Message** | **string** | The message for server log connectors. | + +## Methods + +### NewRunConnectorRequestBodyPropertiesParams + +`func NewRunConnectorRequestBodyPropertiesParams(documents []map[string]interface{}, message string, ) *RunConnectorRequestBodyPropertiesParams` + +NewRunConnectorRequestBodyPropertiesParams instantiates a new RunConnectorRequestBodyPropertiesParams object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorRequestBodyPropertiesParamsWithDefaults + +`func NewRunConnectorRequestBodyPropertiesParamsWithDefaults() *RunConnectorRequestBodyPropertiesParams` + +NewRunConnectorRequestBodyPropertiesParamsWithDefaults instantiates a new RunConnectorRequestBodyPropertiesParams object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDocuments + +`func (o *RunConnectorRequestBodyPropertiesParams) GetDocuments() []map[string]interface{}` + +GetDocuments returns the Documents field if non-nil, zero value otherwise. + +### GetDocumentsOk + +`func (o *RunConnectorRequestBodyPropertiesParams) GetDocumentsOk() (*[]map[string]interface{}, bool)` + +GetDocumentsOk returns a tuple with the Documents field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDocuments + +`func (o *RunConnectorRequestBodyPropertiesParams) SetDocuments(v []map[string]interface{})` + +SetDocuments sets Documents field to given value. + + +### GetLevel + +`func (o *RunConnectorRequestBodyPropertiesParams) GetLevel() string` + +GetLevel returns the Level field if non-nil, zero value otherwise. + +### GetLevelOk + +`func (o *RunConnectorRequestBodyPropertiesParams) GetLevelOk() (*string, bool)` + +GetLevelOk returns a tuple with the Level field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLevel + +`func (o *RunConnectorRequestBodyPropertiesParams) SetLevel(v string)` + +SetLevel sets Level field to given value. + +### HasLevel + +`func (o *RunConnectorRequestBodyPropertiesParams) HasLevel() bool` + +HasLevel returns a boolean if a field has been set. + +### GetMessage + +`func (o *RunConnectorRequestBodyPropertiesParams) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *RunConnectorRequestBodyPropertiesParams) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *RunConnectorRequestBodyPropertiesParams) SetMessage(v string)` + +SetMessage sets Message field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionAddevent.md b/generated/kibanaactions/docs/RunConnectorSubactionAddevent.md new file mode 100644 index 000000000..db137ca50 --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionAddevent.md @@ -0,0 +1,77 @@ +# RunConnectorSubactionAddevent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubAction** | **string** | The action to test. | +**SubActionParams** | Pointer to [**RunConnectorSubactionAddeventSubActionParams**](RunConnectorSubactionAddeventSubActionParams.md) | | [optional] + +## Methods + +### NewRunConnectorSubactionAddevent + +`func NewRunConnectorSubactionAddevent(subAction string, ) *RunConnectorSubactionAddevent` + +NewRunConnectorSubactionAddevent instantiates a new RunConnectorSubactionAddevent object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionAddeventWithDefaults + +`func NewRunConnectorSubactionAddeventWithDefaults() *RunConnectorSubactionAddevent` + +NewRunConnectorSubactionAddeventWithDefaults instantiates a new RunConnectorSubactionAddevent object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSubAction + +`func (o *RunConnectorSubactionAddevent) GetSubAction() string` + +GetSubAction returns the SubAction field if non-nil, zero value otherwise. + +### GetSubActionOk + +`func (o *RunConnectorSubactionAddevent) GetSubActionOk() (*string, bool)` + +GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubAction + +`func (o *RunConnectorSubactionAddevent) SetSubAction(v string)` + +SetSubAction sets SubAction field to given value. + + +### GetSubActionParams + +`func (o *RunConnectorSubactionAddevent) GetSubActionParams() RunConnectorSubactionAddeventSubActionParams` + +GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. + +### GetSubActionParamsOk + +`func (o *RunConnectorSubactionAddevent) GetSubActionParamsOk() (*RunConnectorSubactionAddeventSubActionParams, bool)` + +GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubActionParams + +`func (o *RunConnectorSubactionAddevent) SetSubActionParams(v RunConnectorSubactionAddeventSubActionParams)` + +SetSubActionParams sets SubActionParams field to given value. + +### HasSubActionParams + +`func (o *RunConnectorSubactionAddevent) HasSubActionParams() bool` + +HasSubActionParams returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionAddeventSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionAddeventSubActionParams.md new file mode 100644 index 000000000..28280ca7f --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionAddeventSubActionParams.md @@ -0,0 +1,316 @@ +# RunConnectorSubactionAddeventSubActionParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AdditionalInfo** | Pointer to **string** | Additional information about the event. | [optional] +**Description** | Pointer to **string** | The details about the event. | [optional] +**EventClass** | Pointer to **string** | A specific instance of the source. | [optional] +**MessageKey** | Pointer to **string** | All actions sharing this key are associated with the same ServiceNow alert. The default value is `<rule ID>:<alert instance ID>`. | [optional] +**MetricName** | Pointer to **string** | The name of the metric. | [optional] +**Node** | Pointer to **string** | The host that the event was triggered for. | [optional] +**Resource** | Pointer to **string** | The name of the resource. | [optional] +**Severity** | Pointer to **string** | The severity of the event. | [optional] +**Source** | Pointer to **string** | The name of the event source type. | [optional] +**TimeOfEvent** | Pointer to **string** | The time of the event. | [optional] +**Type** | Pointer to **string** | The type of event. | [optional] + +## Methods + +### NewRunConnectorSubactionAddeventSubActionParams + +`func NewRunConnectorSubactionAddeventSubActionParams() *RunConnectorSubactionAddeventSubActionParams` + +NewRunConnectorSubactionAddeventSubActionParams instantiates a new RunConnectorSubactionAddeventSubActionParams object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionAddeventSubActionParamsWithDefaults + +`func NewRunConnectorSubactionAddeventSubActionParamsWithDefaults() *RunConnectorSubactionAddeventSubActionParams` + +NewRunConnectorSubactionAddeventSubActionParamsWithDefaults instantiates a new RunConnectorSubactionAddeventSubActionParams object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAdditionalInfo + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetAdditionalInfo() string` + +GetAdditionalInfo returns the AdditionalInfo field if non-nil, zero value otherwise. + +### GetAdditionalInfoOk + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetAdditionalInfoOk() (*string, bool)` + +GetAdditionalInfoOk returns a tuple with the AdditionalInfo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAdditionalInfo + +`func (o *RunConnectorSubactionAddeventSubActionParams) SetAdditionalInfo(v string)` + +SetAdditionalInfo sets AdditionalInfo field to given value. + +### HasAdditionalInfo + +`func (o *RunConnectorSubactionAddeventSubActionParams) HasAdditionalInfo() bool` + +HasAdditionalInfo returns a boolean if a field has been set. + +### GetDescription + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *RunConnectorSubactionAddeventSubActionParams) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *RunConnectorSubactionAddeventSubActionParams) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetEventClass + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetEventClass() string` + +GetEventClass returns the EventClass field if non-nil, zero value otherwise. + +### GetEventClassOk + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetEventClassOk() (*string, bool)` + +GetEventClassOk returns a tuple with the EventClass field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEventClass + +`func (o *RunConnectorSubactionAddeventSubActionParams) SetEventClass(v string)` + +SetEventClass sets EventClass field to given value. + +### HasEventClass + +`func (o *RunConnectorSubactionAddeventSubActionParams) HasEventClass() bool` + +HasEventClass returns a boolean if a field has been set. + +### GetMessageKey + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetMessageKey() string` + +GetMessageKey returns the MessageKey field if non-nil, zero value otherwise. + +### GetMessageKeyOk + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetMessageKeyOk() (*string, bool)` + +GetMessageKeyOk returns a tuple with the MessageKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessageKey + +`func (o *RunConnectorSubactionAddeventSubActionParams) SetMessageKey(v string)` + +SetMessageKey sets MessageKey field to given value. + +### HasMessageKey + +`func (o *RunConnectorSubactionAddeventSubActionParams) HasMessageKey() bool` + +HasMessageKey returns a boolean if a field has been set. + +### GetMetricName + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetMetricName() string` + +GetMetricName returns the MetricName field if non-nil, zero value otherwise. + +### GetMetricNameOk + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetMetricNameOk() (*string, bool)` + +GetMetricNameOk returns a tuple with the MetricName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetricName + +`func (o *RunConnectorSubactionAddeventSubActionParams) SetMetricName(v string)` + +SetMetricName sets MetricName field to given value. + +### HasMetricName + +`func (o *RunConnectorSubactionAddeventSubActionParams) HasMetricName() bool` + +HasMetricName returns a boolean if a field has been set. + +### GetNode + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetNode() string` + +GetNode returns the Node field if non-nil, zero value otherwise. + +### GetNodeOk + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetNodeOk() (*string, bool)` + +GetNodeOk returns a tuple with the Node field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNode + +`func (o *RunConnectorSubactionAddeventSubActionParams) SetNode(v string)` + +SetNode sets Node field to given value. + +### HasNode + +`func (o *RunConnectorSubactionAddeventSubActionParams) HasNode() bool` + +HasNode returns a boolean if a field has been set. + +### GetResource + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetResource() string` + +GetResource returns the Resource field if non-nil, zero value otherwise. + +### GetResourceOk + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetResourceOk() (*string, bool)` + +GetResourceOk returns a tuple with the Resource field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResource + +`func (o *RunConnectorSubactionAddeventSubActionParams) SetResource(v string)` + +SetResource sets Resource field to given value. + +### HasResource + +`func (o *RunConnectorSubactionAddeventSubActionParams) HasResource() bool` + +HasResource returns a boolean if a field has been set. + +### GetSeverity + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetSeverity() string` + +GetSeverity returns the Severity field if non-nil, zero value otherwise. + +### GetSeverityOk + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetSeverityOk() (*string, bool)` + +GetSeverityOk returns a tuple with the Severity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeverity + +`func (o *RunConnectorSubactionAddeventSubActionParams) SetSeverity(v string)` + +SetSeverity sets Severity field to given value. + +### HasSeverity + +`func (o *RunConnectorSubactionAddeventSubActionParams) HasSeverity() bool` + +HasSeverity returns a boolean if a field has been set. + +### GetSource + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetSource() string` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetSourceOk() (*string, bool)` + +GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSource + +`func (o *RunConnectorSubactionAddeventSubActionParams) SetSource(v string)` + +SetSource sets Source field to given value. + +### HasSource + +`func (o *RunConnectorSubactionAddeventSubActionParams) HasSource() bool` + +HasSource returns a boolean if a field has been set. + +### GetTimeOfEvent + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetTimeOfEvent() string` + +GetTimeOfEvent returns the TimeOfEvent field if non-nil, zero value otherwise. + +### GetTimeOfEventOk + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetTimeOfEventOk() (*string, bool)` + +GetTimeOfEventOk returns a tuple with the TimeOfEvent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeOfEvent + +`func (o *RunConnectorSubactionAddeventSubActionParams) SetTimeOfEvent(v string)` + +SetTimeOfEvent sets TimeOfEvent field to given value. + +### HasTimeOfEvent + +`func (o *RunConnectorSubactionAddeventSubActionParams) HasTimeOfEvent() bool` + +HasTimeOfEvent returns a boolean if a field has been set. + +### GetType + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RunConnectorSubactionAddeventSubActionParams) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *RunConnectorSubactionAddeventSubActionParams) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *RunConnectorSubactionAddeventSubActionParams) HasType() bool` + +HasType returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionClosealert.md b/generated/kibanaactions/docs/RunConnectorSubactionClosealert.md new file mode 100644 index 000000000..8329373ec --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionClosealert.md @@ -0,0 +1,72 @@ +# RunConnectorSubactionClosealert + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubAction** | **string** | The action to test. | +**SubActionParams** | [**RunConnectorSubactionClosealertSubActionParams**](RunConnectorSubactionClosealertSubActionParams.md) | | + +## Methods + +### NewRunConnectorSubactionClosealert + +`func NewRunConnectorSubactionClosealert(subAction string, subActionParams RunConnectorSubactionClosealertSubActionParams, ) *RunConnectorSubactionClosealert` + +NewRunConnectorSubactionClosealert instantiates a new RunConnectorSubactionClosealert object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionClosealertWithDefaults + +`func NewRunConnectorSubactionClosealertWithDefaults() *RunConnectorSubactionClosealert` + +NewRunConnectorSubactionClosealertWithDefaults instantiates a new RunConnectorSubactionClosealert object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSubAction + +`func (o *RunConnectorSubactionClosealert) GetSubAction() string` + +GetSubAction returns the SubAction field if non-nil, zero value otherwise. + +### GetSubActionOk + +`func (o *RunConnectorSubactionClosealert) GetSubActionOk() (*string, bool)` + +GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubAction + +`func (o *RunConnectorSubactionClosealert) SetSubAction(v string)` + +SetSubAction sets SubAction field to given value. + + +### GetSubActionParams + +`func (o *RunConnectorSubactionClosealert) GetSubActionParams() RunConnectorSubactionClosealertSubActionParams` + +GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. + +### GetSubActionParamsOk + +`func (o *RunConnectorSubactionClosealert) GetSubActionParamsOk() (*RunConnectorSubactionClosealertSubActionParams, bool)` + +GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubActionParams + +`func (o *RunConnectorSubactionClosealert) SetSubActionParams(v RunConnectorSubactionClosealertSubActionParams)` + +SetSubActionParams sets SubActionParams field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionClosealertSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionClosealertSubActionParams.md new file mode 100644 index 000000000..d2871566c --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionClosealertSubActionParams.md @@ -0,0 +1,129 @@ +# RunConnectorSubactionClosealertSubActionParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Alias** | **string** | The unique identifier used for alert deduplication in Opsgenie. The alias must match the value used when creating the alert. | +**Note** | Pointer to **string** | Additional information for the alert. | [optional] +**Source** | Pointer to **string** | The display name for the source of the alert. | [optional] +**User** | Pointer to **string** | The display name for the owner. | [optional] + +## Methods + +### NewRunConnectorSubactionClosealertSubActionParams + +`func NewRunConnectorSubactionClosealertSubActionParams(alias string, ) *RunConnectorSubactionClosealertSubActionParams` + +NewRunConnectorSubactionClosealertSubActionParams instantiates a new RunConnectorSubactionClosealertSubActionParams object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionClosealertSubActionParamsWithDefaults + +`func NewRunConnectorSubactionClosealertSubActionParamsWithDefaults() *RunConnectorSubactionClosealertSubActionParams` + +NewRunConnectorSubactionClosealertSubActionParamsWithDefaults instantiates a new RunConnectorSubactionClosealertSubActionParams object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAlias + +`func (o *RunConnectorSubactionClosealertSubActionParams) GetAlias() string` + +GetAlias returns the Alias field if non-nil, zero value otherwise. + +### GetAliasOk + +`func (o *RunConnectorSubactionClosealertSubActionParams) GetAliasOk() (*string, bool)` + +GetAliasOk returns a tuple with the Alias field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlias + +`func (o *RunConnectorSubactionClosealertSubActionParams) SetAlias(v string)` + +SetAlias sets Alias field to given value. + + +### GetNote + +`func (o *RunConnectorSubactionClosealertSubActionParams) GetNote() string` + +GetNote returns the Note field if non-nil, zero value otherwise. + +### GetNoteOk + +`func (o *RunConnectorSubactionClosealertSubActionParams) GetNoteOk() (*string, bool)` + +GetNoteOk returns a tuple with the Note field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNote + +`func (o *RunConnectorSubactionClosealertSubActionParams) SetNote(v string)` + +SetNote sets Note field to given value. + +### HasNote + +`func (o *RunConnectorSubactionClosealertSubActionParams) HasNote() bool` + +HasNote returns a boolean if a field has been set. + +### GetSource + +`func (o *RunConnectorSubactionClosealertSubActionParams) GetSource() string` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *RunConnectorSubactionClosealertSubActionParams) GetSourceOk() (*string, bool)` + +GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSource + +`func (o *RunConnectorSubactionClosealertSubActionParams) SetSource(v string)` + +SetSource sets Source field to given value. + +### HasSource + +`func (o *RunConnectorSubactionClosealertSubActionParams) HasSource() bool` + +HasSource returns a boolean if a field has been set. + +### GetUser + +`func (o *RunConnectorSubactionClosealertSubActionParams) GetUser() string` + +GetUser returns the User field if non-nil, zero value otherwise. + +### GetUserOk + +`func (o *RunConnectorSubactionClosealertSubActionParams) GetUserOk() (*string, bool)` + +GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUser + +`func (o *RunConnectorSubactionClosealertSubActionParams) SetUser(v string)` + +SetUser sets User field to given value. + +### HasUser + +`func (o *RunConnectorSubactionClosealertSubActionParams) HasUser() bool` + +HasUser returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionCreatealert.md b/generated/kibanaactions/docs/RunConnectorSubactionCreatealert.md new file mode 100644 index 000000000..6528932a8 --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionCreatealert.md @@ -0,0 +1,72 @@ +# RunConnectorSubactionCreatealert + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubAction** | **string** | The action to test. | +**SubActionParams** | [**RunConnectorSubactionCreatealertSubActionParams**](RunConnectorSubactionCreatealertSubActionParams.md) | | + +## Methods + +### NewRunConnectorSubactionCreatealert + +`func NewRunConnectorSubactionCreatealert(subAction string, subActionParams RunConnectorSubactionCreatealertSubActionParams, ) *RunConnectorSubactionCreatealert` + +NewRunConnectorSubactionCreatealert instantiates a new RunConnectorSubactionCreatealert object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionCreatealertWithDefaults + +`func NewRunConnectorSubactionCreatealertWithDefaults() *RunConnectorSubactionCreatealert` + +NewRunConnectorSubactionCreatealertWithDefaults instantiates a new RunConnectorSubactionCreatealert object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSubAction + +`func (o *RunConnectorSubactionCreatealert) GetSubAction() string` + +GetSubAction returns the SubAction field if non-nil, zero value otherwise. + +### GetSubActionOk + +`func (o *RunConnectorSubactionCreatealert) GetSubActionOk() (*string, bool)` + +GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubAction + +`func (o *RunConnectorSubactionCreatealert) SetSubAction(v string)` + +SetSubAction sets SubAction field to given value. + + +### GetSubActionParams + +`func (o *RunConnectorSubactionCreatealert) GetSubActionParams() RunConnectorSubactionCreatealertSubActionParams` + +GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. + +### GetSubActionParamsOk + +`func (o *RunConnectorSubactionCreatealert) GetSubActionParamsOk() (*RunConnectorSubactionCreatealertSubActionParams, bool)` + +GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubActionParams + +`func (o *RunConnectorSubactionCreatealert) SetSubActionParams(v RunConnectorSubactionCreatealertSubActionParams)` + +SetSubActionParams sets SubActionParams field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParams.md new file mode 100644 index 000000000..24b3da7ef --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParams.md @@ -0,0 +1,363 @@ +# RunConnectorSubactionCreatealertSubActionParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Actions** | Pointer to **[]string** | The custom actions available to the alert. | [optional] +**Alias** | Pointer to **string** | The unique identifier used for alert deduplication in Opsgenie. | [optional] +**Description** | Pointer to **string** | A description that provides detailed information about the alert. | [optional] +**Details** | Pointer to **map[string]interface{}** | The custom properties of the alert. | [optional] +**Entity** | Pointer to **string** | The domain of the alert. For example, the application or server name. | [optional] +**Message** | **string** | The alert message. | +**Note** | Pointer to **string** | Additional information for the alert. | [optional] +**Priority** | Pointer to **string** | The priority level for the alert. | [optional] +**Responders** | Pointer to [**[]RunConnectorSubactionCreatealertSubActionParamsRespondersInner**](RunConnectorSubactionCreatealertSubActionParamsRespondersInner.md) | The entities to receive notifications about the alert. If `type` is `user`, either `id` or `username` is required. If `type` is `team`, either `id` or `name` is required. | [optional] +**Source** | Pointer to **string** | The display name for the source of the alert. | [optional] +**Tags** | Pointer to **[]string** | The tags for the alert. | [optional] +**User** | Pointer to **string** | The display name for the owner. | [optional] +**VisibleTo** | Pointer to [**[]RunConnectorSubactionCreatealertSubActionParamsVisibleToInner**](RunConnectorSubactionCreatealertSubActionParamsVisibleToInner.md) | The teams and users that the alert will be visible to without sending a notification. Only one of `id`, `name`, or `username` is required. | [optional] + +## Methods + +### NewRunConnectorSubactionCreatealertSubActionParams + +`func NewRunConnectorSubactionCreatealertSubActionParams(message string, ) *RunConnectorSubactionCreatealertSubActionParams` + +NewRunConnectorSubactionCreatealertSubActionParams instantiates a new RunConnectorSubactionCreatealertSubActionParams object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionCreatealertSubActionParamsWithDefaults + +`func NewRunConnectorSubactionCreatealertSubActionParamsWithDefaults() *RunConnectorSubactionCreatealertSubActionParams` + +NewRunConnectorSubactionCreatealertSubActionParamsWithDefaults instantiates a new RunConnectorSubactionCreatealertSubActionParams object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetActions + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetActions() []string` + +GetActions returns the Actions field if non-nil, zero value otherwise. + +### GetActionsOk + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetActionsOk() (*[]string, bool)` + +GetActionsOk returns a tuple with the Actions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActions + +`func (o *RunConnectorSubactionCreatealertSubActionParams) SetActions(v []string)` + +SetActions sets Actions field to given value. + +### HasActions + +`func (o *RunConnectorSubactionCreatealertSubActionParams) HasActions() bool` + +HasActions returns a boolean if a field has been set. + +### GetAlias + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetAlias() string` + +GetAlias returns the Alias field if non-nil, zero value otherwise. + +### GetAliasOk + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetAliasOk() (*string, bool)` + +GetAliasOk returns a tuple with the Alias field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlias + +`func (o *RunConnectorSubactionCreatealertSubActionParams) SetAlias(v string)` + +SetAlias sets Alias field to given value. + +### HasAlias + +`func (o *RunConnectorSubactionCreatealertSubActionParams) HasAlias() bool` + +HasAlias returns a boolean if a field has been set. + +### GetDescription + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *RunConnectorSubactionCreatealertSubActionParams) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *RunConnectorSubactionCreatealertSubActionParams) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetDetails + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetDetails() map[string]interface{}` + +GetDetails returns the Details field if non-nil, zero value otherwise. + +### GetDetailsOk + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetDetailsOk() (*map[string]interface{}, bool)` + +GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetails + +`func (o *RunConnectorSubactionCreatealertSubActionParams) SetDetails(v map[string]interface{})` + +SetDetails sets Details field to given value. + +### HasDetails + +`func (o *RunConnectorSubactionCreatealertSubActionParams) HasDetails() bool` + +HasDetails returns a boolean if a field has been set. + +### GetEntity + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetEntity() string` + +GetEntity returns the Entity field if non-nil, zero value otherwise. + +### GetEntityOk + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetEntityOk() (*string, bool)` + +GetEntityOk returns a tuple with the Entity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEntity + +`func (o *RunConnectorSubactionCreatealertSubActionParams) SetEntity(v string)` + +SetEntity sets Entity field to given value. + +### HasEntity + +`func (o *RunConnectorSubactionCreatealertSubActionParams) HasEntity() bool` + +HasEntity returns a boolean if a field has been set. + +### GetMessage + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *RunConnectorSubactionCreatealertSubActionParams) SetMessage(v string)` + +SetMessage sets Message field to given value. + + +### GetNote + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetNote() string` + +GetNote returns the Note field if non-nil, zero value otherwise. + +### GetNoteOk + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetNoteOk() (*string, bool)` + +GetNoteOk returns a tuple with the Note field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNote + +`func (o *RunConnectorSubactionCreatealertSubActionParams) SetNote(v string)` + +SetNote sets Note field to given value. + +### HasNote + +`func (o *RunConnectorSubactionCreatealertSubActionParams) HasNote() bool` + +HasNote returns a boolean if a field has been set. + +### GetPriority + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetPriority() string` + +GetPriority returns the Priority field if non-nil, zero value otherwise. + +### GetPriorityOk + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetPriorityOk() (*string, bool)` + +GetPriorityOk returns a tuple with the Priority field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPriority + +`func (o *RunConnectorSubactionCreatealertSubActionParams) SetPriority(v string)` + +SetPriority sets Priority field to given value. + +### HasPriority + +`func (o *RunConnectorSubactionCreatealertSubActionParams) HasPriority() bool` + +HasPriority returns a boolean if a field has been set. + +### GetResponders + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetResponders() []RunConnectorSubactionCreatealertSubActionParamsRespondersInner` + +GetResponders returns the Responders field if non-nil, zero value otherwise. + +### GetRespondersOk + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetRespondersOk() (*[]RunConnectorSubactionCreatealertSubActionParamsRespondersInner, bool)` + +GetRespondersOk returns a tuple with the Responders field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResponders + +`func (o *RunConnectorSubactionCreatealertSubActionParams) SetResponders(v []RunConnectorSubactionCreatealertSubActionParamsRespondersInner)` + +SetResponders sets Responders field to given value. + +### HasResponders + +`func (o *RunConnectorSubactionCreatealertSubActionParams) HasResponders() bool` + +HasResponders returns a boolean if a field has been set. + +### GetSource + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetSource() string` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetSourceOk() (*string, bool)` + +GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSource + +`func (o *RunConnectorSubactionCreatealertSubActionParams) SetSource(v string)` + +SetSource sets Source field to given value. + +### HasSource + +`func (o *RunConnectorSubactionCreatealertSubActionParams) HasSource() bool` + +HasSource returns a boolean if a field has been set. + +### GetTags + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *RunConnectorSubactionCreatealertSubActionParams) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *RunConnectorSubactionCreatealertSubActionParams) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetUser + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetUser() string` + +GetUser returns the User field if non-nil, zero value otherwise. + +### GetUserOk + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetUserOk() (*string, bool)` + +GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUser + +`func (o *RunConnectorSubactionCreatealertSubActionParams) SetUser(v string)` + +SetUser sets User field to given value. + +### HasUser + +`func (o *RunConnectorSubactionCreatealertSubActionParams) HasUser() bool` + +HasUser returns a boolean if a field has been set. + +### GetVisibleTo + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetVisibleTo() []RunConnectorSubactionCreatealertSubActionParamsVisibleToInner` + +GetVisibleTo returns the VisibleTo field if non-nil, zero value otherwise. + +### GetVisibleToOk + +`func (o *RunConnectorSubactionCreatealertSubActionParams) GetVisibleToOk() (*[]RunConnectorSubactionCreatealertSubActionParamsVisibleToInner, bool)` + +GetVisibleToOk returns a tuple with the VisibleTo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVisibleTo + +`func (o *RunConnectorSubactionCreatealertSubActionParams) SetVisibleTo(v []RunConnectorSubactionCreatealertSubActionParamsVisibleToInner)` + +SetVisibleTo sets VisibleTo field to given value. + +### HasVisibleTo + +`func (o *RunConnectorSubactionCreatealertSubActionParams) HasVisibleTo() bool` + +HasVisibleTo returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsRespondersInner.md b/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsRespondersInner.md new file mode 100644 index 000000000..1eef38bf9 --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsRespondersInner.md @@ -0,0 +1,134 @@ +# RunConnectorSubactionCreatealertSubActionParamsRespondersInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | The identifier for the entity. | [optional] +**Name** | Pointer to **string** | The name of the entity. | [optional] +**Type** | Pointer to **string** | The type of responders, in this case `escalation`. | [optional] +**Username** | Pointer to **string** | A valid email address for the user. | [optional] + +## Methods + +### NewRunConnectorSubactionCreatealertSubActionParamsRespondersInner + +`func NewRunConnectorSubactionCreatealertSubActionParamsRespondersInner() *RunConnectorSubactionCreatealertSubActionParamsRespondersInner` + +NewRunConnectorSubactionCreatealertSubActionParamsRespondersInner instantiates a new RunConnectorSubactionCreatealertSubActionParamsRespondersInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionCreatealertSubActionParamsRespondersInnerWithDefaults + +`func NewRunConnectorSubactionCreatealertSubActionParamsRespondersInnerWithDefaults() *RunConnectorSubactionCreatealertSubActionParamsRespondersInner` + +NewRunConnectorSubactionCreatealertSubActionParamsRespondersInnerWithDefaults instantiates a new RunConnectorSubactionCreatealertSubActionParamsRespondersInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetType + +`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetUsername + +`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetUsernameOk() (*string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsername + +`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) SetUsername(v string)` + +SetUsername sets Username field to given value. + +### HasUsername + +`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) HasUsername() bool` + +HasUsername returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsVisibleToInner.md b/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsVisibleToInner.md new file mode 100644 index 000000000..b829f3de6 --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsVisibleToInner.md @@ -0,0 +1,129 @@ +# RunConnectorSubactionCreatealertSubActionParamsVisibleToInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | The identifier for the entity. | [optional] +**Name** | Pointer to **string** | The name of the entity. | [optional] +**Type** | **string** | Valid values are `team` and `user`. | +**Username** | Pointer to **string** | The user name. This property is required only when the `type` is `user`. | [optional] + +## Methods + +### NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInner + +`func NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInner(type_ string, ) *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner` + +NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInner instantiates a new RunConnectorSubactionCreatealertSubActionParamsVisibleToInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInnerWithDefaults + +`func NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInnerWithDefaults() *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner` + +NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInnerWithDefaults instantiates a new RunConnectorSubactionCreatealertSubActionParamsVisibleToInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetType + +`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) SetType(v string)` + +SetType sets Type field to given value. + + +### GetUsername + +`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetUsernameOk() (*string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsername + +`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) SetUsername(v string)` + +SetUsername sets Username field to given value. + +### HasUsername + +`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) HasUsername() bool` + +HasUsername returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetype.md b/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetype.md new file mode 100644 index 000000000..d511ea0df --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetype.md @@ -0,0 +1,72 @@ +# RunConnectorSubactionFieldsbyissuetype + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubAction** | **string** | The action to test. | +**SubActionParams** | [**RunConnectorSubactionFieldsbyissuetypeSubActionParams**](RunConnectorSubactionFieldsbyissuetypeSubActionParams.md) | | + +## Methods + +### NewRunConnectorSubactionFieldsbyissuetype + +`func NewRunConnectorSubactionFieldsbyissuetype(subAction string, subActionParams RunConnectorSubactionFieldsbyissuetypeSubActionParams, ) *RunConnectorSubactionFieldsbyissuetype` + +NewRunConnectorSubactionFieldsbyissuetype instantiates a new RunConnectorSubactionFieldsbyissuetype object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionFieldsbyissuetypeWithDefaults + +`func NewRunConnectorSubactionFieldsbyissuetypeWithDefaults() *RunConnectorSubactionFieldsbyissuetype` + +NewRunConnectorSubactionFieldsbyissuetypeWithDefaults instantiates a new RunConnectorSubactionFieldsbyissuetype object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSubAction + +`func (o *RunConnectorSubactionFieldsbyissuetype) GetSubAction() string` + +GetSubAction returns the SubAction field if non-nil, zero value otherwise. + +### GetSubActionOk + +`func (o *RunConnectorSubactionFieldsbyissuetype) GetSubActionOk() (*string, bool)` + +GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubAction + +`func (o *RunConnectorSubactionFieldsbyissuetype) SetSubAction(v string)` + +SetSubAction sets SubAction field to given value. + + +### GetSubActionParams + +`func (o *RunConnectorSubactionFieldsbyissuetype) GetSubActionParams() RunConnectorSubactionFieldsbyissuetypeSubActionParams` + +GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. + +### GetSubActionParamsOk + +`func (o *RunConnectorSubactionFieldsbyissuetype) GetSubActionParamsOk() (*RunConnectorSubactionFieldsbyissuetypeSubActionParams, bool)` + +GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubActionParams + +`func (o *RunConnectorSubactionFieldsbyissuetype) SetSubActionParams(v RunConnectorSubactionFieldsbyissuetypeSubActionParams)` + +SetSubActionParams sets SubActionParams field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetypeSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetypeSubActionParams.md new file mode 100644 index 000000000..2de07280e --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetypeSubActionParams.md @@ -0,0 +1,51 @@ +# RunConnectorSubactionFieldsbyissuetypeSubActionParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The Jira issue type identifier. | + +## Methods + +### NewRunConnectorSubactionFieldsbyissuetypeSubActionParams + +`func NewRunConnectorSubactionFieldsbyissuetypeSubActionParams(id string, ) *RunConnectorSubactionFieldsbyissuetypeSubActionParams` + +NewRunConnectorSubactionFieldsbyissuetypeSubActionParams instantiates a new RunConnectorSubactionFieldsbyissuetypeSubActionParams object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionFieldsbyissuetypeSubActionParamsWithDefaults + +`func NewRunConnectorSubactionFieldsbyissuetypeSubActionParamsWithDefaults() *RunConnectorSubactionFieldsbyissuetypeSubActionParams` + +NewRunConnectorSubactionFieldsbyissuetypeSubActionParamsWithDefaults instantiates a new RunConnectorSubactionFieldsbyissuetypeSubActionParams object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *RunConnectorSubactionFieldsbyissuetypeSubActionParams) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RunConnectorSubactionFieldsbyissuetypeSubActionParams) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *RunConnectorSubactionFieldsbyissuetypeSubActionParams) SetId(v string)` + +SetId sets Id field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionGetchoices.md b/generated/kibanaactions/docs/RunConnectorSubactionGetchoices.md new file mode 100644 index 000000000..f5a7039ad --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionGetchoices.md @@ -0,0 +1,72 @@ +# RunConnectorSubactionGetchoices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubAction** | **string** | The action to test. | +**SubActionParams** | [**RunConnectorSubactionGetchoicesSubActionParams**](RunConnectorSubactionGetchoicesSubActionParams.md) | | + +## Methods + +### NewRunConnectorSubactionGetchoices + +`func NewRunConnectorSubactionGetchoices(subAction string, subActionParams RunConnectorSubactionGetchoicesSubActionParams, ) *RunConnectorSubactionGetchoices` + +NewRunConnectorSubactionGetchoices instantiates a new RunConnectorSubactionGetchoices object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionGetchoicesWithDefaults + +`func NewRunConnectorSubactionGetchoicesWithDefaults() *RunConnectorSubactionGetchoices` + +NewRunConnectorSubactionGetchoicesWithDefaults instantiates a new RunConnectorSubactionGetchoices object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSubAction + +`func (o *RunConnectorSubactionGetchoices) GetSubAction() string` + +GetSubAction returns the SubAction field if non-nil, zero value otherwise. + +### GetSubActionOk + +`func (o *RunConnectorSubactionGetchoices) GetSubActionOk() (*string, bool)` + +GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubAction + +`func (o *RunConnectorSubactionGetchoices) SetSubAction(v string)` + +SetSubAction sets SubAction field to given value. + + +### GetSubActionParams + +`func (o *RunConnectorSubactionGetchoices) GetSubActionParams() RunConnectorSubactionGetchoicesSubActionParams` + +GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. + +### GetSubActionParamsOk + +`func (o *RunConnectorSubactionGetchoices) GetSubActionParamsOk() (*RunConnectorSubactionGetchoicesSubActionParams, bool)` + +GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubActionParams + +`func (o *RunConnectorSubactionGetchoices) SetSubActionParams(v RunConnectorSubactionGetchoicesSubActionParams)` + +SetSubActionParams sets SubActionParams field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionGetchoicesSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionGetchoicesSubActionParams.md new file mode 100644 index 000000000..7b85cf71e --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionGetchoicesSubActionParams.md @@ -0,0 +1,51 @@ +# RunConnectorSubactionGetchoicesSubActionParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fields** | **[]string** | An array of fields. | + +## Methods + +### NewRunConnectorSubactionGetchoicesSubActionParams + +`func NewRunConnectorSubactionGetchoicesSubActionParams(fields []string, ) *RunConnectorSubactionGetchoicesSubActionParams` + +NewRunConnectorSubactionGetchoicesSubActionParams instantiates a new RunConnectorSubactionGetchoicesSubActionParams object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionGetchoicesSubActionParamsWithDefaults + +`func NewRunConnectorSubactionGetchoicesSubActionParamsWithDefaults() *RunConnectorSubactionGetchoicesSubActionParams` + +NewRunConnectorSubactionGetchoicesSubActionParamsWithDefaults instantiates a new RunConnectorSubactionGetchoicesSubActionParams object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFields + +`func (o *RunConnectorSubactionGetchoicesSubActionParams) GetFields() []string` + +GetFields returns the Fields field if non-nil, zero value otherwise. + +### GetFieldsOk + +`func (o *RunConnectorSubactionGetchoicesSubActionParams) GetFieldsOk() (*[]string, bool)` + +GetFieldsOk returns a tuple with the Fields field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFields + +`func (o *RunConnectorSubactionGetchoicesSubActionParams) SetFields(v []string)` + +SetFields sets Fields field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionGetfields.md b/generated/kibanaactions/docs/RunConnectorSubactionGetfields.md new file mode 100644 index 000000000..06f830c97 --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionGetfields.md @@ -0,0 +1,51 @@ +# RunConnectorSubactionGetfields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubAction** | **string** | The action to test. | + +## Methods + +### NewRunConnectorSubactionGetfields + +`func NewRunConnectorSubactionGetfields(subAction string, ) *RunConnectorSubactionGetfields` + +NewRunConnectorSubactionGetfields instantiates a new RunConnectorSubactionGetfields object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionGetfieldsWithDefaults + +`func NewRunConnectorSubactionGetfieldsWithDefaults() *RunConnectorSubactionGetfields` + +NewRunConnectorSubactionGetfieldsWithDefaults instantiates a new RunConnectorSubactionGetfields object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSubAction + +`func (o *RunConnectorSubactionGetfields) GetSubAction() string` + +GetSubAction returns the SubAction field if non-nil, zero value otherwise. + +### GetSubActionOk + +`func (o *RunConnectorSubactionGetfields) GetSubActionOk() (*string, bool)` + +GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubAction + +`func (o *RunConnectorSubactionGetfields) SetSubAction(v string)` + +SetSubAction sets SubAction field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionGetincident.md b/generated/kibanaactions/docs/RunConnectorSubactionGetincident.md new file mode 100644 index 000000000..1a0822d89 --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionGetincident.md @@ -0,0 +1,72 @@ +# RunConnectorSubactionGetincident + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubAction** | **string** | The action to test. | +**SubActionParams** | [**RunConnectorSubactionGetincidentSubActionParams**](RunConnectorSubactionGetincidentSubActionParams.md) | | + +## Methods + +### NewRunConnectorSubactionGetincident + +`func NewRunConnectorSubactionGetincident(subAction string, subActionParams RunConnectorSubactionGetincidentSubActionParams, ) *RunConnectorSubactionGetincident` + +NewRunConnectorSubactionGetincident instantiates a new RunConnectorSubactionGetincident object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionGetincidentWithDefaults + +`func NewRunConnectorSubactionGetincidentWithDefaults() *RunConnectorSubactionGetincident` + +NewRunConnectorSubactionGetincidentWithDefaults instantiates a new RunConnectorSubactionGetincident object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSubAction + +`func (o *RunConnectorSubactionGetincident) GetSubAction() string` + +GetSubAction returns the SubAction field if non-nil, zero value otherwise. + +### GetSubActionOk + +`func (o *RunConnectorSubactionGetincident) GetSubActionOk() (*string, bool)` + +GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubAction + +`func (o *RunConnectorSubactionGetincident) SetSubAction(v string)` + +SetSubAction sets SubAction field to given value. + + +### GetSubActionParams + +`func (o *RunConnectorSubactionGetincident) GetSubActionParams() RunConnectorSubactionGetincidentSubActionParams` + +GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. + +### GetSubActionParamsOk + +`func (o *RunConnectorSubactionGetincident) GetSubActionParamsOk() (*RunConnectorSubactionGetincidentSubActionParams, bool)` + +GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubActionParams + +`func (o *RunConnectorSubactionGetincident) SetSubActionParams(v RunConnectorSubactionGetincidentSubActionParams)` + +SetSubActionParams sets SubActionParams field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionGetincidentSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionGetincidentSubActionParams.md new file mode 100644 index 000000000..b7988fad3 --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionGetincidentSubActionParams.md @@ -0,0 +1,51 @@ +# RunConnectorSubactionGetincidentSubActionParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ExternalId** | **string** | The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. | + +## Methods + +### NewRunConnectorSubactionGetincidentSubActionParams + +`func NewRunConnectorSubactionGetincidentSubActionParams(externalId string, ) *RunConnectorSubactionGetincidentSubActionParams` + +NewRunConnectorSubactionGetincidentSubActionParams instantiates a new RunConnectorSubactionGetincidentSubActionParams object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionGetincidentSubActionParamsWithDefaults + +`func NewRunConnectorSubactionGetincidentSubActionParamsWithDefaults() *RunConnectorSubactionGetincidentSubActionParams` + +NewRunConnectorSubactionGetincidentSubActionParamsWithDefaults instantiates a new RunConnectorSubactionGetincidentSubActionParams object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetExternalId + +`func (o *RunConnectorSubactionGetincidentSubActionParams) GetExternalId() string` + +GetExternalId returns the ExternalId field if non-nil, zero value otherwise. + +### GetExternalIdOk + +`func (o *RunConnectorSubactionGetincidentSubActionParams) GetExternalIdOk() (*string, bool)` + +GetExternalIdOk returns a tuple with the ExternalId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExternalId + +`func (o *RunConnectorSubactionGetincidentSubActionParams) SetExternalId(v string)` + +SetExternalId sets ExternalId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionIssue.md b/generated/kibanaactions/docs/RunConnectorSubactionIssue.md new file mode 100644 index 000000000..6111a7305 --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionIssue.md @@ -0,0 +1,77 @@ +# RunConnectorSubactionIssue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubAction** | **string** | The action to test. | +**SubActionParams** | Pointer to [**RunConnectorSubactionIssueSubActionParams**](RunConnectorSubactionIssueSubActionParams.md) | | [optional] + +## Methods + +### NewRunConnectorSubactionIssue + +`func NewRunConnectorSubactionIssue(subAction string, ) *RunConnectorSubactionIssue` + +NewRunConnectorSubactionIssue instantiates a new RunConnectorSubactionIssue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionIssueWithDefaults + +`func NewRunConnectorSubactionIssueWithDefaults() *RunConnectorSubactionIssue` + +NewRunConnectorSubactionIssueWithDefaults instantiates a new RunConnectorSubactionIssue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSubAction + +`func (o *RunConnectorSubactionIssue) GetSubAction() string` + +GetSubAction returns the SubAction field if non-nil, zero value otherwise. + +### GetSubActionOk + +`func (o *RunConnectorSubactionIssue) GetSubActionOk() (*string, bool)` + +GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubAction + +`func (o *RunConnectorSubactionIssue) SetSubAction(v string)` + +SetSubAction sets SubAction field to given value. + + +### GetSubActionParams + +`func (o *RunConnectorSubactionIssue) GetSubActionParams() RunConnectorSubactionIssueSubActionParams` + +GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. + +### GetSubActionParamsOk + +`func (o *RunConnectorSubactionIssue) GetSubActionParamsOk() (*RunConnectorSubactionIssueSubActionParams, bool)` + +GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubActionParams + +`func (o *RunConnectorSubactionIssue) SetSubActionParams(v RunConnectorSubactionIssueSubActionParams)` + +SetSubActionParams sets SubActionParams field to given value. + +### HasSubActionParams + +`func (o *RunConnectorSubactionIssue) HasSubActionParams() bool` + +HasSubActionParams returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionIssueSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionIssueSubActionParams.md new file mode 100644 index 000000000..43d16c388 --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionIssueSubActionParams.md @@ -0,0 +1,51 @@ +# RunConnectorSubactionIssueSubActionParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The Jira issue identifier. | + +## Methods + +### NewRunConnectorSubactionIssueSubActionParams + +`func NewRunConnectorSubactionIssueSubActionParams(id string, ) *RunConnectorSubactionIssueSubActionParams` + +NewRunConnectorSubactionIssueSubActionParams instantiates a new RunConnectorSubactionIssueSubActionParams object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionIssueSubActionParamsWithDefaults + +`func NewRunConnectorSubactionIssueSubActionParamsWithDefaults() *RunConnectorSubactionIssueSubActionParams` + +NewRunConnectorSubactionIssueSubActionParamsWithDefaults instantiates a new RunConnectorSubactionIssueSubActionParams object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *RunConnectorSubactionIssueSubActionParams) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RunConnectorSubactionIssueSubActionParams) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *RunConnectorSubactionIssueSubActionParams) SetId(v string)` + +SetId sets Id field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionIssues.md b/generated/kibanaactions/docs/RunConnectorSubactionIssues.md new file mode 100644 index 000000000..09eb8b903 --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionIssues.md @@ -0,0 +1,72 @@ +# RunConnectorSubactionIssues + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubAction** | **string** | The action to test. | +**SubActionParams** | [**RunConnectorSubactionIssuesSubActionParams**](RunConnectorSubactionIssuesSubActionParams.md) | | + +## Methods + +### NewRunConnectorSubactionIssues + +`func NewRunConnectorSubactionIssues(subAction string, subActionParams RunConnectorSubactionIssuesSubActionParams, ) *RunConnectorSubactionIssues` + +NewRunConnectorSubactionIssues instantiates a new RunConnectorSubactionIssues object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionIssuesWithDefaults + +`func NewRunConnectorSubactionIssuesWithDefaults() *RunConnectorSubactionIssues` + +NewRunConnectorSubactionIssuesWithDefaults instantiates a new RunConnectorSubactionIssues object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSubAction + +`func (o *RunConnectorSubactionIssues) GetSubAction() string` + +GetSubAction returns the SubAction field if non-nil, zero value otherwise. + +### GetSubActionOk + +`func (o *RunConnectorSubactionIssues) GetSubActionOk() (*string, bool)` + +GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubAction + +`func (o *RunConnectorSubactionIssues) SetSubAction(v string)` + +SetSubAction sets SubAction field to given value. + + +### GetSubActionParams + +`func (o *RunConnectorSubactionIssues) GetSubActionParams() RunConnectorSubactionIssuesSubActionParams` + +GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. + +### GetSubActionParamsOk + +`func (o *RunConnectorSubactionIssues) GetSubActionParamsOk() (*RunConnectorSubactionIssuesSubActionParams, bool)` + +GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubActionParams + +`func (o *RunConnectorSubactionIssues) SetSubActionParams(v RunConnectorSubactionIssuesSubActionParams)` + +SetSubActionParams sets SubActionParams field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionIssuesSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionIssuesSubActionParams.md new file mode 100644 index 000000000..26e087deb --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionIssuesSubActionParams.md @@ -0,0 +1,51 @@ +# RunConnectorSubactionIssuesSubActionParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | The title of the Jira issue. | + +## Methods + +### NewRunConnectorSubactionIssuesSubActionParams + +`func NewRunConnectorSubactionIssuesSubActionParams(title string, ) *RunConnectorSubactionIssuesSubActionParams` + +NewRunConnectorSubactionIssuesSubActionParams instantiates a new RunConnectorSubactionIssuesSubActionParams object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionIssuesSubActionParamsWithDefaults + +`func NewRunConnectorSubactionIssuesSubActionParamsWithDefaults() *RunConnectorSubactionIssuesSubActionParams` + +NewRunConnectorSubactionIssuesSubActionParamsWithDefaults instantiates a new RunConnectorSubactionIssuesSubActionParams object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTitle + +`func (o *RunConnectorSubactionIssuesSubActionParams) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *RunConnectorSubactionIssuesSubActionParams) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *RunConnectorSubactionIssuesSubActionParams) SetTitle(v string)` + +SetTitle sets Title field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionIssuetypes.md b/generated/kibanaactions/docs/RunConnectorSubactionIssuetypes.md new file mode 100644 index 000000000..6c8d0ef9a --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionIssuetypes.md @@ -0,0 +1,51 @@ +# RunConnectorSubactionIssuetypes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubAction** | **string** | The action to test. | + +## Methods + +### NewRunConnectorSubactionIssuetypes + +`func NewRunConnectorSubactionIssuetypes(subAction string, ) *RunConnectorSubactionIssuetypes` + +NewRunConnectorSubactionIssuetypes instantiates a new RunConnectorSubactionIssuetypes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionIssuetypesWithDefaults + +`func NewRunConnectorSubactionIssuetypesWithDefaults() *RunConnectorSubactionIssuetypes` + +NewRunConnectorSubactionIssuetypesWithDefaults instantiates a new RunConnectorSubactionIssuetypes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSubAction + +`func (o *RunConnectorSubactionIssuetypes) GetSubAction() string` + +GetSubAction returns the SubAction field if non-nil, zero value otherwise. + +### GetSubActionOk + +`func (o *RunConnectorSubactionIssuetypes) GetSubActionOk() (*string, bool)` + +GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubAction + +`func (o *RunConnectorSubactionIssuetypes) SetSubAction(v string)` + +SetSubAction sets SubAction field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoservice.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoservice.md new file mode 100644 index 000000000..fcf2c9055 --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionPushtoservice.md @@ -0,0 +1,72 @@ +# RunConnectorSubactionPushtoservice + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubAction** | **string** | The action to test. | +**SubActionParams** | [**RunConnectorSubactionPushtoserviceSubActionParams**](RunConnectorSubactionPushtoserviceSubActionParams.md) | | + +## Methods + +### NewRunConnectorSubactionPushtoservice + +`func NewRunConnectorSubactionPushtoservice(subAction string, subActionParams RunConnectorSubactionPushtoserviceSubActionParams, ) *RunConnectorSubactionPushtoservice` + +NewRunConnectorSubactionPushtoservice instantiates a new RunConnectorSubactionPushtoservice object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionPushtoserviceWithDefaults + +`func NewRunConnectorSubactionPushtoserviceWithDefaults() *RunConnectorSubactionPushtoservice` + +NewRunConnectorSubactionPushtoserviceWithDefaults instantiates a new RunConnectorSubactionPushtoservice object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSubAction + +`func (o *RunConnectorSubactionPushtoservice) GetSubAction() string` + +GetSubAction returns the SubAction field if non-nil, zero value otherwise. + +### GetSubActionOk + +`func (o *RunConnectorSubactionPushtoservice) GetSubActionOk() (*string, bool)` + +GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubAction + +`func (o *RunConnectorSubactionPushtoservice) SetSubAction(v string)` + +SetSubAction sets SubAction field to given value. + + +### GetSubActionParams + +`func (o *RunConnectorSubactionPushtoservice) GetSubActionParams() RunConnectorSubactionPushtoserviceSubActionParams` + +GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. + +### GetSubActionParamsOk + +`func (o *RunConnectorSubactionPushtoservice) GetSubActionParamsOk() (*RunConnectorSubactionPushtoserviceSubActionParams, bool)` + +GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubActionParams + +`func (o *RunConnectorSubactionPushtoservice) SetSubActionParams(v RunConnectorSubactionPushtoserviceSubActionParams)` + +SetSubActionParams sets SubActionParams field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParams.md new file mode 100644 index 000000000..a1d5b0e62 --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParams.md @@ -0,0 +1,82 @@ +# RunConnectorSubactionPushtoserviceSubActionParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Comments** | Pointer to [**[]RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner**](RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner.md) | Additional information that is sent to Jira, ServiceNow ITSM, ServiceNow SecOps, or Swimlane. | [optional] +**Incident** | Pointer to [**RunConnectorSubactionPushtoserviceSubActionParamsIncident**](RunConnectorSubactionPushtoserviceSubActionParamsIncident.md) | | [optional] + +## Methods + +### NewRunConnectorSubactionPushtoserviceSubActionParams + +`func NewRunConnectorSubactionPushtoserviceSubActionParams() *RunConnectorSubactionPushtoserviceSubActionParams` + +NewRunConnectorSubactionPushtoserviceSubActionParams instantiates a new RunConnectorSubactionPushtoserviceSubActionParams object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionPushtoserviceSubActionParamsWithDefaults + +`func NewRunConnectorSubactionPushtoserviceSubActionParamsWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParams` + +NewRunConnectorSubactionPushtoserviceSubActionParamsWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParams object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetComments + +`func (o *RunConnectorSubactionPushtoserviceSubActionParams) GetComments() []RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner` + +GetComments returns the Comments field if non-nil, zero value otherwise. + +### GetCommentsOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParams) GetCommentsOk() (*[]RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner, bool)` + +GetCommentsOk returns a tuple with the Comments field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComments + +`func (o *RunConnectorSubactionPushtoserviceSubActionParams) SetComments(v []RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner)` + +SetComments sets Comments field to given value. + +### HasComments + +`func (o *RunConnectorSubactionPushtoserviceSubActionParams) HasComments() bool` + +HasComments returns a boolean if a field has been set. + +### GetIncident + +`func (o *RunConnectorSubactionPushtoserviceSubActionParams) GetIncident() RunConnectorSubactionPushtoserviceSubActionParamsIncident` + +GetIncident returns the Incident field if non-nil, zero value otherwise. + +### GetIncidentOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParams) GetIncidentOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncident, bool)` + +GetIncidentOk returns a tuple with the Incident field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncident + +`func (o *RunConnectorSubactionPushtoserviceSubActionParams) SetIncident(v RunConnectorSubactionPushtoserviceSubActionParamsIncident)` + +SetIncident sets Incident field to given value. + +### HasIncident + +`func (o *RunConnectorSubactionPushtoserviceSubActionParams) HasIncident() bool` + +HasIncident returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner.md new file mode 100644 index 000000000..8721338d1 --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner.md @@ -0,0 +1,82 @@ +# RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Comment** | Pointer to **string** | A comment related to the incident. For example, describe how to troubleshoot the issue. | [optional] +**CommentId** | Pointer to **int32** | A unique identifier for the comment. | [optional] + +## Methods + +### NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner + +`func NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner() *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner` + +NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInnerWithDefaults + +`func NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInnerWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner` + +NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInnerWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetComment + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) GetComment() string` + +GetComment returns the Comment field if non-nil, zero value otherwise. + +### GetCommentOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) GetCommentOk() (*string, bool)` + +GetCommentOk returns a tuple with the Comment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComment + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) SetComment(v string)` + +SetComment sets Comment field to given value. + +### HasComment + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) HasComment() bool` + +HasComment returns a boolean if a field has been set. + +### GetCommentId + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) GetCommentId() int32` + +GetCommentId returns the CommentId field if non-nil, zero value otherwise. + +### GetCommentIdOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) GetCommentIdOk() (*int32, bool)` + +GetCommentIdOk returns a tuple with the CommentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommentId + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) SetCommentId(v int32)` + +SetCommentId sets CommentId field to given value. + +### HasCommentId + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) HasCommentId() bool` + +HasCommentId returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncident.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncident.md new file mode 100644 index 000000000..7d6b6927a --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncident.md @@ -0,0 +1,654 @@ +# RunConnectorSubactionPushtoserviceSubActionParamsIncident + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AlertId** | Pointer to **string** | The alert identifier for Swimlane connectors. | [optional] +**CaseId** | Pointer to **string** | The case identifier for the incident for Swimlane connectors. | [optional] +**CaseName** | Pointer to **string** | The case name for the incident for Swimlane connectors. | [optional] +**Category** | Pointer to **string** | The category of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. | [optional] +**CorrelationDisplay** | Pointer to **string** | A descriptive label of the alert for correlation purposes for ServiceNow ITSM and ServiceNow SecOps connectors. | [optional] +**CorrelationId** | Pointer to **string** | The correlation identifier for the security incident for ServiceNow ITSM and ServiveNow SecOps connectors. Connectors using the same correlation ID are associated with the same ServiceNow incident. This value determines whether a new ServiceNow incident is created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the correlation ID value in ServiceNow. The maximum character length for this value is 100 characters. NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that ServiceNow creates a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, ServiceNow creates and continually updates a single incident record for the alert. | [optional] +**Description** | Pointer to **string** | The description of the incident for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors. | [optional] +**DestIp** | Pointer to [**RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp**](RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md) | | [optional] +**ExternalId** | Pointer to **string** | The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. If present, the incident is updated. Otherwise, a new incident is created. | [optional] +**Impact** | Pointer to **string** | The impact of the incident for ServiceNow ITSM connectors. | [optional] +**IssueType** | Pointer to **int32** | The type of incident for Jira connectors. For example, 10006. To obtain the list of valid values, set `subAction` to `issueTypes`. | [optional] +**Labels** | Pointer to **[]string** | The labels for the incident for Jira connectors. NOTE: Labels cannot contain spaces. | [optional] +**MalwareHash** | Pointer to [**RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash**](RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md) | | [optional] +**MalwareUrl** | Pointer to [**RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl**](RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md) | | [optional] +**Parent** | Pointer to **string** | The ID or key of the parent issue for Jira connectors. Applies only to `Sub-task` types of issues. | [optional] +**Priority** | Pointer to **string** | The priority of the incident in Jira and ServiceNow SecOps connectors. | [optional] +**RuleName** | Pointer to **string** | The rule name for Swimlane connectors. | [optional] +**Severity** | Pointer to **string** | The severity of the incident for ServiceNow ITSM and Swimlane connectors. | [optional] +**ShortDescription** | Pointer to **string** | A short description of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. It is used for searching the contents of the knowledge base. | [optional] +**SourceIp** | Pointer to [**RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp**](RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md) | | [optional] +**Subcategory** | Pointer to **string** | The subcategory of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. | [optional] +**Summary** | Pointer to **string** | A summary of the incident for Jira connectors. | [optional] +**Title** | Pointer to **string** | A title for the incident for Jira connectors. It is used for searching the contents of the knowledge base. | [optional] +**Urgency** | Pointer to **string** | The urgency of the incident for ServiceNow ITSM connectors. | [optional] + +## Methods + +### NewRunConnectorSubactionPushtoserviceSubActionParamsIncident + +`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncident() *RunConnectorSubactionPushtoserviceSubActionParamsIncident` + +NewRunConnectorSubactionPushtoserviceSubActionParamsIncident instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncident object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentWithDefaults + +`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParamsIncident` + +NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncident object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAlertId + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetAlertId() string` + +GetAlertId returns the AlertId field if non-nil, zero value otherwise. + +### GetAlertIdOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetAlertIdOk() (*string, bool)` + +GetAlertIdOk returns a tuple with the AlertId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlertId + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetAlertId(v string)` + +SetAlertId sets AlertId field to given value. + +### HasAlertId + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasAlertId() bool` + +HasAlertId returns a boolean if a field has been set. + +### GetCaseId + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCaseId() string` + +GetCaseId returns the CaseId field if non-nil, zero value otherwise. + +### GetCaseIdOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCaseIdOk() (*string, bool)` + +GetCaseIdOk returns a tuple with the CaseId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCaseId + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCaseId(v string)` + +SetCaseId sets CaseId field to given value. + +### HasCaseId + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCaseId() bool` + +HasCaseId returns a boolean if a field has been set. + +### GetCaseName + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCaseName() string` + +GetCaseName returns the CaseName field if non-nil, zero value otherwise. + +### GetCaseNameOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCaseNameOk() (*string, bool)` + +GetCaseNameOk returns a tuple with the CaseName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCaseName + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCaseName(v string)` + +SetCaseName sets CaseName field to given value. + +### HasCaseName + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCaseName() bool` + +HasCaseName returns a boolean if a field has been set. + +### GetCategory + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCategory() string` + +GetCategory returns the Category field if non-nil, zero value otherwise. + +### GetCategoryOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCategoryOk() (*string, bool)` + +GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCategory + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCategory(v string)` + +SetCategory sets Category field to given value. + +### HasCategory + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCategory() bool` + +HasCategory returns a boolean if a field has been set. + +### GetCorrelationDisplay + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCorrelationDisplay() string` + +GetCorrelationDisplay returns the CorrelationDisplay field if non-nil, zero value otherwise. + +### GetCorrelationDisplayOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCorrelationDisplayOk() (*string, bool)` + +GetCorrelationDisplayOk returns a tuple with the CorrelationDisplay field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCorrelationDisplay + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCorrelationDisplay(v string)` + +SetCorrelationDisplay sets CorrelationDisplay field to given value. + +### HasCorrelationDisplay + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCorrelationDisplay() bool` + +HasCorrelationDisplay returns a boolean if a field has been set. + +### GetCorrelationId + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCorrelationId() string` + +GetCorrelationId returns the CorrelationId field if non-nil, zero value otherwise. + +### GetCorrelationIdOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCorrelationIdOk() (*string, bool)` + +GetCorrelationIdOk returns a tuple with the CorrelationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCorrelationId + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCorrelationId(v string)` + +SetCorrelationId sets CorrelationId field to given value. + +### HasCorrelationId + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCorrelationId() bool` + +HasCorrelationId returns a boolean if a field has been set. + +### GetDescription + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetDestIp + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetDestIp() RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp` + +GetDestIp returns the DestIp field if non-nil, zero value otherwise. + +### GetDestIpOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetDestIpOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp, bool)` + +GetDestIpOk returns a tuple with the DestIp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDestIp + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetDestIp(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp)` + +SetDestIp sets DestIp field to given value. + +### HasDestIp + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasDestIp() bool` + +HasDestIp returns a boolean if a field has been set. + +### GetExternalId + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetExternalId() string` + +GetExternalId returns the ExternalId field if non-nil, zero value otherwise. + +### GetExternalIdOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetExternalIdOk() (*string, bool)` + +GetExternalIdOk returns a tuple with the ExternalId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExternalId + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetExternalId(v string)` + +SetExternalId sets ExternalId field to given value. + +### HasExternalId + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasExternalId() bool` + +HasExternalId returns a boolean if a field has been set. + +### GetImpact + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetImpact() string` + +GetImpact returns the Impact field if non-nil, zero value otherwise. + +### GetImpactOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetImpactOk() (*string, bool)` + +GetImpactOk returns a tuple with the Impact field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetImpact + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetImpact(v string)` + +SetImpact sets Impact field to given value. + +### HasImpact + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasImpact() bool` + +HasImpact returns a boolean if a field has been set. + +### GetIssueType + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetIssueType() int32` + +GetIssueType returns the IssueType field if non-nil, zero value otherwise. + +### GetIssueTypeOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetIssueTypeOk() (*int32, bool)` + +GetIssueTypeOk returns a tuple with the IssueType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssueType + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetIssueType(v int32)` + +SetIssueType sets IssueType field to given value. + +### HasIssueType + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasIssueType() bool` + +HasIssueType returns a boolean if a field has been set. + +### GetLabels + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetLabels() []string` + +GetLabels returns the Labels field if non-nil, zero value otherwise. + +### GetLabelsOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetLabelsOk() (*[]string, bool)` + +GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabels + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetLabels(v []string)` + +SetLabels sets Labels field to given value. + +### HasLabels + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasLabels() bool` + +HasLabels returns a boolean if a field has been set. + +### GetMalwareHash + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetMalwareHash() RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash` + +GetMalwareHash returns the MalwareHash field if non-nil, zero value otherwise. + +### GetMalwareHashOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetMalwareHashOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash, bool)` + +GetMalwareHashOk returns a tuple with the MalwareHash field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMalwareHash + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetMalwareHash(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash)` + +SetMalwareHash sets MalwareHash field to given value. + +### HasMalwareHash + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasMalwareHash() bool` + +HasMalwareHash returns a boolean if a field has been set. + +### GetMalwareUrl + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetMalwareUrl() RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl` + +GetMalwareUrl returns the MalwareUrl field if non-nil, zero value otherwise. + +### GetMalwareUrlOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetMalwareUrlOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl, bool)` + +GetMalwareUrlOk returns a tuple with the MalwareUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMalwareUrl + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetMalwareUrl(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl)` + +SetMalwareUrl sets MalwareUrl field to given value. + +### HasMalwareUrl + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasMalwareUrl() bool` + +HasMalwareUrl returns a boolean if a field has been set. + +### GetParent + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetParent() string` + +GetParent returns the Parent field if non-nil, zero value otherwise. + +### GetParentOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetParentOk() (*string, bool)` + +GetParentOk returns a tuple with the Parent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParent + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetParent(v string)` + +SetParent sets Parent field to given value. + +### HasParent + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasParent() bool` + +HasParent returns a boolean if a field has been set. + +### GetPriority + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetPriority() string` + +GetPriority returns the Priority field if non-nil, zero value otherwise. + +### GetPriorityOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetPriorityOk() (*string, bool)` + +GetPriorityOk returns a tuple with the Priority field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPriority + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetPriority(v string)` + +SetPriority sets Priority field to given value. + +### HasPriority + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasPriority() bool` + +HasPriority returns a boolean if a field has been set. + +### GetRuleName + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetRuleName() string` + +GetRuleName returns the RuleName field if non-nil, zero value otherwise. + +### GetRuleNameOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetRuleNameOk() (*string, bool)` + +GetRuleNameOk returns a tuple with the RuleName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRuleName + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetRuleName(v string)` + +SetRuleName sets RuleName field to given value. + +### HasRuleName + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasRuleName() bool` + +HasRuleName returns a boolean if a field has been set. + +### GetSeverity + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSeverity() string` + +GetSeverity returns the Severity field if non-nil, zero value otherwise. + +### GetSeverityOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSeverityOk() (*string, bool)` + +GetSeverityOk returns a tuple with the Severity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeverity + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetSeverity(v string)` + +SetSeverity sets Severity field to given value. + +### HasSeverity + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasSeverity() bool` + +HasSeverity returns a boolean if a field has been set. + +### GetShortDescription + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetShortDescription() string` + +GetShortDescription returns the ShortDescription field if non-nil, zero value otherwise. + +### GetShortDescriptionOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetShortDescriptionOk() (*string, bool)` + +GetShortDescriptionOk returns a tuple with the ShortDescription field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetShortDescription + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetShortDescription(v string)` + +SetShortDescription sets ShortDescription field to given value. + +### HasShortDescription + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasShortDescription() bool` + +HasShortDescription returns a boolean if a field has been set. + +### GetSourceIp + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSourceIp() RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp` + +GetSourceIp returns the SourceIp field if non-nil, zero value otherwise. + +### GetSourceIpOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSourceIpOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp, bool)` + +GetSourceIpOk returns a tuple with the SourceIp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSourceIp + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetSourceIp(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp)` + +SetSourceIp sets SourceIp field to given value. + +### HasSourceIp + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasSourceIp() bool` + +HasSourceIp returns a boolean if a field has been set. + +### GetSubcategory + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSubcategory() string` + +GetSubcategory returns the Subcategory field if non-nil, zero value otherwise. + +### GetSubcategoryOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSubcategoryOk() (*string, bool)` + +GetSubcategoryOk returns a tuple with the Subcategory field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubcategory + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetSubcategory(v string)` + +SetSubcategory sets Subcategory field to given value. + +### HasSubcategory + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasSubcategory() bool` + +HasSubcategory returns a boolean if a field has been set. + +### GetSummary + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSummary() string` + +GetSummary returns the Summary field if non-nil, zero value otherwise. + +### GetSummaryOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSummaryOk() (*string, bool)` + +GetSummaryOk returns a tuple with the Summary field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSummary + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetSummary(v string)` + +SetSummary sets Summary field to given value. + +### HasSummary + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasSummary() bool` + +HasSummary returns a boolean if a field has been set. + +### GetTitle + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetUrgency + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetUrgency() string` + +GetUrgency returns the Urgency field if non-nil, zero value otherwise. + +### GetUrgencyOk + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetUrgencyOk() (*string, bool)` + +GetUrgencyOk returns a tuple with the Urgency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrgency + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetUrgency(v string)` + +SetUrgency sets Urgency field to given value. + +### HasUrgency + +`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasUrgency() bool` + +HasUrgency returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md new file mode 100644 index 000000000..50f6e1317 --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md @@ -0,0 +1,30 @@ +# RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp + +`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp` + +NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIpWithDefaults + +`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIpWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp` + +NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIpWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md new file mode 100644 index 000000000..af1d7ccce --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md @@ -0,0 +1,30 @@ +# RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash + +`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash` + +NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHashWithDefaults + +`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHashWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash` + +NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHashWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md new file mode 100644 index 000000000..a44bf61a4 --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md @@ -0,0 +1,30 @@ +# RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl + +`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl` + +NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrlWithDefaults + +`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrlWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl` + +NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrlWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md new file mode 100644 index 000000000..535ad6189 --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md @@ -0,0 +1,30 @@ +# RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp + +`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp` + +NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIpWithDefaults + +`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIpWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp` + +NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIpWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/SecretsPropertiesCasesWebhook.md b/generated/kibanaactions/docs/SecretsPropertiesCasesWebhook.md new file mode 100644 index 000000000..8ff0bdac4 --- /dev/null +++ b/generated/kibanaactions/docs/SecretsPropertiesCasesWebhook.md @@ -0,0 +1,82 @@ +# SecretsPropertiesCasesWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Password** | Pointer to **string** | The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. | [optional] +**User** | Pointer to **string** | The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. | [optional] + +## Methods + +### NewSecretsPropertiesCasesWebhook + +`func NewSecretsPropertiesCasesWebhook() *SecretsPropertiesCasesWebhook` + +NewSecretsPropertiesCasesWebhook instantiates a new SecretsPropertiesCasesWebhook object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSecretsPropertiesCasesWebhookWithDefaults + +`func NewSecretsPropertiesCasesWebhookWithDefaults() *SecretsPropertiesCasesWebhook` + +NewSecretsPropertiesCasesWebhookWithDefaults instantiates a new SecretsPropertiesCasesWebhook object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPassword + +`func (o *SecretsPropertiesCasesWebhook) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *SecretsPropertiesCasesWebhook) GetPasswordOk() (*string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassword + +`func (o *SecretsPropertiesCasesWebhook) SetPassword(v string)` + +SetPassword sets Password field to given value. + +### HasPassword + +`func (o *SecretsPropertiesCasesWebhook) HasPassword() bool` + +HasPassword returns a boolean if a field has been set. + +### GetUser + +`func (o *SecretsPropertiesCasesWebhook) GetUser() string` + +GetUser returns the User field if non-nil, zero value otherwise. + +### GetUserOk + +`func (o *SecretsPropertiesCasesWebhook) GetUserOk() (*string, bool)` + +GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUser + +`func (o *SecretsPropertiesCasesWebhook) SetUser(v string)` + +SetUser sets User field to given value. + +### HasUser + +`func (o *SecretsPropertiesCasesWebhook) HasUser() bool` + +HasUser returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/SecretsPropertiesJira.md b/generated/kibanaactions/docs/SecretsPropertiesJira.md new file mode 100644 index 000000000..ae3ab197d --- /dev/null +++ b/generated/kibanaactions/docs/SecretsPropertiesJira.md @@ -0,0 +1,72 @@ +# SecretsPropertiesJira + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiToken** | **string** | The Jira API authentication token for HTTP basic authentication. | +**Email** | **string** | The account email for HTTP Basic authentication. | + +## Methods + +### NewSecretsPropertiesJira + +`func NewSecretsPropertiesJira(apiToken string, email string, ) *SecretsPropertiesJira` + +NewSecretsPropertiesJira instantiates a new SecretsPropertiesJira object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSecretsPropertiesJiraWithDefaults + +`func NewSecretsPropertiesJiraWithDefaults() *SecretsPropertiesJira` + +NewSecretsPropertiesJiraWithDefaults instantiates a new SecretsPropertiesJira object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiToken + +`func (o *SecretsPropertiesJira) GetApiToken() string` + +GetApiToken returns the ApiToken field if non-nil, zero value otherwise. + +### GetApiTokenOk + +`func (o *SecretsPropertiesJira) GetApiTokenOk() (*string, bool)` + +GetApiTokenOk returns a tuple with the ApiToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiToken + +`func (o *SecretsPropertiesJira) SetApiToken(v string)` + +SetApiToken sets ApiToken field to given value. + + +### GetEmail + +`func (o *SecretsPropertiesJira) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *SecretsPropertiesJira) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *SecretsPropertiesJira) SetEmail(v string)` + +SetEmail sets Email field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/SecretsPropertiesOpsgenie.md b/generated/kibanaactions/docs/SecretsPropertiesOpsgenie.md new file mode 100644 index 000000000..a4116129f --- /dev/null +++ b/generated/kibanaactions/docs/SecretsPropertiesOpsgenie.md @@ -0,0 +1,51 @@ +# SecretsPropertiesOpsgenie + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKey** | **string** | The Opsgenie API authentication key for HTTP Basic authentication. | + +## Methods + +### NewSecretsPropertiesOpsgenie + +`func NewSecretsPropertiesOpsgenie(apiKey string, ) *SecretsPropertiesOpsgenie` + +NewSecretsPropertiesOpsgenie instantiates a new SecretsPropertiesOpsgenie object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSecretsPropertiesOpsgenieWithDefaults + +`func NewSecretsPropertiesOpsgenieWithDefaults() *SecretsPropertiesOpsgenie` + +NewSecretsPropertiesOpsgenieWithDefaults instantiates a new SecretsPropertiesOpsgenie object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiKey + +`func (o *SecretsPropertiesOpsgenie) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *SecretsPropertiesOpsgenie) GetApiKeyOk() (*string, bool)` + +GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKey + +`func (o *SecretsPropertiesOpsgenie) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/SecretsPropertiesResilient.md b/generated/kibanaactions/docs/SecretsPropertiesResilient.md new file mode 100644 index 000000000..d8bf1ba85 --- /dev/null +++ b/generated/kibanaactions/docs/SecretsPropertiesResilient.md @@ -0,0 +1,72 @@ +# SecretsPropertiesResilient + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKeyId** | **string** | The authentication key ID for HTTP Basic authentication. | +**ApiKeySecret** | **string** | The authentication key secret for HTTP Basic authentication. | + +## Methods + +### NewSecretsPropertiesResilient + +`func NewSecretsPropertiesResilient(apiKeyId string, apiKeySecret string, ) *SecretsPropertiesResilient` + +NewSecretsPropertiesResilient instantiates a new SecretsPropertiesResilient object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSecretsPropertiesResilientWithDefaults + +`func NewSecretsPropertiesResilientWithDefaults() *SecretsPropertiesResilient` + +NewSecretsPropertiesResilientWithDefaults instantiates a new SecretsPropertiesResilient object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiKeyId + +`func (o *SecretsPropertiesResilient) GetApiKeyId() string` + +GetApiKeyId returns the ApiKeyId field if non-nil, zero value otherwise. + +### GetApiKeyIdOk + +`func (o *SecretsPropertiesResilient) GetApiKeyIdOk() (*string, bool)` + +GetApiKeyIdOk returns a tuple with the ApiKeyId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKeyId + +`func (o *SecretsPropertiesResilient) SetApiKeyId(v string)` + +SetApiKeyId sets ApiKeyId field to given value. + + +### GetApiKeySecret + +`func (o *SecretsPropertiesResilient) GetApiKeySecret() string` + +GetApiKeySecret returns the ApiKeySecret field if non-nil, zero value otherwise. + +### GetApiKeySecretOk + +`func (o *SecretsPropertiesResilient) GetApiKeySecretOk() (*string, bool)` + +GetApiKeySecretOk returns a tuple with the ApiKeySecret field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKeySecret + +`func (o *SecretsPropertiesResilient) SetApiKeySecret(v string)` + +SetApiKeySecret sets ApiKeySecret field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/SecretsPropertiesServicenow.md b/generated/kibanaactions/docs/SecretsPropertiesServicenow.md new file mode 100644 index 000000000..62278c963 --- /dev/null +++ b/generated/kibanaactions/docs/SecretsPropertiesServicenow.md @@ -0,0 +1,160 @@ +# SecretsPropertiesServicenow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClientSecret** | Pointer to **string** | The client secret assigned to your OAuth application. This property is required when `isOAuth` is `true`. | [optional] +**Password** | Pointer to **string** | The password for HTTP basic authentication. This property is required when `isOAuth` is `false`. | [optional] +**PrivateKey** | Pointer to **string** | The RSA private key that you created for use in ServiceNow. This property is required when `isOAuth` is `true`. | [optional] +**PrivateKeyPassword** | Pointer to **string** | The password for the RSA private key. This property is required when `isOAuth` is `true` and you set a password on your private key. | [optional] +**Username** | Pointer to **string** | The username for HTTP basic authentication. This property is required when `isOAuth` is `false`. | [optional] + +## Methods + +### NewSecretsPropertiesServicenow + +`func NewSecretsPropertiesServicenow() *SecretsPropertiesServicenow` + +NewSecretsPropertiesServicenow instantiates a new SecretsPropertiesServicenow object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSecretsPropertiesServicenowWithDefaults + +`func NewSecretsPropertiesServicenowWithDefaults() *SecretsPropertiesServicenow` + +NewSecretsPropertiesServicenowWithDefaults instantiates a new SecretsPropertiesServicenow object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetClientSecret + +`func (o *SecretsPropertiesServicenow) GetClientSecret() string` + +GetClientSecret returns the ClientSecret field if non-nil, zero value otherwise. + +### GetClientSecretOk + +`func (o *SecretsPropertiesServicenow) GetClientSecretOk() (*string, bool)` + +GetClientSecretOk returns a tuple with the ClientSecret field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientSecret + +`func (o *SecretsPropertiesServicenow) SetClientSecret(v string)` + +SetClientSecret sets ClientSecret field to given value. + +### HasClientSecret + +`func (o *SecretsPropertiesServicenow) HasClientSecret() bool` + +HasClientSecret returns a boolean if a field has been set. + +### GetPassword + +`func (o *SecretsPropertiesServicenow) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *SecretsPropertiesServicenow) GetPasswordOk() (*string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassword + +`func (o *SecretsPropertiesServicenow) SetPassword(v string)` + +SetPassword sets Password field to given value. + +### HasPassword + +`func (o *SecretsPropertiesServicenow) HasPassword() bool` + +HasPassword returns a boolean if a field has been set. + +### GetPrivateKey + +`func (o *SecretsPropertiesServicenow) GetPrivateKey() string` + +GetPrivateKey returns the PrivateKey field if non-nil, zero value otherwise. + +### GetPrivateKeyOk + +`func (o *SecretsPropertiesServicenow) GetPrivateKeyOk() (*string, bool)` + +GetPrivateKeyOk returns a tuple with the PrivateKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivateKey + +`func (o *SecretsPropertiesServicenow) SetPrivateKey(v string)` + +SetPrivateKey sets PrivateKey field to given value. + +### HasPrivateKey + +`func (o *SecretsPropertiesServicenow) HasPrivateKey() bool` + +HasPrivateKey returns a boolean if a field has been set. + +### GetPrivateKeyPassword + +`func (o *SecretsPropertiesServicenow) GetPrivateKeyPassword() string` + +GetPrivateKeyPassword returns the PrivateKeyPassword field if non-nil, zero value otherwise. + +### GetPrivateKeyPasswordOk + +`func (o *SecretsPropertiesServicenow) GetPrivateKeyPasswordOk() (*string, bool)` + +GetPrivateKeyPasswordOk returns a tuple with the PrivateKeyPassword field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivateKeyPassword + +`func (o *SecretsPropertiesServicenow) SetPrivateKeyPassword(v string)` + +SetPrivateKeyPassword sets PrivateKeyPassword field to given value. + +### HasPrivateKeyPassword + +`func (o *SecretsPropertiesServicenow) HasPrivateKeyPassword() bool` + +HasPrivateKeyPassword returns a boolean if a field has been set. + +### GetUsername + +`func (o *SecretsPropertiesServicenow) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *SecretsPropertiesServicenow) GetUsernameOk() (*string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsername + +`func (o *SecretsPropertiesServicenow) SetUsername(v string)` + +SetUsername sets Username field to given value. + +### HasUsername + +`func (o *SecretsPropertiesServicenow) HasUsername() bool` + +HasUsername returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/SecretsPropertiesSwimlane.md b/generated/kibanaactions/docs/SecretsPropertiesSwimlane.md new file mode 100644 index 000000000..12881fb69 --- /dev/null +++ b/generated/kibanaactions/docs/SecretsPropertiesSwimlane.md @@ -0,0 +1,56 @@ +# SecretsPropertiesSwimlane + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiToken** | Pointer to **string** | Swimlane API authentication token. | [optional] + +## Methods + +### NewSecretsPropertiesSwimlane + +`func NewSecretsPropertiesSwimlane() *SecretsPropertiesSwimlane` + +NewSecretsPropertiesSwimlane instantiates a new SecretsPropertiesSwimlane object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSecretsPropertiesSwimlaneWithDefaults + +`func NewSecretsPropertiesSwimlaneWithDefaults() *SecretsPropertiesSwimlane` + +NewSecretsPropertiesSwimlaneWithDefaults instantiates a new SecretsPropertiesSwimlane object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApiToken + +`func (o *SecretsPropertiesSwimlane) GetApiToken() string` + +GetApiToken returns the ApiToken field if non-nil, zero value otherwise. + +### GetApiTokenOk + +`func (o *SecretsPropertiesSwimlane) GetApiTokenOk() (*string, bool)` + +GetApiTokenOk returns a tuple with the ApiToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiToken + +`func (o *SecretsPropertiesSwimlane) SetApiToken(v string)` + +SetApiToken sets ApiToken field to given value. + +### HasApiToken + +`func (o *SecretsPropertiesSwimlane) HasApiToken() bool` + +HasApiToken returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/SeverityMapping.md b/generated/kibanaactions/docs/SeverityMapping.md new file mode 100644 index 000000000..9d057b2f9 --- /dev/null +++ b/generated/kibanaactions/docs/SeverityMapping.md @@ -0,0 +1,114 @@ +# SeverityMapping + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FieldType** | **string** | The type of field in Swimlane. | +**Id** | **string** | The identifier for the field in Swimlane. | +**Key** | **string** | The key for the field in Swimlane. | +**Name** | **string** | The name of the field in Swimlane. | + +## Methods + +### NewSeverityMapping + +`func NewSeverityMapping(fieldType string, id string, key string, name string, ) *SeverityMapping` + +NewSeverityMapping instantiates a new SeverityMapping object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSeverityMappingWithDefaults + +`func NewSeverityMappingWithDefaults() *SeverityMapping` + +NewSeverityMappingWithDefaults instantiates a new SeverityMapping object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFieldType + +`func (o *SeverityMapping) GetFieldType() string` + +GetFieldType returns the FieldType field if non-nil, zero value otherwise. + +### GetFieldTypeOk + +`func (o *SeverityMapping) GetFieldTypeOk() (*string, bool)` + +GetFieldTypeOk returns a tuple with the FieldType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFieldType + +`func (o *SeverityMapping) SetFieldType(v string)` + +SetFieldType sets FieldType field to given value. + + +### GetId + +`func (o *SeverityMapping) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *SeverityMapping) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *SeverityMapping) SetId(v string)` + +SetId sets Id field to given value. + + +### GetKey + +`func (o *SeverityMapping) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *SeverityMapping) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *SeverityMapping) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetName + +`func (o *SeverityMapping) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SeverityMapping) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *SeverityMapping) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/SubactionParameters.md b/generated/kibanaactions/docs/SubactionParameters.md new file mode 100644 index 000000000..2c2327e89 --- /dev/null +++ b/generated/kibanaactions/docs/SubactionParameters.md @@ -0,0 +1,72 @@ +# SubactionParameters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SubAction** | **string** | The action to test. | +**SubActionParams** | [**RunConnectorSubactionPushtoserviceSubActionParams**](RunConnectorSubactionPushtoserviceSubActionParams.md) | | + +## Methods + +### NewSubactionParameters + +`func NewSubactionParameters(subAction string, subActionParams RunConnectorSubactionPushtoserviceSubActionParams, ) *SubactionParameters` + +NewSubactionParameters instantiates a new SubactionParameters object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSubactionParametersWithDefaults + +`func NewSubactionParametersWithDefaults() *SubactionParameters` + +NewSubactionParametersWithDefaults instantiates a new SubactionParameters object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSubAction + +`func (o *SubactionParameters) GetSubAction() string` + +GetSubAction returns the SubAction field if non-nil, zero value otherwise. + +### GetSubActionOk + +`func (o *SubactionParameters) GetSubActionOk() (*string, bool)` + +GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubAction + +`func (o *SubactionParameters) SetSubAction(v string)` + +SetSubAction sets SubAction field to given value. + + +### GetSubActionParams + +`func (o *SubactionParameters) GetSubActionParams() RunConnectorSubactionPushtoserviceSubActionParams` + +GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. + +### GetSubActionParamsOk + +`func (o *SubactionParameters) GetSubActionParamsOk() (*RunConnectorSubactionPushtoserviceSubActionParams, bool)` + +GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubActionParams + +`func (o *SubactionParameters) SetSubActionParams(v RunConnectorSubactionPushtoserviceSubActionParams)` + +SetSubActionParams sets SubActionParams field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/UpdateConnector400Response.md b/generated/kibanaactions/docs/UpdateConnector400Response.md new file mode 100644 index 000000000..fd9c67d90 --- /dev/null +++ b/generated/kibanaactions/docs/UpdateConnector400Response.md @@ -0,0 +1,108 @@ +# UpdateConnector400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] +**StatusCode** | Pointer to **int32** | | [optional] + +## Methods + +### NewUpdateConnector400Response + +`func NewUpdateConnector400Response() *UpdateConnector400Response` + +NewUpdateConnector400Response instantiates a new UpdateConnector400Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateConnector400ResponseWithDefaults + +`func NewUpdateConnector400ResponseWithDefaults() *UpdateConnector400Response` + +NewUpdateConnector400ResponseWithDefaults instantiates a new UpdateConnector400Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetError + +`func (o *UpdateConnector400Response) GetError() string` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *UpdateConnector400Response) GetErrorOk() (*string, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *UpdateConnector400Response) SetError(v string)` + +SetError sets Error field to given value. + +### HasError + +`func (o *UpdateConnector400Response) HasError() bool` + +HasError returns a boolean if a field has been set. + +### GetMessage + +`func (o *UpdateConnector400Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *UpdateConnector400Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *UpdateConnector400Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *UpdateConnector400Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetStatusCode + +`func (o *UpdateConnector400Response) GetStatusCode() int32` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *UpdateConnector400Response) GetStatusCodeOk() (*int32, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *UpdateConnector400Response) SetStatusCode(v int32)` + +SetStatusCode sets StatusCode field to given value. + +### HasStatusCode + +`func (o *UpdateConnector400Response) HasStatusCode() bool` + +HasStatusCode returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestBodyProperties.md b/generated/kibanaactions/docs/UpdateConnectorRequestBodyProperties.md new file mode 100644 index 000000000..c6f7835ed --- /dev/null +++ b/generated/kibanaactions/docs/UpdateConnectorRequestBodyProperties.md @@ -0,0 +1,93 @@ +# UpdateConnectorRequestBodyProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesSwimlane**](ConfigPropertiesSwimlane.md) | | +**Name** | **string** | The display name for the connector. | +**Secrets** | [**SecretsPropertiesSwimlane**](SecretsPropertiesSwimlane.md) | | + +## Methods + +### NewUpdateConnectorRequestBodyProperties + +`func NewUpdateConnectorRequestBodyProperties(config ConfigPropertiesSwimlane, name string, secrets SecretsPropertiesSwimlane, ) *UpdateConnectorRequestBodyProperties` + +NewUpdateConnectorRequestBodyProperties instantiates a new UpdateConnectorRequestBodyProperties object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateConnectorRequestBodyPropertiesWithDefaults + +`func NewUpdateConnectorRequestBodyPropertiesWithDefaults() *UpdateConnectorRequestBodyProperties` + +NewUpdateConnectorRequestBodyPropertiesWithDefaults instantiates a new UpdateConnectorRequestBodyProperties object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *UpdateConnectorRequestBodyProperties) GetConfig() ConfigPropertiesSwimlane` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *UpdateConnectorRequestBodyProperties) GetConfigOk() (*ConfigPropertiesSwimlane, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *UpdateConnectorRequestBodyProperties) SetConfig(v ConfigPropertiesSwimlane)` + +SetConfig sets Config field to given value. + + +### GetName + +`func (o *UpdateConnectorRequestBodyProperties) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpdateConnectorRequestBodyProperties) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *UpdateConnectorRequestBodyProperties) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *UpdateConnectorRequestBodyProperties) GetSecrets() SecretsPropertiesSwimlane` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *UpdateConnectorRequestBodyProperties) GetSecretsOk() (*SecretsPropertiesSwimlane, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *UpdateConnectorRequestBodyProperties) SetSecrets(v SecretsPropertiesSwimlane)` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestCasesWebhook.md b/generated/kibanaactions/docs/UpdateConnectorRequestCasesWebhook.md new file mode 100644 index 000000000..70a302752 --- /dev/null +++ b/generated/kibanaactions/docs/UpdateConnectorRequestCasesWebhook.md @@ -0,0 +1,98 @@ +# UpdateConnectorRequestCasesWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesCasesWebhook**](ConfigPropertiesCasesWebhook.md) | | +**Name** | **string** | The display name for the connector. | +**Secrets** | Pointer to [**SecretsPropertiesCasesWebhook**](SecretsPropertiesCasesWebhook.md) | | [optional] + +## Methods + +### NewUpdateConnectorRequestCasesWebhook + +`func NewUpdateConnectorRequestCasesWebhook(config ConfigPropertiesCasesWebhook, name string, ) *UpdateConnectorRequestCasesWebhook` + +NewUpdateConnectorRequestCasesWebhook instantiates a new UpdateConnectorRequestCasesWebhook object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateConnectorRequestCasesWebhookWithDefaults + +`func NewUpdateConnectorRequestCasesWebhookWithDefaults() *UpdateConnectorRequestCasesWebhook` + +NewUpdateConnectorRequestCasesWebhookWithDefaults instantiates a new UpdateConnectorRequestCasesWebhook object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *UpdateConnectorRequestCasesWebhook) GetConfig() ConfigPropertiesCasesWebhook` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *UpdateConnectorRequestCasesWebhook) GetConfigOk() (*ConfigPropertiesCasesWebhook, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *UpdateConnectorRequestCasesWebhook) SetConfig(v ConfigPropertiesCasesWebhook)` + +SetConfig sets Config field to given value. + + +### GetName + +`func (o *UpdateConnectorRequestCasesWebhook) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpdateConnectorRequestCasesWebhook) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *UpdateConnectorRequestCasesWebhook) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *UpdateConnectorRequestCasesWebhook) GetSecrets() SecretsPropertiesCasesWebhook` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *UpdateConnectorRequestCasesWebhook) GetSecretsOk() (*SecretsPropertiesCasesWebhook, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *UpdateConnectorRequestCasesWebhook) SetSecrets(v SecretsPropertiesCasesWebhook)` + +SetSecrets sets Secrets field to given value. + +### HasSecrets + +`func (o *UpdateConnectorRequestCasesWebhook) HasSecrets() bool` + +HasSecrets returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestIndex.md b/generated/kibanaactions/docs/UpdateConnectorRequestIndex.md new file mode 100644 index 000000000..eb9c989ff --- /dev/null +++ b/generated/kibanaactions/docs/UpdateConnectorRequestIndex.md @@ -0,0 +1,72 @@ +# UpdateConnectorRequestIndex + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesIndex**](ConfigPropertiesIndex.md) | | +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewUpdateConnectorRequestIndex + +`func NewUpdateConnectorRequestIndex(config ConfigPropertiesIndex, name string, ) *UpdateConnectorRequestIndex` + +NewUpdateConnectorRequestIndex instantiates a new UpdateConnectorRequestIndex object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateConnectorRequestIndexWithDefaults + +`func NewUpdateConnectorRequestIndexWithDefaults() *UpdateConnectorRequestIndex` + +NewUpdateConnectorRequestIndexWithDefaults instantiates a new UpdateConnectorRequestIndex object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *UpdateConnectorRequestIndex) GetConfig() ConfigPropertiesIndex` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *UpdateConnectorRequestIndex) GetConfigOk() (*ConfigPropertiesIndex, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *UpdateConnectorRequestIndex) SetConfig(v ConfigPropertiesIndex)` + +SetConfig sets Config field to given value. + + +### GetName + +`func (o *UpdateConnectorRequestIndex) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpdateConnectorRequestIndex) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *UpdateConnectorRequestIndex) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestJira.md b/generated/kibanaactions/docs/UpdateConnectorRequestJira.md new file mode 100644 index 000000000..85aadd4d3 --- /dev/null +++ b/generated/kibanaactions/docs/UpdateConnectorRequestJira.md @@ -0,0 +1,93 @@ +# UpdateConnectorRequestJira + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesJira**](ConfigPropertiesJira.md) | | +**Name** | **string** | The display name for the connector. | +**Secrets** | [**SecretsPropertiesJira**](SecretsPropertiesJira.md) | | + +## Methods + +### NewUpdateConnectorRequestJira + +`func NewUpdateConnectorRequestJira(config ConfigPropertiesJira, name string, secrets SecretsPropertiesJira, ) *UpdateConnectorRequestJira` + +NewUpdateConnectorRequestJira instantiates a new UpdateConnectorRequestJira object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateConnectorRequestJiraWithDefaults + +`func NewUpdateConnectorRequestJiraWithDefaults() *UpdateConnectorRequestJira` + +NewUpdateConnectorRequestJiraWithDefaults instantiates a new UpdateConnectorRequestJira object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *UpdateConnectorRequestJira) GetConfig() ConfigPropertiesJira` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *UpdateConnectorRequestJira) GetConfigOk() (*ConfigPropertiesJira, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *UpdateConnectorRequestJira) SetConfig(v ConfigPropertiesJira)` + +SetConfig sets Config field to given value. + + +### GetName + +`func (o *UpdateConnectorRequestJira) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpdateConnectorRequestJira) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *UpdateConnectorRequestJira) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *UpdateConnectorRequestJira) GetSecrets() SecretsPropertiesJira` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *UpdateConnectorRequestJira) GetSecretsOk() (*SecretsPropertiesJira, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *UpdateConnectorRequestJira) SetSecrets(v SecretsPropertiesJira)` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestOpsgenie.md b/generated/kibanaactions/docs/UpdateConnectorRequestOpsgenie.md new file mode 100644 index 000000000..b2700341e --- /dev/null +++ b/generated/kibanaactions/docs/UpdateConnectorRequestOpsgenie.md @@ -0,0 +1,93 @@ +# UpdateConnectorRequestOpsgenie + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesOpsgenie**](ConfigPropertiesOpsgenie.md) | | +**Name** | **string** | The display name for the connector. | +**Secrets** | [**SecretsPropertiesOpsgenie**](SecretsPropertiesOpsgenie.md) | | + +## Methods + +### NewUpdateConnectorRequestOpsgenie + +`func NewUpdateConnectorRequestOpsgenie(config ConfigPropertiesOpsgenie, name string, secrets SecretsPropertiesOpsgenie, ) *UpdateConnectorRequestOpsgenie` + +NewUpdateConnectorRequestOpsgenie instantiates a new UpdateConnectorRequestOpsgenie object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateConnectorRequestOpsgenieWithDefaults + +`func NewUpdateConnectorRequestOpsgenieWithDefaults() *UpdateConnectorRequestOpsgenie` + +NewUpdateConnectorRequestOpsgenieWithDefaults instantiates a new UpdateConnectorRequestOpsgenie object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *UpdateConnectorRequestOpsgenie) GetConfig() ConfigPropertiesOpsgenie` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *UpdateConnectorRequestOpsgenie) GetConfigOk() (*ConfigPropertiesOpsgenie, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *UpdateConnectorRequestOpsgenie) SetConfig(v ConfigPropertiesOpsgenie)` + +SetConfig sets Config field to given value. + + +### GetName + +`func (o *UpdateConnectorRequestOpsgenie) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpdateConnectorRequestOpsgenie) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *UpdateConnectorRequestOpsgenie) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *UpdateConnectorRequestOpsgenie) GetSecrets() SecretsPropertiesOpsgenie` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *UpdateConnectorRequestOpsgenie) GetSecretsOk() (*SecretsPropertiesOpsgenie, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *UpdateConnectorRequestOpsgenie) SetSecrets(v SecretsPropertiesOpsgenie)` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestResilient.md b/generated/kibanaactions/docs/UpdateConnectorRequestResilient.md new file mode 100644 index 000000000..0b095b429 --- /dev/null +++ b/generated/kibanaactions/docs/UpdateConnectorRequestResilient.md @@ -0,0 +1,93 @@ +# UpdateConnectorRequestResilient + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesResilient**](ConfigPropertiesResilient.md) | | +**Name** | **string** | The display name for the connector. | +**Secrets** | [**SecretsPropertiesResilient**](SecretsPropertiesResilient.md) | | + +## Methods + +### NewUpdateConnectorRequestResilient + +`func NewUpdateConnectorRequestResilient(config ConfigPropertiesResilient, name string, secrets SecretsPropertiesResilient, ) *UpdateConnectorRequestResilient` + +NewUpdateConnectorRequestResilient instantiates a new UpdateConnectorRequestResilient object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateConnectorRequestResilientWithDefaults + +`func NewUpdateConnectorRequestResilientWithDefaults() *UpdateConnectorRequestResilient` + +NewUpdateConnectorRequestResilientWithDefaults instantiates a new UpdateConnectorRequestResilient object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *UpdateConnectorRequestResilient) GetConfig() ConfigPropertiesResilient` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *UpdateConnectorRequestResilient) GetConfigOk() (*ConfigPropertiesResilient, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *UpdateConnectorRequestResilient) SetConfig(v ConfigPropertiesResilient)` + +SetConfig sets Config field to given value. + + +### GetName + +`func (o *UpdateConnectorRequestResilient) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpdateConnectorRequestResilient) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *UpdateConnectorRequestResilient) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *UpdateConnectorRequestResilient) GetSecrets() SecretsPropertiesResilient` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *UpdateConnectorRequestResilient) GetSecretsOk() (*SecretsPropertiesResilient, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *UpdateConnectorRequestResilient) SetSecrets(v SecretsPropertiesResilient)` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestServerlog.md b/generated/kibanaactions/docs/UpdateConnectorRequestServerlog.md new file mode 100644 index 000000000..c0471ed4a --- /dev/null +++ b/generated/kibanaactions/docs/UpdateConnectorRequestServerlog.md @@ -0,0 +1,51 @@ +# UpdateConnectorRequestServerlog + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The display name for the connector. | + +## Methods + +### NewUpdateConnectorRequestServerlog + +`func NewUpdateConnectorRequestServerlog(name string, ) *UpdateConnectorRequestServerlog` + +NewUpdateConnectorRequestServerlog instantiates a new UpdateConnectorRequestServerlog object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateConnectorRequestServerlogWithDefaults + +`func NewUpdateConnectorRequestServerlogWithDefaults() *UpdateConnectorRequestServerlog` + +NewUpdateConnectorRequestServerlogWithDefaults instantiates a new UpdateConnectorRequestServerlog object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *UpdateConnectorRequestServerlog) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpdateConnectorRequestServerlog) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *UpdateConnectorRequestServerlog) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestServicenow.md b/generated/kibanaactions/docs/UpdateConnectorRequestServicenow.md new file mode 100644 index 000000000..b767622f8 --- /dev/null +++ b/generated/kibanaactions/docs/UpdateConnectorRequestServicenow.md @@ -0,0 +1,93 @@ +# UpdateConnectorRequestServicenow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesServicenow**](ConfigPropertiesServicenow.md) | | +**Name** | **string** | The display name for the connector. | +**Secrets** | [**SecretsPropertiesServicenow**](SecretsPropertiesServicenow.md) | | + +## Methods + +### NewUpdateConnectorRequestServicenow + +`func NewUpdateConnectorRequestServicenow(config ConfigPropertiesServicenow, name string, secrets SecretsPropertiesServicenow, ) *UpdateConnectorRequestServicenow` + +NewUpdateConnectorRequestServicenow instantiates a new UpdateConnectorRequestServicenow object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateConnectorRequestServicenowWithDefaults + +`func NewUpdateConnectorRequestServicenowWithDefaults() *UpdateConnectorRequestServicenow` + +NewUpdateConnectorRequestServicenowWithDefaults instantiates a new UpdateConnectorRequestServicenow object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *UpdateConnectorRequestServicenow) GetConfig() ConfigPropertiesServicenow` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *UpdateConnectorRequestServicenow) GetConfigOk() (*ConfigPropertiesServicenow, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *UpdateConnectorRequestServicenow) SetConfig(v ConfigPropertiesServicenow)` + +SetConfig sets Config field to given value. + + +### GetName + +`func (o *UpdateConnectorRequestServicenow) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpdateConnectorRequestServicenow) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *UpdateConnectorRequestServicenow) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *UpdateConnectorRequestServicenow) GetSecrets() SecretsPropertiesServicenow` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *UpdateConnectorRequestServicenow) GetSecretsOk() (*SecretsPropertiesServicenow, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *UpdateConnectorRequestServicenow) SetSecrets(v SecretsPropertiesServicenow)` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestServicenowItom.md b/generated/kibanaactions/docs/UpdateConnectorRequestServicenowItom.md new file mode 100644 index 000000000..4bd1756cb --- /dev/null +++ b/generated/kibanaactions/docs/UpdateConnectorRequestServicenowItom.md @@ -0,0 +1,93 @@ +# UpdateConnectorRequestServicenowItom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesServicenowItom**](ConfigPropertiesServicenowItom.md) | | +**Name** | **string** | The display name for the connector. | +**Secrets** | [**SecretsPropertiesServicenow**](SecretsPropertiesServicenow.md) | | + +## Methods + +### NewUpdateConnectorRequestServicenowItom + +`func NewUpdateConnectorRequestServicenowItom(config ConfigPropertiesServicenowItom, name string, secrets SecretsPropertiesServicenow, ) *UpdateConnectorRequestServicenowItom` + +NewUpdateConnectorRequestServicenowItom instantiates a new UpdateConnectorRequestServicenowItom object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateConnectorRequestServicenowItomWithDefaults + +`func NewUpdateConnectorRequestServicenowItomWithDefaults() *UpdateConnectorRequestServicenowItom` + +NewUpdateConnectorRequestServicenowItomWithDefaults instantiates a new UpdateConnectorRequestServicenowItom object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *UpdateConnectorRequestServicenowItom) GetConfig() ConfigPropertiesServicenowItom` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *UpdateConnectorRequestServicenowItom) GetConfigOk() (*ConfigPropertiesServicenowItom, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *UpdateConnectorRequestServicenowItom) SetConfig(v ConfigPropertiesServicenowItom)` + +SetConfig sets Config field to given value. + + +### GetName + +`func (o *UpdateConnectorRequestServicenowItom) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpdateConnectorRequestServicenowItom) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *UpdateConnectorRequestServicenowItom) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *UpdateConnectorRequestServicenowItom) GetSecrets() SecretsPropertiesServicenow` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *UpdateConnectorRequestServicenowItom) GetSecretsOk() (*SecretsPropertiesServicenow, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *UpdateConnectorRequestServicenowItom) SetSecrets(v SecretsPropertiesServicenow)` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestSwimlane.md b/generated/kibanaactions/docs/UpdateConnectorRequestSwimlane.md new file mode 100644 index 000000000..5a2ad0323 --- /dev/null +++ b/generated/kibanaactions/docs/UpdateConnectorRequestSwimlane.md @@ -0,0 +1,93 @@ +# UpdateConnectorRequestSwimlane + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | [**ConfigPropertiesSwimlane**](ConfigPropertiesSwimlane.md) | | +**Name** | **string** | The display name for the connector. | +**Secrets** | [**SecretsPropertiesSwimlane**](SecretsPropertiesSwimlane.md) | | + +## Methods + +### NewUpdateConnectorRequestSwimlane + +`func NewUpdateConnectorRequestSwimlane(config ConfigPropertiesSwimlane, name string, secrets SecretsPropertiesSwimlane, ) *UpdateConnectorRequestSwimlane` + +NewUpdateConnectorRequestSwimlane instantiates a new UpdateConnectorRequestSwimlane object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateConnectorRequestSwimlaneWithDefaults + +`func NewUpdateConnectorRequestSwimlaneWithDefaults() *UpdateConnectorRequestSwimlane` + +NewUpdateConnectorRequestSwimlaneWithDefaults instantiates a new UpdateConnectorRequestSwimlane object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *UpdateConnectorRequestSwimlane) GetConfig() ConfigPropertiesSwimlane` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *UpdateConnectorRequestSwimlane) GetConfigOk() (*ConfigPropertiesSwimlane, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *UpdateConnectorRequestSwimlane) SetConfig(v ConfigPropertiesSwimlane)` + +SetConfig sets Config field to given value. + + +### GetName + +`func (o *UpdateConnectorRequestSwimlane) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpdateConnectorRequestSwimlane) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *UpdateConnectorRequestSwimlane) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSecrets + +`func (o *UpdateConnectorRequestSwimlane) GetSecrets() SecretsPropertiesSwimlane` + +GetSecrets returns the Secrets field if non-nil, zero value otherwise. + +### GetSecretsOk + +`func (o *UpdateConnectorRequestSwimlane) GetSecretsOk() (*SecretsPropertiesSwimlane, bool)` + +GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecrets + +`func (o *UpdateConnectorRequestSwimlane) SetSecrets(v SecretsPropertiesSwimlane)` + +SetSecrets sets Secrets field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/git_push.sh b/generated/kibanaactions/git_push.sh new file mode 100644 index 000000000..9c304b700 --- /dev/null +++ b/generated/kibanaactions/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="elastic" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="terraform-provider-elasticstack" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/generated/kibanaactions/model_401_response.go b/generated/kibanaactions/model_401_response.go new file mode 100644 index 000000000..8cd8e8e61 --- /dev/null +++ b/generated/kibanaactions/model_401_response.go @@ -0,0 +1,196 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the Model401Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Model401Response{} + +// Model401Response struct for Model401Response +type Model401Response struct { + Error *string `json:"error,omitempty"` + Message *string `json:"message,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty"` +} + +// NewModel401Response instantiates a new Model401Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewModel401Response() *Model401Response { + this := Model401Response{} + return &this +} + +// NewModel401ResponseWithDefaults instantiates a new Model401Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewModel401ResponseWithDefaults() *Model401Response { + this := Model401Response{} + return &this +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *Model401Response) GetError() string { + if o == nil || IsNil(o.Error) { + var ret string + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Model401Response) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *Model401Response) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *Model401Response) SetError(v string) { + o.Error = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *Model401Response) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Model401Response) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *Model401Response) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *Model401Response) SetMessage(v string) { + o.Message = &v +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *Model401Response) GetStatusCode() int32 { + if o == nil || IsNil(o.StatusCode) { + var ret int32 + return ret + } + return *o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Model401Response) GetStatusCodeOk() (*int32, bool) { + if o == nil || IsNil(o.StatusCode) { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *Model401Response) HasStatusCode() bool { + if o != nil && !IsNil(o.StatusCode) { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. +func (o *Model401Response) SetStatusCode(v int32) { + o.StatusCode = &v +} + +func (o Model401Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Model401Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.StatusCode) { + toSerialize["statusCode"] = o.StatusCode + } + return toSerialize, nil +} + +type NullableModel401Response struct { + value *Model401Response + isSet bool +} + +func (v NullableModel401Response) Get() *Model401Response { + return v.value +} + +func (v *NullableModel401Response) Set(val *Model401Response) { + v.value = val + v.isSet = true +} + +func (v NullableModel401Response) IsSet() bool { + return v.isSet +} + +func (v *NullableModel401Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableModel401Response(val *Model401Response) *NullableModel401Response { + return &NullableModel401Response{value: val, isSet: true} +} + +func (v NullableModel401Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableModel401Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_404_response.go b/generated/kibanaactions/model_404_response.go new file mode 100644 index 000000000..2cfda38f7 --- /dev/null +++ b/generated/kibanaactions/model_404_response.go @@ -0,0 +1,196 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the Model404Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Model404Response{} + +// Model404Response struct for Model404Response +type Model404Response struct { + Error *string `json:"error,omitempty"` + Message *string `json:"message,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty"` +} + +// NewModel404Response instantiates a new Model404Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewModel404Response() *Model404Response { + this := Model404Response{} + return &this +} + +// NewModel404ResponseWithDefaults instantiates a new Model404Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewModel404ResponseWithDefaults() *Model404Response { + this := Model404Response{} + return &this +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *Model404Response) GetError() string { + if o == nil || IsNil(o.Error) { + var ret string + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Model404Response) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *Model404Response) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *Model404Response) SetError(v string) { + o.Error = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *Model404Response) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Model404Response) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *Model404Response) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *Model404Response) SetMessage(v string) { + o.Message = &v +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *Model404Response) GetStatusCode() int32 { + if o == nil || IsNil(o.StatusCode) { + var ret int32 + return ret + } + return *o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Model404Response) GetStatusCodeOk() (*int32, bool) { + if o == nil || IsNil(o.StatusCode) { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *Model404Response) HasStatusCode() bool { + if o != nil && !IsNil(o.StatusCode) { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. +func (o *Model404Response) SetStatusCode(v int32) { + o.StatusCode = &v +} + +func (o Model404Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Model404Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.StatusCode) { + toSerialize["statusCode"] = o.StatusCode + } + return toSerialize, nil +} + +type NullableModel404Response struct { + value *Model404Response + isSet bool +} + +func (v NullableModel404Response) Get() *Model404Response { + return v.value +} + +func (v *NullableModel404Response) Set(val *Model404Response) { + v.value = val + v.isSet = true +} + +func (v NullableModel404Response) IsSet() bool { + return v.isSet +} + +func (v *NullableModel404Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableModel404Response(val *Model404Response) *NullableModel404Response { + return &NullableModel404Response{value: val, isSet: true} +} + +func (v NullableModel404Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableModel404Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_action_response_properties.go b/generated/kibanaactions/model_action_response_properties.go new file mode 100644 index 000000000..5975f3575 --- /dev/null +++ b/generated/kibanaactions/model_action_response_properties.go @@ -0,0 +1,343 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ActionResponseProperties type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ActionResponseProperties{} + +// ActionResponseProperties The properties vary depending on the action type. +type ActionResponseProperties struct { + ActionTypeId *string `json:"actionTypeId,omitempty"` + Config map[string]interface{} `json:"config,omitempty"` + Id *string `json:"id,omitempty"` + // Indicates whether the action type is deprecated. + IsDeprecated *bool `json:"isDeprecated,omitempty"` + // Indicates whether secrets are missing for the action. + IsMissingSecrets *bool `json:"isMissingSecrets,omitempty"` + // Indicates whether it is a preconfigured action. + IsPreconfigured *bool `json:"isPreconfigured,omitempty"` + Name *string `json:"name,omitempty"` +} + +// NewActionResponseProperties instantiates a new ActionResponseProperties object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewActionResponseProperties() *ActionResponseProperties { + this := ActionResponseProperties{} + return &this +} + +// NewActionResponsePropertiesWithDefaults instantiates a new ActionResponseProperties object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewActionResponsePropertiesWithDefaults() *ActionResponseProperties { + this := ActionResponseProperties{} + return &this +} + +// GetActionTypeId returns the ActionTypeId field value if set, zero value otherwise. +func (o *ActionResponseProperties) GetActionTypeId() string { + if o == nil || IsNil(o.ActionTypeId) { + var ret string + return ret + } + return *o.ActionTypeId +} + +// GetActionTypeIdOk returns a tuple with the ActionTypeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActionResponseProperties) GetActionTypeIdOk() (*string, bool) { + if o == nil || IsNil(o.ActionTypeId) { + return nil, false + } + return o.ActionTypeId, true +} + +// HasActionTypeId returns a boolean if a field has been set. +func (o *ActionResponseProperties) HasActionTypeId() bool { + if o != nil && !IsNil(o.ActionTypeId) { + return true + } + + return false +} + +// SetActionTypeId gets a reference to the given string and assigns it to the ActionTypeId field. +func (o *ActionResponseProperties) SetActionTypeId(v string) { + o.ActionTypeId = &v +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *ActionResponseProperties) GetConfig() map[string]interface{} { + if o == nil || IsNil(o.Config) { + var ret map[string]interface{} + return ret + } + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActionResponseProperties) GetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Config) { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *ActionResponseProperties) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. +func (o *ActionResponseProperties) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ActionResponseProperties) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActionResponseProperties) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ActionResponseProperties) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ActionResponseProperties) SetId(v string) { + o.Id = &v +} + +// GetIsDeprecated returns the IsDeprecated field value if set, zero value otherwise. +func (o *ActionResponseProperties) GetIsDeprecated() bool { + if o == nil || IsNil(o.IsDeprecated) { + var ret bool + return ret + } + return *o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActionResponseProperties) GetIsDeprecatedOk() (*bool, bool) { + if o == nil || IsNil(o.IsDeprecated) { + return nil, false + } + return o.IsDeprecated, true +} + +// HasIsDeprecated returns a boolean if a field has been set. +func (o *ActionResponseProperties) HasIsDeprecated() bool { + if o != nil && !IsNil(o.IsDeprecated) { + return true + } + + return false +} + +// SetIsDeprecated gets a reference to the given bool and assigns it to the IsDeprecated field. +func (o *ActionResponseProperties) SetIsDeprecated(v bool) { + o.IsDeprecated = &v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *ActionResponseProperties) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActionResponseProperties) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *ActionResponseProperties) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *ActionResponseProperties) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value if set, zero value otherwise. +func (o *ActionResponseProperties) GetIsPreconfigured() bool { + if o == nil || IsNil(o.IsPreconfigured) { + var ret bool + return ret + } + return *o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActionResponseProperties) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil || IsNil(o.IsPreconfigured) { + return nil, false + } + return o.IsPreconfigured, true +} + +// HasIsPreconfigured returns a boolean if a field has been set. +func (o *ActionResponseProperties) HasIsPreconfigured() bool { + if o != nil && !IsNil(o.IsPreconfigured) { + return true + } + + return false +} + +// SetIsPreconfigured gets a reference to the given bool and assigns it to the IsPreconfigured field. +func (o *ActionResponseProperties) SetIsPreconfigured(v bool) { + o.IsPreconfigured = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ActionResponseProperties) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActionResponseProperties) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ActionResponseProperties) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ActionResponseProperties) SetName(v string) { + o.Name = &v +} + +func (o ActionResponseProperties) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ActionResponseProperties) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ActionTypeId) { + toSerialize["actionTypeId"] = o.ActionTypeId + } + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.IsDeprecated) { + toSerialize["isDeprecated"] = o.IsDeprecated + } + if !IsNil(o.IsMissingSecrets) { + toSerialize["isMissingSecrets"] = o.IsMissingSecrets + } + if !IsNil(o.IsPreconfigured) { + toSerialize["isPreconfigured"] = o.IsPreconfigured + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableActionResponseProperties struct { + value *ActionResponseProperties + isSet bool +} + +func (v NullableActionResponseProperties) Get() *ActionResponseProperties { + return v.value +} + +func (v *NullableActionResponseProperties) Set(val *ActionResponseProperties) { + v.value = val + v.isSet = true +} + +func (v NullableActionResponseProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableActionResponseProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableActionResponseProperties(val *ActionResponseProperties) *NullableActionResponseProperties { + return &NullableActionResponseProperties{value: val, isSet: true} +} + +func (v NullableActionResponseProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableActionResponseProperties) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_alert_identifier_mapping.go b/generated/kibanaactions/model_alert_identifier_mapping.go new file mode 100644 index 000000000..34711268e --- /dev/null +++ b/generated/kibanaactions/model_alert_identifier_mapping.go @@ -0,0 +1,200 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the AlertIdentifierMapping type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AlertIdentifierMapping{} + +// AlertIdentifierMapping Mapping for the alert ID. +type AlertIdentifierMapping struct { + // The type of field in Swimlane. + FieldType string `json:"fieldType"` + // The identifier for the field in Swimlane. + Id string `json:"id"` + // The key for the field in Swimlane. + Key string `json:"key"` + // The name of the field in Swimlane. + Name string `json:"name"` +} + +// NewAlertIdentifierMapping instantiates a new AlertIdentifierMapping object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAlertIdentifierMapping(fieldType string, id string, key string, name string) *AlertIdentifierMapping { + this := AlertIdentifierMapping{} + this.FieldType = fieldType + this.Id = id + this.Key = key + this.Name = name + return &this +} + +// NewAlertIdentifierMappingWithDefaults instantiates a new AlertIdentifierMapping object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAlertIdentifierMappingWithDefaults() *AlertIdentifierMapping { + this := AlertIdentifierMapping{} + return &this +} + +// GetFieldType returns the FieldType field value +func (o *AlertIdentifierMapping) GetFieldType() string { + if o == nil { + var ret string + return ret + } + + return o.FieldType +} + +// GetFieldTypeOk returns a tuple with the FieldType field value +// and a boolean to check if the value has been set. +func (o *AlertIdentifierMapping) GetFieldTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FieldType, true +} + +// SetFieldType sets field value +func (o *AlertIdentifierMapping) SetFieldType(v string) { + o.FieldType = v +} + +// GetId returns the Id field value +func (o *AlertIdentifierMapping) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *AlertIdentifierMapping) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *AlertIdentifierMapping) SetId(v string) { + o.Id = v +} + +// GetKey returns the Key field value +func (o *AlertIdentifierMapping) GetKey() string { + if o == nil { + var ret string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *AlertIdentifierMapping) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Key, true +} + +// SetKey sets field value +func (o *AlertIdentifierMapping) SetKey(v string) { + o.Key = v +} + +// GetName returns the Name field value +func (o *AlertIdentifierMapping) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *AlertIdentifierMapping) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AlertIdentifierMapping) SetName(v string) { + o.Name = v +} + +func (o AlertIdentifierMapping) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AlertIdentifierMapping) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["fieldType"] = o.FieldType + toSerialize["id"] = o.Id + toSerialize["key"] = o.Key + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableAlertIdentifierMapping struct { + value *AlertIdentifierMapping + isSet bool +} + +func (v NullableAlertIdentifierMapping) Get() *AlertIdentifierMapping { + return v.value +} + +func (v *NullableAlertIdentifierMapping) Set(val *AlertIdentifierMapping) { + v.value = val + v.isSet = true +} + +func (v NullableAlertIdentifierMapping) IsSet() bool { + return v.isSet +} + +func (v *NullableAlertIdentifierMapping) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAlertIdentifierMapping(val *AlertIdentifierMapping) *NullableAlertIdentifierMapping { + return &NullableAlertIdentifierMapping{value: val, isSet: true} +} + +func (v NullableAlertIdentifierMapping) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAlertIdentifierMapping) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_case_comment_mapping.go b/generated/kibanaactions/model_case_comment_mapping.go new file mode 100644 index 000000000..0cccbf690 --- /dev/null +++ b/generated/kibanaactions/model_case_comment_mapping.go @@ -0,0 +1,200 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CaseCommentMapping type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CaseCommentMapping{} + +// CaseCommentMapping Mapping for the case comments. +type CaseCommentMapping struct { + // The type of field in Swimlane. + FieldType string `json:"fieldType"` + // The identifier for the field in Swimlane. + Id string `json:"id"` + // The key for the field in Swimlane. + Key string `json:"key"` + // The name of the field in Swimlane. + Name string `json:"name"` +} + +// NewCaseCommentMapping instantiates a new CaseCommentMapping object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCaseCommentMapping(fieldType string, id string, key string, name string) *CaseCommentMapping { + this := CaseCommentMapping{} + this.FieldType = fieldType + this.Id = id + this.Key = key + this.Name = name + return &this +} + +// NewCaseCommentMappingWithDefaults instantiates a new CaseCommentMapping object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCaseCommentMappingWithDefaults() *CaseCommentMapping { + this := CaseCommentMapping{} + return &this +} + +// GetFieldType returns the FieldType field value +func (o *CaseCommentMapping) GetFieldType() string { + if o == nil { + var ret string + return ret + } + + return o.FieldType +} + +// GetFieldTypeOk returns a tuple with the FieldType field value +// and a boolean to check if the value has been set. +func (o *CaseCommentMapping) GetFieldTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FieldType, true +} + +// SetFieldType sets field value +func (o *CaseCommentMapping) SetFieldType(v string) { + o.FieldType = v +} + +// GetId returns the Id field value +func (o *CaseCommentMapping) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CaseCommentMapping) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CaseCommentMapping) SetId(v string) { + o.Id = v +} + +// GetKey returns the Key field value +func (o *CaseCommentMapping) GetKey() string { + if o == nil { + var ret string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *CaseCommentMapping) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Key, true +} + +// SetKey sets field value +func (o *CaseCommentMapping) SetKey(v string) { + o.Key = v +} + +// GetName returns the Name field value +func (o *CaseCommentMapping) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CaseCommentMapping) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CaseCommentMapping) SetName(v string) { + o.Name = v +} + +func (o CaseCommentMapping) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CaseCommentMapping) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["fieldType"] = o.FieldType + toSerialize["id"] = o.Id + toSerialize["key"] = o.Key + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableCaseCommentMapping struct { + value *CaseCommentMapping + isSet bool +} + +func (v NullableCaseCommentMapping) Get() *CaseCommentMapping { + return v.value +} + +func (v *NullableCaseCommentMapping) Set(val *CaseCommentMapping) { + v.value = val + v.isSet = true +} + +func (v NullableCaseCommentMapping) IsSet() bool { + return v.isSet +} + +func (v *NullableCaseCommentMapping) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCaseCommentMapping(val *CaseCommentMapping) *NullableCaseCommentMapping { + return &NullableCaseCommentMapping{value: val, isSet: true} +} + +func (v NullableCaseCommentMapping) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCaseCommentMapping) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_case_description_mapping.go b/generated/kibanaactions/model_case_description_mapping.go new file mode 100644 index 000000000..67f9c3b3b --- /dev/null +++ b/generated/kibanaactions/model_case_description_mapping.go @@ -0,0 +1,200 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CaseDescriptionMapping type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CaseDescriptionMapping{} + +// CaseDescriptionMapping Mapping for the case description. +type CaseDescriptionMapping struct { + // The type of field in Swimlane. + FieldType string `json:"fieldType"` + // The identifier for the field in Swimlane. + Id string `json:"id"` + // The key for the field in Swimlane. + Key string `json:"key"` + // The name of the field in Swimlane. + Name string `json:"name"` +} + +// NewCaseDescriptionMapping instantiates a new CaseDescriptionMapping object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCaseDescriptionMapping(fieldType string, id string, key string, name string) *CaseDescriptionMapping { + this := CaseDescriptionMapping{} + this.FieldType = fieldType + this.Id = id + this.Key = key + this.Name = name + return &this +} + +// NewCaseDescriptionMappingWithDefaults instantiates a new CaseDescriptionMapping object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCaseDescriptionMappingWithDefaults() *CaseDescriptionMapping { + this := CaseDescriptionMapping{} + return &this +} + +// GetFieldType returns the FieldType field value +func (o *CaseDescriptionMapping) GetFieldType() string { + if o == nil { + var ret string + return ret + } + + return o.FieldType +} + +// GetFieldTypeOk returns a tuple with the FieldType field value +// and a boolean to check if the value has been set. +func (o *CaseDescriptionMapping) GetFieldTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FieldType, true +} + +// SetFieldType sets field value +func (o *CaseDescriptionMapping) SetFieldType(v string) { + o.FieldType = v +} + +// GetId returns the Id field value +func (o *CaseDescriptionMapping) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CaseDescriptionMapping) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CaseDescriptionMapping) SetId(v string) { + o.Id = v +} + +// GetKey returns the Key field value +func (o *CaseDescriptionMapping) GetKey() string { + if o == nil { + var ret string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *CaseDescriptionMapping) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Key, true +} + +// SetKey sets field value +func (o *CaseDescriptionMapping) SetKey(v string) { + o.Key = v +} + +// GetName returns the Name field value +func (o *CaseDescriptionMapping) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CaseDescriptionMapping) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CaseDescriptionMapping) SetName(v string) { + o.Name = v +} + +func (o CaseDescriptionMapping) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CaseDescriptionMapping) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["fieldType"] = o.FieldType + toSerialize["id"] = o.Id + toSerialize["key"] = o.Key + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableCaseDescriptionMapping struct { + value *CaseDescriptionMapping + isSet bool +} + +func (v NullableCaseDescriptionMapping) Get() *CaseDescriptionMapping { + return v.value +} + +func (v *NullableCaseDescriptionMapping) Set(val *CaseDescriptionMapping) { + v.value = val + v.isSet = true +} + +func (v NullableCaseDescriptionMapping) IsSet() bool { + return v.isSet +} + +func (v *NullableCaseDescriptionMapping) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCaseDescriptionMapping(val *CaseDescriptionMapping) *NullableCaseDescriptionMapping { + return &NullableCaseDescriptionMapping{value: val, isSet: true} +} + +func (v NullableCaseDescriptionMapping) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCaseDescriptionMapping) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_case_identifier_mapping.go b/generated/kibanaactions/model_case_identifier_mapping.go new file mode 100644 index 000000000..82616eb7c --- /dev/null +++ b/generated/kibanaactions/model_case_identifier_mapping.go @@ -0,0 +1,200 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CaseIdentifierMapping type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CaseIdentifierMapping{} + +// CaseIdentifierMapping Mapping for the case ID. +type CaseIdentifierMapping struct { + // The type of field in Swimlane. + FieldType string `json:"fieldType"` + // The identifier for the field in Swimlane. + Id string `json:"id"` + // The key for the field in Swimlane. + Key string `json:"key"` + // The name of the field in Swimlane. + Name string `json:"name"` +} + +// NewCaseIdentifierMapping instantiates a new CaseIdentifierMapping object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCaseIdentifierMapping(fieldType string, id string, key string, name string) *CaseIdentifierMapping { + this := CaseIdentifierMapping{} + this.FieldType = fieldType + this.Id = id + this.Key = key + this.Name = name + return &this +} + +// NewCaseIdentifierMappingWithDefaults instantiates a new CaseIdentifierMapping object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCaseIdentifierMappingWithDefaults() *CaseIdentifierMapping { + this := CaseIdentifierMapping{} + return &this +} + +// GetFieldType returns the FieldType field value +func (o *CaseIdentifierMapping) GetFieldType() string { + if o == nil { + var ret string + return ret + } + + return o.FieldType +} + +// GetFieldTypeOk returns a tuple with the FieldType field value +// and a boolean to check if the value has been set. +func (o *CaseIdentifierMapping) GetFieldTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FieldType, true +} + +// SetFieldType sets field value +func (o *CaseIdentifierMapping) SetFieldType(v string) { + o.FieldType = v +} + +// GetId returns the Id field value +func (o *CaseIdentifierMapping) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CaseIdentifierMapping) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CaseIdentifierMapping) SetId(v string) { + o.Id = v +} + +// GetKey returns the Key field value +func (o *CaseIdentifierMapping) GetKey() string { + if o == nil { + var ret string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *CaseIdentifierMapping) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Key, true +} + +// SetKey sets field value +func (o *CaseIdentifierMapping) SetKey(v string) { + o.Key = v +} + +// GetName returns the Name field value +func (o *CaseIdentifierMapping) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CaseIdentifierMapping) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CaseIdentifierMapping) SetName(v string) { + o.Name = v +} + +func (o CaseIdentifierMapping) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CaseIdentifierMapping) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["fieldType"] = o.FieldType + toSerialize["id"] = o.Id + toSerialize["key"] = o.Key + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableCaseIdentifierMapping struct { + value *CaseIdentifierMapping + isSet bool +} + +func (v NullableCaseIdentifierMapping) Get() *CaseIdentifierMapping { + return v.value +} + +func (v *NullableCaseIdentifierMapping) Set(val *CaseIdentifierMapping) { + v.value = val + v.isSet = true +} + +func (v NullableCaseIdentifierMapping) IsSet() bool { + return v.isSet +} + +func (v *NullableCaseIdentifierMapping) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCaseIdentifierMapping(val *CaseIdentifierMapping) *NullableCaseIdentifierMapping { + return &NullableCaseIdentifierMapping{value: val, isSet: true} +} + +func (v NullableCaseIdentifierMapping) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCaseIdentifierMapping) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_case_name_mapping.go b/generated/kibanaactions/model_case_name_mapping.go new file mode 100644 index 000000000..27ccc4cc4 --- /dev/null +++ b/generated/kibanaactions/model_case_name_mapping.go @@ -0,0 +1,200 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CaseNameMapping type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CaseNameMapping{} + +// CaseNameMapping Mapping for the case name. +type CaseNameMapping struct { + // The type of field in Swimlane. + FieldType string `json:"fieldType"` + // The identifier for the field in Swimlane. + Id string `json:"id"` + // The key for the field in Swimlane. + Key string `json:"key"` + // The name of the field in Swimlane. + Name string `json:"name"` +} + +// NewCaseNameMapping instantiates a new CaseNameMapping object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCaseNameMapping(fieldType string, id string, key string, name string) *CaseNameMapping { + this := CaseNameMapping{} + this.FieldType = fieldType + this.Id = id + this.Key = key + this.Name = name + return &this +} + +// NewCaseNameMappingWithDefaults instantiates a new CaseNameMapping object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCaseNameMappingWithDefaults() *CaseNameMapping { + this := CaseNameMapping{} + return &this +} + +// GetFieldType returns the FieldType field value +func (o *CaseNameMapping) GetFieldType() string { + if o == nil { + var ret string + return ret + } + + return o.FieldType +} + +// GetFieldTypeOk returns a tuple with the FieldType field value +// and a boolean to check if the value has been set. +func (o *CaseNameMapping) GetFieldTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FieldType, true +} + +// SetFieldType sets field value +func (o *CaseNameMapping) SetFieldType(v string) { + o.FieldType = v +} + +// GetId returns the Id field value +func (o *CaseNameMapping) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CaseNameMapping) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CaseNameMapping) SetId(v string) { + o.Id = v +} + +// GetKey returns the Key field value +func (o *CaseNameMapping) GetKey() string { + if o == nil { + var ret string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *CaseNameMapping) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Key, true +} + +// SetKey sets field value +func (o *CaseNameMapping) SetKey(v string) { + o.Key = v +} + +// GetName returns the Name field value +func (o *CaseNameMapping) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CaseNameMapping) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CaseNameMapping) SetName(v string) { + o.Name = v +} + +func (o CaseNameMapping) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CaseNameMapping) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["fieldType"] = o.FieldType + toSerialize["id"] = o.Id + toSerialize["key"] = o.Key + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableCaseNameMapping struct { + value *CaseNameMapping + isSet bool +} + +func (v NullableCaseNameMapping) Get() *CaseNameMapping { + return v.value +} + +func (v *NullableCaseNameMapping) Set(val *CaseNameMapping) { + v.value = val + v.isSet = true +} + +func (v NullableCaseNameMapping) IsSet() bool { + return v.isSet +} + +func (v *NullableCaseNameMapping) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCaseNameMapping(val *CaseNameMapping) *NullableCaseNameMapping { + return &NullableCaseNameMapping{value: val, isSet: true} +} + +func (v NullableCaseNameMapping) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCaseNameMapping) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_config_properties_cases_webhook.go b/generated/kibanaactions/model_config_properties_cases_webhook.go new file mode 100644 index 000000000..b11fdae41 --- /dev/null +++ b/generated/kibanaactions/model_config_properties_cases_webhook.go @@ -0,0 +1,587 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConfigPropertiesCasesWebhook type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConfigPropertiesCasesWebhook{} + +// ConfigPropertiesCasesWebhook Defines properties for connectors when type is `.cases-webhook`. +type ConfigPropertiesCasesWebhook struct { + // A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. + CreateCommentJson *string `json:"createCommentJson,omitempty"` + // The REST API HTTP request method to create a case comment in the third-party system. Valid values are `patch`, `post`, and `put`. + CreateCommentMethod *string `json:"createCommentMethod,omitempty"` + // The REST API URL to create a case comment by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts setting`, add the hostname to the allowed hosts. + CreateCommentUrl *string `json:"createCommentUrl,omitempty"` + // A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. + CreateIncidentJson string `json:"createIncidentJson"` + // The REST API HTTP request method to create a case in the third-party system. Valid values are `patch`, `post`, and `put`. + CreateIncidentMethod *string `json:"createIncidentMethod,omitempty"` + // The JSON key in the create case response that contains the external case ID. + CreateIncidentResponseKey string `json:"createIncidentResponseKey"` + // The REST API URL to create a case in the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. + CreateIncidentUrl string `json:"createIncidentUrl"` + // The JSON key in get case response that contains the external case title. + GetIncidentResponseExternalTitleKey string `json:"getIncidentResponseExternalTitleKey"` + // The REST API URL to get the case by ID from the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. You can use a variable to add the external system ID to the URL. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. + GetIncidentUrl string `json:"getIncidentUrl"` + // If true, a username and password for login type authentication must be provided. + HasAuth *bool `json:"hasAuth,omitempty"` + // A set of key-value pairs sent as headers with the request URLs for the create case, update case, get case, and create comment methods. + Headers *string `json:"headers,omitempty"` + // The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. + UpdateIncidentJson string `json:"updateIncidentJson"` + // The REST API HTTP request method to update the case in the third-party system. Valid values are `patch`, `post`, and `put`. + UpdateIncidentMethod *string `json:"updateIncidentMethod,omitempty"` + // The REST API URL to update the case by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. + UpdateIncidentUrl string `json:"updateIncidentUrl"` + // The URL to view the case in the external system. You can use variables to add the external system ID or external system title to the URL. + ViewIncidentUrl string `json:"viewIncidentUrl"` +} + +// NewConfigPropertiesCasesWebhook instantiates a new ConfigPropertiesCasesWebhook object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConfigPropertiesCasesWebhook(createIncidentJson string, createIncidentResponseKey string, createIncidentUrl string, getIncidentResponseExternalTitleKey string, getIncidentUrl string, updateIncidentJson string, updateIncidentUrl string, viewIncidentUrl string) *ConfigPropertiesCasesWebhook { + this := ConfigPropertiesCasesWebhook{} + var createCommentMethod string = "put" + this.CreateCommentMethod = &createCommentMethod + this.CreateIncidentJson = createIncidentJson + var createIncidentMethod string = "post" + this.CreateIncidentMethod = &createIncidentMethod + this.CreateIncidentResponseKey = createIncidentResponseKey + this.CreateIncidentUrl = createIncidentUrl + this.GetIncidentResponseExternalTitleKey = getIncidentResponseExternalTitleKey + this.GetIncidentUrl = getIncidentUrl + var hasAuth bool = true + this.HasAuth = &hasAuth + this.UpdateIncidentJson = updateIncidentJson + var updateIncidentMethod string = "put" + this.UpdateIncidentMethod = &updateIncidentMethod + this.UpdateIncidentUrl = updateIncidentUrl + this.ViewIncidentUrl = viewIncidentUrl + return &this +} + +// NewConfigPropertiesCasesWebhookWithDefaults instantiates a new ConfigPropertiesCasesWebhook object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConfigPropertiesCasesWebhookWithDefaults() *ConfigPropertiesCasesWebhook { + this := ConfigPropertiesCasesWebhook{} + var createCommentMethod string = "put" + this.CreateCommentMethod = &createCommentMethod + var createIncidentMethod string = "post" + this.CreateIncidentMethod = &createIncidentMethod + var hasAuth bool = true + this.HasAuth = &hasAuth + var updateIncidentMethod string = "put" + this.UpdateIncidentMethod = &updateIncidentMethod + return &this +} + +// GetCreateCommentJson returns the CreateCommentJson field value if set, zero value otherwise. +func (o *ConfigPropertiesCasesWebhook) GetCreateCommentJson() string { + if o == nil || IsNil(o.CreateCommentJson) { + var ret string + return ret + } + return *o.CreateCommentJson +} + +// GetCreateCommentJsonOk returns a tuple with the CreateCommentJson field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesCasesWebhook) GetCreateCommentJsonOk() (*string, bool) { + if o == nil || IsNil(o.CreateCommentJson) { + return nil, false + } + return o.CreateCommentJson, true +} + +// HasCreateCommentJson returns a boolean if a field has been set. +func (o *ConfigPropertiesCasesWebhook) HasCreateCommentJson() bool { + if o != nil && !IsNil(o.CreateCommentJson) { + return true + } + + return false +} + +// SetCreateCommentJson gets a reference to the given string and assigns it to the CreateCommentJson field. +func (o *ConfigPropertiesCasesWebhook) SetCreateCommentJson(v string) { + o.CreateCommentJson = &v +} + +// GetCreateCommentMethod returns the CreateCommentMethod field value if set, zero value otherwise. +func (o *ConfigPropertiesCasesWebhook) GetCreateCommentMethod() string { + if o == nil || IsNil(o.CreateCommentMethod) { + var ret string + return ret + } + return *o.CreateCommentMethod +} + +// GetCreateCommentMethodOk returns a tuple with the CreateCommentMethod field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesCasesWebhook) GetCreateCommentMethodOk() (*string, bool) { + if o == nil || IsNil(o.CreateCommentMethod) { + return nil, false + } + return o.CreateCommentMethod, true +} + +// HasCreateCommentMethod returns a boolean if a field has been set. +func (o *ConfigPropertiesCasesWebhook) HasCreateCommentMethod() bool { + if o != nil && !IsNil(o.CreateCommentMethod) { + return true + } + + return false +} + +// SetCreateCommentMethod gets a reference to the given string and assigns it to the CreateCommentMethod field. +func (o *ConfigPropertiesCasesWebhook) SetCreateCommentMethod(v string) { + o.CreateCommentMethod = &v +} + +// GetCreateCommentUrl returns the CreateCommentUrl field value if set, zero value otherwise. +func (o *ConfigPropertiesCasesWebhook) GetCreateCommentUrl() string { + if o == nil || IsNil(o.CreateCommentUrl) { + var ret string + return ret + } + return *o.CreateCommentUrl +} + +// GetCreateCommentUrlOk returns a tuple with the CreateCommentUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesCasesWebhook) GetCreateCommentUrlOk() (*string, bool) { + if o == nil || IsNil(o.CreateCommentUrl) { + return nil, false + } + return o.CreateCommentUrl, true +} + +// HasCreateCommentUrl returns a boolean if a field has been set. +func (o *ConfigPropertiesCasesWebhook) HasCreateCommentUrl() bool { + if o != nil && !IsNil(o.CreateCommentUrl) { + return true + } + + return false +} + +// SetCreateCommentUrl gets a reference to the given string and assigns it to the CreateCommentUrl field. +func (o *ConfigPropertiesCasesWebhook) SetCreateCommentUrl(v string) { + o.CreateCommentUrl = &v +} + +// GetCreateIncidentJson returns the CreateIncidentJson field value +func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentJson() string { + if o == nil { + var ret string + return ret + } + + return o.CreateIncidentJson +} + +// GetCreateIncidentJsonOk returns a tuple with the CreateIncidentJson field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentJsonOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreateIncidentJson, true +} + +// SetCreateIncidentJson sets field value +func (o *ConfigPropertiesCasesWebhook) SetCreateIncidentJson(v string) { + o.CreateIncidentJson = v +} + +// GetCreateIncidentMethod returns the CreateIncidentMethod field value if set, zero value otherwise. +func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentMethod() string { + if o == nil || IsNil(o.CreateIncidentMethod) { + var ret string + return ret + } + return *o.CreateIncidentMethod +} + +// GetCreateIncidentMethodOk returns a tuple with the CreateIncidentMethod field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentMethodOk() (*string, bool) { + if o == nil || IsNil(o.CreateIncidentMethod) { + return nil, false + } + return o.CreateIncidentMethod, true +} + +// HasCreateIncidentMethod returns a boolean if a field has been set. +func (o *ConfigPropertiesCasesWebhook) HasCreateIncidentMethod() bool { + if o != nil && !IsNil(o.CreateIncidentMethod) { + return true + } + + return false +} + +// SetCreateIncidentMethod gets a reference to the given string and assigns it to the CreateIncidentMethod field. +func (o *ConfigPropertiesCasesWebhook) SetCreateIncidentMethod(v string) { + o.CreateIncidentMethod = &v +} + +// GetCreateIncidentResponseKey returns the CreateIncidentResponseKey field value +func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentResponseKey() string { + if o == nil { + var ret string + return ret + } + + return o.CreateIncidentResponseKey +} + +// GetCreateIncidentResponseKeyOk returns a tuple with the CreateIncidentResponseKey field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentResponseKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreateIncidentResponseKey, true +} + +// SetCreateIncidentResponseKey sets field value +func (o *ConfigPropertiesCasesWebhook) SetCreateIncidentResponseKey(v string) { + o.CreateIncidentResponseKey = v +} + +// GetCreateIncidentUrl returns the CreateIncidentUrl field value +func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentUrl() string { + if o == nil { + var ret string + return ret + } + + return o.CreateIncidentUrl +} + +// GetCreateIncidentUrlOk returns a tuple with the CreateIncidentUrl field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreateIncidentUrl, true +} + +// SetCreateIncidentUrl sets field value +func (o *ConfigPropertiesCasesWebhook) SetCreateIncidentUrl(v string) { + o.CreateIncidentUrl = v +} + +// GetGetIncidentResponseExternalTitleKey returns the GetIncidentResponseExternalTitleKey field value +func (o *ConfigPropertiesCasesWebhook) GetGetIncidentResponseExternalTitleKey() string { + if o == nil { + var ret string + return ret + } + + return o.GetIncidentResponseExternalTitleKey +} + +// GetGetIncidentResponseExternalTitleKeyOk returns a tuple with the GetIncidentResponseExternalTitleKey field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesCasesWebhook) GetGetIncidentResponseExternalTitleKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.GetIncidentResponseExternalTitleKey, true +} + +// SetGetIncidentResponseExternalTitleKey sets field value +func (o *ConfigPropertiesCasesWebhook) SetGetIncidentResponseExternalTitleKey(v string) { + o.GetIncidentResponseExternalTitleKey = v +} + +// GetGetIncidentUrl returns the GetIncidentUrl field value +func (o *ConfigPropertiesCasesWebhook) GetGetIncidentUrl() string { + if o == nil { + var ret string + return ret + } + + return o.GetIncidentUrl +} + +// GetGetIncidentUrlOk returns a tuple with the GetIncidentUrl field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesCasesWebhook) GetGetIncidentUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.GetIncidentUrl, true +} + +// SetGetIncidentUrl sets field value +func (o *ConfigPropertiesCasesWebhook) SetGetIncidentUrl(v string) { + o.GetIncidentUrl = v +} + +// GetHasAuth returns the HasAuth field value if set, zero value otherwise. +func (o *ConfigPropertiesCasesWebhook) GetHasAuth() bool { + if o == nil || IsNil(o.HasAuth) { + var ret bool + return ret + } + return *o.HasAuth +} + +// GetHasAuthOk returns a tuple with the HasAuth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesCasesWebhook) GetHasAuthOk() (*bool, bool) { + if o == nil || IsNil(o.HasAuth) { + return nil, false + } + return o.HasAuth, true +} + +// HasHasAuth returns a boolean if a field has been set. +func (o *ConfigPropertiesCasesWebhook) HasHasAuth() bool { + if o != nil && !IsNil(o.HasAuth) { + return true + } + + return false +} + +// SetHasAuth gets a reference to the given bool and assigns it to the HasAuth field. +func (o *ConfigPropertiesCasesWebhook) SetHasAuth(v bool) { + o.HasAuth = &v +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *ConfigPropertiesCasesWebhook) GetHeaders() string { + if o == nil || IsNil(o.Headers) { + var ret string + return ret + } + return *o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesCasesWebhook) GetHeadersOk() (*string, bool) { + if o == nil || IsNil(o.Headers) { + return nil, false + } + return o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *ConfigPropertiesCasesWebhook) HasHeaders() bool { + if o != nil && !IsNil(o.Headers) { + return true + } + + return false +} + +// SetHeaders gets a reference to the given string and assigns it to the Headers field. +func (o *ConfigPropertiesCasesWebhook) SetHeaders(v string) { + o.Headers = &v +} + +// GetUpdateIncidentJson returns the UpdateIncidentJson field value +func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentJson() string { + if o == nil { + var ret string + return ret + } + + return o.UpdateIncidentJson +} + +// GetUpdateIncidentJsonOk returns a tuple with the UpdateIncidentJson field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentJsonOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UpdateIncidentJson, true +} + +// SetUpdateIncidentJson sets field value +func (o *ConfigPropertiesCasesWebhook) SetUpdateIncidentJson(v string) { + o.UpdateIncidentJson = v +} + +// GetUpdateIncidentMethod returns the UpdateIncidentMethod field value if set, zero value otherwise. +func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentMethod() string { + if o == nil || IsNil(o.UpdateIncidentMethod) { + var ret string + return ret + } + return *o.UpdateIncidentMethod +} + +// GetUpdateIncidentMethodOk returns a tuple with the UpdateIncidentMethod field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentMethodOk() (*string, bool) { + if o == nil || IsNil(o.UpdateIncidentMethod) { + return nil, false + } + return o.UpdateIncidentMethod, true +} + +// HasUpdateIncidentMethod returns a boolean if a field has been set. +func (o *ConfigPropertiesCasesWebhook) HasUpdateIncidentMethod() bool { + if o != nil && !IsNil(o.UpdateIncidentMethod) { + return true + } + + return false +} + +// SetUpdateIncidentMethod gets a reference to the given string and assigns it to the UpdateIncidentMethod field. +func (o *ConfigPropertiesCasesWebhook) SetUpdateIncidentMethod(v string) { + o.UpdateIncidentMethod = &v +} + +// GetUpdateIncidentUrl returns the UpdateIncidentUrl field value +func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentUrl() string { + if o == nil { + var ret string + return ret + } + + return o.UpdateIncidentUrl +} + +// GetUpdateIncidentUrlOk returns a tuple with the UpdateIncidentUrl field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UpdateIncidentUrl, true +} + +// SetUpdateIncidentUrl sets field value +func (o *ConfigPropertiesCasesWebhook) SetUpdateIncidentUrl(v string) { + o.UpdateIncidentUrl = v +} + +// GetViewIncidentUrl returns the ViewIncidentUrl field value +func (o *ConfigPropertiesCasesWebhook) GetViewIncidentUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ViewIncidentUrl +} + +// GetViewIncidentUrlOk returns a tuple with the ViewIncidentUrl field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesCasesWebhook) GetViewIncidentUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ViewIncidentUrl, true +} + +// SetViewIncidentUrl sets field value +func (o *ConfigPropertiesCasesWebhook) SetViewIncidentUrl(v string) { + o.ViewIncidentUrl = v +} + +func (o ConfigPropertiesCasesWebhook) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConfigPropertiesCasesWebhook) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreateCommentJson) { + toSerialize["createCommentJson"] = o.CreateCommentJson + } + if !IsNil(o.CreateCommentMethod) { + toSerialize["createCommentMethod"] = o.CreateCommentMethod + } + if !IsNil(o.CreateCommentUrl) { + toSerialize["createCommentUrl"] = o.CreateCommentUrl + } + toSerialize["createIncidentJson"] = o.CreateIncidentJson + if !IsNil(o.CreateIncidentMethod) { + toSerialize["createIncidentMethod"] = o.CreateIncidentMethod + } + toSerialize["createIncidentResponseKey"] = o.CreateIncidentResponseKey + toSerialize["createIncidentUrl"] = o.CreateIncidentUrl + toSerialize["getIncidentResponseExternalTitleKey"] = o.GetIncidentResponseExternalTitleKey + toSerialize["getIncidentUrl"] = o.GetIncidentUrl + if !IsNil(o.HasAuth) { + toSerialize["hasAuth"] = o.HasAuth + } + if !IsNil(o.Headers) { + toSerialize["headers"] = o.Headers + } + toSerialize["updateIncidentJson"] = o.UpdateIncidentJson + if !IsNil(o.UpdateIncidentMethod) { + toSerialize["updateIncidentMethod"] = o.UpdateIncidentMethod + } + toSerialize["updateIncidentUrl"] = o.UpdateIncidentUrl + toSerialize["viewIncidentUrl"] = o.ViewIncidentUrl + return toSerialize, nil +} + +type NullableConfigPropertiesCasesWebhook struct { + value *ConfigPropertiesCasesWebhook + isSet bool +} + +func (v NullableConfigPropertiesCasesWebhook) Get() *ConfigPropertiesCasesWebhook { + return v.value +} + +func (v *NullableConfigPropertiesCasesWebhook) Set(val *ConfigPropertiesCasesWebhook) { + v.value = val + v.isSet = true +} + +func (v NullableConfigPropertiesCasesWebhook) IsSet() bool { + return v.isSet +} + +func (v *NullableConfigPropertiesCasesWebhook) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConfigPropertiesCasesWebhook(val *ConfigPropertiesCasesWebhook) *NullableConfigPropertiesCasesWebhook { + return &NullableConfigPropertiesCasesWebhook{value: val, isSet: true} +} + +func (v NullableConfigPropertiesCasesWebhook) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConfigPropertiesCasesWebhook) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_config_properties_index.go b/generated/kibanaactions/model_config_properties_index.go new file mode 100644 index 000000000..8cbaf5e87 --- /dev/null +++ b/generated/kibanaactions/model_config_properties_index.go @@ -0,0 +1,205 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConfigPropertiesIndex type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConfigPropertiesIndex{} + +// ConfigPropertiesIndex Defines properties for connectors when type is `.index`. +type ConfigPropertiesIndex struct { + // Specifies a field that will contain the time the alert condition was detected. + ExecutionTimeField NullableString `json:"executionTimeField,omitempty"` + // The Elasticsearch index to be written to. + Index string `json:"index"` + // The refresh policy for the write request, which affects when changes are made visible to search. Refer to the refresh setting for Elasticsearch document APIs. + Refresh *bool `json:"refresh,omitempty"` +} + +// NewConfigPropertiesIndex instantiates a new ConfigPropertiesIndex object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConfigPropertiesIndex(index string) *ConfigPropertiesIndex { + this := ConfigPropertiesIndex{} + this.Index = index + var refresh bool = false + this.Refresh = &refresh + return &this +} + +// NewConfigPropertiesIndexWithDefaults instantiates a new ConfigPropertiesIndex object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConfigPropertiesIndexWithDefaults() *ConfigPropertiesIndex { + this := ConfigPropertiesIndex{} + var refresh bool = false + this.Refresh = &refresh + return &this +} + +// GetExecutionTimeField returns the ExecutionTimeField field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ConfigPropertiesIndex) GetExecutionTimeField() string { + if o == nil || IsNil(o.ExecutionTimeField.Get()) { + var ret string + return ret + } + return *o.ExecutionTimeField.Get() +} + +// GetExecutionTimeFieldOk returns a tuple with the ExecutionTimeField field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ConfigPropertiesIndex) GetExecutionTimeFieldOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ExecutionTimeField.Get(), o.ExecutionTimeField.IsSet() +} + +// HasExecutionTimeField returns a boolean if a field has been set. +func (o *ConfigPropertiesIndex) HasExecutionTimeField() bool { + if o != nil && o.ExecutionTimeField.IsSet() { + return true + } + + return false +} + +// SetExecutionTimeField gets a reference to the given NullableString and assigns it to the ExecutionTimeField field. +func (o *ConfigPropertiesIndex) SetExecutionTimeField(v string) { + o.ExecutionTimeField.Set(&v) +} + +// SetExecutionTimeFieldNil sets the value for ExecutionTimeField to be an explicit nil +func (o *ConfigPropertiesIndex) SetExecutionTimeFieldNil() { + o.ExecutionTimeField.Set(nil) +} + +// UnsetExecutionTimeField ensures that no value is present for ExecutionTimeField, not even an explicit nil +func (o *ConfigPropertiesIndex) UnsetExecutionTimeField() { + o.ExecutionTimeField.Unset() +} + +// GetIndex returns the Index field value +func (o *ConfigPropertiesIndex) GetIndex() string { + if o == nil { + var ret string + return ret + } + + return o.Index +} + +// GetIndexOk returns a tuple with the Index field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesIndex) GetIndexOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Index, true +} + +// SetIndex sets field value +func (o *ConfigPropertiesIndex) SetIndex(v string) { + o.Index = v +} + +// GetRefresh returns the Refresh field value if set, zero value otherwise. +func (o *ConfigPropertiesIndex) GetRefresh() bool { + if o == nil || IsNil(o.Refresh) { + var ret bool + return ret + } + return *o.Refresh +} + +// GetRefreshOk returns a tuple with the Refresh field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesIndex) GetRefreshOk() (*bool, bool) { + if o == nil || IsNil(o.Refresh) { + return nil, false + } + return o.Refresh, true +} + +// HasRefresh returns a boolean if a field has been set. +func (o *ConfigPropertiesIndex) HasRefresh() bool { + if o != nil && !IsNil(o.Refresh) { + return true + } + + return false +} + +// SetRefresh gets a reference to the given bool and assigns it to the Refresh field. +func (o *ConfigPropertiesIndex) SetRefresh(v bool) { + o.Refresh = &v +} + +func (o ConfigPropertiesIndex) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConfigPropertiesIndex) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ExecutionTimeField.IsSet() { + toSerialize["executionTimeField"] = o.ExecutionTimeField.Get() + } + toSerialize["index"] = o.Index + if !IsNil(o.Refresh) { + toSerialize["refresh"] = o.Refresh + } + return toSerialize, nil +} + +type NullableConfigPropertiesIndex struct { + value *ConfigPropertiesIndex + isSet bool +} + +func (v NullableConfigPropertiesIndex) Get() *ConfigPropertiesIndex { + return v.value +} + +func (v *NullableConfigPropertiesIndex) Set(val *ConfigPropertiesIndex) { + v.value = val + v.isSet = true +} + +func (v NullableConfigPropertiesIndex) IsSet() bool { + return v.isSet +} + +func (v *NullableConfigPropertiesIndex) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConfigPropertiesIndex(val *ConfigPropertiesIndex) *NullableConfigPropertiesIndex { + return &NullableConfigPropertiesIndex{value: val, isSet: true} +} + +func (v NullableConfigPropertiesIndex) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConfigPropertiesIndex) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_config_properties_jira.go b/generated/kibanaactions/model_config_properties_jira.go new file mode 100644 index 000000000..5924396ac --- /dev/null +++ b/generated/kibanaactions/model_config_properties_jira.go @@ -0,0 +1,144 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConfigPropertiesJira type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConfigPropertiesJira{} + +// ConfigPropertiesJira Defines properties for connectors when type is `.jira`. +type ConfigPropertiesJira struct { + // The Jira instance URL. + ApiUrl string `json:"apiUrl"` + // The Jira project key. + ProjectKey string `json:"projectKey"` +} + +// NewConfigPropertiesJira instantiates a new ConfigPropertiesJira object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConfigPropertiesJira(apiUrl string, projectKey string) *ConfigPropertiesJira { + this := ConfigPropertiesJira{} + this.ApiUrl = apiUrl + this.ProjectKey = projectKey + return &this +} + +// NewConfigPropertiesJiraWithDefaults instantiates a new ConfigPropertiesJira object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConfigPropertiesJiraWithDefaults() *ConfigPropertiesJira { + this := ConfigPropertiesJira{} + return &this +} + +// GetApiUrl returns the ApiUrl field value +func (o *ConfigPropertiesJira) GetApiUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesJira) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *ConfigPropertiesJira) SetApiUrl(v string) { + o.ApiUrl = v +} + +// GetProjectKey returns the ProjectKey field value +func (o *ConfigPropertiesJira) GetProjectKey() string { + if o == nil { + var ret string + return ret + } + + return o.ProjectKey +} + +// GetProjectKeyOk returns a tuple with the ProjectKey field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesJira) GetProjectKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProjectKey, true +} + +// SetProjectKey sets field value +func (o *ConfigPropertiesJira) SetProjectKey(v string) { + o.ProjectKey = v +} + +func (o ConfigPropertiesJira) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConfigPropertiesJira) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["apiUrl"] = o.ApiUrl + toSerialize["projectKey"] = o.ProjectKey + return toSerialize, nil +} + +type NullableConfigPropertiesJira struct { + value *ConfigPropertiesJira + isSet bool +} + +func (v NullableConfigPropertiesJira) Get() *ConfigPropertiesJira { + return v.value +} + +func (v *NullableConfigPropertiesJira) Set(val *ConfigPropertiesJira) { + v.value = val + v.isSet = true +} + +func (v NullableConfigPropertiesJira) IsSet() bool { + return v.isSet +} + +func (v *NullableConfigPropertiesJira) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConfigPropertiesJira(val *ConfigPropertiesJira) *NullableConfigPropertiesJira { + return &NullableConfigPropertiesJira{value: val, isSet: true} +} + +func (v NullableConfigPropertiesJira) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConfigPropertiesJira) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_config_properties_opsgenie.go b/generated/kibanaactions/model_config_properties_opsgenie.go new file mode 100644 index 000000000..37bfde227 --- /dev/null +++ b/generated/kibanaactions/model_config_properties_opsgenie.go @@ -0,0 +1,116 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConfigPropertiesOpsgenie type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConfigPropertiesOpsgenie{} + +// ConfigPropertiesOpsgenie Defines properties for connectors when type is `.opsgenie`. +type ConfigPropertiesOpsgenie struct { + // The Opsgenie URL. For example, `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. + ApiUrl string `json:"apiUrl"` +} + +// NewConfigPropertiesOpsgenie instantiates a new ConfigPropertiesOpsgenie object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConfigPropertiesOpsgenie(apiUrl string) *ConfigPropertiesOpsgenie { + this := ConfigPropertiesOpsgenie{} + this.ApiUrl = apiUrl + return &this +} + +// NewConfigPropertiesOpsgenieWithDefaults instantiates a new ConfigPropertiesOpsgenie object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConfigPropertiesOpsgenieWithDefaults() *ConfigPropertiesOpsgenie { + this := ConfigPropertiesOpsgenie{} + return &this +} + +// GetApiUrl returns the ApiUrl field value +func (o *ConfigPropertiesOpsgenie) GetApiUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesOpsgenie) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *ConfigPropertiesOpsgenie) SetApiUrl(v string) { + o.ApiUrl = v +} + +func (o ConfigPropertiesOpsgenie) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConfigPropertiesOpsgenie) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["apiUrl"] = o.ApiUrl + return toSerialize, nil +} + +type NullableConfigPropertiesOpsgenie struct { + value *ConfigPropertiesOpsgenie + isSet bool +} + +func (v NullableConfigPropertiesOpsgenie) Get() *ConfigPropertiesOpsgenie { + return v.value +} + +func (v *NullableConfigPropertiesOpsgenie) Set(val *ConfigPropertiesOpsgenie) { + v.value = val + v.isSet = true +} + +func (v NullableConfigPropertiesOpsgenie) IsSet() bool { + return v.isSet +} + +func (v *NullableConfigPropertiesOpsgenie) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConfigPropertiesOpsgenie(val *ConfigPropertiesOpsgenie) *NullableConfigPropertiesOpsgenie { + return &NullableConfigPropertiesOpsgenie{value: val, isSet: true} +} + +func (v NullableConfigPropertiesOpsgenie) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConfigPropertiesOpsgenie) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_config_properties_resilient.go b/generated/kibanaactions/model_config_properties_resilient.go new file mode 100644 index 000000000..963cb6472 --- /dev/null +++ b/generated/kibanaactions/model_config_properties_resilient.go @@ -0,0 +1,144 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConfigPropertiesResilient type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConfigPropertiesResilient{} + +// ConfigPropertiesResilient Defines properties for connectors when type is `.resilient`. +type ConfigPropertiesResilient struct { + // The IBM Resilient instance URL. + ApiUrl string `json:"apiUrl"` + // The IBM Resilient organization ID. + OrgId string `json:"orgId"` +} + +// NewConfigPropertiesResilient instantiates a new ConfigPropertiesResilient object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConfigPropertiesResilient(apiUrl string, orgId string) *ConfigPropertiesResilient { + this := ConfigPropertiesResilient{} + this.ApiUrl = apiUrl + this.OrgId = orgId + return &this +} + +// NewConfigPropertiesResilientWithDefaults instantiates a new ConfigPropertiesResilient object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConfigPropertiesResilientWithDefaults() *ConfigPropertiesResilient { + this := ConfigPropertiesResilient{} + return &this +} + +// GetApiUrl returns the ApiUrl field value +func (o *ConfigPropertiesResilient) GetApiUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesResilient) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *ConfigPropertiesResilient) SetApiUrl(v string) { + o.ApiUrl = v +} + +// GetOrgId returns the OrgId field value +func (o *ConfigPropertiesResilient) GetOrgId() string { + if o == nil { + var ret string + return ret + } + + return o.OrgId +} + +// GetOrgIdOk returns a tuple with the OrgId field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesResilient) GetOrgIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrgId, true +} + +// SetOrgId sets field value +func (o *ConfigPropertiesResilient) SetOrgId(v string) { + o.OrgId = v +} + +func (o ConfigPropertiesResilient) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConfigPropertiesResilient) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["apiUrl"] = o.ApiUrl + toSerialize["orgId"] = o.OrgId + return toSerialize, nil +} + +type NullableConfigPropertiesResilient struct { + value *ConfigPropertiesResilient + isSet bool +} + +func (v NullableConfigPropertiesResilient) Get() *ConfigPropertiesResilient { + return v.value +} + +func (v *NullableConfigPropertiesResilient) Set(val *ConfigPropertiesResilient) { + v.value = val + v.isSet = true +} + +func (v NullableConfigPropertiesResilient) IsSet() bool { + return v.isSet +} + +func (v *NullableConfigPropertiesResilient) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConfigPropertiesResilient(val *ConfigPropertiesResilient) *NullableConfigPropertiesResilient { + return &NullableConfigPropertiesResilient{value: val, isSet: true} +} + +func (v NullableConfigPropertiesResilient) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConfigPropertiesResilient) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_config_properties_servicenow.go b/generated/kibanaactions/model_config_properties_servicenow.go new file mode 100644 index 000000000..75be2f2e3 --- /dev/null +++ b/generated/kibanaactions/model_config_properties_servicenow.go @@ -0,0 +1,309 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConfigPropertiesServicenow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConfigPropertiesServicenow{} + +// ConfigPropertiesServicenow Defines properties for connectors when type is `.servicenow`. +type ConfigPropertiesServicenow struct { + // The ServiceNow instance URL. + ApiUrl string `json:"apiUrl"` + // The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. + ClientId *string `json:"clientId,omitempty"` + // The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). + IsOAuth *bool `json:"isOAuth,omitempty"` + // The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. + JwtKeyId *string `json:"jwtKeyId,omitempty"` + // The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. + UserIdentifierValue *string `json:"userIdentifierValue,omitempty"` + // Determines whether the connector uses the Table API or the Import Set API. This property is supported only for ServiceNow ITSM and ServiceNow SecOps connectors. NOTE: If this property is set to `false`, the Elastic application should be installed in ServiceNow. + UsesTableApi *bool `json:"usesTableApi,omitempty"` +} + +// NewConfigPropertiesServicenow instantiates a new ConfigPropertiesServicenow object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConfigPropertiesServicenow(apiUrl string) *ConfigPropertiesServicenow { + this := ConfigPropertiesServicenow{} + this.ApiUrl = apiUrl + var isOAuth bool = false + this.IsOAuth = &isOAuth + var usesTableApi bool = true + this.UsesTableApi = &usesTableApi + return &this +} + +// NewConfigPropertiesServicenowWithDefaults instantiates a new ConfigPropertiesServicenow object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConfigPropertiesServicenowWithDefaults() *ConfigPropertiesServicenow { + this := ConfigPropertiesServicenow{} + var isOAuth bool = false + this.IsOAuth = &isOAuth + var usesTableApi bool = true + this.UsesTableApi = &usesTableApi + return &this +} + +// GetApiUrl returns the ApiUrl field value +func (o *ConfigPropertiesServicenow) GetApiUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesServicenow) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *ConfigPropertiesServicenow) SetApiUrl(v string) { + o.ApiUrl = v +} + +// GetClientId returns the ClientId field value if set, zero value otherwise. +func (o *ConfigPropertiesServicenow) GetClientId() string { + if o == nil || IsNil(o.ClientId) { + var ret string + return ret + } + return *o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesServicenow) GetClientIdOk() (*string, bool) { + if o == nil || IsNil(o.ClientId) { + return nil, false + } + return o.ClientId, true +} + +// HasClientId returns a boolean if a field has been set. +func (o *ConfigPropertiesServicenow) HasClientId() bool { + if o != nil && !IsNil(o.ClientId) { + return true + } + + return false +} + +// SetClientId gets a reference to the given string and assigns it to the ClientId field. +func (o *ConfigPropertiesServicenow) SetClientId(v string) { + o.ClientId = &v +} + +// GetIsOAuth returns the IsOAuth field value if set, zero value otherwise. +func (o *ConfigPropertiesServicenow) GetIsOAuth() bool { + if o == nil || IsNil(o.IsOAuth) { + var ret bool + return ret + } + return *o.IsOAuth +} + +// GetIsOAuthOk returns a tuple with the IsOAuth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesServicenow) GetIsOAuthOk() (*bool, bool) { + if o == nil || IsNil(o.IsOAuth) { + return nil, false + } + return o.IsOAuth, true +} + +// HasIsOAuth returns a boolean if a field has been set. +func (o *ConfigPropertiesServicenow) HasIsOAuth() bool { + if o != nil && !IsNil(o.IsOAuth) { + return true + } + + return false +} + +// SetIsOAuth gets a reference to the given bool and assigns it to the IsOAuth field. +func (o *ConfigPropertiesServicenow) SetIsOAuth(v bool) { + o.IsOAuth = &v +} + +// GetJwtKeyId returns the JwtKeyId field value if set, zero value otherwise. +func (o *ConfigPropertiesServicenow) GetJwtKeyId() string { + if o == nil || IsNil(o.JwtKeyId) { + var ret string + return ret + } + return *o.JwtKeyId +} + +// GetJwtKeyIdOk returns a tuple with the JwtKeyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesServicenow) GetJwtKeyIdOk() (*string, bool) { + if o == nil || IsNil(o.JwtKeyId) { + return nil, false + } + return o.JwtKeyId, true +} + +// HasJwtKeyId returns a boolean if a field has been set. +func (o *ConfigPropertiesServicenow) HasJwtKeyId() bool { + if o != nil && !IsNil(o.JwtKeyId) { + return true + } + + return false +} + +// SetJwtKeyId gets a reference to the given string and assigns it to the JwtKeyId field. +func (o *ConfigPropertiesServicenow) SetJwtKeyId(v string) { + o.JwtKeyId = &v +} + +// GetUserIdentifierValue returns the UserIdentifierValue field value if set, zero value otherwise. +func (o *ConfigPropertiesServicenow) GetUserIdentifierValue() string { + if o == nil || IsNil(o.UserIdentifierValue) { + var ret string + return ret + } + return *o.UserIdentifierValue +} + +// GetUserIdentifierValueOk returns a tuple with the UserIdentifierValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesServicenow) GetUserIdentifierValueOk() (*string, bool) { + if o == nil || IsNil(o.UserIdentifierValue) { + return nil, false + } + return o.UserIdentifierValue, true +} + +// HasUserIdentifierValue returns a boolean if a field has been set. +func (o *ConfigPropertiesServicenow) HasUserIdentifierValue() bool { + if o != nil && !IsNil(o.UserIdentifierValue) { + return true + } + + return false +} + +// SetUserIdentifierValue gets a reference to the given string and assigns it to the UserIdentifierValue field. +func (o *ConfigPropertiesServicenow) SetUserIdentifierValue(v string) { + o.UserIdentifierValue = &v +} + +// GetUsesTableApi returns the UsesTableApi field value if set, zero value otherwise. +func (o *ConfigPropertiesServicenow) GetUsesTableApi() bool { + if o == nil || IsNil(o.UsesTableApi) { + var ret bool + return ret + } + return *o.UsesTableApi +} + +// GetUsesTableApiOk returns a tuple with the UsesTableApi field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesServicenow) GetUsesTableApiOk() (*bool, bool) { + if o == nil || IsNil(o.UsesTableApi) { + return nil, false + } + return o.UsesTableApi, true +} + +// HasUsesTableApi returns a boolean if a field has been set. +func (o *ConfigPropertiesServicenow) HasUsesTableApi() bool { + if o != nil && !IsNil(o.UsesTableApi) { + return true + } + + return false +} + +// SetUsesTableApi gets a reference to the given bool and assigns it to the UsesTableApi field. +func (o *ConfigPropertiesServicenow) SetUsesTableApi(v bool) { + o.UsesTableApi = &v +} + +func (o ConfigPropertiesServicenow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConfigPropertiesServicenow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["apiUrl"] = o.ApiUrl + if !IsNil(o.ClientId) { + toSerialize["clientId"] = o.ClientId + } + if !IsNil(o.IsOAuth) { + toSerialize["isOAuth"] = o.IsOAuth + } + if !IsNil(o.JwtKeyId) { + toSerialize["jwtKeyId"] = o.JwtKeyId + } + if !IsNil(o.UserIdentifierValue) { + toSerialize["userIdentifierValue"] = o.UserIdentifierValue + } + if !IsNil(o.UsesTableApi) { + toSerialize["usesTableApi"] = o.UsesTableApi + } + return toSerialize, nil +} + +type NullableConfigPropertiesServicenow struct { + value *ConfigPropertiesServicenow + isSet bool +} + +func (v NullableConfigPropertiesServicenow) Get() *ConfigPropertiesServicenow { + return v.value +} + +func (v *NullableConfigPropertiesServicenow) Set(val *ConfigPropertiesServicenow) { + v.value = val + v.isSet = true +} + +func (v NullableConfigPropertiesServicenow) IsSet() bool { + return v.isSet +} + +func (v *NullableConfigPropertiesServicenow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConfigPropertiesServicenow(val *ConfigPropertiesServicenow) *NullableConfigPropertiesServicenow { + return &NullableConfigPropertiesServicenow{value: val, isSet: true} +} + +func (v NullableConfigPropertiesServicenow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConfigPropertiesServicenow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_config_properties_servicenow_itom.go b/generated/kibanaactions/model_config_properties_servicenow_itom.go new file mode 100644 index 000000000..7fcb061b0 --- /dev/null +++ b/generated/kibanaactions/model_config_properties_servicenow_itom.go @@ -0,0 +1,268 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConfigPropertiesServicenowItom type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConfigPropertiesServicenowItom{} + +// ConfigPropertiesServicenowItom Defines properties for connectors when type is `.servicenow`. +type ConfigPropertiesServicenowItom struct { + // The ServiceNow instance URL. + ApiUrl string `json:"apiUrl"` + // The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. + ClientId *string `json:"clientId,omitempty"` + // The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). + IsOAuth *bool `json:"isOAuth,omitempty"` + // The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. + JwtKeyId *string `json:"jwtKeyId,omitempty"` + // The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. + UserIdentifierValue *string `json:"userIdentifierValue,omitempty"` +} + +// NewConfigPropertiesServicenowItom instantiates a new ConfigPropertiesServicenowItom object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConfigPropertiesServicenowItom(apiUrl string) *ConfigPropertiesServicenowItom { + this := ConfigPropertiesServicenowItom{} + this.ApiUrl = apiUrl + var isOAuth bool = false + this.IsOAuth = &isOAuth + return &this +} + +// NewConfigPropertiesServicenowItomWithDefaults instantiates a new ConfigPropertiesServicenowItom object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConfigPropertiesServicenowItomWithDefaults() *ConfigPropertiesServicenowItom { + this := ConfigPropertiesServicenowItom{} + var isOAuth bool = false + this.IsOAuth = &isOAuth + return &this +} + +// GetApiUrl returns the ApiUrl field value +func (o *ConfigPropertiesServicenowItom) GetApiUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesServicenowItom) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *ConfigPropertiesServicenowItom) SetApiUrl(v string) { + o.ApiUrl = v +} + +// GetClientId returns the ClientId field value if set, zero value otherwise. +func (o *ConfigPropertiesServicenowItom) GetClientId() string { + if o == nil || IsNil(o.ClientId) { + var ret string + return ret + } + return *o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesServicenowItom) GetClientIdOk() (*string, bool) { + if o == nil || IsNil(o.ClientId) { + return nil, false + } + return o.ClientId, true +} + +// HasClientId returns a boolean if a field has been set. +func (o *ConfigPropertiesServicenowItom) HasClientId() bool { + if o != nil && !IsNil(o.ClientId) { + return true + } + + return false +} + +// SetClientId gets a reference to the given string and assigns it to the ClientId field. +func (o *ConfigPropertiesServicenowItom) SetClientId(v string) { + o.ClientId = &v +} + +// GetIsOAuth returns the IsOAuth field value if set, zero value otherwise. +func (o *ConfigPropertiesServicenowItom) GetIsOAuth() bool { + if o == nil || IsNil(o.IsOAuth) { + var ret bool + return ret + } + return *o.IsOAuth +} + +// GetIsOAuthOk returns a tuple with the IsOAuth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesServicenowItom) GetIsOAuthOk() (*bool, bool) { + if o == nil || IsNil(o.IsOAuth) { + return nil, false + } + return o.IsOAuth, true +} + +// HasIsOAuth returns a boolean if a field has been set. +func (o *ConfigPropertiesServicenowItom) HasIsOAuth() bool { + if o != nil && !IsNil(o.IsOAuth) { + return true + } + + return false +} + +// SetIsOAuth gets a reference to the given bool and assigns it to the IsOAuth field. +func (o *ConfigPropertiesServicenowItom) SetIsOAuth(v bool) { + o.IsOAuth = &v +} + +// GetJwtKeyId returns the JwtKeyId field value if set, zero value otherwise. +func (o *ConfigPropertiesServicenowItom) GetJwtKeyId() string { + if o == nil || IsNil(o.JwtKeyId) { + var ret string + return ret + } + return *o.JwtKeyId +} + +// GetJwtKeyIdOk returns a tuple with the JwtKeyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesServicenowItom) GetJwtKeyIdOk() (*string, bool) { + if o == nil || IsNil(o.JwtKeyId) { + return nil, false + } + return o.JwtKeyId, true +} + +// HasJwtKeyId returns a boolean if a field has been set. +func (o *ConfigPropertiesServicenowItom) HasJwtKeyId() bool { + if o != nil && !IsNil(o.JwtKeyId) { + return true + } + + return false +} + +// SetJwtKeyId gets a reference to the given string and assigns it to the JwtKeyId field. +func (o *ConfigPropertiesServicenowItom) SetJwtKeyId(v string) { + o.JwtKeyId = &v +} + +// GetUserIdentifierValue returns the UserIdentifierValue field value if set, zero value otherwise. +func (o *ConfigPropertiesServicenowItom) GetUserIdentifierValue() string { + if o == nil || IsNil(o.UserIdentifierValue) { + var ret string + return ret + } + return *o.UserIdentifierValue +} + +// GetUserIdentifierValueOk returns a tuple with the UserIdentifierValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesServicenowItom) GetUserIdentifierValueOk() (*string, bool) { + if o == nil || IsNil(o.UserIdentifierValue) { + return nil, false + } + return o.UserIdentifierValue, true +} + +// HasUserIdentifierValue returns a boolean if a field has been set. +func (o *ConfigPropertiesServicenowItom) HasUserIdentifierValue() bool { + if o != nil && !IsNil(o.UserIdentifierValue) { + return true + } + + return false +} + +// SetUserIdentifierValue gets a reference to the given string and assigns it to the UserIdentifierValue field. +func (o *ConfigPropertiesServicenowItom) SetUserIdentifierValue(v string) { + o.UserIdentifierValue = &v +} + +func (o ConfigPropertiesServicenowItom) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConfigPropertiesServicenowItom) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["apiUrl"] = o.ApiUrl + if !IsNil(o.ClientId) { + toSerialize["clientId"] = o.ClientId + } + if !IsNil(o.IsOAuth) { + toSerialize["isOAuth"] = o.IsOAuth + } + if !IsNil(o.JwtKeyId) { + toSerialize["jwtKeyId"] = o.JwtKeyId + } + if !IsNil(o.UserIdentifierValue) { + toSerialize["userIdentifierValue"] = o.UserIdentifierValue + } + return toSerialize, nil +} + +type NullableConfigPropertiesServicenowItom struct { + value *ConfigPropertiesServicenowItom + isSet bool +} + +func (v NullableConfigPropertiesServicenowItom) Get() *ConfigPropertiesServicenowItom { + return v.value +} + +func (v *NullableConfigPropertiesServicenowItom) Set(val *ConfigPropertiesServicenowItom) { + v.value = val + v.isSet = true +} + +func (v NullableConfigPropertiesServicenowItom) IsSet() bool { + return v.isSet +} + +func (v *NullableConfigPropertiesServicenowItom) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConfigPropertiesServicenowItom(val *ConfigPropertiesServicenowItom) *NullableConfigPropertiesServicenowItom { + return &NullableConfigPropertiesServicenowItom{value: val, isSet: true} +} + +func (v NullableConfigPropertiesServicenowItom) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConfigPropertiesServicenowItom) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_config_properties_swimlane.go b/generated/kibanaactions/model_config_properties_swimlane.go new file mode 100644 index 000000000..5f7e80cae --- /dev/null +++ b/generated/kibanaactions/model_config_properties_swimlane.go @@ -0,0 +1,208 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConfigPropertiesSwimlane type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConfigPropertiesSwimlane{} + +// ConfigPropertiesSwimlane Defines properties for connectors when type is `.swimlane`. +type ConfigPropertiesSwimlane struct { + // The Swimlane instance URL. + ApiUrl string `json:"apiUrl"` + // The Swimlane application ID. + AppId string `json:"appId"` + // The type of connector. Valid values are `all`, `alerts`, and `cases`. + ConnectorType string `json:"connectorType"` + Mappings *ConnectorMappingsPropertiesForASwimlaneConnector `json:"mappings,omitempty"` +} + +// NewConfigPropertiesSwimlane instantiates a new ConfigPropertiesSwimlane object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConfigPropertiesSwimlane(apiUrl string, appId string, connectorType string) *ConfigPropertiesSwimlane { + this := ConfigPropertiesSwimlane{} + this.ApiUrl = apiUrl + this.AppId = appId + this.ConnectorType = connectorType + return &this +} + +// NewConfigPropertiesSwimlaneWithDefaults instantiates a new ConfigPropertiesSwimlane object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConfigPropertiesSwimlaneWithDefaults() *ConfigPropertiesSwimlane { + this := ConfigPropertiesSwimlane{} + return &this +} + +// GetApiUrl returns the ApiUrl field value +func (o *ConfigPropertiesSwimlane) GetApiUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ApiUrl +} + +// GetApiUrlOk returns a tuple with the ApiUrl field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesSwimlane) GetApiUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiUrl, true +} + +// SetApiUrl sets field value +func (o *ConfigPropertiesSwimlane) SetApiUrl(v string) { + o.ApiUrl = v +} + +// GetAppId returns the AppId field value +func (o *ConfigPropertiesSwimlane) GetAppId() string { + if o == nil { + var ret string + return ret + } + + return o.AppId +} + +// GetAppIdOk returns a tuple with the AppId field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesSwimlane) GetAppIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AppId, true +} + +// SetAppId sets field value +func (o *ConfigPropertiesSwimlane) SetAppId(v string) { + o.AppId = v +} + +// GetConnectorType returns the ConnectorType field value +func (o *ConfigPropertiesSwimlane) GetConnectorType() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorType +} + +// GetConnectorTypeOk returns a tuple with the ConnectorType field value +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesSwimlane) GetConnectorTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorType, true +} + +// SetConnectorType sets field value +func (o *ConfigPropertiesSwimlane) SetConnectorType(v string) { + o.ConnectorType = v +} + +// GetMappings returns the Mappings field value if set, zero value otherwise. +func (o *ConfigPropertiesSwimlane) GetMappings() ConnectorMappingsPropertiesForASwimlaneConnector { + if o == nil || IsNil(o.Mappings) { + var ret ConnectorMappingsPropertiesForASwimlaneConnector + return ret + } + return *o.Mappings +} + +// GetMappingsOk returns a tuple with the Mappings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigPropertiesSwimlane) GetMappingsOk() (*ConnectorMappingsPropertiesForASwimlaneConnector, bool) { + if o == nil || IsNil(o.Mappings) { + return nil, false + } + return o.Mappings, true +} + +// HasMappings returns a boolean if a field has been set. +func (o *ConfigPropertiesSwimlane) HasMappings() bool { + if o != nil && !IsNil(o.Mappings) { + return true + } + + return false +} + +// SetMappings gets a reference to the given ConnectorMappingsPropertiesForASwimlaneConnector and assigns it to the Mappings field. +func (o *ConfigPropertiesSwimlane) SetMappings(v ConnectorMappingsPropertiesForASwimlaneConnector) { + o.Mappings = &v +} + +func (o ConfigPropertiesSwimlane) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConfigPropertiesSwimlane) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["apiUrl"] = o.ApiUrl + toSerialize["appId"] = o.AppId + toSerialize["connectorType"] = o.ConnectorType + if !IsNil(o.Mappings) { + toSerialize["mappings"] = o.Mappings + } + return toSerialize, nil +} + +type NullableConfigPropertiesSwimlane struct { + value *ConfigPropertiesSwimlane + isSet bool +} + +func (v NullableConfigPropertiesSwimlane) Get() *ConfigPropertiesSwimlane { + return v.value +} + +func (v *NullableConfigPropertiesSwimlane) Set(val *ConfigPropertiesSwimlane) { + v.value = val + v.isSet = true +} + +func (v NullableConfigPropertiesSwimlane) IsSet() bool { + return v.isSet +} + +func (v *NullableConfigPropertiesSwimlane) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConfigPropertiesSwimlane(val *ConfigPropertiesSwimlane) *NullableConfigPropertiesSwimlane { + return &NullableConfigPropertiesSwimlane{value: val, isSet: true} +} + +func (v NullableConfigPropertiesSwimlane) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConfigPropertiesSwimlane) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_mappings_properties_for_a_swimlane_connector.go b/generated/kibanaactions/model_connector_mappings_properties_for_a_swimlane_connector.go new file mode 100644 index 000000000..c5f624a25 --- /dev/null +++ b/generated/kibanaactions/model_connector_mappings_properties_for_a_swimlane_connector.go @@ -0,0 +1,340 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConnectorMappingsPropertiesForASwimlaneConnector type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorMappingsPropertiesForASwimlaneConnector{} + +// ConnectorMappingsPropertiesForASwimlaneConnector The field mapping. +type ConnectorMappingsPropertiesForASwimlaneConnector struct { + AlertIdConfig *AlertIdentifierMapping `json:"alertIdConfig,omitempty"` + CaseIdConfig *CaseIdentifierMapping `json:"caseIdConfig,omitempty"` + CaseNameConfig *CaseNameMapping `json:"caseNameConfig,omitempty"` + CommentsConfig *CaseCommentMapping `json:"commentsConfig,omitempty"` + DescriptionConfig *CaseDescriptionMapping `json:"descriptionConfig,omitempty"` + RuleNameConfig *RuleNameMapping `json:"ruleNameConfig,omitempty"` + SeverityConfig *SeverityMapping `json:"severityConfig,omitempty"` +} + +// NewConnectorMappingsPropertiesForASwimlaneConnector instantiates a new ConnectorMappingsPropertiesForASwimlaneConnector object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorMappingsPropertiesForASwimlaneConnector() *ConnectorMappingsPropertiesForASwimlaneConnector { + this := ConnectorMappingsPropertiesForASwimlaneConnector{} + return &this +} + +// NewConnectorMappingsPropertiesForASwimlaneConnectorWithDefaults instantiates a new ConnectorMappingsPropertiesForASwimlaneConnector object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorMappingsPropertiesForASwimlaneConnectorWithDefaults() *ConnectorMappingsPropertiesForASwimlaneConnector { + this := ConnectorMappingsPropertiesForASwimlaneConnector{} + return &this +} + +// GetAlertIdConfig returns the AlertIdConfig field value if set, zero value otherwise. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetAlertIdConfig() AlertIdentifierMapping { + if o == nil || IsNil(o.AlertIdConfig) { + var ret AlertIdentifierMapping + return ret + } + return *o.AlertIdConfig +} + +// GetAlertIdConfigOk returns a tuple with the AlertIdConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetAlertIdConfigOk() (*AlertIdentifierMapping, bool) { + if o == nil || IsNil(o.AlertIdConfig) { + return nil, false + } + return o.AlertIdConfig, true +} + +// HasAlertIdConfig returns a boolean if a field has been set. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasAlertIdConfig() bool { + if o != nil && !IsNil(o.AlertIdConfig) { + return true + } + + return false +} + +// SetAlertIdConfig gets a reference to the given AlertIdentifierMapping and assigns it to the AlertIdConfig field. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetAlertIdConfig(v AlertIdentifierMapping) { + o.AlertIdConfig = &v +} + +// GetCaseIdConfig returns the CaseIdConfig field value if set, zero value otherwise. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCaseIdConfig() CaseIdentifierMapping { + if o == nil || IsNil(o.CaseIdConfig) { + var ret CaseIdentifierMapping + return ret + } + return *o.CaseIdConfig +} + +// GetCaseIdConfigOk returns a tuple with the CaseIdConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCaseIdConfigOk() (*CaseIdentifierMapping, bool) { + if o == nil || IsNil(o.CaseIdConfig) { + return nil, false + } + return o.CaseIdConfig, true +} + +// HasCaseIdConfig returns a boolean if a field has been set. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasCaseIdConfig() bool { + if o != nil && !IsNil(o.CaseIdConfig) { + return true + } + + return false +} + +// SetCaseIdConfig gets a reference to the given CaseIdentifierMapping and assigns it to the CaseIdConfig field. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetCaseIdConfig(v CaseIdentifierMapping) { + o.CaseIdConfig = &v +} + +// GetCaseNameConfig returns the CaseNameConfig field value if set, zero value otherwise. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCaseNameConfig() CaseNameMapping { + if o == nil || IsNil(o.CaseNameConfig) { + var ret CaseNameMapping + return ret + } + return *o.CaseNameConfig +} + +// GetCaseNameConfigOk returns a tuple with the CaseNameConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCaseNameConfigOk() (*CaseNameMapping, bool) { + if o == nil || IsNil(o.CaseNameConfig) { + return nil, false + } + return o.CaseNameConfig, true +} + +// HasCaseNameConfig returns a boolean if a field has been set. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasCaseNameConfig() bool { + if o != nil && !IsNil(o.CaseNameConfig) { + return true + } + + return false +} + +// SetCaseNameConfig gets a reference to the given CaseNameMapping and assigns it to the CaseNameConfig field. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetCaseNameConfig(v CaseNameMapping) { + o.CaseNameConfig = &v +} + +// GetCommentsConfig returns the CommentsConfig field value if set, zero value otherwise. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCommentsConfig() CaseCommentMapping { + if o == nil || IsNil(o.CommentsConfig) { + var ret CaseCommentMapping + return ret + } + return *o.CommentsConfig +} + +// GetCommentsConfigOk returns a tuple with the CommentsConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCommentsConfigOk() (*CaseCommentMapping, bool) { + if o == nil || IsNil(o.CommentsConfig) { + return nil, false + } + return o.CommentsConfig, true +} + +// HasCommentsConfig returns a boolean if a field has been set. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasCommentsConfig() bool { + if o != nil && !IsNil(o.CommentsConfig) { + return true + } + + return false +} + +// SetCommentsConfig gets a reference to the given CaseCommentMapping and assigns it to the CommentsConfig field. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetCommentsConfig(v CaseCommentMapping) { + o.CommentsConfig = &v +} + +// GetDescriptionConfig returns the DescriptionConfig field value if set, zero value otherwise. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetDescriptionConfig() CaseDescriptionMapping { + if o == nil || IsNil(o.DescriptionConfig) { + var ret CaseDescriptionMapping + return ret + } + return *o.DescriptionConfig +} + +// GetDescriptionConfigOk returns a tuple with the DescriptionConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetDescriptionConfigOk() (*CaseDescriptionMapping, bool) { + if o == nil || IsNil(o.DescriptionConfig) { + return nil, false + } + return o.DescriptionConfig, true +} + +// HasDescriptionConfig returns a boolean if a field has been set. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasDescriptionConfig() bool { + if o != nil && !IsNil(o.DescriptionConfig) { + return true + } + + return false +} + +// SetDescriptionConfig gets a reference to the given CaseDescriptionMapping and assigns it to the DescriptionConfig field. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetDescriptionConfig(v CaseDescriptionMapping) { + o.DescriptionConfig = &v +} + +// GetRuleNameConfig returns the RuleNameConfig field value if set, zero value otherwise. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetRuleNameConfig() RuleNameMapping { + if o == nil || IsNil(o.RuleNameConfig) { + var ret RuleNameMapping + return ret + } + return *o.RuleNameConfig +} + +// GetRuleNameConfigOk returns a tuple with the RuleNameConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetRuleNameConfigOk() (*RuleNameMapping, bool) { + if o == nil || IsNil(o.RuleNameConfig) { + return nil, false + } + return o.RuleNameConfig, true +} + +// HasRuleNameConfig returns a boolean if a field has been set. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasRuleNameConfig() bool { + if o != nil && !IsNil(o.RuleNameConfig) { + return true + } + + return false +} + +// SetRuleNameConfig gets a reference to the given RuleNameMapping and assigns it to the RuleNameConfig field. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetRuleNameConfig(v RuleNameMapping) { + o.RuleNameConfig = &v +} + +// GetSeverityConfig returns the SeverityConfig field value if set, zero value otherwise. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetSeverityConfig() SeverityMapping { + if o == nil || IsNil(o.SeverityConfig) { + var ret SeverityMapping + return ret + } + return *o.SeverityConfig +} + +// GetSeverityConfigOk returns a tuple with the SeverityConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetSeverityConfigOk() (*SeverityMapping, bool) { + if o == nil || IsNil(o.SeverityConfig) { + return nil, false + } + return o.SeverityConfig, true +} + +// HasSeverityConfig returns a boolean if a field has been set. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasSeverityConfig() bool { + if o != nil && !IsNil(o.SeverityConfig) { + return true + } + + return false +} + +// SetSeverityConfig gets a reference to the given SeverityMapping and assigns it to the SeverityConfig field. +func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetSeverityConfig(v SeverityMapping) { + o.SeverityConfig = &v +} + +func (o ConnectorMappingsPropertiesForASwimlaneConnector) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorMappingsPropertiesForASwimlaneConnector) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AlertIdConfig) { + toSerialize["alertIdConfig"] = o.AlertIdConfig + } + if !IsNil(o.CaseIdConfig) { + toSerialize["caseIdConfig"] = o.CaseIdConfig + } + if !IsNil(o.CaseNameConfig) { + toSerialize["caseNameConfig"] = o.CaseNameConfig + } + if !IsNil(o.CommentsConfig) { + toSerialize["commentsConfig"] = o.CommentsConfig + } + if !IsNil(o.DescriptionConfig) { + toSerialize["descriptionConfig"] = o.DescriptionConfig + } + if !IsNil(o.RuleNameConfig) { + toSerialize["ruleNameConfig"] = o.RuleNameConfig + } + if !IsNil(o.SeverityConfig) { + toSerialize["severityConfig"] = o.SeverityConfig + } + return toSerialize, nil +} + +type NullableConnectorMappingsPropertiesForASwimlaneConnector struct { + value *ConnectorMappingsPropertiesForASwimlaneConnector + isSet bool +} + +func (v NullableConnectorMappingsPropertiesForASwimlaneConnector) Get() *ConnectorMappingsPropertiesForASwimlaneConnector { + return v.value +} + +func (v *NullableConnectorMappingsPropertiesForASwimlaneConnector) Set(val *ConnectorMappingsPropertiesForASwimlaneConnector) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorMappingsPropertiesForASwimlaneConnector) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorMappingsPropertiesForASwimlaneConnector) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorMappingsPropertiesForASwimlaneConnector(val *ConnectorMappingsPropertiesForASwimlaneConnector) *NullableConnectorMappingsPropertiesForASwimlaneConnector { + return &NullableConnectorMappingsPropertiesForASwimlaneConnector{value: val, isSet: true} +} + +func (v NullableConnectorMappingsPropertiesForASwimlaneConnector) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorMappingsPropertiesForASwimlaneConnector) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_response_properties.go b/generated/kibanaactions/model_connector_response_properties.go new file mode 100644 index 000000000..6b174f9d4 --- /dev/null +++ b/generated/kibanaactions/model_connector_response_properties.go @@ -0,0 +1,595 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" + "fmt" +) + +// ConnectorResponseProperties - The properties vary depending on the connector type. +type ConnectorResponseProperties struct { + ConnectorResponsePropertiesCasesWebhook *ConnectorResponsePropertiesCasesWebhook + ConnectorResponsePropertiesEmail *ConnectorResponsePropertiesEmail + ConnectorResponsePropertiesIndex *ConnectorResponsePropertiesIndex + ConnectorResponsePropertiesJira *ConnectorResponsePropertiesJira + ConnectorResponsePropertiesOpsgenie *ConnectorResponsePropertiesOpsgenie + ConnectorResponsePropertiesPagerduty *ConnectorResponsePropertiesPagerduty + ConnectorResponsePropertiesResilient *ConnectorResponsePropertiesResilient + ConnectorResponsePropertiesServerlog *ConnectorResponsePropertiesServerlog + ConnectorResponsePropertiesServicenow *ConnectorResponsePropertiesServicenow + ConnectorResponsePropertiesServicenowItom *ConnectorResponsePropertiesServicenowItom + ConnectorResponsePropertiesServicenowSir *ConnectorResponsePropertiesServicenowSir + ConnectorResponsePropertiesSlack *ConnectorResponsePropertiesSlack + ConnectorResponsePropertiesSwimlane *ConnectorResponsePropertiesSwimlane + ConnectorResponsePropertiesTeams *ConnectorResponsePropertiesTeams + ConnectorResponsePropertiesTines *ConnectorResponsePropertiesTines + ConnectorResponsePropertiesWebhook *ConnectorResponsePropertiesWebhook + ConnectorResponsePropertiesXmatters *ConnectorResponsePropertiesXmatters +} + +// ConnectorResponsePropertiesCasesWebhookAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesCasesWebhook wrapped in ConnectorResponseProperties +func ConnectorResponsePropertiesCasesWebhookAsConnectorResponseProperties(v *ConnectorResponsePropertiesCasesWebhook) ConnectorResponseProperties { + return ConnectorResponseProperties{ + ConnectorResponsePropertiesCasesWebhook: v, + } +} + +// ConnectorResponsePropertiesEmailAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesEmail wrapped in ConnectorResponseProperties +func ConnectorResponsePropertiesEmailAsConnectorResponseProperties(v *ConnectorResponsePropertiesEmail) ConnectorResponseProperties { + return ConnectorResponseProperties{ + ConnectorResponsePropertiesEmail: v, + } +} + +// ConnectorResponsePropertiesIndexAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesIndex wrapped in ConnectorResponseProperties +func ConnectorResponsePropertiesIndexAsConnectorResponseProperties(v *ConnectorResponsePropertiesIndex) ConnectorResponseProperties { + return ConnectorResponseProperties{ + ConnectorResponsePropertiesIndex: v, + } +} + +// ConnectorResponsePropertiesJiraAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesJira wrapped in ConnectorResponseProperties +func ConnectorResponsePropertiesJiraAsConnectorResponseProperties(v *ConnectorResponsePropertiesJira) ConnectorResponseProperties { + return ConnectorResponseProperties{ + ConnectorResponsePropertiesJira: v, + } +} + +// ConnectorResponsePropertiesOpsgenieAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesOpsgenie wrapped in ConnectorResponseProperties +func ConnectorResponsePropertiesOpsgenieAsConnectorResponseProperties(v *ConnectorResponsePropertiesOpsgenie) ConnectorResponseProperties { + return ConnectorResponseProperties{ + ConnectorResponsePropertiesOpsgenie: v, + } +} + +// ConnectorResponsePropertiesPagerdutyAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesPagerduty wrapped in ConnectorResponseProperties +func ConnectorResponsePropertiesPagerdutyAsConnectorResponseProperties(v *ConnectorResponsePropertiesPagerduty) ConnectorResponseProperties { + return ConnectorResponseProperties{ + ConnectorResponsePropertiesPagerduty: v, + } +} + +// ConnectorResponsePropertiesResilientAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesResilient wrapped in ConnectorResponseProperties +func ConnectorResponsePropertiesResilientAsConnectorResponseProperties(v *ConnectorResponsePropertiesResilient) ConnectorResponseProperties { + return ConnectorResponseProperties{ + ConnectorResponsePropertiesResilient: v, + } +} + +// ConnectorResponsePropertiesServerlogAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesServerlog wrapped in ConnectorResponseProperties +func ConnectorResponsePropertiesServerlogAsConnectorResponseProperties(v *ConnectorResponsePropertiesServerlog) ConnectorResponseProperties { + return ConnectorResponseProperties{ + ConnectorResponsePropertiesServerlog: v, + } +} + +// ConnectorResponsePropertiesServicenowAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesServicenow wrapped in ConnectorResponseProperties +func ConnectorResponsePropertiesServicenowAsConnectorResponseProperties(v *ConnectorResponsePropertiesServicenow) ConnectorResponseProperties { + return ConnectorResponseProperties{ + ConnectorResponsePropertiesServicenow: v, + } +} + +// ConnectorResponsePropertiesServicenowItomAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesServicenowItom wrapped in ConnectorResponseProperties +func ConnectorResponsePropertiesServicenowItomAsConnectorResponseProperties(v *ConnectorResponsePropertiesServicenowItom) ConnectorResponseProperties { + return ConnectorResponseProperties{ + ConnectorResponsePropertiesServicenowItom: v, + } +} + +// ConnectorResponsePropertiesServicenowSirAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesServicenowSir wrapped in ConnectorResponseProperties +func ConnectorResponsePropertiesServicenowSirAsConnectorResponseProperties(v *ConnectorResponsePropertiesServicenowSir) ConnectorResponseProperties { + return ConnectorResponseProperties{ + ConnectorResponsePropertiesServicenowSir: v, + } +} + +// ConnectorResponsePropertiesSlackAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesSlack wrapped in ConnectorResponseProperties +func ConnectorResponsePropertiesSlackAsConnectorResponseProperties(v *ConnectorResponsePropertiesSlack) ConnectorResponseProperties { + return ConnectorResponseProperties{ + ConnectorResponsePropertiesSlack: v, + } +} + +// ConnectorResponsePropertiesSwimlaneAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesSwimlane wrapped in ConnectorResponseProperties +func ConnectorResponsePropertiesSwimlaneAsConnectorResponseProperties(v *ConnectorResponsePropertiesSwimlane) ConnectorResponseProperties { + return ConnectorResponseProperties{ + ConnectorResponsePropertiesSwimlane: v, + } +} + +// ConnectorResponsePropertiesTeamsAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesTeams wrapped in ConnectorResponseProperties +func ConnectorResponsePropertiesTeamsAsConnectorResponseProperties(v *ConnectorResponsePropertiesTeams) ConnectorResponseProperties { + return ConnectorResponseProperties{ + ConnectorResponsePropertiesTeams: v, + } +} + +// ConnectorResponsePropertiesTinesAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesTines wrapped in ConnectorResponseProperties +func ConnectorResponsePropertiesTinesAsConnectorResponseProperties(v *ConnectorResponsePropertiesTines) ConnectorResponseProperties { + return ConnectorResponseProperties{ + ConnectorResponsePropertiesTines: v, + } +} + +// ConnectorResponsePropertiesWebhookAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesWebhook wrapped in ConnectorResponseProperties +func ConnectorResponsePropertiesWebhookAsConnectorResponseProperties(v *ConnectorResponsePropertiesWebhook) ConnectorResponseProperties { + return ConnectorResponseProperties{ + ConnectorResponsePropertiesWebhook: v, + } +} + +// ConnectorResponsePropertiesXmattersAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesXmatters wrapped in ConnectorResponseProperties +func ConnectorResponsePropertiesXmattersAsConnectorResponseProperties(v *ConnectorResponsePropertiesXmatters) ConnectorResponseProperties { + return ConnectorResponseProperties{ + ConnectorResponsePropertiesXmatters: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *ConnectorResponseProperties) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into ConnectorResponsePropertiesCasesWebhook + err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesCasesWebhook) + if err == nil { + jsonConnectorResponsePropertiesCasesWebhook, _ := json.Marshal(dst.ConnectorResponsePropertiesCasesWebhook) + if string(jsonConnectorResponsePropertiesCasesWebhook) == "{}" { // empty struct + dst.ConnectorResponsePropertiesCasesWebhook = nil + } else { + match++ + } + } else { + dst.ConnectorResponsePropertiesCasesWebhook = nil + } + + // try to unmarshal data into ConnectorResponsePropertiesEmail + err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesEmail) + if err == nil { + jsonConnectorResponsePropertiesEmail, _ := json.Marshal(dst.ConnectorResponsePropertiesEmail) + if string(jsonConnectorResponsePropertiesEmail) == "{}" { // empty struct + dst.ConnectorResponsePropertiesEmail = nil + } else { + match++ + } + } else { + dst.ConnectorResponsePropertiesEmail = nil + } + + // try to unmarshal data into ConnectorResponsePropertiesIndex + err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesIndex) + if err == nil { + jsonConnectorResponsePropertiesIndex, _ := json.Marshal(dst.ConnectorResponsePropertiesIndex) + if string(jsonConnectorResponsePropertiesIndex) == "{}" { // empty struct + dst.ConnectorResponsePropertiesIndex = nil + } else { + match++ + } + } else { + dst.ConnectorResponsePropertiesIndex = nil + } + + // try to unmarshal data into ConnectorResponsePropertiesJira + err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesJira) + if err == nil { + jsonConnectorResponsePropertiesJira, _ := json.Marshal(dst.ConnectorResponsePropertiesJira) + if string(jsonConnectorResponsePropertiesJira) == "{}" { // empty struct + dst.ConnectorResponsePropertiesJira = nil + } else { + match++ + } + } else { + dst.ConnectorResponsePropertiesJira = nil + } + + // try to unmarshal data into ConnectorResponsePropertiesOpsgenie + err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesOpsgenie) + if err == nil { + jsonConnectorResponsePropertiesOpsgenie, _ := json.Marshal(dst.ConnectorResponsePropertiesOpsgenie) + if string(jsonConnectorResponsePropertiesOpsgenie) == "{}" { // empty struct + dst.ConnectorResponsePropertiesOpsgenie = nil + } else { + match++ + } + } else { + dst.ConnectorResponsePropertiesOpsgenie = nil + } + + // try to unmarshal data into ConnectorResponsePropertiesPagerduty + err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesPagerduty) + if err == nil { + jsonConnectorResponsePropertiesPagerduty, _ := json.Marshal(dst.ConnectorResponsePropertiesPagerduty) + if string(jsonConnectorResponsePropertiesPagerduty) == "{}" { // empty struct + dst.ConnectorResponsePropertiesPagerduty = nil + } else { + match++ + } + } else { + dst.ConnectorResponsePropertiesPagerduty = nil + } + + // try to unmarshal data into ConnectorResponsePropertiesResilient + err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesResilient) + if err == nil { + jsonConnectorResponsePropertiesResilient, _ := json.Marshal(dst.ConnectorResponsePropertiesResilient) + if string(jsonConnectorResponsePropertiesResilient) == "{}" { // empty struct + dst.ConnectorResponsePropertiesResilient = nil + } else { + match++ + } + } else { + dst.ConnectorResponsePropertiesResilient = nil + } + + // try to unmarshal data into ConnectorResponsePropertiesServerlog + err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesServerlog) + if err == nil { + jsonConnectorResponsePropertiesServerlog, _ := json.Marshal(dst.ConnectorResponsePropertiesServerlog) + if string(jsonConnectorResponsePropertiesServerlog) == "{}" { // empty struct + dst.ConnectorResponsePropertiesServerlog = nil + } else { + match++ + } + } else { + dst.ConnectorResponsePropertiesServerlog = nil + } + + // try to unmarshal data into ConnectorResponsePropertiesServicenow + err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesServicenow) + if err == nil { + jsonConnectorResponsePropertiesServicenow, _ := json.Marshal(dst.ConnectorResponsePropertiesServicenow) + if string(jsonConnectorResponsePropertiesServicenow) == "{}" { // empty struct + dst.ConnectorResponsePropertiesServicenow = nil + } else { + match++ + } + } else { + dst.ConnectorResponsePropertiesServicenow = nil + } + + // try to unmarshal data into ConnectorResponsePropertiesServicenowItom + err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesServicenowItom) + if err == nil { + jsonConnectorResponsePropertiesServicenowItom, _ := json.Marshal(dst.ConnectorResponsePropertiesServicenowItom) + if string(jsonConnectorResponsePropertiesServicenowItom) == "{}" { // empty struct + dst.ConnectorResponsePropertiesServicenowItom = nil + } else { + match++ + } + } else { + dst.ConnectorResponsePropertiesServicenowItom = nil + } + + // try to unmarshal data into ConnectorResponsePropertiesServicenowSir + err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesServicenowSir) + if err == nil { + jsonConnectorResponsePropertiesServicenowSir, _ := json.Marshal(dst.ConnectorResponsePropertiesServicenowSir) + if string(jsonConnectorResponsePropertiesServicenowSir) == "{}" { // empty struct + dst.ConnectorResponsePropertiesServicenowSir = nil + } else { + match++ + } + } else { + dst.ConnectorResponsePropertiesServicenowSir = nil + } + + // try to unmarshal data into ConnectorResponsePropertiesSlack + err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesSlack) + if err == nil { + jsonConnectorResponsePropertiesSlack, _ := json.Marshal(dst.ConnectorResponsePropertiesSlack) + if string(jsonConnectorResponsePropertiesSlack) == "{}" { // empty struct + dst.ConnectorResponsePropertiesSlack = nil + } else { + match++ + } + } else { + dst.ConnectorResponsePropertiesSlack = nil + } + + // try to unmarshal data into ConnectorResponsePropertiesSwimlane + err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesSwimlane) + if err == nil { + jsonConnectorResponsePropertiesSwimlane, _ := json.Marshal(dst.ConnectorResponsePropertiesSwimlane) + if string(jsonConnectorResponsePropertiesSwimlane) == "{}" { // empty struct + dst.ConnectorResponsePropertiesSwimlane = nil + } else { + match++ + } + } else { + dst.ConnectorResponsePropertiesSwimlane = nil + } + + // try to unmarshal data into ConnectorResponsePropertiesTeams + err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesTeams) + if err == nil { + jsonConnectorResponsePropertiesTeams, _ := json.Marshal(dst.ConnectorResponsePropertiesTeams) + if string(jsonConnectorResponsePropertiesTeams) == "{}" { // empty struct + dst.ConnectorResponsePropertiesTeams = nil + } else { + match++ + } + } else { + dst.ConnectorResponsePropertiesTeams = nil + } + + // try to unmarshal data into ConnectorResponsePropertiesTines + err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesTines) + if err == nil { + jsonConnectorResponsePropertiesTines, _ := json.Marshal(dst.ConnectorResponsePropertiesTines) + if string(jsonConnectorResponsePropertiesTines) == "{}" { // empty struct + dst.ConnectorResponsePropertiesTines = nil + } else { + match++ + } + } else { + dst.ConnectorResponsePropertiesTines = nil + } + + // try to unmarshal data into ConnectorResponsePropertiesWebhook + err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesWebhook) + if err == nil { + jsonConnectorResponsePropertiesWebhook, _ := json.Marshal(dst.ConnectorResponsePropertiesWebhook) + if string(jsonConnectorResponsePropertiesWebhook) == "{}" { // empty struct + dst.ConnectorResponsePropertiesWebhook = nil + } else { + match++ + } + } else { + dst.ConnectorResponsePropertiesWebhook = nil + } + + // try to unmarshal data into ConnectorResponsePropertiesXmatters + err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesXmatters) + if err == nil { + jsonConnectorResponsePropertiesXmatters, _ := json.Marshal(dst.ConnectorResponsePropertiesXmatters) + if string(jsonConnectorResponsePropertiesXmatters) == "{}" { // empty struct + dst.ConnectorResponsePropertiesXmatters = nil + } else { + match++ + } + } else { + dst.ConnectorResponsePropertiesXmatters = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.ConnectorResponsePropertiesCasesWebhook = nil + dst.ConnectorResponsePropertiesEmail = nil + dst.ConnectorResponsePropertiesIndex = nil + dst.ConnectorResponsePropertiesJira = nil + dst.ConnectorResponsePropertiesOpsgenie = nil + dst.ConnectorResponsePropertiesPagerduty = nil + dst.ConnectorResponsePropertiesResilient = nil + dst.ConnectorResponsePropertiesServerlog = nil + dst.ConnectorResponsePropertiesServicenow = nil + dst.ConnectorResponsePropertiesServicenowItom = nil + dst.ConnectorResponsePropertiesServicenowSir = nil + dst.ConnectorResponsePropertiesSlack = nil + dst.ConnectorResponsePropertiesSwimlane = nil + dst.ConnectorResponsePropertiesTeams = nil + dst.ConnectorResponsePropertiesTines = nil + dst.ConnectorResponsePropertiesWebhook = nil + dst.ConnectorResponsePropertiesXmatters = nil + + return fmt.Errorf("data matches more than one schema in oneOf(ConnectorResponseProperties)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(ConnectorResponseProperties)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ConnectorResponseProperties) MarshalJSON() ([]byte, error) { + if src.ConnectorResponsePropertiesCasesWebhook != nil { + return json.Marshal(&src.ConnectorResponsePropertiesCasesWebhook) + } + + if src.ConnectorResponsePropertiesEmail != nil { + return json.Marshal(&src.ConnectorResponsePropertiesEmail) + } + + if src.ConnectorResponsePropertiesIndex != nil { + return json.Marshal(&src.ConnectorResponsePropertiesIndex) + } + + if src.ConnectorResponsePropertiesJira != nil { + return json.Marshal(&src.ConnectorResponsePropertiesJira) + } + + if src.ConnectorResponsePropertiesOpsgenie != nil { + return json.Marshal(&src.ConnectorResponsePropertiesOpsgenie) + } + + if src.ConnectorResponsePropertiesPagerduty != nil { + return json.Marshal(&src.ConnectorResponsePropertiesPagerduty) + } + + if src.ConnectorResponsePropertiesResilient != nil { + return json.Marshal(&src.ConnectorResponsePropertiesResilient) + } + + if src.ConnectorResponsePropertiesServerlog != nil { + return json.Marshal(&src.ConnectorResponsePropertiesServerlog) + } + + if src.ConnectorResponsePropertiesServicenow != nil { + return json.Marshal(&src.ConnectorResponsePropertiesServicenow) + } + + if src.ConnectorResponsePropertiesServicenowItom != nil { + return json.Marshal(&src.ConnectorResponsePropertiesServicenowItom) + } + + if src.ConnectorResponsePropertiesServicenowSir != nil { + return json.Marshal(&src.ConnectorResponsePropertiesServicenowSir) + } + + if src.ConnectorResponsePropertiesSlack != nil { + return json.Marshal(&src.ConnectorResponsePropertiesSlack) + } + + if src.ConnectorResponsePropertiesSwimlane != nil { + return json.Marshal(&src.ConnectorResponsePropertiesSwimlane) + } + + if src.ConnectorResponsePropertiesTeams != nil { + return json.Marshal(&src.ConnectorResponsePropertiesTeams) + } + + if src.ConnectorResponsePropertiesTines != nil { + return json.Marshal(&src.ConnectorResponsePropertiesTines) + } + + if src.ConnectorResponsePropertiesWebhook != nil { + return json.Marshal(&src.ConnectorResponsePropertiesWebhook) + } + + if src.ConnectorResponsePropertiesXmatters != nil { + return json.Marshal(&src.ConnectorResponsePropertiesXmatters) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *ConnectorResponseProperties) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.ConnectorResponsePropertiesCasesWebhook != nil { + return obj.ConnectorResponsePropertiesCasesWebhook + } + + if obj.ConnectorResponsePropertiesEmail != nil { + return obj.ConnectorResponsePropertiesEmail + } + + if obj.ConnectorResponsePropertiesIndex != nil { + return obj.ConnectorResponsePropertiesIndex + } + + if obj.ConnectorResponsePropertiesJira != nil { + return obj.ConnectorResponsePropertiesJira + } + + if obj.ConnectorResponsePropertiesOpsgenie != nil { + return obj.ConnectorResponsePropertiesOpsgenie + } + + if obj.ConnectorResponsePropertiesPagerduty != nil { + return obj.ConnectorResponsePropertiesPagerduty + } + + if obj.ConnectorResponsePropertiesResilient != nil { + return obj.ConnectorResponsePropertiesResilient + } + + if obj.ConnectorResponsePropertiesServerlog != nil { + return obj.ConnectorResponsePropertiesServerlog + } + + if obj.ConnectorResponsePropertiesServicenow != nil { + return obj.ConnectorResponsePropertiesServicenow + } + + if obj.ConnectorResponsePropertiesServicenowItom != nil { + return obj.ConnectorResponsePropertiesServicenowItom + } + + if obj.ConnectorResponsePropertiesServicenowSir != nil { + return obj.ConnectorResponsePropertiesServicenowSir + } + + if obj.ConnectorResponsePropertiesSlack != nil { + return obj.ConnectorResponsePropertiesSlack + } + + if obj.ConnectorResponsePropertiesSwimlane != nil { + return obj.ConnectorResponsePropertiesSwimlane + } + + if obj.ConnectorResponsePropertiesTeams != nil { + return obj.ConnectorResponsePropertiesTeams + } + + if obj.ConnectorResponsePropertiesTines != nil { + return obj.ConnectorResponsePropertiesTines + } + + if obj.ConnectorResponsePropertiesWebhook != nil { + return obj.ConnectorResponsePropertiesWebhook + } + + if obj.ConnectorResponsePropertiesXmatters != nil { + return obj.ConnectorResponsePropertiesXmatters + } + + // all schemas are nil + return nil +} + +type NullableConnectorResponseProperties struct { + value *ConnectorResponseProperties + isSet bool +} + +func (v NullableConnectorResponseProperties) Get() *ConnectorResponseProperties { + return v.value +} + +func (v *NullableConnectorResponseProperties) Set(val *ConnectorResponseProperties) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponseProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponseProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponseProperties(val *ConnectorResponseProperties) *NullableConnectorResponseProperties { + return &NullableConnectorResponseProperties{value: val, isSet: true} +} + +func (v NullableConnectorResponseProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponseProperties) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_response_properties_cases_webhook.go b/generated/kibanaactions/model_connector_response_properties_cases_webhook.go new file mode 100644 index 000000000..cda33eb29 --- /dev/null +++ b/generated/kibanaactions/model_connector_response_properties_cases_webhook.go @@ -0,0 +1,292 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConnectorResponsePropertiesCasesWebhook type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorResponsePropertiesCasesWebhook{} + +// ConnectorResponsePropertiesCasesWebhook struct for ConnectorResponsePropertiesCasesWebhook +type ConnectorResponsePropertiesCasesWebhook struct { + Config ConfigPropertiesCasesWebhook `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The identifier for the connector. + Id string `json:"id"` + // Indicates whether the connector type is deprecated. + IsDeprecated bool `json:"is_deprecated"` + // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` + // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured bool `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewConnectorResponsePropertiesCasesWebhook instantiates a new ConnectorResponsePropertiesCasesWebhook object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorResponsePropertiesCasesWebhook(config ConfigPropertiesCasesWebhook, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesCasesWebhook { + this := ConnectorResponsePropertiesCasesWebhook{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Id = id + this.IsDeprecated = isDeprecated + this.IsPreconfigured = isPreconfigured + this.Name = name + return &this +} + +// NewConnectorResponsePropertiesCasesWebhookWithDefaults instantiates a new ConnectorResponsePropertiesCasesWebhook object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorResponsePropertiesCasesWebhookWithDefaults() *ConnectorResponsePropertiesCasesWebhook { + this := ConnectorResponsePropertiesCasesWebhook{} + return &this +} + +// GetConfig returns the Config field value +func (o *ConnectorResponsePropertiesCasesWebhook) GetConfig() ConfigPropertiesCasesWebhook { + if o == nil { + var ret ConfigPropertiesCasesWebhook + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesCasesWebhook) GetConfigOk() (*ConfigPropertiesCasesWebhook, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *ConnectorResponsePropertiesCasesWebhook) SetConfig(v ConfigPropertiesCasesWebhook) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *ConnectorResponsePropertiesCasesWebhook) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesCasesWebhook) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *ConnectorResponsePropertiesCasesWebhook) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetId returns the Id field value +func (o *ConnectorResponsePropertiesCasesWebhook) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesCasesWebhook) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ConnectorResponsePropertiesCasesWebhook) SetId(v string) { + o.Id = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *ConnectorResponsePropertiesCasesWebhook) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesCasesWebhook) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *ConnectorResponsePropertiesCasesWebhook) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *ConnectorResponsePropertiesCasesWebhook) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesCasesWebhook) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *ConnectorResponsePropertiesCasesWebhook) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *ConnectorResponsePropertiesCasesWebhook) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value +func (o *ConnectorResponsePropertiesCasesWebhook) GetIsPreconfigured() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesCasesWebhook) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPreconfigured, true +} + +// SetIsPreconfigured sets field value +func (o *ConnectorResponsePropertiesCasesWebhook) SetIsPreconfigured(v bool) { + o.IsPreconfigured = v +} + +// GetName returns the Name field value +func (o *ConnectorResponsePropertiesCasesWebhook) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesCasesWebhook) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorResponsePropertiesCasesWebhook) SetName(v string) { + o.Name = v +} + +func (o ConnectorResponsePropertiesCasesWebhook) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorResponsePropertiesCasesWebhook) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["id"] = o.Id + toSerialize["is_deprecated"] = o.IsDeprecated + if !IsNil(o.IsMissingSecrets) { + toSerialize["is_missing_secrets"] = o.IsMissingSecrets + } + toSerialize["is_preconfigured"] = o.IsPreconfigured + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableConnectorResponsePropertiesCasesWebhook struct { + value *ConnectorResponsePropertiesCasesWebhook + isSet bool +} + +func (v NullableConnectorResponsePropertiesCasesWebhook) Get() *ConnectorResponsePropertiesCasesWebhook { + return v.value +} + +func (v *NullableConnectorResponsePropertiesCasesWebhook) Set(val *ConnectorResponsePropertiesCasesWebhook) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponsePropertiesCasesWebhook) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponsePropertiesCasesWebhook) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponsePropertiesCasesWebhook(val *ConnectorResponsePropertiesCasesWebhook) *NullableConnectorResponsePropertiesCasesWebhook { + return &NullableConnectorResponsePropertiesCasesWebhook{value: val, isSet: true} +} + +func (v NullableConnectorResponsePropertiesCasesWebhook) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponsePropertiesCasesWebhook) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_response_properties_email.go b/generated/kibanaactions/model_connector_response_properties_email.go new file mode 100644 index 000000000..3bca15cc6 --- /dev/null +++ b/generated/kibanaactions/model_connector_response_properties_email.go @@ -0,0 +1,293 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConnectorResponsePropertiesEmail type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorResponsePropertiesEmail{} + +// ConnectorResponsePropertiesEmail struct for ConnectorResponsePropertiesEmail +type ConnectorResponsePropertiesEmail struct { + // Defines properties for connectors when type is `.email`. + Config map[string]interface{} `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The identifier for the connector. + Id string `json:"id"` + // Indicates whether the connector type is deprecated. + IsDeprecated bool `json:"is_deprecated"` + // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` + // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured bool `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewConnectorResponsePropertiesEmail instantiates a new ConnectorResponsePropertiesEmail object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorResponsePropertiesEmail(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesEmail { + this := ConnectorResponsePropertiesEmail{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Id = id + this.IsDeprecated = isDeprecated + this.IsPreconfigured = isPreconfigured + this.Name = name + return &this +} + +// NewConnectorResponsePropertiesEmailWithDefaults instantiates a new ConnectorResponsePropertiesEmail object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorResponsePropertiesEmailWithDefaults() *ConnectorResponsePropertiesEmail { + this := ConnectorResponsePropertiesEmail{} + return &this +} + +// GetConfig returns the Config field value +func (o *ConnectorResponsePropertiesEmail) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesEmail) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *ConnectorResponsePropertiesEmail) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *ConnectorResponsePropertiesEmail) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesEmail) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *ConnectorResponsePropertiesEmail) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetId returns the Id field value +func (o *ConnectorResponsePropertiesEmail) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesEmail) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ConnectorResponsePropertiesEmail) SetId(v string) { + o.Id = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *ConnectorResponsePropertiesEmail) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesEmail) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *ConnectorResponsePropertiesEmail) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *ConnectorResponsePropertiesEmail) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesEmail) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *ConnectorResponsePropertiesEmail) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *ConnectorResponsePropertiesEmail) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value +func (o *ConnectorResponsePropertiesEmail) GetIsPreconfigured() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesEmail) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPreconfigured, true +} + +// SetIsPreconfigured sets field value +func (o *ConnectorResponsePropertiesEmail) SetIsPreconfigured(v bool) { + o.IsPreconfigured = v +} + +// GetName returns the Name field value +func (o *ConnectorResponsePropertiesEmail) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesEmail) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorResponsePropertiesEmail) SetName(v string) { + o.Name = v +} + +func (o ConnectorResponsePropertiesEmail) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorResponsePropertiesEmail) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["id"] = o.Id + toSerialize["is_deprecated"] = o.IsDeprecated + if !IsNil(o.IsMissingSecrets) { + toSerialize["is_missing_secrets"] = o.IsMissingSecrets + } + toSerialize["is_preconfigured"] = o.IsPreconfigured + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableConnectorResponsePropertiesEmail struct { + value *ConnectorResponsePropertiesEmail + isSet bool +} + +func (v NullableConnectorResponsePropertiesEmail) Get() *ConnectorResponsePropertiesEmail { + return v.value +} + +func (v *NullableConnectorResponsePropertiesEmail) Set(val *ConnectorResponsePropertiesEmail) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponsePropertiesEmail) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponsePropertiesEmail) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponsePropertiesEmail(val *ConnectorResponsePropertiesEmail) *NullableConnectorResponsePropertiesEmail { + return &NullableConnectorResponsePropertiesEmail{value: val, isSet: true} +} + +func (v NullableConnectorResponsePropertiesEmail) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponsePropertiesEmail) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_response_properties_index.go b/generated/kibanaactions/model_connector_response_properties_index.go new file mode 100644 index 000000000..b02b655a0 --- /dev/null +++ b/generated/kibanaactions/model_connector_response_properties_index.go @@ -0,0 +1,292 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConnectorResponsePropertiesIndex type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorResponsePropertiesIndex{} + +// ConnectorResponsePropertiesIndex struct for ConnectorResponsePropertiesIndex +type ConnectorResponsePropertiesIndex struct { + Config ConfigPropertiesIndex `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The identifier for the connector. + Id string `json:"id"` + // Indicates whether the connector type is deprecated. + IsDeprecated bool `json:"is_deprecated"` + // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` + // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured bool `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewConnectorResponsePropertiesIndex instantiates a new ConnectorResponsePropertiesIndex object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorResponsePropertiesIndex(config ConfigPropertiesIndex, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesIndex { + this := ConnectorResponsePropertiesIndex{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Id = id + this.IsDeprecated = isDeprecated + this.IsPreconfigured = isPreconfigured + this.Name = name + return &this +} + +// NewConnectorResponsePropertiesIndexWithDefaults instantiates a new ConnectorResponsePropertiesIndex object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorResponsePropertiesIndexWithDefaults() *ConnectorResponsePropertiesIndex { + this := ConnectorResponsePropertiesIndex{} + return &this +} + +// GetConfig returns the Config field value +func (o *ConnectorResponsePropertiesIndex) GetConfig() ConfigPropertiesIndex { + if o == nil { + var ret ConfigPropertiesIndex + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesIndex) GetConfigOk() (*ConfigPropertiesIndex, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *ConnectorResponsePropertiesIndex) SetConfig(v ConfigPropertiesIndex) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *ConnectorResponsePropertiesIndex) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesIndex) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *ConnectorResponsePropertiesIndex) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetId returns the Id field value +func (o *ConnectorResponsePropertiesIndex) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesIndex) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ConnectorResponsePropertiesIndex) SetId(v string) { + o.Id = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *ConnectorResponsePropertiesIndex) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesIndex) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *ConnectorResponsePropertiesIndex) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *ConnectorResponsePropertiesIndex) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesIndex) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *ConnectorResponsePropertiesIndex) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *ConnectorResponsePropertiesIndex) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value +func (o *ConnectorResponsePropertiesIndex) GetIsPreconfigured() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesIndex) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPreconfigured, true +} + +// SetIsPreconfigured sets field value +func (o *ConnectorResponsePropertiesIndex) SetIsPreconfigured(v bool) { + o.IsPreconfigured = v +} + +// GetName returns the Name field value +func (o *ConnectorResponsePropertiesIndex) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesIndex) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorResponsePropertiesIndex) SetName(v string) { + o.Name = v +} + +func (o ConnectorResponsePropertiesIndex) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorResponsePropertiesIndex) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["id"] = o.Id + toSerialize["is_deprecated"] = o.IsDeprecated + if !IsNil(o.IsMissingSecrets) { + toSerialize["is_missing_secrets"] = o.IsMissingSecrets + } + toSerialize["is_preconfigured"] = o.IsPreconfigured + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableConnectorResponsePropertiesIndex struct { + value *ConnectorResponsePropertiesIndex + isSet bool +} + +func (v NullableConnectorResponsePropertiesIndex) Get() *ConnectorResponsePropertiesIndex { + return v.value +} + +func (v *NullableConnectorResponsePropertiesIndex) Set(val *ConnectorResponsePropertiesIndex) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponsePropertiesIndex) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponsePropertiesIndex) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponsePropertiesIndex(val *ConnectorResponsePropertiesIndex) *NullableConnectorResponsePropertiesIndex { + return &NullableConnectorResponsePropertiesIndex{value: val, isSet: true} +} + +func (v NullableConnectorResponsePropertiesIndex) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponsePropertiesIndex) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_response_properties_jira.go b/generated/kibanaactions/model_connector_response_properties_jira.go new file mode 100644 index 000000000..fe00c61b1 --- /dev/null +++ b/generated/kibanaactions/model_connector_response_properties_jira.go @@ -0,0 +1,292 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConnectorResponsePropertiesJira type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorResponsePropertiesJira{} + +// ConnectorResponsePropertiesJira struct for ConnectorResponsePropertiesJira +type ConnectorResponsePropertiesJira struct { + Config ConfigPropertiesJira `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The identifier for the connector. + Id string `json:"id"` + // Indicates whether the connector type is deprecated. + IsDeprecated bool `json:"is_deprecated"` + // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` + // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured bool `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewConnectorResponsePropertiesJira instantiates a new ConnectorResponsePropertiesJira object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorResponsePropertiesJira(config ConfigPropertiesJira, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesJira { + this := ConnectorResponsePropertiesJira{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Id = id + this.IsDeprecated = isDeprecated + this.IsPreconfigured = isPreconfigured + this.Name = name + return &this +} + +// NewConnectorResponsePropertiesJiraWithDefaults instantiates a new ConnectorResponsePropertiesJira object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorResponsePropertiesJiraWithDefaults() *ConnectorResponsePropertiesJira { + this := ConnectorResponsePropertiesJira{} + return &this +} + +// GetConfig returns the Config field value +func (o *ConnectorResponsePropertiesJira) GetConfig() ConfigPropertiesJira { + if o == nil { + var ret ConfigPropertiesJira + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesJira) GetConfigOk() (*ConfigPropertiesJira, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *ConnectorResponsePropertiesJira) SetConfig(v ConfigPropertiesJira) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *ConnectorResponsePropertiesJira) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesJira) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *ConnectorResponsePropertiesJira) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetId returns the Id field value +func (o *ConnectorResponsePropertiesJira) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesJira) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ConnectorResponsePropertiesJira) SetId(v string) { + o.Id = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *ConnectorResponsePropertiesJira) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesJira) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *ConnectorResponsePropertiesJira) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *ConnectorResponsePropertiesJira) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesJira) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *ConnectorResponsePropertiesJira) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *ConnectorResponsePropertiesJira) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value +func (o *ConnectorResponsePropertiesJira) GetIsPreconfigured() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesJira) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPreconfigured, true +} + +// SetIsPreconfigured sets field value +func (o *ConnectorResponsePropertiesJira) SetIsPreconfigured(v bool) { + o.IsPreconfigured = v +} + +// GetName returns the Name field value +func (o *ConnectorResponsePropertiesJira) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesJira) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorResponsePropertiesJira) SetName(v string) { + o.Name = v +} + +func (o ConnectorResponsePropertiesJira) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorResponsePropertiesJira) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["id"] = o.Id + toSerialize["is_deprecated"] = o.IsDeprecated + if !IsNil(o.IsMissingSecrets) { + toSerialize["is_missing_secrets"] = o.IsMissingSecrets + } + toSerialize["is_preconfigured"] = o.IsPreconfigured + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableConnectorResponsePropertiesJira struct { + value *ConnectorResponsePropertiesJira + isSet bool +} + +func (v NullableConnectorResponsePropertiesJira) Get() *ConnectorResponsePropertiesJira { + return v.value +} + +func (v *NullableConnectorResponsePropertiesJira) Set(val *ConnectorResponsePropertiesJira) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponsePropertiesJira) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponsePropertiesJira) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponsePropertiesJira(val *ConnectorResponsePropertiesJira) *NullableConnectorResponsePropertiesJira { + return &NullableConnectorResponsePropertiesJira{value: val, isSet: true} +} + +func (v NullableConnectorResponsePropertiesJira) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponsePropertiesJira) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_response_properties_opsgenie.go b/generated/kibanaactions/model_connector_response_properties_opsgenie.go new file mode 100644 index 000000000..476a42867 --- /dev/null +++ b/generated/kibanaactions/model_connector_response_properties_opsgenie.go @@ -0,0 +1,292 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConnectorResponsePropertiesOpsgenie type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorResponsePropertiesOpsgenie{} + +// ConnectorResponsePropertiesOpsgenie struct for ConnectorResponsePropertiesOpsgenie +type ConnectorResponsePropertiesOpsgenie struct { + Config ConfigPropertiesOpsgenie `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The identifier for the connector. + Id string `json:"id"` + // Indicates whether the connector type is deprecated. + IsDeprecated bool `json:"is_deprecated"` + // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` + // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured bool `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewConnectorResponsePropertiesOpsgenie instantiates a new ConnectorResponsePropertiesOpsgenie object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorResponsePropertiesOpsgenie(config ConfigPropertiesOpsgenie, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesOpsgenie { + this := ConnectorResponsePropertiesOpsgenie{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Id = id + this.IsDeprecated = isDeprecated + this.IsPreconfigured = isPreconfigured + this.Name = name + return &this +} + +// NewConnectorResponsePropertiesOpsgenieWithDefaults instantiates a new ConnectorResponsePropertiesOpsgenie object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorResponsePropertiesOpsgenieWithDefaults() *ConnectorResponsePropertiesOpsgenie { + this := ConnectorResponsePropertiesOpsgenie{} + return &this +} + +// GetConfig returns the Config field value +func (o *ConnectorResponsePropertiesOpsgenie) GetConfig() ConfigPropertiesOpsgenie { + if o == nil { + var ret ConfigPropertiesOpsgenie + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesOpsgenie) GetConfigOk() (*ConfigPropertiesOpsgenie, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *ConnectorResponsePropertiesOpsgenie) SetConfig(v ConfigPropertiesOpsgenie) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *ConnectorResponsePropertiesOpsgenie) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesOpsgenie) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *ConnectorResponsePropertiesOpsgenie) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetId returns the Id field value +func (o *ConnectorResponsePropertiesOpsgenie) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesOpsgenie) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ConnectorResponsePropertiesOpsgenie) SetId(v string) { + o.Id = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *ConnectorResponsePropertiesOpsgenie) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesOpsgenie) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *ConnectorResponsePropertiesOpsgenie) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *ConnectorResponsePropertiesOpsgenie) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesOpsgenie) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *ConnectorResponsePropertiesOpsgenie) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *ConnectorResponsePropertiesOpsgenie) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value +func (o *ConnectorResponsePropertiesOpsgenie) GetIsPreconfigured() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesOpsgenie) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPreconfigured, true +} + +// SetIsPreconfigured sets field value +func (o *ConnectorResponsePropertiesOpsgenie) SetIsPreconfigured(v bool) { + o.IsPreconfigured = v +} + +// GetName returns the Name field value +func (o *ConnectorResponsePropertiesOpsgenie) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesOpsgenie) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorResponsePropertiesOpsgenie) SetName(v string) { + o.Name = v +} + +func (o ConnectorResponsePropertiesOpsgenie) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorResponsePropertiesOpsgenie) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["id"] = o.Id + toSerialize["is_deprecated"] = o.IsDeprecated + if !IsNil(o.IsMissingSecrets) { + toSerialize["is_missing_secrets"] = o.IsMissingSecrets + } + toSerialize["is_preconfigured"] = o.IsPreconfigured + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableConnectorResponsePropertiesOpsgenie struct { + value *ConnectorResponsePropertiesOpsgenie + isSet bool +} + +func (v NullableConnectorResponsePropertiesOpsgenie) Get() *ConnectorResponsePropertiesOpsgenie { + return v.value +} + +func (v *NullableConnectorResponsePropertiesOpsgenie) Set(val *ConnectorResponsePropertiesOpsgenie) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponsePropertiesOpsgenie) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponsePropertiesOpsgenie) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponsePropertiesOpsgenie(val *ConnectorResponsePropertiesOpsgenie) *NullableConnectorResponsePropertiesOpsgenie { + return &NullableConnectorResponsePropertiesOpsgenie{value: val, isSet: true} +} + +func (v NullableConnectorResponsePropertiesOpsgenie) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponsePropertiesOpsgenie) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_response_properties_pagerduty.go b/generated/kibanaactions/model_connector_response_properties_pagerduty.go new file mode 100644 index 000000000..101dfbf60 --- /dev/null +++ b/generated/kibanaactions/model_connector_response_properties_pagerduty.go @@ -0,0 +1,293 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConnectorResponsePropertiesPagerduty type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorResponsePropertiesPagerduty{} + +// ConnectorResponsePropertiesPagerduty struct for ConnectorResponsePropertiesPagerduty +type ConnectorResponsePropertiesPagerduty struct { + // Defines properties for connectors when type is `.pagerduty`. + Config map[string]interface{} `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The identifier for the connector. + Id string `json:"id"` + // Indicates whether the connector type is deprecated. + IsDeprecated bool `json:"is_deprecated"` + // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` + // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured bool `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewConnectorResponsePropertiesPagerduty instantiates a new ConnectorResponsePropertiesPagerduty object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorResponsePropertiesPagerduty(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesPagerduty { + this := ConnectorResponsePropertiesPagerduty{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Id = id + this.IsDeprecated = isDeprecated + this.IsPreconfigured = isPreconfigured + this.Name = name + return &this +} + +// NewConnectorResponsePropertiesPagerdutyWithDefaults instantiates a new ConnectorResponsePropertiesPagerduty object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorResponsePropertiesPagerdutyWithDefaults() *ConnectorResponsePropertiesPagerduty { + this := ConnectorResponsePropertiesPagerduty{} + return &this +} + +// GetConfig returns the Config field value +func (o *ConnectorResponsePropertiesPagerduty) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesPagerduty) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *ConnectorResponsePropertiesPagerduty) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *ConnectorResponsePropertiesPagerduty) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesPagerduty) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *ConnectorResponsePropertiesPagerduty) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetId returns the Id field value +func (o *ConnectorResponsePropertiesPagerduty) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesPagerduty) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ConnectorResponsePropertiesPagerduty) SetId(v string) { + o.Id = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *ConnectorResponsePropertiesPagerduty) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesPagerduty) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *ConnectorResponsePropertiesPagerduty) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *ConnectorResponsePropertiesPagerduty) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesPagerduty) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *ConnectorResponsePropertiesPagerduty) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *ConnectorResponsePropertiesPagerduty) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value +func (o *ConnectorResponsePropertiesPagerduty) GetIsPreconfigured() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesPagerduty) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPreconfigured, true +} + +// SetIsPreconfigured sets field value +func (o *ConnectorResponsePropertiesPagerduty) SetIsPreconfigured(v bool) { + o.IsPreconfigured = v +} + +// GetName returns the Name field value +func (o *ConnectorResponsePropertiesPagerduty) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesPagerduty) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorResponsePropertiesPagerduty) SetName(v string) { + o.Name = v +} + +func (o ConnectorResponsePropertiesPagerduty) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorResponsePropertiesPagerduty) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["id"] = o.Id + toSerialize["is_deprecated"] = o.IsDeprecated + if !IsNil(o.IsMissingSecrets) { + toSerialize["is_missing_secrets"] = o.IsMissingSecrets + } + toSerialize["is_preconfigured"] = o.IsPreconfigured + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableConnectorResponsePropertiesPagerduty struct { + value *ConnectorResponsePropertiesPagerduty + isSet bool +} + +func (v NullableConnectorResponsePropertiesPagerduty) Get() *ConnectorResponsePropertiesPagerduty { + return v.value +} + +func (v *NullableConnectorResponsePropertiesPagerduty) Set(val *ConnectorResponsePropertiesPagerduty) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponsePropertiesPagerduty) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponsePropertiesPagerduty) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponsePropertiesPagerduty(val *ConnectorResponsePropertiesPagerduty) *NullableConnectorResponsePropertiesPagerduty { + return &NullableConnectorResponsePropertiesPagerduty{value: val, isSet: true} +} + +func (v NullableConnectorResponsePropertiesPagerduty) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponsePropertiesPagerduty) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_response_properties_resilient.go b/generated/kibanaactions/model_connector_response_properties_resilient.go new file mode 100644 index 000000000..de9ebb696 --- /dev/null +++ b/generated/kibanaactions/model_connector_response_properties_resilient.go @@ -0,0 +1,292 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConnectorResponsePropertiesResilient type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorResponsePropertiesResilient{} + +// ConnectorResponsePropertiesResilient struct for ConnectorResponsePropertiesResilient +type ConnectorResponsePropertiesResilient struct { + Config ConfigPropertiesResilient `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The identifier for the connector. + Id string `json:"id"` + // Indicates whether the connector type is deprecated. + IsDeprecated bool `json:"is_deprecated"` + // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` + // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured bool `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewConnectorResponsePropertiesResilient instantiates a new ConnectorResponsePropertiesResilient object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorResponsePropertiesResilient(config ConfigPropertiesResilient, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesResilient { + this := ConnectorResponsePropertiesResilient{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Id = id + this.IsDeprecated = isDeprecated + this.IsPreconfigured = isPreconfigured + this.Name = name + return &this +} + +// NewConnectorResponsePropertiesResilientWithDefaults instantiates a new ConnectorResponsePropertiesResilient object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorResponsePropertiesResilientWithDefaults() *ConnectorResponsePropertiesResilient { + this := ConnectorResponsePropertiesResilient{} + return &this +} + +// GetConfig returns the Config field value +func (o *ConnectorResponsePropertiesResilient) GetConfig() ConfigPropertiesResilient { + if o == nil { + var ret ConfigPropertiesResilient + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesResilient) GetConfigOk() (*ConfigPropertiesResilient, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *ConnectorResponsePropertiesResilient) SetConfig(v ConfigPropertiesResilient) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *ConnectorResponsePropertiesResilient) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesResilient) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *ConnectorResponsePropertiesResilient) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetId returns the Id field value +func (o *ConnectorResponsePropertiesResilient) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesResilient) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ConnectorResponsePropertiesResilient) SetId(v string) { + o.Id = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *ConnectorResponsePropertiesResilient) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesResilient) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *ConnectorResponsePropertiesResilient) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *ConnectorResponsePropertiesResilient) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesResilient) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *ConnectorResponsePropertiesResilient) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *ConnectorResponsePropertiesResilient) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value +func (o *ConnectorResponsePropertiesResilient) GetIsPreconfigured() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesResilient) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPreconfigured, true +} + +// SetIsPreconfigured sets field value +func (o *ConnectorResponsePropertiesResilient) SetIsPreconfigured(v bool) { + o.IsPreconfigured = v +} + +// GetName returns the Name field value +func (o *ConnectorResponsePropertiesResilient) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesResilient) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorResponsePropertiesResilient) SetName(v string) { + o.Name = v +} + +func (o ConnectorResponsePropertiesResilient) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorResponsePropertiesResilient) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["id"] = o.Id + toSerialize["is_deprecated"] = o.IsDeprecated + if !IsNil(o.IsMissingSecrets) { + toSerialize["is_missing_secrets"] = o.IsMissingSecrets + } + toSerialize["is_preconfigured"] = o.IsPreconfigured + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableConnectorResponsePropertiesResilient struct { + value *ConnectorResponsePropertiesResilient + isSet bool +} + +func (v NullableConnectorResponsePropertiesResilient) Get() *ConnectorResponsePropertiesResilient { + return v.value +} + +func (v *NullableConnectorResponsePropertiesResilient) Set(val *ConnectorResponsePropertiesResilient) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponsePropertiesResilient) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponsePropertiesResilient) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponsePropertiesResilient(val *ConnectorResponsePropertiesResilient) *NullableConnectorResponsePropertiesResilient { + return &NullableConnectorResponsePropertiesResilient{value: val, isSet: true} +} + +func (v NullableConnectorResponsePropertiesResilient) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponsePropertiesResilient) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_response_properties_serverlog.go b/generated/kibanaactions/model_connector_response_properties_serverlog.go new file mode 100644 index 000000000..9c0be92e1 --- /dev/null +++ b/generated/kibanaactions/model_connector_response_properties_serverlog.go @@ -0,0 +1,296 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConnectorResponsePropertiesServerlog type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorResponsePropertiesServerlog{} + +// ConnectorResponsePropertiesServerlog struct for ConnectorResponsePropertiesServerlog +type ConnectorResponsePropertiesServerlog struct { + Config map[string]interface{} `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The identifier for the connector. + Id string `json:"id"` + // Indicates whether the connector type is deprecated. + IsDeprecated bool `json:"is_deprecated"` + // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` + // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured bool `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewConnectorResponsePropertiesServerlog instantiates a new ConnectorResponsePropertiesServerlog object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorResponsePropertiesServerlog(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesServerlog { + this := ConnectorResponsePropertiesServerlog{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Id = id + this.IsDeprecated = isDeprecated + this.IsPreconfigured = isPreconfigured + this.Name = name + return &this +} + +// NewConnectorResponsePropertiesServerlogWithDefaults instantiates a new ConnectorResponsePropertiesServerlog object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorResponsePropertiesServerlogWithDefaults() *ConnectorResponsePropertiesServerlog { + this := ConnectorResponsePropertiesServerlog{} + return &this +} + +// GetConfig returns the Config field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *ConnectorResponsePropertiesServerlog) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ConnectorResponsePropertiesServerlog) GetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Config) { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *ConnectorResponsePropertiesServerlog) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *ConnectorResponsePropertiesServerlog) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServerlog) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *ConnectorResponsePropertiesServerlog) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetId returns the Id field value +func (o *ConnectorResponsePropertiesServerlog) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServerlog) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ConnectorResponsePropertiesServerlog) SetId(v string) { + o.Id = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *ConnectorResponsePropertiesServerlog) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServerlog) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *ConnectorResponsePropertiesServerlog) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *ConnectorResponsePropertiesServerlog) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServerlog) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *ConnectorResponsePropertiesServerlog) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *ConnectorResponsePropertiesServerlog) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value +func (o *ConnectorResponsePropertiesServerlog) GetIsPreconfigured() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServerlog) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPreconfigured, true +} + +// SetIsPreconfigured sets field value +func (o *ConnectorResponsePropertiesServerlog) SetIsPreconfigured(v bool) { + o.IsPreconfigured = v +} + +// GetName returns the Name field value +func (o *ConnectorResponsePropertiesServerlog) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServerlog) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorResponsePropertiesServerlog) SetName(v string) { + o.Name = v +} + +func (o ConnectorResponsePropertiesServerlog) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorResponsePropertiesServerlog) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Config != nil { + toSerialize["config"] = o.Config + } + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["id"] = o.Id + toSerialize["is_deprecated"] = o.IsDeprecated + if !IsNil(o.IsMissingSecrets) { + toSerialize["is_missing_secrets"] = o.IsMissingSecrets + } + toSerialize["is_preconfigured"] = o.IsPreconfigured + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableConnectorResponsePropertiesServerlog struct { + value *ConnectorResponsePropertiesServerlog + isSet bool +} + +func (v NullableConnectorResponsePropertiesServerlog) Get() *ConnectorResponsePropertiesServerlog { + return v.value +} + +func (v *NullableConnectorResponsePropertiesServerlog) Set(val *ConnectorResponsePropertiesServerlog) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponsePropertiesServerlog) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponsePropertiesServerlog) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponsePropertiesServerlog(val *ConnectorResponsePropertiesServerlog) *NullableConnectorResponsePropertiesServerlog { + return &NullableConnectorResponsePropertiesServerlog{value: val, isSet: true} +} + +func (v NullableConnectorResponsePropertiesServerlog) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponsePropertiesServerlog) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_response_properties_servicenow.go b/generated/kibanaactions/model_connector_response_properties_servicenow.go new file mode 100644 index 000000000..d1dab1332 --- /dev/null +++ b/generated/kibanaactions/model_connector_response_properties_servicenow.go @@ -0,0 +1,292 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConnectorResponsePropertiesServicenow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorResponsePropertiesServicenow{} + +// ConnectorResponsePropertiesServicenow struct for ConnectorResponsePropertiesServicenow +type ConnectorResponsePropertiesServicenow struct { + Config ConfigPropertiesServicenow `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The identifier for the connector. + Id string `json:"id"` + // Indicates whether the connector type is deprecated. + IsDeprecated bool `json:"is_deprecated"` + // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` + // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured bool `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewConnectorResponsePropertiesServicenow instantiates a new ConnectorResponsePropertiesServicenow object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorResponsePropertiesServicenow(config ConfigPropertiesServicenow, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesServicenow { + this := ConnectorResponsePropertiesServicenow{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Id = id + this.IsDeprecated = isDeprecated + this.IsPreconfigured = isPreconfigured + this.Name = name + return &this +} + +// NewConnectorResponsePropertiesServicenowWithDefaults instantiates a new ConnectorResponsePropertiesServicenow object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorResponsePropertiesServicenowWithDefaults() *ConnectorResponsePropertiesServicenow { + this := ConnectorResponsePropertiesServicenow{} + return &this +} + +// GetConfig returns the Config field value +func (o *ConnectorResponsePropertiesServicenow) GetConfig() ConfigPropertiesServicenow { + if o == nil { + var ret ConfigPropertiesServicenow + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenow) GetConfigOk() (*ConfigPropertiesServicenow, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *ConnectorResponsePropertiesServicenow) SetConfig(v ConfigPropertiesServicenow) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *ConnectorResponsePropertiesServicenow) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenow) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *ConnectorResponsePropertiesServicenow) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetId returns the Id field value +func (o *ConnectorResponsePropertiesServicenow) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenow) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ConnectorResponsePropertiesServicenow) SetId(v string) { + o.Id = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *ConnectorResponsePropertiesServicenow) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenow) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *ConnectorResponsePropertiesServicenow) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *ConnectorResponsePropertiesServicenow) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenow) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *ConnectorResponsePropertiesServicenow) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *ConnectorResponsePropertiesServicenow) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value +func (o *ConnectorResponsePropertiesServicenow) GetIsPreconfigured() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenow) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPreconfigured, true +} + +// SetIsPreconfigured sets field value +func (o *ConnectorResponsePropertiesServicenow) SetIsPreconfigured(v bool) { + o.IsPreconfigured = v +} + +// GetName returns the Name field value +func (o *ConnectorResponsePropertiesServicenow) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenow) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorResponsePropertiesServicenow) SetName(v string) { + o.Name = v +} + +func (o ConnectorResponsePropertiesServicenow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorResponsePropertiesServicenow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["id"] = o.Id + toSerialize["is_deprecated"] = o.IsDeprecated + if !IsNil(o.IsMissingSecrets) { + toSerialize["is_missing_secrets"] = o.IsMissingSecrets + } + toSerialize["is_preconfigured"] = o.IsPreconfigured + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableConnectorResponsePropertiesServicenow struct { + value *ConnectorResponsePropertiesServicenow + isSet bool +} + +func (v NullableConnectorResponsePropertiesServicenow) Get() *ConnectorResponsePropertiesServicenow { + return v.value +} + +func (v *NullableConnectorResponsePropertiesServicenow) Set(val *ConnectorResponsePropertiesServicenow) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponsePropertiesServicenow) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponsePropertiesServicenow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponsePropertiesServicenow(val *ConnectorResponsePropertiesServicenow) *NullableConnectorResponsePropertiesServicenow { + return &NullableConnectorResponsePropertiesServicenow{value: val, isSet: true} +} + +func (v NullableConnectorResponsePropertiesServicenow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponsePropertiesServicenow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_response_properties_servicenow_itom.go b/generated/kibanaactions/model_connector_response_properties_servicenow_itom.go new file mode 100644 index 000000000..fffdfa152 --- /dev/null +++ b/generated/kibanaactions/model_connector_response_properties_servicenow_itom.go @@ -0,0 +1,292 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConnectorResponsePropertiesServicenowItom type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorResponsePropertiesServicenowItom{} + +// ConnectorResponsePropertiesServicenowItom struct for ConnectorResponsePropertiesServicenowItom +type ConnectorResponsePropertiesServicenowItom struct { + Config ConfigPropertiesServicenowItom `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The identifier for the connector. + Id string `json:"id"` + // Indicates whether the connector type is deprecated. + IsDeprecated bool `json:"is_deprecated"` + // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` + // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured bool `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewConnectorResponsePropertiesServicenowItom instantiates a new ConnectorResponsePropertiesServicenowItom object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorResponsePropertiesServicenowItom(config ConfigPropertiesServicenowItom, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesServicenowItom { + this := ConnectorResponsePropertiesServicenowItom{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Id = id + this.IsDeprecated = isDeprecated + this.IsPreconfigured = isPreconfigured + this.Name = name + return &this +} + +// NewConnectorResponsePropertiesServicenowItomWithDefaults instantiates a new ConnectorResponsePropertiesServicenowItom object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorResponsePropertiesServicenowItomWithDefaults() *ConnectorResponsePropertiesServicenowItom { + this := ConnectorResponsePropertiesServicenowItom{} + return &this +} + +// GetConfig returns the Config field value +func (o *ConnectorResponsePropertiesServicenowItom) GetConfig() ConfigPropertiesServicenowItom { + if o == nil { + var ret ConfigPropertiesServicenowItom + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenowItom) GetConfigOk() (*ConfigPropertiesServicenowItom, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *ConnectorResponsePropertiesServicenowItom) SetConfig(v ConfigPropertiesServicenowItom) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *ConnectorResponsePropertiesServicenowItom) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenowItom) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *ConnectorResponsePropertiesServicenowItom) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetId returns the Id field value +func (o *ConnectorResponsePropertiesServicenowItom) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenowItom) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ConnectorResponsePropertiesServicenowItom) SetId(v string) { + o.Id = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *ConnectorResponsePropertiesServicenowItom) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenowItom) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *ConnectorResponsePropertiesServicenowItom) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *ConnectorResponsePropertiesServicenowItom) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenowItom) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *ConnectorResponsePropertiesServicenowItom) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *ConnectorResponsePropertiesServicenowItom) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value +func (o *ConnectorResponsePropertiesServicenowItom) GetIsPreconfigured() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenowItom) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPreconfigured, true +} + +// SetIsPreconfigured sets field value +func (o *ConnectorResponsePropertiesServicenowItom) SetIsPreconfigured(v bool) { + o.IsPreconfigured = v +} + +// GetName returns the Name field value +func (o *ConnectorResponsePropertiesServicenowItom) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenowItom) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorResponsePropertiesServicenowItom) SetName(v string) { + o.Name = v +} + +func (o ConnectorResponsePropertiesServicenowItom) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorResponsePropertiesServicenowItom) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["id"] = o.Id + toSerialize["is_deprecated"] = o.IsDeprecated + if !IsNil(o.IsMissingSecrets) { + toSerialize["is_missing_secrets"] = o.IsMissingSecrets + } + toSerialize["is_preconfigured"] = o.IsPreconfigured + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableConnectorResponsePropertiesServicenowItom struct { + value *ConnectorResponsePropertiesServicenowItom + isSet bool +} + +func (v NullableConnectorResponsePropertiesServicenowItom) Get() *ConnectorResponsePropertiesServicenowItom { + return v.value +} + +func (v *NullableConnectorResponsePropertiesServicenowItom) Set(val *ConnectorResponsePropertiesServicenowItom) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponsePropertiesServicenowItom) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponsePropertiesServicenowItom) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponsePropertiesServicenowItom(val *ConnectorResponsePropertiesServicenowItom) *NullableConnectorResponsePropertiesServicenowItom { + return &NullableConnectorResponsePropertiesServicenowItom{value: val, isSet: true} +} + +func (v NullableConnectorResponsePropertiesServicenowItom) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponsePropertiesServicenowItom) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_response_properties_servicenow_sir.go b/generated/kibanaactions/model_connector_response_properties_servicenow_sir.go new file mode 100644 index 000000000..544f20cf6 --- /dev/null +++ b/generated/kibanaactions/model_connector_response_properties_servicenow_sir.go @@ -0,0 +1,292 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConnectorResponsePropertiesServicenowSir type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorResponsePropertiesServicenowSir{} + +// ConnectorResponsePropertiesServicenowSir struct for ConnectorResponsePropertiesServicenowSir +type ConnectorResponsePropertiesServicenowSir struct { + Config ConfigPropertiesServicenow `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The identifier for the connector. + Id string `json:"id"` + // Indicates whether the connector type is deprecated. + IsDeprecated bool `json:"is_deprecated"` + // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` + // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured bool `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewConnectorResponsePropertiesServicenowSir instantiates a new ConnectorResponsePropertiesServicenowSir object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorResponsePropertiesServicenowSir(config ConfigPropertiesServicenow, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesServicenowSir { + this := ConnectorResponsePropertiesServicenowSir{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Id = id + this.IsDeprecated = isDeprecated + this.IsPreconfigured = isPreconfigured + this.Name = name + return &this +} + +// NewConnectorResponsePropertiesServicenowSirWithDefaults instantiates a new ConnectorResponsePropertiesServicenowSir object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorResponsePropertiesServicenowSirWithDefaults() *ConnectorResponsePropertiesServicenowSir { + this := ConnectorResponsePropertiesServicenowSir{} + return &this +} + +// GetConfig returns the Config field value +func (o *ConnectorResponsePropertiesServicenowSir) GetConfig() ConfigPropertiesServicenow { + if o == nil { + var ret ConfigPropertiesServicenow + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenowSir) GetConfigOk() (*ConfigPropertiesServicenow, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *ConnectorResponsePropertiesServicenowSir) SetConfig(v ConfigPropertiesServicenow) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *ConnectorResponsePropertiesServicenowSir) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenowSir) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *ConnectorResponsePropertiesServicenowSir) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetId returns the Id field value +func (o *ConnectorResponsePropertiesServicenowSir) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenowSir) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ConnectorResponsePropertiesServicenowSir) SetId(v string) { + o.Id = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *ConnectorResponsePropertiesServicenowSir) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenowSir) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *ConnectorResponsePropertiesServicenowSir) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *ConnectorResponsePropertiesServicenowSir) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenowSir) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *ConnectorResponsePropertiesServicenowSir) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *ConnectorResponsePropertiesServicenowSir) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value +func (o *ConnectorResponsePropertiesServicenowSir) GetIsPreconfigured() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenowSir) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPreconfigured, true +} + +// SetIsPreconfigured sets field value +func (o *ConnectorResponsePropertiesServicenowSir) SetIsPreconfigured(v bool) { + o.IsPreconfigured = v +} + +// GetName returns the Name field value +func (o *ConnectorResponsePropertiesServicenowSir) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesServicenowSir) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorResponsePropertiesServicenowSir) SetName(v string) { + o.Name = v +} + +func (o ConnectorResponsePropertiesServicenowSir) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorResponsePropertiesServicenowSir) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["id"] = o.Id + toSerialize["is_deprecated"] = o.IsDeprecated + if !IsNil(o.IsMissingSecrets) { + toSerialize["is_missing_secrets"] = o.IsMissingSecrets + } + toSerialize["is_preconfigured"] = o.IsPreconfigured + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableConnectorResponsePropertiesServicenowSir struct { + value *ConnectorResponsePropertiesServicenowSir + isSet bool +} + +func (v NullableConnectorResponsePropertiesServicenowSir) Get() *ConnectorResponsePropertiesServicenowSir { + return v.value +} + +func (v *NullableConnectorResponsePropertiesServicenowSir) Set(val *ConnectorResponsePropertiesServicenowSir) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponsePropertiesServicenowSir) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponsePropertiesServicenowSir) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponsePropertiesServicenowSir(val *ConnectorResponsePropertiesServicenowSir) *NullableConnectorResponsePropertiesServicenowSir { + return &NullableConnectorResponsePropertiesServicenowSir{value: val, isSet: true} +} + +func (v NullableConnectorResponsePropertiesServicenowSir) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponsePropertiesServicenowSir) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_response_properties_slack.go b/generated/kibanaactions/model_connector_response_properties_slack.go new file mode 100644 index 000000000..340c2b385 --- /dev/null +++ b/generated/kibanaactions/model_connector_response_properties_slack.go @@ -0,0 +1,265 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConnectorResponsePropertiesSlack type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorResponsePropertiesSlack{} + +// ConnectorResponsePropertiesSlack struct for ConnectorResponsePropertiesSlack +type ConnectorResponsePropertiesSlack struct { + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The identifier for the connector. + Id string `json:"id"` + // Indicates whether the connector type is deprecated. + IsDeprecated bool `json:"is_deprecated"` + // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` + // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured bool `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewConnectorResponsePropertiesSlack instantiates a new ConnectorResponsePropertiesSlack object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorResponsePropertiesSlack(connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesSlack { + this := ConnectorResponsePropertiesSlack{} + this.ConnectorTypeId = connectorTypeId + this.Id = id + this.IsDeprecated = isDeprecated + this.IsPreconfigured = isPreconfigured + this.Name = name + return &this +} + +// NewConnectorResponsePropertiesSlackWithDefaults instantiates a new ConnectorResponsePropertiesSlack object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorResponsePropertiesSlackWithDefaults() *ConnectorResponsePropertiesSlack { + this := ConnectorResponsePropertiesSlack{} + return &this +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *ConnectorResponsePropertiesSlack) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesSlack) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *ConnectorResponsePropertiesSlack) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetId returns the Id field value +func (o *ConnectorResponsePropertiesSlack) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesSlack) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ConnectorResponsePropertiesSlack) SetId(v string) { + o.Id = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *ConnectorResponsePropertiesSlack) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesSlack) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *ConnectorResponsePropertiesSlack) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *ConnectorResponsePropertiesSlack) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesSlack) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *ConnectorResponsePropertiesSlack) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *ConnectorResponsePropertiesSlack) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value +func (o *ConnectorResponsePropertiesSlack) GetIsPreconfigured() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesSlack) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPreconfigured, true +} + +// SetIsPreconfigured sets field value +func (o *ConnectorResponsePropertiesSlack) SetIsPreconfigured(v bool) { + o.IsPreconfigured = v +} + +// GetName returns the Name field value +func (o *ConnectorResponsePropertiesSlack) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesSlack) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorResponsePropertiesSlack) SetName(v string) { + o.Name = v +} + +func (o ConnectorResponsePropertiesSlack) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorResponsePropertiesSlack) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["id"] = o.Id + toSerialize["is_deprecated"] = o.IsDeprecated + if !IsNil(o.IsMissingSecrets) { + toSerialize["is_missing_secrets"] = o.IsMissingSecrets + } + toSerialize["is_preconfigured"] = o.IsPreconfigured + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableConnectorResponsePropertiesSlack struct { + value *ConnectorResponsePropertiesSlack + isSet bool +} + +func (v NullableConnectorResponsePropertiesSlack) Get() *ConnectorResponsePropertiesSlack { + return v.value +} + +func (v *NullableConnectorResponsePropertiesSlack) Set(val *ConnectorResponsePropertiesSlack) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponsePropertiesSlack) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponsePropertiesSlack) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponsePropertiesSlack(val *ConnectorResponsePropertiesSlack) *NullableConnectorResponsePropertiesSlack { + return &NullableConnectorResponsePropertiesSlack{value: val, isSet: true} +} + +func (v NullableConnectorResponsePropertiesSlack) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponsePropertiesSlack) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_response_properties_swimlane.go b/generated/kibanaactions/model_connector_response_properties_swimlane.go new file mode 100644 index 000000000..aea61e63d --- /dev/null +++ b/generated/kibanaactions/model_connector_response_properties_swimlane.go @@ -0,0 +1,292 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConnectorResponsePropertiesSwimlane type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorResponsePropertiesSwimlane{} + +// ConnectorResponsePropertiesSwimlane struct for ConnectorResponsePropertiesSwimlane +type ConnectorResponsePropertiesSwimlane struct { + Config ConfigPropertiesSwimlane `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The identifier for the connector. + Id string `json:"id"` + // Indicates whether the connector type is deprecated. + IsDeprecated bool `json:"is_deprecated"` + // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` + // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured bool `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewConnectorResponsePropertiesSwimlane instantiates a new ConnectorResponsePropertiesSwimlane object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorResponsePropertiesSwimlane(config ConfigPropertiesSwimlane, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesSwimlane { + this := ConnectorResponsePropertiesSwimlane{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Id = id + this.IsDeprecated = isDeprecated + this.IsPreconfigured = isPreconfigured + this.Name = name + return &this +} + +// NewConnectorResponsePropertiesSwimlaneWithDefaults instantiates a new ConnectorResponsePropertiesSwimlane object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorResponsePropertiesSwimlaneWithDefaults() *ConnectorResponsePropertiesSwimlane { + this := ConnectorResponsePropertiesSwimlane{} + return &this +} + +// GetConfig returns the Config field value +func (o *ConnectorResponsePropertiesSwimlane) GetConfig() ConfigPropertiesSwimlane { + if o == nil { + var ret ConfigPropertiesSwimlane + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesSwimlane) GetConfigOk() (*ConfigPropertiesSwimlane, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *ConnectorResponsePropertiesSwimlane) SetConfig(v ConfigPropertiesSwimlane) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *ConnectorResponsePropertiesSwimlane) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesSwimlane) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *ConnectorResponsePropertiesSwimlane) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetId returns the Id field value +func (o *ConnectorResponsePropertiesSwimlane) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesSwimlane) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ConnectorResponsePropertiesSwimlane) SetId(v string) { + o.Id = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *ConnectorResponsePropertiesSwimlane) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesSwimlane) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *ConnectorResponsePropertiesSwimlane) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *ConnectorResponsePropertiesSwimlane) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesSwimlane) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *ConnectorResponsePropertiesSwimlane) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *ConnectorResponsePropertiesSwimlane) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value +func (o *ConnectorResponsePropertiesSwimlane) GetIsPreconfigured() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesSwimlane) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPreconfigured, true +} + +// SetIsPreconfigured sets field value +func (o *ConnectorResponsePropertiesSwimlane) SetIsPreconfigured(v bool) { + o.IsPreconfigured = v +} + +// GetName returns the Name field value +func (o *ConnectorResponsePropertiesSwimlane) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesSwimlane) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorResponsePropertiesSwimlane) SetName(v string) { + o.Name = v +} + +func (o ConnectorResponsePropertiesSwimlane) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorResponsePropertiesSwimlane) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["id"] = o.Id + toSerialize["is_deprecated"] = o.IsDeprecated + if !IsNil(o.IsMissingSecrets) { + toSerialize["is_missing_secrets"] = o.IsMissingSecrets + } + toSerialize["is_preconfigured"] = o.IsPreconfigured + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableConnectorResponsePropertiesSwimlane struct { + value *ConnectorResponsePropertiesSwimlane + isSet bool +} + +func (v NullableConnectorResponsePropertiesSwimlane) Get() *ConnectorResponsePropertiesSwimlane { + return v.value +} + +func (v *NullableConnectorResponsePropertiesSwimlane) Set(val *ConnectorResponsePropertiesSwimlane) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponsePropertiesSwimlane) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponsePropertiesSwimlane) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponsePropertiesSwimlane(val *ConnectorResponsePropertiesSwimlane) *NullableConnectorResponsePropertiesSwimlane { + return &NullableConnectorResponsePropertiesSwimlane{value: val, isSet: true} +} + +func (v NullableConnectorResponsePropertiesSwimlane) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponsePropertiesSwimlane) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_response_properties_teams.go b/generated/kibanaactions/model_connector_response_properties_teams.go new file mode 100644 index 000000000..10c2c2f18 --- /dev/null +++ b/generated/kibanaactions/model_connector_response_properties_teams.go @@ -0,0 +1,265 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConnectorResponsePropertiesTeams type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorResponsePropertiesTeams{} + +// ConnectorResponsePropertiesTeams struct for ConnectorResponsePropertiesTeams +type ConnectorResponsePropertiesTeams struct { + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The identifier for the connector. + Id string `json:"id"` + // Indicates whether the connector type is deprecated. + IsDeprecated bool `json:"is_deprecated"` + // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` + // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured bool `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewConnectorResponsePropertiesTeams instantiates a new ConnectorResponsePropertiesTeams object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorResponsePropertiesTeams(connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesTeams { + this := ConnectorResponsePropertiesTeams{} + this.ConnectorTypeId = connectorTypeId + this.Id = id + this.IsDeprecated = isDeprecated + this.IsPreconfigured = isPreconfigured + this.Name = name + return &this +} + +// NewConnectorResponsePropertiesTeamsWithDefaults instantiates a new ConnectorResponsePropertiesTeams object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorResponsePropertiesTeamsWithDefaults() *ConnectorResponsePropertiesTeams { + this := ConnectorResponsePropertiesTeams{} + return &this +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *ConnectorResponsePropertiesTeams) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesTeams) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *ConnectorResponsePropertiesTeams) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetId returns the Id field value +func (o *ConnectorResponsePropertiesTeams) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesTeams) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ConnectorResponsePropertiesTeams) SetId(v string) { + o.Id = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *ConnectorResponsePropertiesTeams) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesTeams) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *ConnectorResponsePropertiesTeams) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *ConnectorResponsePropertiesTeams) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesTeams) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *ConnectorResponsePropertiesTeams) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *ConnectorResponsePropertiesTeams) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value +func (o *ConnectorResponsePropertiesTeams) GetIsPreconfigured() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesTeams) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPreconfigured, true +} + +// SetIsPreconfigured sets field value +func (o *ConnectorResponsePropertiesTeams) SetIsPreconfigured(v bool) { + o.IsPreconfigured = v +} + +// GetName returns the Name field value +func (o *ConnectorResponsePropertiesTeams) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesTeams) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorResponsePropertiesTeams) SetName(v string) { + o.Name = v +} + +func (o ConnectorResponsePropertiesTeams) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorResponsePropertiesTeams) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["id"] = o.Id + toSerialize["is_deprecated"] = o.IsDeprecated + if !IsNil(o.IsMissingSecrets) { + toSerialize["is_missing_secrets"] = o.IsMissingSecrets + } + toSerialize["is_preconfigured"] = o.IsPreconfigured + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableConnectorResponsePropertiesTeams struct { + value *ConnectorResponsePropertiesTeams + isSet bool +} + +func (v NullableConnectorResponsePropertiesTeams) Get() *ConnectorResponsePropertiesTeams { + return v.value +} + +func (v *NullableConnectorResponsePropertiesTeams) Set(val *ConnectorResponsePropertiesTeams) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponsePropertiesTeams) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponsePropertiesTeams) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponsePropertiesTeams(val *ConnectorResponsePropertiesTeams) *NullableConnectorResponsePropertiesTeams { + return &NullableConnectorResponsePropertiesTeams{value: val, isSet: true} +} + +func (v NullableConnectorResponsePropertiesTeams) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponsePropertiesTeams) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_response_properties_tines.go b/generated/kibanaactions/model_connector_response_properties_tines.go new file mode 100644 index 000000000..6de1bf76e --- /dev/null +++ b/generated/kibanaactions/model_connector_response_properties_tines.go @@ -0,0 +1,293 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConnectorResponsePropertiesTines type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorResponsePropertiesTines{} + +// ConnectorResponsePropertiesTines struct for ConnectorResponsePropertiesTines +type ConnectorResponsePropertiesTines struct { + // Defines properties for connectors when type is `.tines`. + Config map[string]interface{} `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The identifier for the connector. + Id string `json:"id"` + // Indicates whether the connector type is deprecated. + IsDeprecated bool `json:"is_deprecated"` + // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` + // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured bool `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewConnectorResponsePropertiesTines instantiates a new ConnectorResponsePropertiesTines object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorResponsePropertiesTines(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesTines { + this := ConnectorResponsePropertiesTines{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Id = id + this.IsDeprecated = isDeprecated + this.IsPreconfigured = isPreconfigured + this.Name = name + return &this +} + +// NewConnectorResponsePropertiesTinesWithDefaults instantiates a new ConnectorResponsePropertiesTines object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorResponsePropertiesTinesWithDefaults() *ConnectorResponsePropertiesTines { + this := ConnectorResponsePropertiesTines{} + return &this +} + +// GetConfig returns the Config field value +func (o *ConnectorResponsePropertiesTines) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesTines) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *ConnectorResponsePropertiesTines) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *ConnectorResponsePropertiesTines) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesTines) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *ConnectorResponsePropertiesTines) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetId returns the Id field value +func (o *ConnectorResponsePropertiesTines) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesTines) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ConnectorResponsePropertiesTines) SetId(v string) { + o.Id = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *ConnectorResponsePropertiesTines) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesTines) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *ConnectorResponsePropertiesTines) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *ConnectorResponsePropertiesTines) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesTines) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *ConnectorResponsePropertiesTines) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *ConnectorResponsePropertiesTines) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value +func (o *ConnectorResponsePropertiesTines) GetIsPreconfigured() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesTines) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPreconfigured, true +} + +// SetIsPreconfigured sets field value +func (o *ConnectorResponsePropertiesTines) SetIsPreconfigured(v bool) { + o.IsPreconfigured = v +} + +// GetName returns the Name field value +func (o *ConnectorResponsePropertiesTines) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesTines) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorResponsePropertiesTines) SetName(v string) { + o.Name = v +} + +func (o ConnectorResponsePropertiesTines) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorResponsePropertiesTines) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["id"] = o.Id + toSerialize["is_deprecated"] = o.IsDeprecated + if !IsNil(o.IsMissingSecrets) { + toSerialize["is_missing_secrets"] = o.IsMissingSecrets + } + toSerialize["is_preconfigured"] = o.IsPreconfigured + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableConnectorResponsePropertiesTines struct { + value *ConnectorResponsePropertiesTines + isSet bool +} + +func (v NullableConnectorResponsePropertiesTines) Get() *ConnectorResponsePropertiesTines { + return v.value +} + +func (v *NullableConnectorResponsePropertiesTines) Set(val *ConnectorResponsePropertiesTines) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponsePropertiesTines) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponsePropertiesTines) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponsePropertiesTines(val *ConnectorResponsePropertiesTines) *NullableConnectorResponsePropertiesTines { + return &NullableConnectorResponsePropertiesTines{value: val, isSet: true} +} + +func (v NullableConnectorResponsePropertiesTines) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponsePropertiesTines) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_response_properties_webhook.go b/generated/kibanaactions/model_connector_response_properties_webhook.go new file mode 100644 index 000000000..9f64f57c1 --- /dev/null +++ b/generated/kibanaactions/model_connector_response_properties_webhook.go @@ -0,0 +1,293 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConnectorResponsePropertiesWebhook type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorResponsePropertiesWebhook{} + +// ConnectorResponsePropertiesWebhook struct for ConnectorResponsePropertiesWebhook +type ConnectorResponsePropertiesWebhook struct { + // Defines properties for connectors when type is `.webhook`. + Config map[string]interface{} `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The identifier for the connector. + Id string `json:"id"` + // Indicates whether the connector type is deprecated. + IsDeprecated bool `json:"is_deprecated"` + // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` + // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured bool `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewConnectorResponsePropertiesWebhook instantiates a new ConnectorResponsePropertiesWebhook object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorResponsePropertiesWebhook(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesWebhook { + this := ConnectorResponsePropertiesWebhook{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Id = id + this.IsDeprecated = isDeprecated + this.IsPreconfigured = isPreconfigured + this.Name = name + return &this +} + +// NewConnectorResponsePropertiesWebhookWithDefaults instantiates a new ConnectorResponsePropertiesWebhook object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorResponsePropertiesWebhookWithDefaults() *ConnectorResponsePropertiesWebhook { + this := ConnectorResponsePropertiesWebhook{} + return &this +} + +// GetConfig returns the Config field value +func (o *ConnectorResponsePropertiesWebhook) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesWebhook) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *ConnectorResponsePropertiesWebhook) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *ConnectorResponsePropertiesWebhook) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesWebhook) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *ConnectorResponsePropertiesWebhook) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetId returns the Id field value +func (o *ConnectorResponsePropertiesWebhook) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesWebhook) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ConnectorResponsePropertiesWebhook) SetId(v string) { + o.Id = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *ConnectorResponsePropertiesWebhook) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesWebhook) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *ConnectorResponsePropertiesWebhook) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *ConnectorResponsePropertiesWebhook) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesWebhook) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *ConnectorResponsePropertiesWebhook) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *ConnectorResponsePropertiesWebhook) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value +func (o *ConnectorResponsePropertiesWebhook) GetIsPreconfigured() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesWebhook) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPreconfigured, true +} + +// SetIsPreconfigured sets field value +func (o *ConnectorResponsePropertiesWebhook) SetIsPreconfigured(v bool) { + o.IsPreconfigured = v +} + +// GetName returns the Name field value +func (o *ConnectorResponsePropertiesWebhook) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesWebhook) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorResponsePropertiesWebhook) SetName(v string) { + o.Name = v +} + +func (o ConnectorResponsePropertiesWebhook) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorResponsePropertiesWebhook) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["id"] = o.Id + toSerialize["is_deprecated"] = o.IsDeprecated + if !IsNil(o.IsMissingSecrets) { + toSerialize["is_missing_secrets"] = o.IsMissingSecrets + } + toSerialize["is_preconfigured"] = o.IsPreconfigured + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableConnectorResponsePropertiesWebhook struct { + value *ConnectorResponsePropertiesWebhook + isSet bool +} + +func (v NullableConnectorResponsePropertiesWebhook) Get() *ConnectorResponsePropertiesWebhook { + return v.value +} + +func (v *NullableConnectorResponsePropertiesWebhook) Set(val *ConnectorResponsePropertiesWebhook) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponsePropertiesWebhook) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponsePropertiesWebhook) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponsePropertiesWebhook(val *ConnectorResponsePropertiesWebhook) *NullableConnectorResponsePropertiesWebhook { + return &NullableConnectorResponsePropertiesWebhook{value: val, isSet: true} +} + +func (v NullableConnectorResponsePropertiesWebhook) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponsePropertiesWebhook) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_response_properties_xmatters.go b/generated/kibanaactions/model_connector_response_properties_xmatters.go new file mode 100644 index 000000000..9b3c42e91 --- /dev/null +++ b/generated/kibanaactions/model_connector_response_properties_xmatters.go @@ -0,0 +1,293 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the ConnectorResponsePropertiesXmatters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorResponsePropertiesXmatters{} + +// ConnectorResponsePropertiesXmatters struct for ConnectorResponsePropertiesXmatters +type ConnectorResponsePropertiesXmatters struct { + // Defines properties for connectors when type is `.xmatters`. + Config map[string]interface{} `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The identifier for the connector. + Id string `json:"id"` + // Indicates whether the connector type is deprecated. + IsDeprecated bool `json:"is_deprecated"` + // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` + // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured bool `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewConnectorResponsePropertiesXmatters instantiates a new ConnectorResponsePropertiesXmatters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorResponsePropertiesXmatters(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesXmatters { + this := ConnectorResponsePropertiesXmatters{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Id = id + this.IsDeprecated = isDeprecated + this.IsPreconfigured = isPreconfigured + this.Name = name + return &this +} + +// NewConnectorResponsePropertiesXmattersWithDefaults instantiates a new ConnectorResponsePropertiesXmatters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorResponsePropertiesXmattersWithDefaults() *ConnectorResponsePropertiesXmatters { + this := ConnectorResponsePropertiesXmatters{} + return &this +} + +// GetConfig returns the Config field value +func (o *ConnectorResponsePropertiesXmatters) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesXmatters) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *ConnectorResponsePropertiesXmatters) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *ConnectorResponsePropertiesXmatters) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesXmatters) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *ConnectorResponsePropertiesXmatters) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetId returns the Id field value +func (o *ConnectorResponsePropertiesXmatters) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesXmatters) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ConnectorResponsePropertiesXmatters) SetId(v string) { + o.Id = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *ConnectorResponsePropertiesXmatters) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesXmatters) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *ConnectorResponsePropertiesXmatters) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *ConnectorResponsePropertiesXmatters) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesXmatters) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *ConnectorResponsePropertiesXmatters) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *ConnectorResponsePropertiesXmatters) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value +func (o *ConnectorResponsePropertiesXmatters) GetIsPreconfigured() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesXmatters) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPreconfigured, true +} + +// SetIsPreconfigured sets field value +func (o *ConnectorResponsePropertiesXmatters) SetIsPreconfigured(v bool) { + o.IsPreconfigured = v +} + +// GetName returns the Name field value +func (o *ConnectorResponsePropertiesXmatters) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponsePropertiesXmatters) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorResponsePropertiesXmatters) SetName(v string) { + o.Name = v +} + +func (o ConnectorResponsePropertiesXmatters) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorResponsePropertiesXmatters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["id"] = o.Id + toSerialize["is_deprecated"] = o.IsDeprecated + if !IsNil(o.IsMissingSecrets) { + toSerialize["is_missing_secrets"] = o.IsMissingSecrets + } + toSerialize["is_preconfigured"] = o.IsPreconfigured + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableConnectorResponsePropertiesXmatters struct { + value *ConnectorResponsePropertiesXmatters + isSet bool +} + +func (v NullableConnectorResponsePropertiesXmatters) Get() *ConnectorResponsePropertiesXmatters { + return v.value +} + +func (v *NullableConnectorResponsePropertiesXmatters) Set(val *ConnectorResponsePropertiesXmatters) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponsePropertiesXmatters) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponsePropertiesXmatters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponsePropertiesXmatters(val *ConnectorResponsePropertiesXmatters) *NullableConnectorResponsePropertiesXmatters { + return &NullableConnectorResponsePropertiesXmatters{value: val, isSet: true} +} + +func (v NullableConnectorResponsePropertiesXmatters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponsePropertiesXmatters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_connector_types.go b/generated/kibanaactions/model_connector_types.go new file mode 100644 index 000000000..e85a4504b --- /dev/null +++ b/generated/kibanaactions/model_connector_types.go @@ -0,0 +1,140 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" + "fmt" +) + +// ConnectorTypes The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`. +type ConnectorTypes string + +// List of connector_types +const ( + CASES_WEBHOOK ConnectorTypes = ".cases-webhook" + EMAIL ConnectorTypes = ".email" + INDEX ConnectorTypes = ".index" + JIRA ConnectorTypes = ".jira" + OPSGENIE ConnectorTypes = ".opsgenie" + PAGERDUTY ConnectorTypes = ".pagerduty" + RESILIENT ConnectorTypes = ".resilient" + SERVICENOW ConnectorTypes = ".servicenow" + SERVICENOW_ITOM ConnectorTypes = ".servicenow-itom" + SERVICENOW_SIR ConnectorTypes = ".servicenow-sir" + SERVER_LOG ConnectorTypes = ".server-log" + SLACK ConnectorTypes = ".slack" + SWIMLANE ConnectorTypes = ".swimlane" + TEAMS ConnectorTypes = ".teams" + TINES ConnectorTypes = ".tines" + WEBHOOK ConnectorTypes = ".webhook" + XMATTERS ConnectorTypes = ".xmatters" +) + +// All allowed values of ConnectorTypes enum +var AllowedConnectorTypesEnumValues = []ConnectorTypes{ + ".cases-webhook", + ".email", + ".index", + ".jira", + ".opsgenie", + ".pagerduty", + ".resilient", + ".servicenow", + ".servicenow-itom", + ".servicenow-sir", + ".server-log", + ".slack", + ".swimlane", + ".teams", + ".tines", + ".webhook", + ".xmatters", +} + +func (v *ConnectorTypes) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ConnectorTypes(value) + for _, existing := range AllowedConnectorTypesEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ConnectorTypes", value) +} + +// NewConnectorTypesFromValue returns a pointer to a valid ConnectorTypes +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewConnectorTypesFromValue(v string) (*ConnectorTypes, error) { + ev := ConnectorTypes(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ConnectorTypes: valid values are %v", v, AllowedConnectorTypesEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ConnectorTypes) IsValid() bool { + for _, existing := range AllowedConnectorTypesEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to connector_types value +func (v ConnectorTypes) Ptr() *ConnectorTypes { + return &v +} + +type NullableConnectorTypes struct { + value *ConnectorTypes + isSet bool +} + +func (v NullableConnectorTypes) Get() *ConnectorTypes { + return v.value +} + +func (v *NullableConnectorTypes) Set(val *ConnectorTypes) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorTypes) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorTypes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorTypes(val *ConnectorTypes) *NullableConnectorTypes { + return &NullableConnectorTypes{value: val, isSet: true} +} + +func (v NullableConnectorTypes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorTypes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_create_connector_request_body_properties.go b/generated/kibanaactions/model_create_connector_request_body_properties.go new file mode 100644 index 000000000..14a27e592 --- /dev/null +++ b/generated/kibanaactions/model_create_connector_request_body_properties.go @@ -0,0 +1,595 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" + "fmt" +) + +// CreateConnectorRequestBodyProperties - The properties vary depending on the connector type. +type CreateConnectorRequestBodyProperties struct { + CreateConnectorRequestCasesWebhook *CreateConnectorRequestCasesWebhook + CreateConnectorRequestEmail *CreateConnectorRequestEmail + CreateConnectorRequestIndex *CreateConnectorRequestIndex + CreateConnectorRequestJira *CreateConnectorRequestJira + CreateConnectorRequestOpsgenie *CreateConnectorRequestOpsgenie + CreateConnectorRequestPagerduty *CreateConnectorRequestPagerduty + CreateConnectorRequestResilient *CreateConnectorRequestResilient + CreateConnectorRequestServerlog *CreateConnectorRequestServerlog + CreateConnectorRequestServicenow *CreateConnectorRequestServicenow + CreateConnectorRequestServicenowItom *CreateConnectorRequestServicenowItom + CreateConnectorRequestServicenowSir *CreateConnectorRequestServicenowSir + CreateConnectorRequestSlack *CreateConnectorRequestSlack + CreateConnectorRequestSwimlane *CreateConnectorRequestSwimlane + CreateConnectorRequestTeams *CreateConnectorRequestTeams + CreateConnectorRequestTines *CreateConnectorRequestTines + CreateConnectorRequestWebhook *CreateConnectorRequestWebhook + CreateConnectorRequestXmatters *CreateConnectorRequestXmatters +} + +// CreateConnectorRequestCasesWebhookAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestCasesWebhook wrapped in CreateConnectorRequestBodyProperties +func CreateConnectorRequestCasesWebhookAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestCasesWebhook) CreateConnectorRequestBodyProperties { + return CreateConnectorRequestBodyProperties{ + CreateConnectorRequestCasesWebhook: v, + } +} + +// CreateConnectorRequestEmailAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestEmail wrapped in CreateConnectorRequestBodyProperties +func CreateConnectorRequestEmailAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestEmail) CreateConnectorRequestBodyProperties { + return CreateConnectorRequestBodyProperties{ + CreateConnectorRequestEmail: v, + } +} + +// CreateConnectorRequestIndexAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestIndex wrapped in CreateConnectorRequestBodyProperties +func CreateConnectorRequestIndexAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestIndex) CreateConnectorRequestBodyProperties { + return CreateConnectorRequestBodyProperties{ + CreateConnectorRequestIndex: v, + } +} + +// CreateConnectorRequestJiraAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestJira wrapped in CreateConnectorRequestBodyProperties +func CreateConnectorRequestJiraAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestJira) CreateConnectorRequestBodyProperties { + return CreateConnectorRequestBodyProperties{ + CreateConnectorRequestJira: v, + } +} + +// CreateConnectorRequestOpsgenieAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestOpsgenie wrapped in CreateConnectorRequestBodyProperties +func CreateConnectorRequestOpsgenieAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestOpsgenie) CreateConnectorRequestBodyProperties { + return CreateConnectorRequestBodyProperties{ + CreateConnectorRequestOpsgenie: v, + } +} + +// CreateConnectorRequestPagerdutyAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestPagerduty wrapped in CreateConnectorRequestBodyProperties +func CreateConnectorRequestPagerdutyAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestPagerduty) CreateConnectorRequestBodyProperties { + return CreateConnectorRequestBodyProperties{ + CreateConnectorRequestPagerduty: v, + } +} + +// CreateConnectorRequestResilientAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestResilient wrapped in CreateConnectorRequestBodyProperties +func CreateConnectorRequestResilientAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestResilient) CreateConnectorRequestBodyProperties { + return CreateConnectorRequestBodyProperties{ + CreateConnectorRequestResilient: v, + } +} + +// CreateConnectorRequestServerlogAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestServerlog wrapped in CreateConnectorRequestBodyProperties +func CreateConnectorRequestServerlogAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestServerlog) CreateConnectorRequestBodyProperties { + return CreateConnectorRequestBodyProperties{ + CreateConnectorRequestServerlog: v, + } +} + +// CreateConnectorRequestServicenowAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestServicenow wrapped in CreateConnectorRequestBodyProperties +func CreateConnectorRequestServicenowAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestServicenow) CreateConnectorRequestBodyProperties { + return CreateConnectorRequestBodyProperties{ + CreateConnectorRequestServicenow: v, + } +} + +// CreateConnectorRequestServicenowItomAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestServicenowItom wrapped in CreateConnectorRequestBodyProperties +func CreateConnectorRequestServicenowItomAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestServicenowItom) CreateConnectorRequestBodyProperties { + return CreateConnectorRequestBodyProperties{ + CreateConnectorRequestServicenowItom: v, + } +} + +// CreateConnectorRequestServicenowSirAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestServicenowSir wrapped in CreateConnectorRequestBodyProperties +func CreateConnectorRequestServicenowSirAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestServicenowSir) CreateConnectorRequestBodyProperties { + return CreateConnectorRequestBodyProperties{ + CreateConnectorRequestServicenowSir: v, + } +} + +// CreateConnectorRequestSlackAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestSlack wrapped in CreateConnectorRequestBodyProperties +func CreateConnectorRequestSlackAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestSlack) CreateConnectorRequestBodyProperties { + return CreateConnectorRequestBodyProperties{ + CreateConnectorRequestSlack: v, + } +} + +// CreateConnectorRequestSwimlaneAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestSwimlane wrapped in CreateConnectorRequestBodyProperties +func CreateConnectorRequestSwimlaneAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestSwimlane) CreateConnectorRequestBodyProperties { + return CreateConnectorRequestBodyProperties{ + CreateConnectorRequestSwimlane: v, + } +} + +// CreateConnectorRequestTeamsAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestTeams wrapped in CreateConnectorRequestBodyProperties +func CreateConnectorRequestTeamsAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestTeams) CreateConnectorRequestBodyProperties { + return CreateConnectorRequestBodyProperties{ + CreateConnectorRequestTeams: v, + } +} + +// CreateConnectorRequestTinesAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestTines wrapped in CreateConnectorRequestBodyProperties +func CreateConnectorRequestTinesAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestTines) CreateConnectorRequestBodyProperties { + return CreateConnectorRequestBodyProperties{ + CreateConnectorRequestTines: v, + } +} + +// CreateConnectorRequestWebhookAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestWebhook wrapped in CreateConnectorRequestBodyProperties +func CreateConnectorRequestWebhookAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestWebhook) CreateConnectorRequestBodyProperties { + return CreateConnectorRequestBodyProperties{ + CreateConnectorRequestWebhook: v, + } +} + +// CreateConnectorRequestXmattersAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestXmatters wrapped in CreateConnectorRequestBodyProperties +func CreateConnectorRequestXmattersAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestXmatters) CreateConnectorRequestBodyProperties { + return CreateConnectorRequestBodyProperties{ + CreateConnectorRequestXmatters: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *CreateConnectorRequestBodyProperties) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into CreateConnectorRequestCasesWebhook + err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestCasesWebhook) + if err == nil { + jsonCreateConnectorRequestCasesWebhook, _ := json.Marshal(dst.CreateConnectorRequestCasesWebhook) + if string(jsonCreateConnectorRequestCasesWebhook) == "{}" { // empty struct + dst.CreateConnectorRequestCasesWebhook = nil + } else { + match++ + } + } else { + dst.CreateConnectorRequestCasesWebhook = nil + } + + // try to unmarshal data into CreateConnectorRequestEmail + err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestEmail) + if err == nil { + jsonCreateConnectorRequestEmail, _ := json.Marshal(dst.CreateConnectorRequestEmail) + if string(jsonCreateConnectorRequestEmail) == "{}" { // empty struct + dst.CreateConnectorRequestEmail = nil + } else { + match++ + } + } else { + dst.CreateConnectorRequestEmail = nil + } + + // try to unmarshal data into CreateConnectorRequestIndex + err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestIndex) + if err == nil { + jsonCreateConnectorRequestIndex, _ := json.Marshal(dst.CreateConnectorRequestIndex) + if string(jsonCreateConnectorRequestIndex) == "{}" { // empty struct + dst.CreateConnectorRequestIndex = nil + } else { + match++ + } + } else { + dst.CreateConnectorRequestIndex = nil + } + + // try to unmarshal data into CreateConnectorRequestJira + err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestJira) + if err == nil { + jsonCreateConnectorRequestJira, _ := json.Marshal(dst.CreateConnectorRequestJira) + if string(jsonCreateConnectorRequestJira) == "{}" { // empty struct + dst.CreateConnectorRequestJira = nil + } else { + match++ + } + } else { + dst.CreateConnectorRequestJira = nil + } + + // try to unmarshal data into CreateConnectorRequestOpsgenie + err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestOpsgenie) + if err == nil { + jsonCreateConnectorRequestOpsgenie, _ := json.Marshal(dst.CreateConnectorRequestOpsgenie) + if string(jsonCreateConnectorRequestOpsgenie) == "{}" { // empty struct + dst.CreateConnectorRequestOpsgenie = nil + } else { + match++ + } + } else { + dst.CreateConnectorRequestOpsgenie = nil + } + + // try to unmarshal data into CreateConnectorRequestPagerduty + err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestPagerduty) + if err == nil { + jsonCreateConnectorRequestPagerduty, _ := json.Marshal(dst.CreateConnectorRequestPagerduty) + if string(jsonCreateConnectorRequestPagerduty) == "{}" { // empty struct + dst.CreateConnectorRequestPagerduty = nil + } else { + match++ + } + } else { + dst.CreateConnectorRequestPagerduty = nil + } + + // try to unmarshal data into CreateConnectorRequestResilient + err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestResilient) + if err == nil { + jsonCreateConnectorRequestResilient, _ := json.Marshal(dst.CreateConnectorRequestResilient) + if string(jsonCreateConnectorRequestResilient) == "{}" { // empty struct + dst.CreateConnectorRequestResilient = nil + } else { + match++ + } + } else { + dst.CreateConnectorRequestResilient = nil + } + + // try to unmarshal data into CreateConnectorRequestServerlog + err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestServerlog) + if err == nil { + jsonCreateConnectorRequestServerlog, _ := json.Marshal(dst.CreateConnectorRequestServerlog) + if string(jsonCreateConnectorRequestServerlog) == "{}" { // empty struct + dst.CreateConnectorRequestServerlog = nil + } else { + match++ + } + } else { + dst.CreateConnectorRequestServerlog = nil + } + + // try to unmarshal data into CreateConnectorRequestServicenow + err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestServicenow) + if err == nil { + jsonCreateConnectorRequestServicenow, _ := json.Marshal(dst.CreateConnectorRequestServicenow) + if string(jsonCreateConnectorRequestServicenow) == "{}" { // empty struct + dst.CreateConnectorRequestServicenow = nil + } else { + match++ + } + } else { + dst.CreateConnectorRequestServicenow = nil + } + + // try to unmarshal data into CreateConnectorRequestServicenowItom + err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestServicenowItom) + if err == nil { + jsonCreateConnectorRequestServicenowItom, _ := json.Marshal(dst.CreateConnectorRequestServicenowItom) + if string(jsonCreateConnectorRequestServicenowItom) == "{}" { // empty struct + dst.CreateConnectorRequestServicenowItom = nil + } else { + match++ + } + } else { + dst.CreateConnectorRequestServicenowItom = nil + } + + // try to unmarshal data into CreateConnectorRequestServicenowSir + err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestServicenowSir) + if err == nil { + jsonCreateConnectorRequestServicenowSir, _ := json.Marshal(dst.CreateConnectorRequestServicenowSir) + if string(jsonCreateConnectorRequestServicenowSir) == "{}" { // empty struct + dst.CreateConnectorRequestServicenowSir = nil + } else { + match++ + } + } else { + dst.CreateConnectorRequestServicenowSir = nil + } + + // try to unmarshal data into CreateConnectorRequestSlack + err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestSlack) + if err == nil { + jsonCreateConnectorRequestSlack, _ := json.Marshal(dst.CreateConnectorRequestSlack) + if string(jsonCreateConnectorRequestSlack) == "{}" { // empty struct + dst.CreateConnectorRequestSlack = nil + } else { + match++ + } + } else { + dst.CreateConnectorRequestSlack = nil + } + + // try to unmarshal data into CreateConnectorRequestSwimlane + err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestSwimlane) + if err == nil { + jsonCreateConnectorRequestSwimlane, _ := json.Marshal(dst.CreateConnectorRequestSwimlane) + if string(jsonCreateConnectorRequestSwimlane) == "{}" { // empty struct + dst.CreateConnectorRequestSwimlane = nil + } else { + match++ + } + } else { + dst.CreateConnectorRequestSwimlane = nil + } + + // try to unmarshal data into CreateConnectorRequestTeams + err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestTeams) + if err == nil { + jsonCreateConnectorRequestTeams, _ := json.Marshal(dst.CreateConnectorRequestTeams) + if string(jsonCreateConnectorRequestTeams) == "{}" { // empty struct + dst.CreateConnectorRequestTeams = nil + } else { + match++ + } + } else { + dst.CreateConnectorRequestTeams = nil + } + + // try to unmarshal data into CreateConnectorRequestTines + err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestTines) + if err == nil { + jsonCreateConnectorRequestTines, _ := json.Marshal(dst.CreateConnectorRequestTines) + if string(jsonCreateConnectorRequestTines) == "{}" { // empty struct + dst.CreateConnectorRequestTines = nil + } else { + match++ + } + } else { + dst.CreateConnectorRequestTines = nil + } + + // try to unmarshal data into CreateConnectorRequestWebhook + err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestWebhook) + if err == nil { + jsonCreateConnectorRequestWebhook, _ := json.Marshal(dst.CreateConnectorRequestWebhook) + if string(jsonCreateConnectorRequestWebhook) == "{}" { // empty struct + dst.CreateConnectorRequestWebhook = nil + } else { + match++ + } + } else { + dst.CreateConnectorRequestWebhook = nil + } + + // try to unmarshal data into CreateConnectorRequestXmatters + err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestXmatters) + if err == nil { + jsonCreateConnectorRequestXmatters, _ := json.Marshal(dst.CreateConnectorRequestXmatters) + if string(jsonCreateConnectorRequestXmatters) == "{}" { // empty struct + dst.CreateConnectorRequestXmatters = nil + } else { + match++ + } + } else { + dst.CreateConnectorRequestXmatters = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.CreateConnectorRequestCasesWebhook = nil + dst.CreateConnectorRequestEmail = nil + dst.CreateConnectorRequestIndex = nil + dst.CreateConnectorRequestJira = nil + dst.CreateConnectorRequestOpsgenie = nil + dst.CreateConnectorRequestPagerduty = nil + dst.CreateConnectorRequestResilient = nil + dst.CreateConnectorRequestServerlog = nil + dst.CreateConnectorRequestServicenow = nil + dst.CreateConnectorRequestServicenowItom = nil + dst.CreateConnectorRequestServicenowSir = nil + dst.CreateConnectorRequestSlack = nil + dst.CreateConnectorRequestSwimlane = nil + dst.CreateConnectorRequestTeams = nil + dst.CreateConnectorRequestTines = nil + dst.CreateConnectorRequestWebhook = nil + dst.CreateConnectorRequestXmatters = nil + + return fmt.Errorf("data matches more than one schema in oneOf(CreateConnectorRequestBodyProperties)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(CreateConnectorRequestBodyProperties)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src CreateConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { + if src.CreateConnectorRequestCasesWebhook != nil { + return json.Marshal(&src.CreateConnectorRequestCasesWebhook) + } + + if src.CreateConnectorRequestEmail != nil { + return json.Marshal(&src.CreateConnectorRequestEmail) + } + + if src.CreateConnectorRequestIndex != nil { + return json.Marshal(&src.CreateConnectorRequestIndex) + } + + if src.CreateConnectorRequestJira != nil { + return json.Marshal(&src.CreateConnectorRequestJira) + } + + if src.CreateConnectorRequestOpsgenie != nil { + return json.Marshal(&src.CreateConnectorRequestOpsgenie) + } + + if src.CreateConnectorRequestPagerduty != nil { + return json.Marshal(&src.CreateConnectorRequestPagerduty) + } + + if src.CreateConnectorRequestResilient != nil { + return json.Marshal(&src.CreateConnectorRequestResilient) + } + + if src.CreateConnectorRequestServerlog != nil { + return json.Marshal(&src.CreateConnectorRequestServerlog) + } + + if src.CreateConnectorRequestServicenow != nil { + return json.Marshal(&src.CreateConnectorRequestServicenow) + } + + if src.CreateConnectorRequestServicenowItom != nil { + return json.Marshal(&src.CreateConnectorRequestServicenowItom) + } + + if src.CreateConnectorRequestServicenowSir != nil { + return json.Marshal(&src.CreateConnectorRequestServicenowSir) + } + + if src.CreateConnectorRequestSlack != nil { + return json.Marshal(&src.CreateConnectorRequestSlack) + } + + if src.CreateConnectorRequestSwimlane != nil { + return json.Marshal(&src.CreateConnectorRequestSwimlane) + } + + if src.CreateConnectorRequestTeams != nil { + return json.Marshal(&src.CreateConnectorRequestTeams) + } + + if src.CreateConnectorRequestTines != nil { + return json.Marshal(&src.CreateConnectorRequestTines) + } + + if src.CreateConnectorRequestWebhook != nil { + return json.Marshal(&src.CreateConnectorRequestWebhook) + } + + if src.CreateConnectorRequestXmatters != nil { + return json.Marshal(&src.CreateConnectorRequestXmatters) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *CreateConnectorRequestBodyProperties) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.CreateConnectorRequestCasesWebhook != nil { + return obj.CreateConnectorRequestCasesWebhook + } + + if obj.CreateConnectorRequestEmail != nil { + return obj.CreateConnectorRequestEmail + } + + if obj.CreateConnectorRequestIndex != nil { + return obj.CreateConnectorRequestIndex + } + + if obj.CreateConnectorRequestJira != nil { + return obj.CreateConnectorRequestJira + } + + if obj.CreateConnectorRequestOpsgenie != nil { + return obj.CreateConnectorRequestOpsgenie + } + + if obj.CreateConnectorRequestPagerduty != nil { + return obj.CreateConnectorRequestPagerduty + } + + if obj.CreateConnectorRequestResilient != nil { + return obj.CreateConnectorRequestResilient + } + + if obj.CreateConnectorRequestServerlog != nil { + return obj.CreateConnectorRequestServerlog + } + + if obj.CreateConnectorRequestServicenow != nil { + return obj.CreateConnectorRequestServicenow + } + + if obj.CreateConnectorRequestServicenowItom != nil { + return obj.CreateConnectorRequestServicenowItom + } + + if obj.CreateConnectorRequestServicenowSir != nil { + return obj.CreateConnectorRequestServicenowSir + } + + if obj.CreateConnectorRequestSlack != nil { + return obj.CreateConnectorRequestSlack + } + + if obj.CreateConnectorRequestSwimlane != nil { + return obj.CreateConnectorRequestSwimlane + } + + if obj.CreateConnectorRequestTeams != nil { + return obj.CreateConnectorRequestTeams + } + + if obj.CreateConnectorRequestTines != nil { + return obj.CreateConnectorRequestTines + } + + if obj.CreateConnectorRequestWebhook != nil { + return obj.CreateConnectorRequestWebhook + } + + if obj.CreateConnectorRequestXmatters != nil { + return obj.CreateConnectorRequestXmatters + } + + // all schemas are nil + return nil +} + +type NullableCreateConnectorRequestBodyProperties struct { + value *CreateConnectorRequestBodyProperties + isSet bool +} + +func (v NullableCreateConnectorRequestBodyProperties) Get() *CreateConnectorRequestBodyProperties { + return v.value +} + +func (v *NullableCreateConnectorRequestBodyProperties) Set(val *CreateConnectorRequestBodyProperties) { + v.value = val + v.isSet = true +} + +func (v NullableCreateConnectorRequestBodyProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateConnectorRequestBodyProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateConnectorRequestBodyProperties(val *CreateConnectorRequestBodyProperties) *NullableCreateConnectorRequestBodyProperties { + return &NullableCreateConnectorRequestBodyProperties{value: val, isSet: true} +} + +func (v NullableCreateConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateConnectorRequestBodyProperties) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_create_connector_request_cases_webhook.go b/generated/kibanaactions/model_create_connector_request_cases_webhook.go new file mode 100644 index 000000000..75903cce2 --- /dev/null +++ b/generated/kibanaactions/model_create_connector_request_cases_webhook.go @@ -0,0 +1,207 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CreateConnectorRequestCasesWebhook type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateConnectorRequestCasesWebhook{} + +// CreateConnectorRequestCasesWebhook The Webhook - Case Management connector uses axios to send POST, PUT, and GET requests to a case management RESTful API web service. +type CreateConnectorRequestCasesWebhook struct { + Config ConfigPropertiesCasesWebhook `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The display name for the connector. + Name string `json:"name"` + Secrets *SecretsPropertiesCasesWebhook `json:"secrets,omitempty"` +} + +// NewCreateConnectorRequestCasesWebhook instantiates a new CreateConnectorRequestCasesWebhook object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateConnectorRequestCasesWebhook(config ConfigPropertiesCasesWebhook, connectorTypeId string, name string) *CreateConnectorRequestCasesWebhook { + this := CreateConnectorRequestCasesWebhook{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Name = name + return &this +} + +// NewCreateConnectorRequestCasesWebhookWithDefaults instantiates a new CreateConnectorRequestCasesWebhook object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateConnectorRequestCasesWebhookWithDefaults() *CreateConnectorRequestCasesWebhook { + this := CreateConnectorRequestCasesWebhook{} + return &this +} + +// GetConfig returns the Config field value +func (o *CreateConnectorRequestCasesWebhook) GetConfig() ConfigPropertiesCasesWebhook { + if o == nil { + var ret ConfigPropertiesCasesWebhook + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestCasesWebhook) GetConfigOk() (*ConfigPropertiesCasesWebhook, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *CreateConnectorRequestCasesWebhook) SetConfig(v ConfigPropertiesCasesWebhook) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *CreateConnectorRequestCasesWebhook) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestCasesWebhook) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *CreateConnectorRequestCasesWebhook) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetName returns the Name field value +func (o *CreateConnectorRequestCasesWebhook) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestCasesWebhook) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateConnectorRequestCasesWebhook) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value if set, zero value otherwise. +func (o *CreateConnectorRequestCasesWebhook) GetSecrets() SecretsPropertiesCasesWebhook { + if o == nil || IsNil(o.Secrets) { + var ret SecretsPropertiesCasesWebhook + return ret + } + return *o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestCasesWebhook) GetSecretsOk() (*SecretsPropertiesCasesWebhook, bool) { + if o == nil || IsNil(o.Secrets) { + return nil, false + } + return o.Secrets, true +} + +// HasSecrets returns a boolean if a field has been set. +func (o *CreateConnectorRequestCasesWebhook) HasSecrets() bool { + if o != nil && !IsNil(o.Secrets) { + return true + } + + return false +} + +// SetSecrets gets a reference to the given SecretsPropertiesCasesWebhook and assigns it to the Secrets field. +func (o *CreateConnectorRequestCasesWebhook) SetSecrets(v SecretsPropertiesCasesWebhook) { + o.Secrets = &v +} + +func (o CreateConnectorRequestCasesWebhook) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateConnectorRequestCasesWebhook) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["name"] = o.Name + if !IsNil(o.Secrets) { + toSerialize["secrets"] = o.Secrets + } + return toSerialize, nil +} + +type NullableCreateConnectorRequestCasesWebhook struct { + value *CreateConnectorRequestCasesWebhook + isSet bool +} + +func (v NullableCreateConnectorRequestCasesWebhook) Get() *CreateConnectorRequestCasesWebhook { + return v.value +} + +func (v *NullableCreateConnectorRequestCasesWebhook) Set(val *CreateConnectorRequestCasesWebhook) { + v.value = val + v.isSet = true +} + +func (v NullableCreateConnectorRequestCasesWebhook) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateConnectorRequestCasesWebhook) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateConnectorRequestCasesWebhook(val *CreateConnectorRequestCasesWebhook) *NullableCreateConnectorRequestCasesWebhook { + return &NullableCreateConnectorRequestCasesWebhook{value: val, isSet: true} +} + +func (v NullableCreateConnectorRequestCasesWebhook) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateConnectorRequestCasesWebhook) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_create_connector_request_email.go b/generated/kibanaactions/model_create_connector_request_email.go new file mode 100644 index 000000000..c5c2a5b66 --- /dev/null +++ b/generated/kibanaactions/model_create_connector_request_email.go @@ -0,0 +1,200 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CreateConnectorRequestEmail type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateConnectorRequestEmail{} + +// CreateConnectorRequestEmail The email connector uses the SMTP protocol to send mail messages, using an integration of Nodemailer. An exception is Microsoft Exchange, which uses HTTP protocol for sending emails, Send mail. Email message text is sent as both plain text and html text. +type CreateConnectorRequestEmail struct { + // Defines properties for connectors when type is `.email`. + Config map[string]interface{} `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The display name for the connector. + Name string `json:"name"` + // Defines secrets for connectors when type is `.email`. + Secrets map[string]interface{} `json:"secrets"` +} + +// NewCreateConnectorRequestEmail instantiates a new CreateConnectorRequestEmail object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateConnectorRequestEmail(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}) *CreateConnectorRequestEmail { + this := CreateConnectorRequestEmail{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Name = name + this.Secrets = secrets + return &this +} + +// NewCreateConnectorRequestEmailWithDefaults instantiates a new CreateConnectorRequestEmail object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateConnectorRequestEmailWithDefaults() *CreateConnectorRequestEmail { + this := CreateConnectorRequestEmail{} + return &this +} + +// GetConfig returns the Config field value +func (o *CreateConnectorRequestEmail) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestEmail) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *CreateConnectorRequestEmail) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *CreateConnectorRequestEmail) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestEmail) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *CreateConnectorRequestEmail) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetName returns the Name field value +func (o *CreateConnectorRequestEmail) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestEmail) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateConnectorRequestEmail) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *CreateConnectorRequestEmail) GetSecrets() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestEmail) GetSecretsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Secrets, true +} + +// SetSecrets sets field value +func (o *CreateConnectorRequestEmail) SetSecrets(v map[string]interface{}) { + o.Secrets = v +} + +func (o CreateConnectorRequestEmail) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateConnectorRequestEmail) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableCreateConnectorRequestEmail struct { + value *CreateConnectorRequestEmail + isSet bool +} + +func (v NullableCreateConnectorRequestEmail) Get() *CreateConnectorRequestEmail { + return v.value +} + +func (v *NullableCreateConnectorRequestEmail) Set(val *CreateConnectorRequestEmail) { + v.value = val + v.isSet = true +} + +func (v NullableCreateConnectorRequestEmail) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateConnectorRequestEmail) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateConnectorRequestEmail(val *CreateConnectorRequestEmail) *NullableCreateConnectorRequestEmail { + return &NullableCreateConnectorRequestEmail{value: val, isSet: true} +} + +func (v NullableCreateConnectorRequestEmail) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateConnectorRequestEmail) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_create_connector_request_index.go b/generated/kibanaactions/model_create_connector_request_index.go new file mode 100644 index 000000000..04ed98ab5 --- /dev/null +++ b/generated/kibanaactions/model_create_connector_request_index.go @@ -0,0 +1,171 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CreateConnectorRequestIndex type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateConnectorRequestIndex{} + +// CreateConnectorRequestIndex The index connector indexes a document into Elasticsearch. +type CreateConnectorRequestIndex struct { + Config ConfigPropertiesIndex `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewCreateConnectorRequestIndex instantiates a new CreateConnectorRequestIndex object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateConnectorRequestIndex(config ConfigPropertiesIndex, connectorTypeId string, name string) *CreateConnectorRequestIndex { + this := CreateConnectorRequestIndex{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Name = name + return &this +} + +// NewCreateConnectorRequestIndexWithDefaults instantiates a new CreateConnectorRequestIndex object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateConnectorRequestIndexWithDefaults() *CreateConnectorRequestIndex { + this := CreateConnectorRequestIndex{} + return &this +} + +// GetConfig returns the Config field value +func (o *CreateConnectorRequestIndex) GetConfig() ConfigPropertiesIndex { + if o == nil { + var ret ConfigPropertiesIndex + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestIndex) GetConfigOk() (*ConfigPropertiesIndex, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *CreateConnectorRequestIndex) SetConfig(v ConfigPropertiesIndex) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *CreateConnectorRequestIndex) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestIndex) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *CreateConnectorRequestIndex) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetName returns the Name field value +func (o *CreateConnectorRequestIndex) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestIndex) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateConnectorRequestIndex) SetName(v string) { + o.Name = v +} + +func (o CreateConnectorRequestIndex) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateConnectorRequestIndex) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableCreateConnectorRequestIndex struct { + value *CreateConnectorRequestIndex + isSet bool +} + +func (v NullableCreateConnectorRequestIndex) Get() *CreateConnectorRequestIndex { + return v.value +} + +func (v *NullableCreateConnectorRequestIndex) Set(val *CreateConnectorRequestIndex) { + v.value = val + v.isSet = true +} + +func (v NullableCreateConnectorRequestIndex) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateConnectorRequestIndex) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateConnectorRequestIndex(val *CreateConnectorRequestIndex) *NullableCreateConnectorRequestIndex { + return &NullableCreateConnectorRequestIndex{value: val, isSet: true} +} + +func (v NullableCreateConnectorRequestIndex) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateConnectorRequestIndex) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_create_connector_request_jira.go b/generated/kibanaactions/model_create_connector_request_jira.go new file mode 100644 index 000000000..6e7884067 --- /dev/null +++ b/generated/kibanaactions/model_create_connector_request_jira.go @@ -0,0 +1,198 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CreateConnectorRequestJira type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateConnectorRequestJira{} + +// CreateConnectorRequestJira The Jira connector uses the REST API v2 to create Jira issues. +type CreateConnectorRequestJira struct { + Config ConfigPropertiesJira `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesJira `json:"secrets"` +} + +// NewCreateConnectorRequestJira instantiates a new CreateConnectorRequestJira object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateConnectorRequestJira(config ConfigPropertiesJira, connectorTypeId string, name string, secrets SecretsPropertiesJira) *CreateConnectorRequestJira { + this := CreateConnectorRequestJira{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Name = name + this.Secrets = secrets + return &this +} + +// NewCreateConnectorRequestJiraWithDefaults instantiates a new CreateConnectorRequestJira object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateConnectorRequestJiraWithDefaults() *CreateConnectorRequestJira { + this := CreateConnectorRequestJira{} + return &this +} + +// GetConfig returns the Config field value +func (o *CreateConnectorRequestJira) GetConfig() ConfigPropertiesJira { + if o == nil { + var ret ConfigPropertiesJira + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestJira) GetConfigOk() (*ConfigPropertiesJira, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *CreateConnectorRequestJira) SetConfig(v ConfigPropertiesJira) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *CreateConnectorRequestJira) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestJira) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *CreateConnectorRequestJira) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetName returns the Name field value +func (o *CreateConnectorRequestJira) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestJira) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateConnectorRequestJira) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *CreateConnectorRequestJira) GetSecrets() SecretsPropertiesJira { + if o == nil { + var ret SecretsPropertiesJira + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestJira) GetSecretsOk() (*SecretsPropertiesJira, bool) { + if o == nil { + return nil, false + } + return &o.Secrets, true +} + +// SetSecrets sets field value +func (o *CreateConnectorRequestJira) SetSecrets(v SecretsPropertiesJira) { + o.Secrets = v +} + +func (o CreateConnectorRequestJira) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateConnectorRequestJira) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableCreateConnectorRequestJira struct { + value *CreateConnectorRequestJira + isSet bool +} + +func (v NullableCreateConnectorRequestJira) Get() *CreateConnectorRequestJira { + return v.value +} + +func (v *NullableCreateConnectorRequestJira) Set(val *CreateConnectorRequestJira) { + v.value = val + v.isSet = true +} + +func (v NullableCreateConnectorRequestJira) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateConnectorRequestJira) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateConnectorRequestJira(val *CreateConnectorRequestJira) *NullableCreateConnectorRequestJira { + return &NullableCreateConnectorRequestJira{value: val, isSet: true} +} + +func (v NullableCreateConnectorRequestJira) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateConnectorRequestJira) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_create_connector_request_opsgenie.go b/generated/kibanaactions/model_create_connector_request_opsgenie.go new file mode 100644 index 000000000..9cd4631d2 --- /dev/null +++ b/generated/kibanaactions/model_create_connector_request_opsgenie.go @@ -0,0 +1,198 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CreateConnectorRequestOpsgenie type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateConnectorRequestOpsgenie{} + +// CreateConnectorRequestOpsgenie The Opsgenie connector uses the Opsgenie alert API. +type CreateConnectorRequestOpsgenie struct { + Config ConfigPropertiesOpsgenie `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesOpsgenie `json:"secrets"` +} + +// NewCreateConnectorRequestOpsgenie instantiates a new CreateConnectorRequestOpsgenie object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateConnectorRequestOpsgenie(config ConfigPropertiesOpsgenie, connectorTypeId string, name string, secrets SecretsPropertiesOpsgenie) *CreateConnectorRequestOpsgenie { + this := CreateConnectorRequestOpsgenie{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Name = name + this.Secrets = secrets + return &this +} + +// NewCreateConnectorRequestOpsgenieWithDefaults instantiates a new CreateConnectorRequestOpsgenie object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateConnectorRequestOpsgenieWithDefaults() *CreateConnectorRequestOpsgenie { + this := CreateConnectorRequestOpsgenie{} + return &this +} + +// GetConfig returns the Config field value +func (o *CreateConnectorRequestOpsgenie) GetConfig() ConfigPropertiesOpsgenie { + if o == nil { + var ret ConfigPropertiesOpsgenie + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestOpsgenie) GetConfigOk() (*ConfigPropertiesOpsgenie, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *CreateConnectorRequestOpsgenie) SetConfig(v ConfigPropertiesOpsgenie) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *CreateConnectorRequestOpsgenie) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestOpsgenie) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *CreateConnectorRequestOpsgenie) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetName returns the Name field value +func (o *CreateConnectorRequestOpsgenie) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestOpsgenie) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateConnectorRequestOpsgenie) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *CreateConnectorRequestOpsgenie) GetSecrets() SecretsPropertiesOpsgenie { + if o == nil { + var ret SecretsPropertiesOpsgenie + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestOpsgenie) GetSecretsOk() (*SecretsPropertiesOpsgenie, bool) { + if o == nil { + return nil, false + } + return &o.Secrets, true +} + +// SetSecrets sets field value +func (o *CreateConnectorRequestOpsgenie) SetSecrets(v SecretsPropertiesOpsgenie) { + o.Secrets = v +} + +func (o CreateConnectorRequestOpsgenie) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateConnectorRequestOpsgenie) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableCreateConnectorRequestOpsgenie struct { + value *CreateConnectorRequestOpsgenie + isSet bool +} + +func (v NullableCreateConnectorRequestOpsgenie) Get() *CreateConnectorRequestOpsgenie { + return v.value +} + +func (v *NullableCreateConnectorRequestOpsgenie) Set(val *CreateConnectorRequestOpsgenie) { + v.value = val + v.isSet = true +} + +func (v NullableCreateConnectorRequestOpsgenie) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateConnectorRequestOpsgenie) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateConnectorRequestOpsgenie(val *CreateConnectorRequestOpsgenie) *NullableCreateConnectorRequestOpsgenie { + return &NullableCreateConnectorRequestOpsgenie{value: val, isSet: true} +} + +func (v NullableCreateConnectorRequestOpsgenie) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateConnectorRequestOpsgenie) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_create_connector_request_pagerduty.go b/generated/kibanaactions/model_create_connector_request_pagerduty.go new file mode 100644 index 000000000..3e9518d49 --- /dev/null +++ b/generated/kibanaactions/model_create_connector_request_pagerduty.go @@ -0,0 +1,200 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CreateConnectorRequestPagerduty type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateConnectorRequestPagerduty{} + +// CreateConnectorRequestPagerduty The PagerDuty connector uses the v2 Events API to trigger, acknowledge, and resolve PagerDuty alerts. +type CreateConnectorRequestPagerduty struct { + // Defines properties for connectors when type is `.pagerduty`. + Config map[string]interface{} `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The display name for the connector. + Name string `json:"name"` + // Defines secrets for connectors when type is `.pagerduty`. + Secrets map[string]interface{} `json:"secrets"` +} + +// NewCreateConnectorRequestPagerduty instantiates a new CreateConnectorRequestPagerduty object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateConnectorRequestPagerduty(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}) *CreateConnectorRequestPagerduty { + this := CreateConnectorRequestPagerduty{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Name = name + this.Secrets = secrets + return &this +} + +// NewCreateConnectorRequestPagerdutyWithDefaults instantiates a new CreateConnectorRequestPagerduty object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateConnectorRequestPagerdutyWithDefaults() *CreateConnectorRequestPagerduty { + this := CreateConnectorRequestPagerduty{} + return &this +} + +// GetConfig returns the Config field value +func (o *CreateConnectorRequestPagerduty) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestPagerduty) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *CreateConnectorRequestPagerduty) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *CreateConnectorRequestPagerduty) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestPagerduty) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *CreateConnectorRequestPagerduty) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetName returns the Name field value +func (o *CreateConnectorRequestPagerduty) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestPagerduty) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateConnectorRequestPagerduty) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *CreateConnectorRequestPagerduty) GetSecrets() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestPagerduty) GetSecretsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Secrets, true +} + +// SetSecrets sets field value +func (o *CreateConnectorRequestPagerduty) SetSecrets(v map[string]interface{}) { + o.Secrets = v +} + +func (o CreateConnectorRequestPagerduty) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateConnectorRequestPagerduty) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableCreateConnectorRequestPagerduty struct { + value *CreateConnectorRequestPagerduty + isSet bool +} + +func (v NullableCreateConnectorRequestPagerduty) Get() *CreateConnectorRequestPagerduty { + return v.value +} + +func (v *NullableCreateConnectorRequestPagerduty) Set(val *CreateConnectorRequestPagerduty) { + v.value = val + v.isSet = true +} + +func (v NullableCreateConnectorRequestPagerduty) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateConnectorRequestPagerduty) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateConnectorRequestPagerduty(val *CreateConnectorRequestPagerduty) *NullableCreateConnectorRequestPagerduty { + return &NullableCreateConnectorRequestPagerduty{value: val, isSet: true} +} + +func (v NullableCreateConnectorRequestPagerduty) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateConnectorRequestPagerduty) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_create_connector_request_resilient.go b/generated/kibanaactions/model_create_connector_request_resilient.go new file mode 100644 index 000000000..4c33b53af --- /dev/null +++ b/generated/kibanaactions/model_create_connector_request_resilient.go @@ -0,0 +1,198 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CreateConnectorRequestResilient type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateConnectorRequestResilient{} + +// CreateConnectorRequestResilient The IBM Resilient connector uses the RESILIENT REST v2 to create IBM Resilient incidents. +type CreateConnectorRequestResilient struct { + Config ConfigPropertiesResilient `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesResilient `json:"secrets"` +} + +// NewCreateConnectorRequestResilient instantiates a new CreateConnectorRequestResilient object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateConnectorRequestResilient(config ConfigPropertiesResilient, connectorTypeId string, name string, secrets SecretsPropertiesResilient) *CreateConnectorRequestResilient { + this := CreateConnectorRequestResilient{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Name = name + this.Secrets = secrets + return &this +} + +// NewCreateConnectorRequestResilientWithDefaults instantiates a new CreateConnectorRequestResilient object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateConnectorRequestResilientWithDefaults() *CreateConnectorRequestResilient { + this := CreateConnectorRequestResilient{} + return &this +} + +// GetConfig returns the Config field value +func (o *CreateConnectorRequestResilient) GetConfig() ConfigPropertiesResilient { + if o == nil { + var ret ConfigPropertiesResilient + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestResilient) GetConfigOk() (*ConfigPropertiesResilient, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *CreateConnectorRequestResilient) SetConfig(v ConfigPropertiesResilient) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *CreateConnectorRequestResilient) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestResilient) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *CreateConnectorRequestResilient) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetName returns the Name field value +func (o *CreateConnectorRequestResilient) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestResilient) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateConnectorRequestResilient) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *CreateConnectorRequestResilient) GetSecrets() SecretsPropertiesResilient { + if o == nil { + var ret SecretsPropertiesResilient + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestResilient) GetSecretsOk() (*SecretsPropertiesResilient, bool) { + if o == nil { + return nil, false + } + return &o.Secrets, true +} + +// SetSecrets sets field value +func (o *CreateConnectorRequestResilient) SetSecrets(v SecretsPropertiesResilient) { + o.Secrets = v +} + +func (o CreateConnectorRequestResilient) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateConnectorRequestResilient) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableCreateConnectorRequestResilient struct { + value *CreateConnectorRequestResilient + isSet bool +} + +func (v NullableCreateConnectorRequestResilient) Get() *CreateConnectorRequestResilient { + return v.value +} + +func (v *NullableCreateConnectorRequestResilient) Set(val *CreateConnectorRequestResilient) { + v.value = val + v.isSet = true +} + +func (v NullableCreateConnectorRequestResilient) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateConnectorRequestResilient) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateConnectorRequestResilient(val *CreateConnectorRequestResilient) *NullableCreateConnectorRequestResilient { + return &NullableCreateConnectorRequestResilient{value: val, isSet: true} +} + +func (v NullableCreateConnectorRequestResilient) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateConnectorRequestResilient) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_create_connector_request_serverlog.go b/generated/kibanaactions/model_create_connector_request_serverlog.go new file mode 100644 index 000000000..7453ae227 --- /dev/null +++ b/generated/kibanaactions/model_create_connector_request_serverlog.go @@ -0,0 +1,144 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CreateConnectorRequestServerlog type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateConnectorRequestServerlog{} + +// CreateConnectorRequestServerlog This connector writes an entry to the Kibana server log. +type CreateConnectorRequestServerlog struct { + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewCreateConnectorRequestServerlog instantiates a new CreateConnectorRequestServerlog object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateConnectorRequestServerlog(connectorTypeId string, name string) *CreateConnectorRequestServerlog { + this := CreateConnectorRequestServerlog{} + this.ConnectorTypeId = connectorTypeId + this.Name = name + return &this +} + +// NewCreateConnectorRequestServerlogWithDefaults instantiates a new CreateConnectorRequestServerlog object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateConnectorRequestServerlogWithDefaults() *CreateConnectorRequestServerlog { + this := CreateConnectorRequestServerlog{} + return &this +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *CreateConnectorRequestServerlog) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestServerlog) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *CreateConnectorRequestServerlog) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetName returns the Name field value +func (o *CreateConnectorRequestServerlog) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestServerlog) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateConnectorRequestServerlog) SetName(v string) { + o.Name = v +} + +func (o CreateConnectorRequestServerlog) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateConnectorRequestServerlog) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableCreateConnectorRequestServerlog struct { + value *CreateConnectorRequestServerlog + isSet bool +} + +func (v NullableCreateConnectorRequestServerlog) Get() *CreateConnectorRequestServerlog { + return v.value +} + +func (v *NullableCreateConnectorRequestServerlog) Set(val *CreateConnectorRequestServerlog) { + v.value = val + v.isSet = true +} + +func (v NullableCreateConnectorRequestServerlog) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateConnectorRequestServerlog) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateConnectorRequestServerlog(val *CreateConnectorRequestServerlog) *NullableCreateConnectorRequestServerlog { + return &NullableCreateConnectorRequestServerlog{value: val, isSet: true} +} + +func (v NullableCreateConnectorRequestServerlog) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateConnectorRequestServerlog) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_create_connector_request_servicenow.go b/generated/kibanaactions/model_create_connector_request_servicenow.go new file mode 100644 index 000000000..64b5d67b8 --- /dev/null +++ b/generated/kibanaactions/model_create_connector_request_servicenow.go @@ -0,0 +1,198 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CreateConnectorRequestServicenow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateConnectorRequestServicenow{} + +// CreateConnectorRequestServicenow The ServiceNow ITSM connector uses the import set API to create ServiceNow incidents. You can use the connector for rule actions and cases. +type CreateConnectorRequestServicenow struct { + Config ConfigPropertiesServicenow `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesServicenow `json:"secrets"` +} + +// NewCreateConnectorRequestServicenow instantiates a new CreateConnectorRequestServicenow object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateConnectorRequestServicenow(config ConfigPropertiesServicenow, connectorTypeId string, name string, secrets SecretsPropertiesServicenow) *CreateConnectorRequestServicenow { + this := CreateConnectorRequestServicenow{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Name = name + this.Secrets = secrets + return &this +} + +// NewCreateConnectorRequestServicenowWithDefaults instantiates a new CreateConnectorRequestServicenow object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateConnectorRequestServicenowWithDefaults() *CreateConnectorRequestServicenow { + this := CreateConnectorRequestServicenow{} + return &this +} + +// GetConfig returns the Config field value +func (o *CreateConnectorRequestServicenow) GetConfig() ConfigPropertiesServicenow { + if o == nil { + var ret ConfigPropertiesServicenow + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestServicenow) GetConfigOk() (*ConfigPropertiesServicenow, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *CreateConnectorRequestServicenow) SetConfig(v ConfigPropertiesServicenow) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *CreateConnectorRequestServicenow) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestServicenow) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *CreateConnectorRequestServicenow) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetName returns the Name field value +func (o *CreateConnectorRequestServicenow) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestServicenow) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateConnectorRequestServicenow) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *CreateConnectorRequestServicenow) GetSecrets() SecretsPropertiesServicenow { + if o == nil { + var ret SecretsPropertiesServicenow + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestServicenow) GetSecretsOk() (*SecretsPropertiesServicenow, bool) { + if o == nil { + return nil, false + } + return &o.Secrets, true +} + +// SetSecrets sets field value +func (o *CreateConnectorRequestServicenow) SetSecrets(v SecretsPropertiesServicenow) { + o.Secrets = v +} + +func (o CreateConnectorRequestServicenow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateConnectorRequestServicenow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableCreateConnectorRequestServicenow struct { + value *CreateConnectorRequestServicenow + isSet bool +} + +func (v NullableCreateConnectorRequestServicenow) Get() *CreateConnectorRequestServicenow { + return v.value +} + +func (v *NullableCreateConnectorRequestServicenow) Set(val *CreateConnectorRequestServicenow) { + v.value = val + v.isSet = true +} + +func (v NullableCreateConnectorRequestServicenow) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateConnectorRequestServicenow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateConnectorRequestServicenow(val *CreateConnectorRequestServicenow) *NullableCreateConnectorRequestServicenow { + return &NullableCreateConnectorRequestServicenow{value: val, isSet: true} +} + +func (v NullableCreateConnectorRequestServicenow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateConnectorRequestServicenow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_create_connector_request_servicenow_itom.go b/generated/kibanaactions/model_create_connector_request_servicenow_itom.go new file mode 100644 index 000000000..7099c44ae --- /dev/null +++ b/generated/kibanaactions/model_create_connector_request_servicenow_itom.go @@ -0,0 +1,198 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CreateConnectorRequestServicenowItom type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateConnectorRequestServicenowItom{} + +// CreateConnectorRequestServicenowItom The ServiceNow ITOM connector uses the event API to create ServiceNow events. You can use the connector for rule actions. +type CreateConnectorRequestServicenowItom struct { + Config ConfigPropertiesServicenowItom `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesServicenow `json:"secrets"` +} + +// NewCreateConnectorRequestServicenowItom instantiates a new CreateConnectorRequestServicenowItom object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateConnectorRequestServicenowItom(config ConfigPropertiesServicenowItom, connectorTypeId string, name string, secrets SecretsPropertiesServicenow) *CreateConnectorRequestServicenowItom { + this := CreateConnectorRequestServicenowItom{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Name = name + this.Secrets = secrets + return &this +} + +// NewCreateConnectorRequestServicenowItomWithDefaults instantiates a new CreateConnectorRequestServicenowItom object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateConnectorRequestServicenowItomWithDefaults() *CreateConnectorRequestServicenowItom { + this := CreateConnectorRequestServicenowItom{} + return &this +} + +// GetConfig returns the Config field value +func (o *CreateConnectorRequestServicenowItom) GetConfig() ConfigPropertiesServicenowItom { + if o == nil { + var ret ConfigPropertiesServicenowItom + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestServicenowItom) GetConfigOk() (*ConfigPropertiesServicenowItom, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *CreateConnectorRequestServicenowItom) SetConfig(v ConfigPropertiesServicenowItom) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *CreateConnectorRequestServicenowItom) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestServicenowItom) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *CreateConnectorRequestServicenowItom) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetName returns the Name field value +func (o *CreateConnectorRequestServicenowItom) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestServicenowItom) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateConnectorRequestServicenowItom) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *CreateConnectorRequestServicenowItom) GetSecrets() SecretsPropertiesServicenow { + if o == nil { + var ret SecretsPropertiesServicenow + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestServicenowItom) GetSecretsOk() (*SecretsPropertiesServicenow, bool) { + if o == nil { + return nil, false + } + return &o.Secrets, true +} + +// SetSecrets sets field value +func (o *CreateConnectorRequestServicenowItom) SetSecrets(v SecretsPropertiesServicenow) { + o.Secrets = v +} + +func (o CreateConnectorRequestServicenowItom) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateConnectorRequestServicenowItom) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableCreateConnectorRequestServicenowItom struct { + value *CreateConnectorRequestServicenowItom + isSet bool +} + +func (v NullableCreateConnectorRequestServicenowItom) Get() *CreateConnectorRequestServicenowItom { + return v.value +} + +func (v *NullableCreateConnectorRequestServicenowItom) Set(val *CreateConnectorRequestServicenowItom) { + v.value = val + v.isSet = true +} + +func (v NullableCreateConnectorRequestServicenowItom) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateConnectorRequestServicenowItom) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateConnectorRequestServicenowItom(val *CreateConnectorRequestServicenowItom) *NullableCreateConnectorRequestServicenowItom { + return &NullableCreateConnectorRequestServicenowItom{value: val, isSet: true} +} + +func (v NullableCreateConnectorRequestServicenowItom) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateConnectorRequestServicenowItom) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_create_connector_request_servicenow_sir.go b/generated/kibanaactions/model_create_connector_request_servicenow_sir.go new file mode 100644 index 000000000..b02258539 --- /dev/null +++ b/generated/kibanaactions/model_create_connector_request_servicenow_sir.go @@ -0,0 +1,198 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CreateConnectorRequestServicenowSir type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateConnectorRequestServicenowSir{} + +// CreateConnectorRequestServicenowSir The ServiceNow SecOps connector uses the import set API to create ServiceNow security incidents. You can use the connector for rule actions and cases. +type CreateConnectorRequestServicenowSir struct { + Config ConfigPropertiesServicenow `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesServicenow `json:"secrets"` +} + +// NewCreateConnectorRequestServicenowSir instantiates a new CreateConnectorRequestServicenowSir object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateConnectorRequestServicenowSir(config ConfigPropertiesServicenow, connectorTypeId string, name string, secrets SecretsPropertiesServicenow) *CreateConnectorRequestServicenowSir { + this := CreateConnectorRequestServicenowSir{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Name = name + this.Secrets = secrets + return &this +} + +// NewCreateConnectorRequestServicenowSirWithDefaults instantiates a new CreateConnectorRequestServicenowSir object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateConnectorRequestServicenowSirWithDefaults() *CreateConnectorRequestServicenowSir { + this := CreateConnectorRequestServicenowSir{} + return &this +} + +// GetConfig returns the Config field value +func (o *CreateConnectorRequestServicenowSir) GetConfig() ConfigPropertiesServicenow { + if o == nil { + var ret ConfigPropertiesServicenow + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestServicenowSir) GetConfigOk() (*ConfigPropertiesServicenow, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *CreateConnectorRequestServicenowSir) SetConfig(v ConfigPropertiesServicenow) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *CreateConnectorRequestServicenowSir) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestServicenowSir) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *CreateConnectorRequestServicenowSir) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetName returns the Name field value +func (o *CreateConnectorRequestServicenowSir) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestServicenowSir) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateConnectorRequestServicenowSir) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *CreateConnectorRequestServicenowSir) GetSecrets() SecretsPropertiesServicenow { + if o == nil { + var ret SecretsPropertiesServicenow + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestServicenowSir) GetSecretsOk() (*SecretsPropertiesServicenow, bool) { + if o == nil { + return nil, false + } + return &o.Secrets, true +} + +// SetSecrets sets field value +func (o *CreateConnectorRequestServicenowSir) SetSecrets(v SecretsPropertiesServicenow) { + o.Secrets = v +} + +func (o CreateConnectorRequestServicenowSir) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateConnectorRequestServicenowSir) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableCreateConnectorRequestServicenowSir struct { + value *CreateConnectorRequestServicenowSir + isSet bool +} + +func (v NullableCreateConnectorRequestServicenowSir) Get() *CreateConnectorRequestServicenowSir { + return v.value +} + +func (v *NullableCreateConnectorRequestServicenowSir) Set(val *CreateConnectorRequestServicenowSir) { + v.value = val + v.isSet = true +} + +func (v NullableCreateConnectorRequestServicenowSir) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateConnectorRequestServicenowSir) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateConnectorRequestServicenowSir(val *CreateConnectorRequestServicenowSir) *NullableCreateConnectorRequestServicenowSir { + return &NullableCreateConnectorRequestServicenowSir{value: val, isSet: true} +} + +func (v NullableCreateConnectorRequestServicenowSir) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateConnectorRequestServicenowSir) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_create_connector_request_slack.go b/generated/kibanaactions/model_create_connector_request_slack.go new file mode 100644 index 000000000..db1405ab3 --- /dev/null +++ b/generated/kibanaactions/model_create_connector_request_slack.go @@ -0,0 +1,172 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CreateConnectorRequestSlack type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateConnectorRequestSlack{} + +// CreateConnectorRequestSlack The Slack connector uses Slack Incoming Webhooks. +type CreateConnectorRequestSlack struct { + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The display name for the connector. + Name string `json:"name"` + // Defines secrets for connectors when type is `.slack`. + Secrets map[string]interface{} `json:"secrets"` +} + +// NewCreateConnectorRequestSlack instantiates a new CreateConnectorRequestSlack object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateConnectorRequestSlack(connectorTypeId string, name string, secrets map[string]interface{}) *CreateConnectorRequestSlack { + this := CreateConnectorRequestSlack{} + this.ConnectorTypeId = connectorTypeId + this.Name = name + this.Secrets = secrets + return &this +} + +// NewCreateConnectorRequestSlackWithDefaults instantiates a new CreateConnectorRequestSlack object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateConnectorRequestSlackWithDefaults() *CreateConnectorRequestSlack { + this := CreateConnectorRequestSlack{} + return &this +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *CreateConnectorRequestSlack) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestSlack) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *CreateConnectorRequestSlack) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetName returns the Name field value +func (o *CreateConnectorRequestSlack) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestSlack) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateConnectorRequestSlack) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *CreateConnectorRequestSlack) GetSecrets() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestSlack) GetSecretsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Secrets, true +} + +// SetSecrets sets field value +func (o *CreateConnectorRequestSlack) SetSecrets(v map[string]interface{}) { + o.Secrets = v +} + +func (o CreateConnectorRequestSlack) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateConnectorRequestSlack) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableCreateConnectorRequestSlack struct { + value *CreateConnectorRequestSlack + isSet bool +} + +func (v NullableCreateConnectorRequestSlack) Get() *CreateConnectorRequestSlack { + return v.value +} + +func (v *NullableCreateConnectorRequestSlack) Set(val *CreateConnectorRequestSlack) { + v.value = val + v.isSet = true +} + +func (v NullableCreateConnectorRequestSlack) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateConnectorRequestSlack) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateConnectorRequestSlack(val *CreateConnectorRequestSlack) *NullableCreateConnectorRequestSlack { + return &NullableCreateConnectorRequestSlack{value: val, isSet: true} +} + +func (v NullableCreateConnectorRequestSlack) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateConnectorRequestSlack) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_create_connector_request_swimlane.go b/generated/kibanaactions/model_create_connector_request_swimlane.go new file mode 100644 index 000000000..1db9b1ca8 --- /dev/null +++ b/generated/kibanaactions/model_create_connector_request_swimlane.go @@ -0,0 +1,198 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CreateConnectorRequestSwimlane type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateConnectorRequestSwimlane{} + +// CreateConnectorRequestSwimlane The Swimlane connector uses the Swimlane REST API to create Swimlane records. +type CreateConnectorRequestSwimlane struct { + Config ConfigPropertiesSwimlane `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesSwimlane `json:"secrets"` +} + +// NewCreateConnectorRequestSwimlane instantiates a new CreateConnectorRequestSwimlane object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateConnectorRequestSwimlane(config ConfigPropertiesSwimlane, connectorTypeId string, name string, secrets SecretsPropertiesSwimlane) *CreateConnectorRequestSwimlane { + this := CreateConnectorRequestSwimlane{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Name = name + this.Secrets = secrets + return &this +} + +// NewCreateConnectorRequestSwimlaneWithDefaults instantiates a new CreateConnectorRequestSwimlane object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateConnectorRequestSwimlaneWithDefaults() *CreateConnectorRequestSwimlane { + this := CreateConnectorRequestSwimlane{} + return &this +} + +// GetConfig returns the Config field value +func (o *CreateConnectorRequestSwimlane) GetConfig() ConfigPropertiesSwimlane { + if o == nil { + var ret ConfigPropertiesSwimlane + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestSwimlane) GetConfigOk() (*ConfigPropertiesSwimlane, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *CreateConnectorRequestSwimlane) SetConfig(v ConfigPropertiesSwimlane) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *CreateConnectorRequestSwimlane) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestSwimlane) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *CreateConnectorRequestSwimlane) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetName returns the Name field value +func (o *CreateConnectorRequestSwimlane) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestSwimlane) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateConnectorRequestSwimlane) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *CreateConnectorRequestSwimlane) GetSecrets() SecretsPropertiesSwimlane { + if o == nil { + var ret SecretsPropertiesSwimlane + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestSwimlane) GetSecretsOk() (*SecretsPropertiesSwimlane, bool) { + if o == nil { + return nil, false + } + return &o.Secrets, true +} + +// SetSecrets sets field value +func (o *CreateConnectorRequestSwimlane) SetSecrets(v SecretsPropertiesSwimlane) { + o.Secrets = v +} + +func (o CreateConnectorRequestSwimlane) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateConnectorRequestSwimlane) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableCreateConnectorRequestSwimlane struct { + value *CreateConnectorRequestSwimlane + isSet bool +} + +func (v NullableCreateConnectorRequestSwimlane) Get() *CreateConnectorRequestSwimlane { + return v.value +} + +func (v *NullableCreateConnectorRequestSwimlane) Set(val *CreateConnectorRequestSwimlane) { + v.value = val + v.isSet = true +} + +func (v NullableCreateConnectorRequestSwimlane) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateConnectorRequestSwimlane) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateConnectorRequestSwimlane(val *CreateConnectorRequestSwimlane) *NullableCreateConnectorRequestSwimlane { + return &NullableCreateConnectorRequestSwimlane{value: val, isSet: true} +} + +func (v NullableCreateConnectorRequestSwimlane) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateConnectorRequestSwimlane) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_create_connector_request_teams.go b/generated/kibanaactions/model_create_connector_request_teams.go new file mode 100644 index 000000000..f41d2828e --- /dev/null +++ b/generated/kibanaactions/model_create_connector_request_teams.go @@ -0,0 +1,172 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CreateConnectorRequestTeams type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateConnectorRequestTeams{} + +// CreateConnectorRequestTeams The Microsoft Teams connector uses Incoming Webhooks. +type CreateConnectorRequestTeams struct { + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The display name for the connector. + Name string `json:"name"` + // Defines secrets for connectors when type is `.teams`. + Secrets map[string]interface{} `json:"secrets"` +} + +// NewCreateConnectorRequestTeams instantiates a new CreateConnectorRequestTeams object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateConnectorRequestTeams(connectorTypeId string, name string, secrets map[string]interface{}) *CreateConnectorRequestTeams { + this := CreateConnectorRequestTeams{} + this.ConnectorTypeId = connectorTypeId + this.Name = name + this.Secrets = secrets + return &this +} + +// NewCreateConnectorRequestTeamsWithDefaults instantiates a new CreateConnectorRequestTeams object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateConnectorRequestTeamsWithDefaults() *CreateConnectorRequestTeams { + this := CreateConnectorRequestTeams{} + return &this +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *CreateConnectorRequestTeams) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestTeams) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *CreateConnectorRequestTeams) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetName returns the Name field value +func (o *CreateConnectorRequestTeams) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestTeams) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateConnectorRequestTeams) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *CreateConnectorRequestTeams) GetSecrets() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestTeams) GetSecretsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Secrets, true +} + +// SetSecrets sets field value +func (o *CreateConnectorRequestTeams) SetSecrets(v map[string]interface{}) { + o.Secrets = v +} + +func (o CreateConnectorRequestTeams) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateConnectorRequestTeams) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableCreateConnectorRequestTeams struct { + value *CreateConnectorRequestTeams + isSet bool +} + +func (v NullableCreateConnectorRequestTeams) Get() *CreateConnectorRequestTeams { + return v.value +} + +func (v *NullableCreateConnectorRequestTeams) Set(val *CreateConnectorRequestTeams) { + v.value = val + v.isSet = true +} + +func (v NullableCreateConnectorRequestTeams) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateConnectorRequestTeams) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateConnectorRequestTeams(val *CreateConnectorRequestTeams) *NullableCreateConnectorRequestTeams { + return &NullableCreateConnectorRequestTeams{value: val, isSet: true} +} + +func (v NullableCreateConnectorRequestTeams) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateConnectorRequestTeams) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_create_connector_request_tines.go b/generated/kibanaactions/model_create_connector_request_tines.go new file mode 100644 index 000000000..91cb98feb --- /dev/null +++ b/generated/kibanaactions/model_create_connector_request_tines.go @@ -0,0 +1,200 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CreateConnectorRequestTines type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateConnectorRequestTines{} + +// CreateConnectorRequestTines The Tines connector uses Tines Webhook actions to send events via POST request. +type CreateConnectorRequestTines struct { + // Defines properties for connectors when type is `.tines`. + Config map[string]interface{} `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The display name for the connector. + Name string `json:"name"` + // Defines secrets for connectors when type is `.tines`. + Secrets map[string]interface{} `json:"secrets"` +} + +// NewCreateConnectorRequestTines instantiates a new CreateConnectorRequestTines object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateConnectorRequestTines(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}) *CreateConnectorRequestTines { + this := CreateConnectorRequestTines{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Name = name + this.Secrets = secrets + return &this +} + +// NewCreateConnectorRequestTinesWithDefaults instantiates a new CreateConnectorRequestTines object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateConnectorRequestTinesWithDefaults() *CreateConnectorRequestTines { + this := CreateConnectorRequestTines{} + return &this +} + +// GetConfig returns the Config field value +func (o *CreateConnectorRequestTines) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestTines) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *CreateConnectorRequestTines) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *CreateConnectorRequestTines) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestTines) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *CreateConnectorRequestTines) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetName returns the Name field value +func (o *CreateConnectorRequestTines) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestTines) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateConnectorRequestTines) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *CreateConnectorRequestTines) GetSecrets() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestTines) GetSecretsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Secrets, true +} + +// SetSecrets sets field value +func (o *CreateConnectorRequestTines) SetSecrets(v map[string]interface{}) { + o.Secrets = v +} + +func (o CreateConnectorRequestTines) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateConnectorRequestTines) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableCreateConnectorRequestTines struct { + value *CreateConnectorRequestTines + isSet bool +} + +func (v NullableCreateConnectorRequestTines) Get() *CreateConnectorRequestTines { + return v.value +} + +func (v *NullableCreateConnectorRequestTines) Set(val *CreateConnectorRequestTines) { + v.value = val + v.isSet = true +} + +func (v NullableCreateConnectorRequestTines) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateConnectorRequestTines) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateConnectorRequestTines(val *CreateConnectorRequestTines) *NullableCreateConnectorRequestTines { + return &NullableCreateConnectorRequestTines{value: val, isSet: true} +} + +func (v NullableCreateConnectorRequestTines) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateConnectorRequestTines) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_create_connector_request_webhook.go b/generated/kibanaactions/model_create_connector_request_webhook.go new file mode 100644 index 000000000..557f3d4d8 --- /dev/null +++ b/generated/kibanaactions/model_create_connector_request_webhook.go @@ -0,0 +1,200 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CreateConnectorRequestWebhook type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateConnectorRequestWebhook{} + +// CreateConnectorRequestWebhook The Webhook connector uses axios to send a POST or PUT request to a web service. +type CreateConnectorRequestWebhook struct { + // Defines properties for connectors when type is `.webhook`. + Config map[string]interface{} `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The display name for the connector. + Name string `json:"name"` + // Defines secrets for connectors when type is `.webhook`. + Secrets map[string]interface{} `json:"secrets"` +} + +// NewCreateConnectorRequestWebhook instantiates a new CreateConnectorRequestWebhook object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateConnectorRequestWebhook(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}) *CreateConnectorRequestWebhook { + this := CreateConnectorRequestWebhook{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Name = name + this.Secrets = secrets + return &this +} + +// NewCreateConnectorRequestWebhookWithDefaults instantiates a new CreateConnectorRequestWebhook object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateConnectorRequestWebhookWithDefaults() *CreateConnectorRequestWebhook { + this := CreateConnectorRequestWebhook{} + return &this +} + +// GetConfig returns the Config field value +func (o *CreateConnectorRequestWebhook) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestWebhook) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *CreateConnectorRequestWebhook) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *CreateConnectorRequestWebhook) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestWebhook) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *CreateConnectorRequestWebhook) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetName returns the Name field value +func (o *CreateConnectorRequestWebhook) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestWebhook) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateConnectorRequestWebhook) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *CreateConnectorRequestWebhook) GetSecrets() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestWebhook) GetSecretsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Secrets, true +} + +// SetSecrets sets field value +func (o *CreateConnectorRequestWebhook) SetSecrets(v map[string]interface{}) { + o.Secrets = v +} + +func (o CreateConnectorRequestWebhook) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateConnectorRequestWebhook) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableCreateConnectorRequestWebhook struct { + value *CreateConnectorRequestWebhook + isSet bool +} + +func (v NullableCreateConnectorRequestWebhook) Get() *CreateConnectorRequestWebhook { + return v.value +} + +func (v *NullableCreateConnectorRequestWebhook) Set(val *CreateConnectorRequestWebhook) { + v.value = val + v.isSet = true +} + +func (v NullableCreateConnectorRequestWebhook) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateConnectorRequestWebhook) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateConnectorRequestWebhook(val *CreateConnectorRequestWebhook) *NullableCreateConnectorRequestWebhook { + return &NullableCreateConnectorRequestWebhook{value: val, isSet: true} +} + +func (v NullableCreateConnectorRequestWebhook) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateConnectorRequestWebhook) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_create_connector_request_xmatters.go b/generated/kibanaactions/model_create_connector_request_xmatters.go new file mode 100644 index 000000000..caf80dbca --- /dev/null +++ b/generated/kibanaactions/model_create_connector_request_xmatters.go @@ -0,0 +1,200 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the CreateConnectorRequestXmatters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateConnectorRequestXmatters{} + +// CreateConnectorRequestXmatters The xMatters connector uses the xMatters Workflow for Elastic to send actionable alerts to on-call xMatters resources. +type CreateConnectorRequestXmatters struct { + // Defines properties for connectors when type is `.xmatters`. + Config map[string]interface{} `json:"config"` + // The type of connector. + ConnectorTypeId string `json:"connector_type_id"` + // The display name for the connector. + Name string `json:"name"` + // Defines secrets for connectors when type is `.xmatters`. + Secrets map[string]interface{} `json:"secrets"` +} + +// NewCreateConnectorRequestXmatters instantiates a new CreateConnectorRequestXmatters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateConnectorRequestXmatters(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}) *CreateConnectorRequestXmatters { + this := CreateConnectorRequestXmatters{} + this.Config = config + this.ConnectorTypeId = connectorTypeId + this.Name = name + this.Secrets = secrets + return &this +} + +// NewCreateConnectorRequestXmattersWithDefaults instantiates a new CreateConnectorRequestXmatters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateConnectorRequestXmattersWithDefaults() *CreateConnectorRequestXmatters { + this := CreateConnectorRequestXmatters{} + return &this +} + +// GetConfig returns the Config field value +func (o *CreateConnectorRequestXmatters) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestXmatters) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *CreateConnectorRequestXmatters) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *CreateConnectorRequestXmatters) GetConnectorTypeId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestXmatters) GetConnectorTypeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *CreateConnectorRequestXmatters) SetConnectorTypeId(v string) { + o.ConnectorTypeId = v +} + +// GetName returns the Name field value +func (o *CreateConnectorRequestXmatters) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestXmatters) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateConnectorRequestXmatters) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *CreateConnectorRequestXmatters) GetSecrets() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *CreateConnectorRequestXmatters) GetSecretsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Secrets, true +} + +// SetSecrets sets field value +func (o *CreateConnectorRequestXmatters) SetSecrets(v map[string]interface{}) { + o.Secrets = v +} + +func (o CreateConnectorRequestXmatters) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateConnectorRequestXmatters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["connector_type_id"] = o.ConnectorTypeId + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableCreateConnectorRequestXmatters struct { + value *CreateConnectorRequestXmatters + isSet bool +} + +func (v NullableCreateConnectorRequestXmatters) Get() *CreateConnectorRequestXmatters { + return v.value +} + +func (v *NullableCreateConnectorRequestXmatters) Set(val *CreateConnectorRequestXmatters) { + v.value = val + v.isSet = true +} + +func (v NullableCreateConnectorRequestXmatters) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateConnectorRequestXmatters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateConnectorRequestXmatters(val *CreateConnectorRequestXmatters) *NullableCreateConnectorRequestXmatters { + return &NullableCreateConnectorRequestXmatters{value: val, isSet: true} +} + +func (v NullableCreateConnectorRequestXmatters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateConnectorRequestXmatters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_features.go b/generated/kibanaactions/model_features.go new file mode 100644 index 000000000..ea1353179 --- /dev/null +++ b/generated/kibanaactions/model_features.go @@ -0,0 +1,114 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" + "fmt" +) + +// Features The feature that uses the connector. Valid values are `alerting`, `cases`, `uptime`, and `siem`. +type Features string + +// List of features +const ( + ALERTING Features = "alerting" + CASES Features = "cases" + UPTIME Features = "uptime" + SIEM Features = "siem" +) + +// All allowed values of Features enum +var AllowedFeaturesEnumValues = []Features{ + "alerting", + "cases", + "uptime", + "siem", +} + +func (v *Features) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := Features(value) + for _, existing := range AllowedFeaturesEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid Features", value) +} + +// NewFeaturesFromValue returns a pointer to a valid Features +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewFeaturesFromValue(v string) (*Features, error) { + ev := Features(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for Features: valid values are %v", v, AllowedFeaturesEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v Features) IsValid() bool { + for _, existing := range AllowedFeaturesEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to features value +func (v Features) Ptr() *Features { + return &v +} + +type NullableFeatures struct { + value *Features + isSet bool +} + +func (v NullableFeatures) Get() *Features { + return v.value +} + +func (v *NullableFeatures) Set(val *Features) { + v.value = val + v.isSet = true +} + +func (v NullableFeatures) IsSet() bool { + return v.isSet +} + +func (v *NullableFeatures) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFeatures(val *Features) *NullableFeatures { + return &NullableFeatures{value: val, isSet: true} +} + +func (v NullableFeatures) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFeatures) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_get_connector_404_response.go b/generated/kibanaactions/model_get_connector_404_response.go new file mode 100644 index 000000000..bec60f5bd --- /dev/null +++ b/generated/kibanaactions/model_get_connector_404_response.go @@ -0,0 +1,196 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the GetConnector404Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetConnector404Response{} + +// GetConnector404Response struct for GetConnector404Response +type GetConnector404Response struct { + Error *string `json:"error,omitempty"` + Message *string `json:"message,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty"` +} + +// NewGetConnector404Response instantiates a new GetConnector404Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetConnector404Response() *GetConnector404Response { + this := GetConnector404Response{} + return &this +} + +// NewGetConnector404ResponseWithDefaults instantiates a new GetConnector404Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetConnector404ResponseWithDefaults() *GetConnector404Response { + this := GetConnector404Response{} + return &this +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *GetConnector404Response) GetError() string { + if o == nil || IsNil(o.Error) { + var ret string + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetConnector404Response) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *GetConnector404Response) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *GetConnector404Response) SetError(v string) { + o.Error = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *GetConnector404Response) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetConnector404Response) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *GetConnector404Response) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *GetConnector404Response) SetMessage(v string) { + o.Message = &v +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *GetConnector404Response) GetStatusCode() int32 { + if o == nil || IsNil(o.StatusCode) { + var ret int32 + return ret + } + return *o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetConnector404Response) GetStatusCodeOk() (*int32, bool) { + if o == nil || IsNil(o.StatusCode) { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *GetConnector404Response) HasStatusCode() bool { + if o != nil && !IsNil(o.StatusCode) { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. +func (o *GetConnector404Response) SetStatusCode(v int32) { + o.StatusCode = &v +} + +func (o GetConnector404Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetConnector404Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.StatusCode) { + toSerialize["statusCode"] = o.StatusCode + } + return toSerialize, nil +} + +type NullableGetConnector404Response struct { + value *GetConnector404Response + isSet bool +} + +func (v NullableGetConnector404Response) Get() *GetConnector404Response { + return v.value +} + +func (v *NullableGetConnector404Response) Set(val *GetConnector404Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetConnector404Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetConnector404Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetConnector404Response(val *GetConnector404Response) *NullableGetConnector404Response { + return &NullableGetConnector404Response{value: val, isSet: true} +} + +func (v NullableGetConnector404Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetConnector404Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_get_connector_types_response_body_properties_inner.go b/generated/kibanaactions/model_get_connector_types_response_body_properties_inner.go new file mode 100644 index 000000000..3822e540b --- /dev/null +++ b/generated/kibanaactions/model_get_connector_types_response_body_properties_inner.go @@ -0,0 +1,346 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the GetConnectorTypesResponseBodyPropertiesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetConnectorTypesResponseBodyPropertiesInner{} + +// GetConnectorTypesResponseBodyPropertiesInner struct for GetConnectorTypesResponseBodyPropertiesInner +type GetConnectorTypesResponseBodyPropertiesInner struct { + // Indicates whether the connector type is enabled in Kibana. + Enabled *bool `json:"enabled,omitempty"` + // Indicates whether the connector type is enabled in the Kibana `.yml` file. + EnabledInConfig *bool `json:"enabled_in_config,omitempty"` + // Indicates whether the connector is enabled in the license. + EnabledInLicense *bool `json:"enabled_in_license,omitempty"` + Id *ConnectorTypes `json:"id,omitempty"` + // The license that is required to use the connector type. + MinimumLicenseRequired *string `json:"minimum_license_required,omitempty"` + // The name of the connector type. + Name *string `json:"name,omitempty"` + // The Kibana features that are supported by the connector type. + SupportedFeatureIds []Features `json:"supported_feature_ids,omitempty"` +} + +// NewGetConnectorTypesResponseBodyPropertiesInner instantiates a new GetConnectorTypesResponseBodyPropertiesInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetConnectorTypesResponseBodyPropertiesInner() *GetConnectorTypesResponseBodyPropertiesInner { + this := GetConnectorTypesResponseBodyPropertiesInner{} + return &this +} + +// NewGetConnectorTypesResponseBodyPropertiesInnerWithDefaults instantiates a new GetConnectorTypesResponseBodyPropertiesInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetConnectorTypesResponseBodyPropertiesInnerWithDefaults() *GetConnectorTypesResponseBodyPropertiesInner { + this := GetConnectorTypesResponseBodyPropertiesInner{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *GetConnectorTypesResponseBodyPropertiesInner) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *GetConnectorTypesResponseBodyPropertiesInner) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetEnabledInConfig returns the EnabledInConfig field value if set, zero value otherwise. +func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledInConfig() bool { + if o == nil || IsNil(o.EnabledInConfig) { + var ret bool + return ret + } + return *o.EnabledInConfig +} + +// GetEnabledInConfigOk returns a tuple with the EnabledInConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledInConfigOk() (*bool, bool) { + if o == nil || IsNil(o.EnabledInConfig) { + return nil, false + } + return o.EnabledInConfig, true +} + +// HasEnabledInConfig returns a boolean if a field has been set. +func (o *GetConnectorTypesResponseBodyPropertiesInner) HasEnabledInConfig() bool { + if o != nil && !IsNil(o.EnabledInConfig) { + return true + } + + return false +} + +// SetEnabledInConfig gets a reference to the given bool and assigns it to the EnabledInConfig field. +func (o *GetConnectorTypesResponseBodyPropertiesInner) SetEnabledInConfig(v bool) { + o.EnabledInConfig = &v +} + +// GetEnabledInLicense returns the EnabledInLicense field value if set, zero value otherwise. +func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledInLicense() bool { + if o == nil || IsNil(o.EnabledInLicense) { + var ret bool + return ret + } + return *o.EnabledInLicense +} + +// GetEnabledInLicenseOk returns a tuple with the EnabledInLicense field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledInLicenseOk() (*bool, bool) { + if o == nil || IsNil(o.EnabledInLicense) { + return nil, false + } + return o.EnabledInLicense, true +} + +// HasEnabledInLicense returns a boolean if a field has been set. +func (o *GetConnectorTypesResponseBodyPropertiesInner) HasEnabledInLicense() bool { + if o != nil && !IsNil(o.EnabledInLicense) { + return true + } + + return false +} + +// SetEnabledInLicense gets a reference to the given bool and assigns it to the EnabledInLicense field. +func (o *GetConnectorTypesResponseBodyPropertiesInner) SetEnabledInLicense(v bool) { + o.EnabledInLicense = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GetConnectorTypesResponseBodyPropertiesInner) GetId() ConnectorTypes { + if o == nil || IsNil(o.Id) { + var ret ConnectorTypes + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetConnectorTypesResponseBodyPropertiesInner) GetIdOk() (*ConnectorTypes, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GetConnectorTypesResponseBodyPropertiesInner) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given ConnectorTypes and assigns it to the Id field. +func (o *GetConnectorTypesResponseBodyPropertiesInner) SetId(v ConnectorTypes) { + o.Id = &v +} + +// GetMinimumLicenseRequired returns the MinimumLicenseRequired field value if set, zero value otherwise. +func (o *GetConnectorTypesResponseBodyPropertiesInner) GetMinimumLicenseRequired() string { + if o == nil || IsNil(o.MinimumLicenseRequired) { + var ret string + return ret + } + return *o.MinimumLicenseRequired +} + +// GetMinimumLicenseRequiredOk returns a tuple with the MinimumLicenseRequired field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetConnectorTypesResponseBodyPropertiesInner) GetMinimumLicenseRequiredOk() (*string, bool) { + if o == nil || IsNil(o.MinimumLicenseRequired) { + return nil, false + } + return o.MinimumLicenseRequired, true +} + +// HasMinimumLicenseRequired returns a boolean if a field has been set. +func (o *GetConnectorTypesResponseBodyPropertiesInner) HasMinimumLicenseRequired() bool { + if o != nil && !IsNil(o.MinimumLicenseRequired) { + return true + } + + return false +} + +// SetMinimumLicenseRequired gets a reference to the given string and assigns it to the MinimumLicenseRequired field. +func (o *GetConnectorTypesResponseBodyPropertiesInner) SetMinimumLicenseRequired(v string) { + o.MinimumLicenseRequired = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GetConnectorTypesResponseBodyPropertiesInner) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetConnectorTypesResponseBodyPropertiesInner) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GetConnectorTypesResponseBodyPropertiesInner) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GetConnectorTypesResponseBodyPropertiesInner) SetName(v string) { + o.Name = &v +} + +// GetSupportedFeatureIds returns the SupportedFeatureIds field value if set, zero value otherwise. +func (o *GetConnectorTypesResponseBodyPropertiesInner) GetSupportedFeatureIds() []Features { + if o == nil || IsNil(o.SupportedFeatureIds) { + var ret []Features + return ret + } + return o.SupportedFeatureIds +} + +// GetSupportedFeatureIdsOk returns a tuple with the SupportedFeatureIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetConnectorTypesResponseBodyPropertiesInner) GetSupportedFeatureIdsOk() ([]Features, bool) { + if o == nil || IsNil(o.SupportedFeatureIds) { + return nil, false + } + return o.SupportedFeatureIds, true +} + +// HasSupportedFeatureIds returns a boolean if a field has been set. +func (o *GetConnectorTypesResponseBodyPropertiesInner) HasSupportedFeatureIds() bool { + if o != nil && !IsNil(o.SupportedFeatureIds) { + return true + } + + return false +} + +// SetSupportedFeatureIds gets a reference to the given []Features and assigns it to the SupportedFeatureIds field. +func (o *GetConnectorTypesResponseBodyPropertiesInner) SetSupportedFeatureIds(v []Features) { + o.SupportedFeatureIds = v +} + +func (o GetConnectorTypesResponseBodyPropertiesInner) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetConnectorTypesResponseBodyPropertiesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.EnabledInConfig) { + toSerialize["enabled_in_config"] = o.EnabledInConfig + } + if !IsNil(o.EnabledInLicense) { + toSerialize["enabled_in_license"] = o.EnabledInLicense + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.MinimumLicenseRequired) { + toSerialize["minimum_license_required"] = o.MinimumLicenseRequired + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.SupportedFeatureIds) { + toSerialize["supported_feature_ids"] = o.SupportedFeatureIds + } + return toSerialize, nil +} + +type NullableGetConnectorTypesResponseBodyPropertiesInner struct { + value *GetConnectorTypesResponseBodyPropertiesInner + isSet bool +} + +func (v NullableGetConnectorTypesResponseBodyPropertiesInner) Get() *GetConnectorTypesResponseBodyPropertiesInner { + return v.value +} + +func (v *NullableGetConnectorTypesResponseBodyPropertiesInner) Set(val *GetConnectorTypesResponseBodyPropertiesInner) { + v.value = val + v.isSet = true +} + +func (v NullableGetConnectorTypesResponseBodyPropertiesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableGetConnectorTypesResponseBodyPropertiesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetConnectorTypesResponseBodyPropertiesInner(val *GetConnectorTypesResponseBodyPropertiesInner) *NullableGetConnectorTypesResponseBodyPropertiesInner { + return &NullableGetConnectorTypesResponseBodyPropertiesInner{value: val, isSet: true} +} + +func (v NullableGetConnectorTypesResponseBodyPropertiesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetConnectorTypesResponseBodyPropertiesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_get_connectors_response_body_properties.go b/generated/kibanaactions/model_get_connectors_response_body_properties.go new file mode 100644 index 000000000..20df518c0 --- /dev/null +++ b/generated/kibanaactions/model_get_connectors_response_body_properties.go @@ -0,0 +1,332 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the GetConnectorsResponseBodyProperties type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetConnectorsResponseBodyProperties{} + +// GetConnectorsResponseBodyProperties The properties vary for each connector type. +type GetConnectorsResponseBodyProperties struct { + ConnectorTypeId ConnectorTypes `json:"connector_type_id"` + // The configuration for the connector. Configuration properties vary depending on the connector type. + Config map[string]interface{} `json:"config,omitempty"` + // The identifier for the connector. + Id string `json:"id"` + // Indicates whether the connector type is deprecated. + IsDeprecated bool `json:"is_deprecated"` + // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` + // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured bool `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` + // Indicates the number of saved objects that reference the connector. If `is_preconfigured` is true, this value is not calculated. + ReferencedByCount int32 `json:"referenced_by_count"` +} + +// NewGetConnectorsResponseBodyProperties instantiates a new GetConnectorsResponseBodyProperties object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetConnectorsResponseBodyProperties(connectorTypeId ConnectorTypes, id string, isDeprecated bool, isPreconfigured bool, name string, referencedByCount int32) *GetConnectorsResponseBodyProperties { + this := GetConnectorsResponseBodyProperties{} + this.ConnectorTypeId = connectorTypeId + this.Id = id + this.IsDeprecated = isDeprecated + this.IsPreconfigured = isPreconfigured + this.Name = name + this.ReferencedByCount = referencedByCount + return &this +} + +// NewGetConnectorsResponseBodyPropertiesWithDefaults instantiates a new GetConnectorsResponseBodyProperties object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetConnectorsResponseBodyPropertiesWithDefaults() *GetConnectorsResponseBodyProperties { + this := GetConnectorsResponseBodyProperties{} + var referencedByCount int32 = 0 + this.ReferencedByCount = referencedByCount + return &this +} + +// GetConnectorTypeId returns the ConnectorTypeId field value +func (o *GetConnectorsResponseBodyProperties) GetConnectorTypeId() ConnectorTypes { + if o == nil { + var ret ConnectorTypes + return ret + } + + return o.ConnectorTypeId +} + +// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value +// and a boolean to check if the value has been set. +func (o *GetConnectorsResponseBodyProperties) GetConnectorTypeIdOk() (*ConnectorTypes, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorTypeId, true +} + +// SetConnectorTypeId sets field value +func (o *GetConnectorsResponseBodyProperties) SetConnectorTypeId(v ConnectorTypes) { + o.ConnectorTypeId = v +} + +// GetConfig returns the Config field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GetConnectorsResponseBodyProperties) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GetConnectorsResponseBodyProperties) GetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Config) { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *GetConnectorsResponseBodyProperties) HasConfig() bool { + if o != nil && IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. +func (o *GetConnectorsResponseBodyProperties) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetId returns the Id field value +func (o *GetConnectorsResponseBodyProperties) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *GetConnectorsResponseBodyProperties) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *GetConnectorsResponseBodyProperties) SetId(v string) { + o.Id = v +} + +// GetIsDeprecated returns the IsDeprecated field value +func (o *GetConnectorsResponseBodyProperties) GetIsDeprecated() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeprecated +} + +// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value +// and a boolean to check if the value has been set. +func (o *GetConnectorsResponseBodyProperties) GetIsDeprecatedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeprecated, true +} + +// SetIsDeprecated sets field value +func (o *GetConnectorsResponseBodyProperties) SetIsDeprecated(v bool) { + o.IsDeprecated = v +} + +// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. +func (o *GetConnectorsResponseBodyProperties) GetIsMissingSecrets() bool { + if o == nil || IsNil(o.IsMissingSecrets) { + var ret bool + return ret + } + return *o.IsMissingSecrets +} + +// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetConnectorsResponseBodyProperties) GetIsMissingSecretsOk() (*bool, bool) { + if o == nil || IsNil(o.IsMissingSecrets) { + return nil, false + } + return o.IsMissingSecrets, true +} + +// HasIsMissingSecrets returns a boolean if a field has been set. +func (o *GetConnectorsResponseBodyProperties) HasIsMissingSecrets() bool { + if o != nil && !IsNil(o.IsMissingSecrets) { + return true + } + + return false +} + +// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. +func (o *GetConnectorsResponseBodyProperties) SetIsMissingSecrets(v bool) { + o.IsMissingSecrets = &v +} + +// GetIsPreconfigured returns the IsPreconfigured field value +func (o *GetConnectorsResponseBodyProperties) GetIsPreconfigured() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsPreconfigured +} + +// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value +// and a boolean to check if the value has been set. +func (o *GetConnectorsResponseBodyProperties) GetIsPreconfiguredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsPreconfigured, true +} + +// SetIsPreconfigured sets field value +func (o *GetConnectorsResponseBodyProperties) SetIsPreconfigured(v bool) { + o.IsPreconfigured = v +} + +// GetName returns the Name field value +func (o *GetConnectorsResponseBodyProperties) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GetConnectorsResponseBodyProperties) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GetConnectorsResponseBodyProperties) SetName(v string) { + o.Name = v +} + +// GetReferencedByCount returns the ReferencedByCount field value +func (o *GetConnectorsResponseBodyProperties) GetReferencedByCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.ReferencedByCount +} + +// GetReferencedByCountOk returns a tuple with the ReferencedByCount field value +// and a boolean to check if the value has been set. +func (o *GetConnectorsResponseBodyProperties) GetReferencedByCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.ReferencedByCount, true +} + +// SetReferencedByCount sets field value +func (o *GetConnectorsResponseBodyProperties) SetReferencedByCount(v int32) { + o.ReferencedByCount = v +} + +func (o GetConnectorsResponseBodyProperties) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetConnectorsResponseBodyProperties) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["connector_type_id"] = o.ConnectorTypeId + if o.Config != nil { + toSerialize["config"] = o.Config + } + toSerialize["id"] = o.Id + toSerialize["is_deprecated"] = o.IsDeprecated + if !IsNil(o.IsMissingSecrets) { + toSerialize["is_missing_secrets"] = o.IsMissingSecrets + } + toSerialize["is_preconfigured"] = o.IsPreconfigured + toSerialize["name"] = o.Name + toSerialize["referenced_by_count"] = o.ReferencedByCount + return toSerialize, nil +} + +type NullableGetConnectorsResponseBodyProperties struct { + value *GetConnectorsResponseBodyProperties + isSet bool +} + +func (v NullableGetConnectorsResponseBodyProperties) Get() *GetConnectorsResponseBodyProperties { + return v.value +} + +func (v *NullableGetConnectorsResponseBodyProperties) Set(val *GetConnectorsResponseBodyProperties) { + v.value = val + v.isSet = true +} + +func (v NullableGetConnectorsResponseBodyProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableGetConnectorsResponseBodyProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetConnectorsResponseBodyProperties(val *GetConnectorsResponseBodyProperties) *NullableGetConnectorsResponseBodyProperties { + return &NullableGetConnectorsResponseBodyProperties{value: val, isSet: true} +} + +func (v NullableGetConnectorsResponseBodyProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetConnectorsResponseBodyProperties) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_legacy_create_connector_request_properties.go b/generated/kibanaactions/model_legacy_create_connector_request_properties.go new file mode 100644 index 000000000..9c89000c5 --- /dev/null +++ b/generated/kibanaactions/model_legacy_create_connector_request_properties.go @@ -0,0 +1,236 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the LegacyCreateConnectorRequestProperties type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyCreateConnectorRequestProperties{} + +// LegacyCreateConnectorRequestProperties struct for LegacyCreateConnectorRequestProperties +type LegacyCreateConnectorRequestProperties struct { + // The connector type identifier. + ActionTypeId *string `json:"actionTypeId,omitempty"` + // The configuration for the connector. Configuration properties vary depending on the connector type. + Config map[string]interface{} `json:"config,omitempty"` + // The display name for the connector. + Name *string `json:"name,omitempty"` + // The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. NOTE: Remember these values. You must provide them each time you update the connector. + Secrets map[string]interface{} `json:"secrets,omitempty"` +} + +// NewLegacyCreateConnectorRequestProperties instantiates a new LegacyCreateConnectorRequestProperties object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyCreateConnectorRequestProperties() *LegacyCreateConnectorRequestProperties { + this := LegacyCreateConnectorRequestProperties{} + return &this +} + +// NewLegacyCreateConnectorRequestPropertiesWithDefaults instantiates a new LegacyCreateConnectorRequestProperties object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyCreateConnectorRequestPropertiesWithDefaults() *LegacyCreateConnectorRequestProperties { + this := LegacyCreateConnectorRequestProperties{} + return &this +} + +// GetActionTypeId returns the ActionTypeId field value if set, zero value otherwise. +func (o *LegacyCreateConnectorRequestProperties) GetActionTypeId() string { + if o == nil || IsNil(o.ActionTypeId) { + var ret string + return ret + } + return *o.ActionTypeId +} + +// GetActionTypeIdOk returns a tuple with the ActionTypeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyCreateConnectorRequestProperties) GetActionTypeIdOk() (*string, bool) { + if o == nil || IsNil(o.ActionTypeId) { + return nil, false + } + return o.ActionTypeId, true +} + +// HasActionTypeId returns a boolean if a field has been set. +func (o *LegacyCreateConnectorRequestProperties) HasActionTypeId() bool { + if o != nil && !IsNil(o.ActionTypeId) { + return true + } + + return false +} + +// SetActionTypeId gets a reference to the given string and assigns it to the ActionTypeId field. +func (o *LegacyCreateConnectorRequestProperties) SetActionTypeId(v string) { + o.ActionTypeId = &v +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *LegacyCreateConnectorRequestProperties) GetConfig() map[string]interface{} { + if o == nil || IsNil(o.Config) { + var ret map[string]interface{} + return ret + } + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyCreateConnectorRequestProperties) GetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Config) { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *LegacyCreateConnectorRequestProperties) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. +func (o *LegacyCreateConnectorRequestProperties) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *LegacyCreateConnectorRequestProperties) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyCreateConnectorRequestProperties) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *LegacyCreateConnectorRequestProperties) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *LegacyCreateConnectorRequestProperties) SetName(v string) { + o.Name = &v +} + +// GetSecrets returns the Secrets field value if set, zero value otherwise. +func (o *LegacyCreateConnectorRequestProperties) GetSecrets() map[string]interface{} { + if o == nil || IsNil(o.Secrets) { + var ret map[string]interface{} + return ret + } + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyCreateConnectorRequestProperties) GetSecretsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Secrets) { + return map[string]interface{}{}, false + } + return o.Secrets, true +} + +// HasSecrets returns a boolean if a field has been set. +func (o *LegacyCreateConnectorRequestProperties) HasSecrets() bool { + if o != nil && !IsNil(o.Secrets) { + return true + } + + return false +} + +// SetSecrets gets a reference to the given map[string]interface{} and assigns it to the Secrets field. +func (o *LegacyCreateConnectorRequestProperties) SetSecrets(v map[string]interface{}) { + o.Secrets = v +} + +func (o LegacyCreateConnectorRequestProperties) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyCreateConnectorRequestProperties) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ActionTypeId) { + toSerialize["actionTypeId"] = o.ActionTypeId + } + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Secrets) { + toSerialize["secrets"] = o.Secrets + } + return toSerialize, nil +} + +type NullableLegacyCreateConnectorRequestProperties struct { + value *LegacyCreateConnectorRequestProperties + isSet bool +} + +func (v NullableLegacyCreateConnectorRequestProperties) Get() *LegacyCreateConnectorRequestProperties { + return v.value +} + +func (v *NullableLegacyCreateConnectorRequestProperties) Set(val *LegacyCreateConnectorRequestProperties) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyCreateConnectorRequestProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyCreateConnectorRequestProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyCreateConnectorRequestProperties(val *LegacyCreateConnectorRequestProperties) *NullableLegacyCreateConnectorRequestProperties { + return &NullableLegacyCreateConnectorRequestProperties{value: val, isSet: true} +} + +func (v NullableLegacyCreateConnectorRequestProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyCreateConnectorRequestProperties) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_legacy_get_connector_types_response_body_properties_inner.go b/generated/kibanaactions/model_legacy_get_connector_types_response_body_properties_inner.go new file mode 100644 index 000000000..2ef5a8dad --- /dev/null +++ b/generated/kibanaactions/model_legacy_get_connector_types_response_body_properties_inner.go @@ -0,0 +1,310 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the LegacyGetConnectorTypesResponseBodyPropertiesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyGetConnectorTypesResponseBodyPropertiesInner{} + +// LegacyGetConnectorTypesResponseBodyPropertiesInner struct for LegacyGetConnectorTypesResponseBodyPropertiesInner +type LegacyGetConnectorTypesResponseBodyPropertiesInner struct { + // Indicates whether the connector type is enabled in Kibana. + Enabled *bool `json:"enabled,omitempty"` + // Indicates whether the connector type is enabled in the Kibana `.yml` file. + EnabledInConfig *bool `json:"enabledInConfig,omitempty"` + // Indicates whether the connector is enabled in the license. + EnabledInLicense *bool `json:"enabledInLicense,omitempty"` + // The unique identifier for the connector type. + Id *string `json:"id,omitempty"` + // The license that is required to use the connector type. + MinimumLicenseRequired *string `json:"minimumLicenseRequired,omitempty"` + // The name of the connector type. + Name *string `json:"name,omitempty"` +} + +// NewLegacyGetConnectorTypesResponseBodyPropertiesInner instantiates a new LegacyGetConnectorTypesResponseBodyPropertiesInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyGetConnectorTypesResponseBodyPropertiesInner() *LegacyGetConnectorTypesResponseBodyPropertiesInner { + this := LegacyGetConnectorTypesResponseBodyPropertiesInner{} + return &this +} + +// NewLegacyGetConnectorTypesResponseBodyPropertiesInnerWithDefaults instantiates a new LegacyGetConnectorTypesResponseBodyPropertiesInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyGetConnectorTypesResponseBodyPropertiesInnerWithDefaults() *LegacyGetConnectorTypesResponseBodyPropertiesInner { + this := LegacyGetConnectorTypesResponseBodyPropertiesInner{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetEnabledInConfig returns the EnabledInConfig field value if set, zero value otherwise. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledInConfig() bool { + if o == nil || IsNil(o.EnabledInConfig) { + var ret bool + return ret + } + return *o.EnabledInConfig +} + +// GetEnabledInConfigOk returns a tuple with the EnabledInConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledInConfigOk() (*bool, bool) { + if o == nil || IsNil(o.EnabledInConfig) { + return nil, false + } + return o.EnabledInConfig, true +} + +// HasEnabledInConfig returns a boolean if a field has been set. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasEnabledInConfig() bool { + if o != nil && !IsNil(o.EnabledInConfig) { + return true + } + + return false +} + +// SetEnabledInConfig gets a reference to the given bool and assigns it to the EnabledInConfig field. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetEnabledInConfig(v bool) { + o.EnabledInConfig = &v +} + +// GetEnabledInLicense returns the EnabledInLicense field value if set, zero value otherwise. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledInLicense() bool { + if o == nil || IsNil(o.EnabledInLicense) { + var ret bool + return ret + } + return *o.EnabledInLicense +} + +// GetEnabledInLicenseOk returns a tuple with the EnabledInLicense field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledInLicenseOk() (*bool, bool) { + if o == nil || IsNil(o.EnabledInLicense) { + return nil, false + } + return o.EnabledInLicense, true +} + +// HasEnabledInLicense returns a boolean if a field has been set. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasEnabledInLicense() bool { + if o != nil && !IsNil(o.EnabledInLicense) { + return true + } + + return false +} + +// SetEnabledInLicense gets a reference to the given bool and assigns it to the EnabledInLicense field. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetEnabledInLicense(v bool) { + o.EnabledInLicense = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetId(v string) { + o.Id = &v +} + +// GetMinimumLicenseRequired returns the MinimumLicenseRequired field value if set, zero value otherwise. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetMinimumLicenseRequired() string { + if o == nil || IsNil(o.MinimumLicenseRequired) { + var ret string + return ret + } + return *o.MinimumLicenseRequired +} + +// GetMinimumLicenseRequiredOk returns a tuple with the MinimumLicenseRequired field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetMinimumLicenseRequiredOk() (*string, bool) { + if o == nil || IsNil(o.MinimumLicenseRequired) { + return nil, false + } + return o.MinimumLicenseRequired, true +} + +// HasMinimumLicenseRequired returns a boolean if a field has been set. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasMinimumLicenseRequired() bool { + if o != nil && !IsNil(o.MinimumLicenseRequired) { + return true + } + + return false +} + +// SetMinimumLicenseRequired gets a reference to the given string and assigns it to the MinimumLicenseRequired field. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetMinimumLicenseRequired(v string) { + o.MinimumLicenseRequired = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetName(v string) { + o.Name = &v +} + +func (o LegacyGetConnectorTypesResponseBodyPropertiesInner) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyGetConnectorTypesResponseBodyPropertiesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.EnabledInConfig) { + toSerialize["enabledInConfig"] = o.EnabledInConfig + } + if !IsNil(o.EnabledInLicense) { + toSerialize["enabledInLicense"] = o.EnabledInLicense + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.MinimumLicenseRequired) { + toSerialize["minimumLicenseRequired"] = o.MinimumLicenseRequired + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableLegacyGetConnectorTypesResponseBodyPropertiesInner struct { + value *LegacyGetConnectorTypesResponseBodyPropertiesInner + isSet bool +} + +func (v NullableLegacyGetConnectorTypesResponseBodyPropertiesInner) Get() *LegacyGetConnectorTypesResponseBodyPropertiesInner { + return v.value +} + +func (v *NullableLegacyGetConnectorTypesResponseBodyPropertiesInner) Set(val *LegacyGetConnectorTypesResponseBodyPropertiesInner) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyGetConnectorTypesResponseBodyPropertiesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyGetConnectorTypesResponseBodyPropertiesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyGetConnectorTypesResponseBodyPropertiesInner(val *LegacyGetConnectorTypesResponseBodyPropertiesInner) *NullableLegacyGetConnectorTypesResponseBodyPropertiesInner { + return &NullableLegacyGetConnectorTypesResponseBodyPropertiesInner{value: val, isSet: true} +} + +func (v NullableLegacyGetConnectorTypesResponseBodyPropertiesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyGetConnectorTypesResponseBodyPropertiesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_legacy_run_connector_200_response.go b/generated/kibanaactions/model_legacy_run_connector_200_response.go new file mode 100644 index 000000000..bcf7ad780 --- /dev/null +++ b/generated/kibanaactions/model_legacy_run_connector_200_response.go @@ -0,0 +1,197 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the LegacyRunConnector200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyRunConnector200Response{} + +// LegacyRunConnector200Response struct for LegacyRunConnector200Response +type LegacyRunConnector200Response struct { + ActionId *string `json:"actionId,omitempty"` + Data *RunConnector200ResponseData `json:"data,omitempty"` + // The status of the action. + Status *string `json:"status,omitempty"` +} + +// NewLegacyRunConnector200Response instantiates a new LegacyRunConnector200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyRunConnector200Response() *LegacyRunConnector200Response { + this := LegacyRunConnector200Response{} + return &this +} + +// NewLegacyRunConnector200ResponseWithDefaults instantiates a new LegacyRunConnector200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyRunConnector200ResponseWithDefaults() *LegacyRunConnector200Response { + this := LegacyRunConnector200Response{} + return &this +} + +// GetActionId returns the ActionId field value if set, zero value otherwise. +func (o *LegacyRunConnector200Response) GetActionId() string { + if o == nil || IsNil(o.ActionId) { + var ret string + return ret + } + return *o.ActionId +} + +// GetActionIdOk returns a tuple with the ActionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyRunConnector200Response) GetActionIdOk() (*string, bool) { + if o == nil || IsNil(o.ActionId) { + return nil, false + } + return o.ActionId, true +} + +// HasActionId returns a boolean if a field has been set. +func (o *LegacyRunConnector200Response) HasActionId() bool { + if o != nil && !IsNil(o.ActionId) { + return true + } + + return false +} + +// SetActionId gets a reference to the given string and assigns it to the ActionId field. +func (o *LegacyRunConnector200Response) SetActionId(v string) { + o.ActionId = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *LegacyRunConnector200Response) GetData() RunConnector200ResponseData { + if o == nil || IsNil(o.Data) { + var ret RunConnector200ResponseData + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyRunConnector200Response) GetDataOk() (*RunConnector200ResponseData, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *LegacyRunConnector200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given RunConnector200ResponseData and assigns it to the Data field. +func (o *LegacyRunConnector200Response) SetData(v RunConnector200ResponseData) { + o.Data = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *LegacyRunConnector200Response) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyRunConnector200Response) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *LegacyRunConnector200Response) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *LegacyRunConnector200Response) SetStatus(v string) { + o.Status = &v +} + +func (o LegacyRunConnector200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyRunConnector200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ActionId) { + toSerialize["actionId"] = o.ActionId + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableLegacyRunConnector200Response struct { + value *LegacyRunConnector200Response + isSet bool +} + +func (v NullableLegacyRunConnector200Response) Get() *LegacyRunConnector200Response { + return v.value +} + +func (v *NullableLegacyRunConnector200Response) Set(val *LegacyRunConnector200Response) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyRunConnector200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyRunConnector200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyRunConnector200Response(val *LegacyRunConnector200Response) *NullableLegacyRunConnector200Response { + return &NullableLegacyRunConnector200Response{value: val, isSet: true} +} + +func (v NullableLegacyRunConnector200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyRunConnector200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_legacy_run_connector_request_body_properties.go b/generated/kibanaactions/model_legacy_run_connector_request_body_properties.go new file mode 100644 index 000000000..7292d0b0e --- /dev/null +++ b/generated/kibanaactions/model_legacy_run_connector_request_body_properties.go @@ -0,0 +1,116 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the LegacyRunConnectorRequestBodyProperties type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyRunConnectorRequestBodyProperties{} + +// LegacyRunConnectorRequestBodyProperties The properties vary depending on the connector type. +type LegacyRunConnectorRequestBodyProperties struct { + // The parameters of the connector. Parameter properties vary depending on the connector type. + Params map[string]interface{} `json:"params"` +} + +// NewLegacyRunConnectorRequestBodyProperties instantiates a new LegacyRunConnectorRequestBodyProperties object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyRunConnectorRequestBodyProperties(params map[string]interface{}) *LegacyRunConnectorRequestBodyProperties { + this := LegacyRunConnectorRequestBodyProperties{} + this.Params = params + return &this +} + +// NewLegacyRunConnectorRequestBodyPropertiesWithDefaults instantiates a new LegacyRunConnectorRequestBodyProperties object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyRunConnectorRequestBodyPropertiesWithDefaults() *LegacyRunConnectorRequestBodyProperties { + this := LegacyRunConnectorRequestBodyProperties{} + return &this +} + +// GetParams returns the Params field value +func (o *LegacyRunConnectorRequestBodyProperties) GetParams() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Params +} + +// GetParamsOk returns a tuple with the Params field value +// and a boolean to check if the value has been set. +func (o *LegacyRunConnectorRequestBodyProperties) GetParamsOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Params, true +} + +// SetParams sets field value +func (o *LegacyRunConnectorRequestBodyProperties) SetParams(v map[string]interface{}) { + o.Params = v +} + +func (o LegacyRunConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyRunConnectorRequestBodyProperties) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["params"] = o.Params + return toSerialize, nil +} + +type NullableLegacyRunConnectorRequestBodyProperties struct { + value *LegacyRunConnectorRequestBodyProperties + isSet bool +} + +func (v NullableLegacyRunConnectorRequestBodyProperties) Get() *LegacyRunConnectorRequestBodyProperties { + return v.value +} + +func (v *NullableLegacyRunConnectorRequestBodyProperties) Set(val *LegacyRunConnectorRequestBodyProperties) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyRunConnectorRequestBodyProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyRunConnectorRequestBodyProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyRunConnectorRequestBodyProperties(val *LegacyRunConnectorRequestBodyProperties) *NullableLegacyRunConnectorRequestBodyProperties { + return &NullableLegacyRunConnectorRequestBodyProperties{value: val, isSet: true} +} + +func (v NullableLegacyRunConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyRunConnectorRequestBodyProperties) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_legacy_update_connector_request_body_properties.go b/generated/kibanaactions/model_legacy_update_connector_request_body_properties.go new file mode 100644 index 000000000..c53dde372 --- /dev/null +++ b/generated/kibanaactions/model_legacy_update_connector_request_body_properties.go @@ -0,0 +1,199 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the LegacyUpdateConnectorRequestBodyProperties type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LegacyUpdateConnectorRequestBodyProperties{} + +// LegacyUpdateConnectorRequestBodyProperties The properties vary depending on the connector type. +type LegacyUpdateConnectorRequestBodyProperties struct { + // The new connector configuration. Configuration properties vary depending on the connector type. + Config map[string]interface{} `json:"config,omitempty"` + // The new name for the connector. + Name *string `json:"name,omitempty"` + // The updated secrets configuration for the connector. Secrets properties vary depending on the connector type. + Secrets map[string]interface{} `json:"secrets,omitempty"` +} + +// NewLegacyUpdateConnectorRequestBodyProperties instantiates a new LegacyUpdateConnectorRequestBodyProperties object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLegacyUpdateConnectorRequestBodyProperties() *LegacyUpdateConnectorRequestBodyProperties { + this := LegacyUpdateConnectorRequestBodyProperties{} + return &this +} + +// NewLegacyUpdateConnectorRequestBodyPropertiesWithDefaults instantiates a new LegacyUpdateConnectorRequestBodyProperties object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLegacyUpdateConnectorRequestBodyPropertiesWithDefaults() *LegacyUpdateConnectorRequestBodyProperties { + this := LegacyUpdateConnectorRequestBodyProperties{} + return &this +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *LegacyUpdateConnectorRequestBodyProperties) GetConfig() map[string]interface{} { + if o == nil || IsNil(o.Config) { + var ret map[string]interface{} + return ret + } + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyUpdateConnectorRequestBodyProperties) GetConfigOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Config) { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *LegacyUpdateConnectorRequestBodyProperties) HasConfig() bool { + if o != nil && !IsNil(o.Config) { + return true + } + + return false +} + +// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. +func (o *LegacyUpdateConnectorRequestBodyProperties) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *LegacyUpdateConnectorRequestBodyProperties) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyUpdateConnectorRequestBodyProperties) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *LegacyUpdateConnectorRequestBodyProperties) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *LegacyUpdateConnectorRequestBodyProperties) SetName(v string) { + o.Name = &v +} + +// GetSecrets returns the Secrets field value if set, zero value otherwise. +func (o *LegacyUpdateConnectorRequestBodyProperties) GetSecrets() map[string]interface{} { + if o == nil || IsNil(o.Secrets) { + var ret map[string]interface{} + return ret + } + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegacyUpdateConnectorRequestBodyProperties) GetSecretsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Secrets) { + return map[string]interface{}{}, false + } + return o.Secrets, true +} + +// HasSecrets returns a boolean if a field has been set. +func (o *LegacyUpdateConnectorRequestBodyProperties) HasSecrets() bool { + if o != nil && !IsNil(o.Secrets) { + return true + } + + return false +} + +// SetSecrets gets a reference to the given map[string]interface{} and assigns it to the Secrets field. +func (o *LegacyUpdateConnectorRequestBodyProperties) SetSecrets(v map[string]interface{}) { + o.Secrets = v +} + +func (o LegacyUpdateConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegacyUpdateConnectorRequestBodyProperties) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Config) { + toSerialize["config"] = o.Config + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Secrets) { + toSerialize["secrets"] = o.Secrets + } + return toSerialize, nil +} + +type NullableLegacyUpdateConnectorRequestBodyProperties struct { + value *LegacyUpdateConnectorRequestBodyProperties + isSet bool +} + +func (v NullableLegacyUpdateConnectorRequestBodyProperties) Get() *LegacyUpdateConnectorRequestBodyProperties { + return v.value +} + +func (v *NullableLegacyUpdateConnectorRequestBodyProperties) Set(val *LegacyUpdateConnectorRequestBodyProperties) { + v.value = val + v.isSet = true +} + +func (v NullableLegacyUpdateConnectorRequestBodyProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableLegacyUpdateConnectorRequestBodyProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegacyUpdateConnectorRequestBodyProperties(val *LegacyUpdateConnectorRequestBodyProperties) *NullableLegacyUpdateConnectorRequestBodyProperties { + return &NullableLegacyUpdateConnectorRequestBodyProperties{value: val, isSet: true} +} + +func (v NullableLegacyUpdateConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegacyUpdateConnectorRequestBodyProperties) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_rule_name_mapping.go b/generated/kibanaactions/model_rule_name_mapping.go new file mode 100644 index 000000000..2a592ef9b --- /dev/null +++ b/generated/kibanaactions/model_rule_name_mapping.go @@ -0,0 +1,200 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RuleNameMapping type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RuleNameMapping{} + +// RuleNameMapping Mapping for the name of the alert's rule. +type RuleNameMapping struct { + // The type of field in Swimlane. + FieldType string `json:"fieldType"` + // The identifier for the field in Swimlane. + Id string `json:"id"` + // The key for the field in Swimlane. + Key string `json:"key"` + // The name of the field in Swimlane. + Name string `json:"name"` +} + +// NewRuleNameMapping instantiates a new RuleNameMapping object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRuleNameMapping(fieldType string, id string, key string, name string) *RuleNameMapping { + this := RuleNameMapping{} + this.FieldType = fieldType + this.Id = id + this.Key = key + this.Name = name + return &this +} + +// NewRuleNameMappingWithDefaults instantiates a new RuleNameMapping object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRuleNameMappingWithDefaults() *RuleNameMapping { + this := RuleNameMapping{} + return &this +} + +// GetFieldType returns the FieldType field value +func (o *RuleNameMapping) GetFieldType() string { + if o == nil { + var ret string + return ret + } + + return o.FieldType +} + +// GetFieldTypeOk returns a tuple with the FieldType field value +// and a boolean to check if the value has been set. +func (o *RuleNameMapping) GetFieldTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FieldType, true +} + +// SetFieldType sets field value +func (o *RuleNameMapping) SetFieldType(v string) { + o.FieldType = v +} + +// GetId returns the Id field value +func (o *RuleNameMapping) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RuleNameMapping) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *RuleNameMapping) SetId(v string) { + o.Id = v +} + +// GetKey returns the Key field value +func (o *RuleNameMapping) GetKey() string { + if o == nil { + var ret string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *RuleNameMapping) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Key, true +} + +// SetKey sets field value +func (o *RuleNameMapping) SetKey(v string) { + o.Key = v +} + +// GetName returns the Name field value +func (o *RuleNameMapping) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RuleNameMapping) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RuleNameMapping) SetName(v string) { + o.Name = v +} + +func (o RuleNameMapping) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RuleNameMapping) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["fieldType"] = o.FieldType + toSerialize["id"] = o.Id + toSerialize["key"] = o.Key + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableRuleNameMapping struct { + value *RuleNameMapping + isSet bool +} + +func (v NullableRuleNameMapping) Get() *RuleNameMapping { + return v.value +} + +func (v *NullableRuleNameMapping) Set(val *RuleNameMapping) { + v.value = val + v.isSet = true +} + +func (v NullableRuleNameMapping) IsSet() bool { + return v.isSet +} + +func (v *NullableRuleNameMapping) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRuleNameMapping(val *RuleNameMapping) *NullableRuleNameMapping { + return &NullableRuleNameMapping{value: val, isSet: true} +} + +func (v NullableRuleNameMapping) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRuleNameMapping) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_200_response.go b/generated/kibanaactions/model_run_connector_200_response.go new file mode 100644 index 000000000..c8cebb6d0 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_200_response.go @@ -0,0 +1,180 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnector200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnector200Response{} + +// RunConnector200Response struct for RunConnector200Response +type RunConnector200Response struct { + // The identifier for the connector. + ConnectorId string `json:"connector_id"` + Data *RunConnector200ResponseData `json:"data,omitempty"` + // The status of the action. + Status string `json:"status"` +} + +// NewRunConnector200Response instantiates a new RunConnector200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnector200Response(connectorId string, status string) *RunConnector200Response { + this := RunConnector200Response{} + this.ConnectorId = connectorId + this.Status = status + return &this +} + +// NewRunConnector200ResponseWithDefaults instantiates a new RunConnector200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnector200ResponseWithDefaults() *RunConnector200Response { + this := RunConnector200Response{} + return &this +} + +// GetConnectorId returns the ConnectorId field value +func (o *RunConnector200Response) GetConnectorId() string { + if o == nil { + var ret string + return ret + } + + return o.ConnectorId +} + +// GetConnectorIdOk returns a tuple with the ConnectorId field value +// and a boolean to check if the value has been set. +func (o *RunConnector200Response) GetConnectorIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorId, true +} + +// SetConnectorId sets field value +func (o *RunConnector200Response) SetConnectorId(v string) { + o.ConnectorId = v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *RunConnector200Response) GetData() RunConnector200ResponseData { + if o == nil || IsNil(o.Data) { + var ret RunConnector200ResponseData + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnector200Response) GetDataOk() (*RunConnector200ResponseData, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *RunConnector200Response) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given RunConnector200ResponseData and assigns it to the Data field. +func (o *RunConnector200Response) SetData(v RunConnector200ResponseData) { + o.Data = &v +} + +// GetStatus returns the Status field value +func (o *RunConnector200Response) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *RunConnector200Response) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *RunConnector200Response) SetStatus(v string) { + o.Status = v +} + +func (o RunConnector200Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnector200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["connector_id"] = o.ConnectorId + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + toSerialize["status"] = o.Status + return toSerialize, nil +} + +type NullableRunConnector200Response struct { + value *RunConnector200Response + isSet bool +} + +func (v NullableRunConnector200Response) Get() *RunConnector200Response { + return v.value +} + +func (v *NullableRunConnector200Response) Set(val *RunConnector200Response) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnector200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnector200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnector200Response(val *RunConnector200Response) *NullableRunConnector200Response { + return &NullableRunConnector200Response{value: val, isSet: true} +} + +func (v NullableRunConnector200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnector200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_200_response_data.go b/generated/kibanaactions/model_run_connector_200_response_data.go new file mode 100644 index 000000000..78537551f --- /dev/null +++ b/generated/kibanaactions/model_run_connector_200_response_data.go @@ -0,0 +1,145 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" + "fmt" +) + +// RunConnector200ResponseData - struct for RunConnector200ResponseData +type RunConnector200ResponseData struct { + ArrayOfMapmapOfStringinterface *[]map[string]interface{} + MapmapOfStringinterface *map[string]interface{} +} + +// []map[string]interface{}AsRunConnector200ResponseData is a convenience function that returns []map[string]interface{} wrapped in RunConnector200ResponseData +func ArrayOfMapmapOfStringinterfaceAsRunConnector200ResponseData(v *[]map[string]interface{}) RunConnector200ResponseData { + return RunConnector200ResponseData{ + ArrayOfMapmapOfStringinterface: v, + } +} + +// map[string]interface{}AsRunConnector200ResponseData is a convenience function that returns map[string]interface{} wrapped in RunConnector200ResponseData +func MapmapOfStringinterfaceAsRunConnector200ResponseData(v *map[string]interface{}) RunConnector200ResponseData { + return RunConnector200ResponseData{ + MapmapOfStringinterface: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *RunConnector200ResponseData) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into ArrayOfMapmapOfStringinterface{} + err = newStrictDecoder(data).Decode(&dst.ArrayOfMapmapOfStringinterface) + if err == nil { + jsonArrayOfMapmapOfStringinterface, _ := json.Marshal(dst.ArrayOfMapmapOfStringinterface) + if string(jsonArrayOfMapmapOfStringinterface) == "{}" { // empty struct + dst.ArrayOfMapmapOfStringinterface = nil + } else { + match++ + } + } else { + dst.ArrayOfMapmapOfStringinterface = nil + } + + // try to unmarshal data into MapmapOfStringinterface{} + err = newStrictDecoder(data).Decode(&dst.MapmapOfStringinterface) + if err == nil { + jsonMapmapOfStringinterface, _ := json.Marshal(dst.MapmapOfStringinterface) + if string(jsonMapmapOfStringinterface) == "{}" { // empty struct + dst.MapmapOfStringinterface = nil + } else { + match++ + } + } else { + dst.MapmapOfStringinterface = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.ArrayOfMapmapOfStringinterface = nil + dst.MapmapOfStringinterface = nil + + return fmt.Errorf("data matches more than one schema in oneOf(RunConnector200ResponseData)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(RunConnector200ResponseData)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src RunConnector200ResponseData) MarshalJSON() ([]byte, error) { + if src.ArrayOfMapmapOfStringinterface != nil { + return json.Marshal(&src.ArrayOfMapmapOfStringinterface) + } + + if src.MapmapOfStringinterface != nil { + return json.Marshal(&src.MapmapOfStringinterface) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *RunConnector200ResponseData) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.ArrayOfMapmapOfStringinterface != nil { + return obj.ArrayOfMapmapOfStringinterface + } + + if obj.MapmapOfStringinterface != nil { + return obj.MapmapOfStringinterface + } + + // all schemas are nil + return nil +} + +type NullableRunConnector200ResponseData struct { + value *RunConnector200ResponseData + isSet bool +} + +func (v NullableRunConnector200ResponseData) Get() *RunConnector200ResponseData { + return v.value +} + +func (v *NullableRunConnector200ResponseData) Set(val *RunConnector200ResponseData) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnector200ResponseData) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnector200ResponseData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnector200ResponseData(val *RunConnector200ResponseData) *NullableRunConnector200ResponseData { + return &NullableRunConnector200ResponseData{value: val, isSet: true} +} + +func (v NullableRunConnector200ResponseData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnector200ResponseData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_params_documents.go b/generated/kibanaactions/model_run_connector_params_documents.go new file mode 100644 index 000000000..64a876b41 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_params_documents.go @@ -0,0 +1,116 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorParamsDocuments type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorParamsDocuments{} + +// RunConnectorParamsDocuments Test an action that indexes a document into Elasticsearch. +type RunConnectorParamsDocuments struct { + // The documents in JSON format for index connectors. + Documents []map[string]interface{} `json:"documents"` +} + +// NewRunConnectorParamsDocuments instantiates a new RunConnectorParamsDocuments object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorParamsDocuments(documents []map[string]interface{}) *RunConnectorParamsDocuments { + this := RunConnectorParamsDocuments{} + this.Documents = documents + return &this +} + +// NewRunConnectorParamsDocumentsWithDefaults instantiates a new RunConnectorParamsDocuments object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorParamsDocumentsWithDefaults() *RunConnectorParamsDocuments { + this := RunConnectorParamsDocuments{} + return &this +} + +// GetDocuments returns the Documents field value +func (o *RunConnectorParamsDocuments) GetDocuments() []map[string]interface{} { + if o == nil { + var ret []map[string]interface{} + return ret + } + + return o.Documents +} + +// GetDocumentsOk returns a tuple with the Documents field value +// and a boolean to check if the value has been set. +func (o *RunConnectorParamsDocuments) GetDocumentsOk() ([]map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Documents, true +} + +// SetDocuments sets field value +func (o *RunConnectorParamsDocuments) SetDocuments(v []map[string]interface{}) { + o.Documents = v +} + +func (o RunConnectorParamsDocuments) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorParamsDocuments) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["documents"] = o.Documents + return toSerialize, nil +} + +type NullableRunConnectorParamsDocuments struct { + value *RunConnectorParamsDocuments + isSet bool +} + +func (v NullableRunConnectorParamsDocuments) Get() *RunConnectorParamsDocuments { + return v.value +} + +func (v *NullableRunConnectorParamsDocuments) Set(val *RunConnectorParamsDocuments) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorParamsDocuments) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorParamsDocuments) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorParamsDocuments(val *RunConnectorParamsDocuments) *NullableRunConnectorParamsDocuments { + return &NullableRunConnectorParamsDocuments{value: val, isSet: true} +} + +func (v NullableRunConnectorParamsDocuments) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorParamsDocuments) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_params_level_message.go b/generated/kibanaactions/model_run_connector_params_level_message.go new file mode 100644 index 000000000..a8c7a2df2 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_params_level_message.go @@ -0,0 +1,157 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorParamsLevelMessage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorParamsLevelMessage{} + +// RunConnectorParamsLevelMessage Test an action that writes an entry to the Kibana server log. +type RunConnectorParamsLevelMessage struct { + // The log level of the message for server log connectors. + Level *string `json:"level,omitempty"` + // The message for server log connectors. + Message string `json:"message"` +} + +// NewRunConnectorParamsLevelMessage instantiates a new RunConnectorParamsLevelMessage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorParamsLevelMessage(message string) *RunConnectorParamsLevelMessage { + this := RunConnectorParamsLevelMessage{} + var level string = "info" + this.Level = &level + this.Message = message + return &this +} + +// NewRunConnectorParamsLevelMessageWithDefaults instantiates a new RunConnectorParamsLevelMessage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorParamsLevelMessageWithDefaults() *RunConnectorParamsLevelMessage { + this := RunConnectorParamsLevelMessage{} + var level string = "info" + this.Level = &level + return &this +} + +// GetLevel returns the Level field value if set, zero value otherwise. +func (o *RunConnectorParamsLevelMessage) GetLevel() string { + if o == nil || IsNil(o.Level) { + var ret string + return ret + } + return *o.Level +} + +// GetLevelOk returns a tuple with the Level field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorParamsLevelMessage) GetLevelOk() (*string, bool) { + if o == nil || IsNil(o.Level) { + return nil, false + } + return o.Level, true +} + +// HasLevel returns a boolean if a field has been set. +func (o *RunConnectorParamsLevelMessage) HasLevel() bool { + if o != nil && !IsNil(o.Level) { + return true + } + + return false +} + +// SetLevel gets a reference to the given string and assigns it to the Level field. +func (o *RunConnectorParamsLevelMessage) SetLevel(v string) { + o.Level = &v +} + +// GetMessage returns the Message field value +func (o *RunConnectorParamsLevelMessage) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *RunConnectorParamsLevelMessage) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *RunConnectorParamsLevelMessage) SetMessage(v string) { + o.Message = v +} + +func (o RunConnectorParamsLevelMessage) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorParamsLevelMessage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Level) { + toSerialize["level"] = o.Level + } + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableRunConnectorParamsLevelMessage struct { + value *RunConnectorParamsLevelMessage + isSet bool +} + +func (v NullableRunConnectorParamsLevelMessage) Get() *RunConnectorParamsLevelMessage { + return v.value +} + +func (v *NullableRunConnectorParamsLevelMessage) Set(val *RunConnectorParamsLevelMessage) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorParamsLevelMessage) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorParamsLevelMessage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorParamsLevelMessage(val *RunConnectorParamsLevelMessage) *NullableRunConnectorParamsLevelMessage { + return &NullableRunConnectorParamsLevelMessage{value: val, isSet: true} +} + +func (v NullableRunConnectorParamsLevelMessage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorParamsLevelMessage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_request_body_properties.go b/generated/kibanaactions/model_run_connector_request_body_properties.go new file mode 100644 index 000000000..a2df6a4f9 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_request_body_properties.go @@ -0,0 +1,115 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorRequestBodyProperties type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorRequestBodyProperties{} + +// RunConnectorRequestBodyProperties The properties vary depending on the connector type. +type RunConnectorRequestBodyProperties struct { + Params RunConnectorRequestBodyPropertiesParams `json:"params"` +} + +// NewRunConnectorRequestBodyProperties instantiates a new RunConnectorRequestBodyProperties object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorRequestBodyProperties(params RunConnectorRequestBodyPropertiesParams) *RunConnectorRequestBodyProperties { + this := RunConnectorRequestBodyProperties{} + this.Params = params + return &this +} + +// NewRunConnectorRequestBodyPropertiesWithDefaults instantiates a new RunConnectorRequestBodyProperties object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorRequestBodyPropertiesWithDefaults() *RunConnectorRequestBodyProperties { + this := RunConnectorRequestBodyProperties{} + return &this +} + +// GetParams returns the Params field value +func (o *RunConnectorRequestBodyProperties) GetParams() RunConnectorRequestBodyPropertiesParams { + if o == nil { + var ret RunConnectorRequestBodyPropertiesParams + return ret + } + + return o.Params +} + +// GetParamsOk returns a tuple with the Params field value +// and a boolean to check if the value has been set. +func (o *RunConnectorRequestBodyProperties) GetParamsOk() (*RunConnectorRequestBodyPropertiesParams, bool) { + if o == nil { + return nil, false + } + return &o.Params, true +} + +// SetParams sets field value +func (o *RunConnectorRequestBodyProperties) SetParams(v RunConnectorRequestBodyPropertiesParams) { + o.Params = v +} + +func (o RunConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorRequestBodyProperties) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["params"] = o.Params + return toSerialize, nil +} + +type NullableRunConnectorRequestBodyProperties struct { + value *RunConnectorRequestBodyProperties + isSet bool +} + +func (v NullableRunConnectorRequestBodyProperties) Get() *RunConnectorRequestBodyProperties { + return v.value +} + +func (v *NullableRunConnectorRequestBodyProperties) Set(val *RunConnectorRequestBodyProperties) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorRequestBodyProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorRequestBodyProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorRequestBodyProperties(val *RunConnectorRequestBodyProperties) *NullableRunConnectorRequestBodyProperties { + return &NullableRunConnectorRequestBodyProperties{value: val, isSet: true} +} + +func (v NullableRunConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorRequestBodyProperties) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_request_body_properties_params.go b/generated/kibanaactions/model_run_connector_request_body_properties_params.go new file mode 100644 index 000000000..5b1470ddf --- /dev/null +++ b/generated/kibanaactions/model_run_connector_request_body_properties_params.go @@ -0,0 +1,175 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" + "fmt" +) + +// RunConnectorRequestBodyPropertiesParams - struct for RunConnectorRequestBodyPropertiesParams +type RunConnectorRequestBodyPropertiesParams struct { + RunConnectorParamsDocuments *RunConnectorParamsDocuments + RunConnectorParamsLevelMessage *RunConnectorParamsLevelMessage + SubactionParameters *SubactionParameters +} + +// RunConnectorParamsDocumentsAsRunConnectorRequestBodyPropertiesParams is a convenience function that returns RunConnectorParamsDocuments wrapped in RunConnectorRequestBodyPropertiesParams +func RunConnectorParamsDocumentsAsRunConnectorRequestBodyPropertiesParams(v *RunConnectorParamsDocuments) RunConnectorRequestBodyPropertiesParams { + return RunConnectorRequestBodyPropertiesParams{ + RunConnectorParamsDocuments: v, + } +} + +// RunConnectorParamsLevelMessageAsRunConnectorRequestBodyPropertiesParams is a convenience function that returns RunConnectorParamsLevelMessage wrapped in RunConnectorRequestBodyPropertiesParams +func RunConnectorParamsLevelMessageAsRunConnectorRequestBodyPropertiesParams(v *RunConnectorParamsLevelMessage) RunConnectorRequestBodyPropertiesParams { + return RunConnectorRequestBodyPropertiesParams{ + RunConnectorParamsLevelMessage: v, + } +} + +// SubactionParametersAsRunConnectorRequestBodyPropertiesParams is a convenience function that returns SubactionParameters wrapped in RunConnectorRequestBodyPropertiesParams +func SubactionParametersAsRunConnectorRequestBodyPropertiesParams(v *SubactionParameters) RunConnectorRequestBodyPropertiesParams { + return RunConnectorRequestBodyPropertiesParams{ + SubactionParameters: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *RunConnectorRequestBodyPropertiesParams) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into RunConnectorParamsDocuments + err = newStrictDecoder(data).Decode(&dst.RunConnectorParamsDocuments) + if err == nil { + jsonRunConnectorParamsDocuments, _ := json.Marshal(dst.RunConnectorParamsDocuments) + if string(jsonRunConnectorParamsDocuments) == "{}" { // empty struct + dst.RunConnectorParamsDocuments = nil + } else { + match++ + } + } else { + dst.RunConnectorParamsDocuments = nil + } + + // try to unmarshal data into RunConnectorParamsLevelMessage + err = newStrictDecoder(data).Decode(&dst.RunConnectorParamsLevelMessage) + if err == nil { + jsonRunConnectorParamsLevelMessage, _ := json.Marshal(dst.RunConnectorParamsLevelMessage) + if string(jsonRunConnectorParamsLevelMessage) == "{}" { // empty struct + dst.RunConnectorParamsLevelMessage = nil + } else { + match++ + } + } else { + dst.RunConnectorParamsLevelMessage = nil + } + + // try to unmarshal data into SubactionParameters + err = newStrictDecoder(data).Decode(&dst.SubactionParameters) + if err == nil { + jsonSubactionParameters, _ := json.Marshal(dst.SubactionParameters) + if string(jsonSubactionParameters) == "{}" { // empty struct + dst.SubactionParameters = nil + } else { + match++ + } + } else { + dst.SubactionParameters = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.RunConnectorParamsDocuments = nil + dst.RunConnectorParamsLevelMessage = nil + dst.SubactionParameters = nil + + return fmt.Errorf("data matches more than one schema in oneOf(RunConnectorRequestBodyPropertiesParams)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(RunConnectorRequestBodyPropertiesParams)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src RunConnectorRequestBodyPropertiesParams) MarshalJSON() ([]byte, error) { + if src.RunConnectorParamsDocuments != nil { + return json.Marshal(&src.RunConnectorParamsDocuments) + } + + if src.RunConnectorParamsLevelMessage != nil { + return json.Marshal(&src.RunConnectorParamsLevelMessage) + } + + if src.SubactionParameters != nil { + return json.Marshal(&src.SubactionParameters) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *RunConnectorRequestBodyPropertiesParams) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.RunConnectorParamsDocuments != nil { + return obj.RunConnectorParamsDocuments + } + + if obj.RunConnectorParamsLevelMessage != nil { + return obj.RunConnectorParamsLevelMessage + } + + if obj.SubactionParameters != nil { + return obj.SubactionParameters + } + + // all schemas are nil + return nil +} + +type NullableRunConnectorRequestBodyPropertiesParams struct { + value *RunConnectorRequestBodyPropertiesParams + isSet bool +} + +func (v NullableRunConnectorRequestBodyPropertiesParams) Get() *RunConnectorRequestBodyPropertiesParams { + return v.value +} + +func (v *NullableRunConnectorRequestBodyPropertiesParams) Set(val *RunConnectorRequestBodyPropertiesParams) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorRequestBodyPropertiesParams) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorRequestBodyPropertiesParams) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorRequestBodyPropertiesParams(val *RunConnectorRequestBodyPropertiesParams) *NullableRunConnectorRequestBodyPropertiesParams { + return &NullableRunConnectorRequestBodyPropertiesParams{value: val, isSet: true} +} + +func (v NullableRunConnectorRequestBodyPropertiesParams) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorRequestBodyPropertiesParams) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_addevent.go b/generated/kibanaactions/model_run_connector_subaction_addevent.go new file mode 100644 index 000000000..4b32b833e --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_addevent.go @@ -0,0 +1,152 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionAddevent type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionAddevent{} + +// RunConnectorSubactionAddevent The `addEvent` subaction for ServiceNow ITOM connectors. +type RunConnectorSubactionAddevent struct { + // The action to test. + SubAction string `json:"subAction"` + SubActionParams *RunConnectorSubactionAddeventSubActionParams `json:"subActionParams,omitempty"` +} + +// NewRunConnectorSubactionAddevent instantiates a new RunConnectorSubactionAddevent object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionAddevent(subAction string) *RunConnectorSubactionAddevent { + this := RunConnectorSubactionAddevent{} + this.SubAction = subAction + return &this +} + +// NewRunConnectorSubactionAddeventWithDefaults instantiates a new RunConnectorSubactionAddevent object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionAddeventWithDefaults() *RunConnectorSubactionAddevent { + this := RunConnectorSubactionAddevent{} + return &this +} + +// GetSubAction returns the SubAction field value +func (o *RunConnectorSubactionAddevent) GetSubAction() string { + if o == nil { + var ret string + return ret + } + + return o.SubAction +} + +// GetSubActionOk returns a tuple with the SubAction field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionAddevent) GetSubActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SubAction, true +} + +// SetSubAction sets field value +func (o *RunConnectorSubactionAddevent) SetSubAction(v string) { + o.SubAction = v +} + +// GetSubActionParams returns the SubActionParams field value if set, zero value otherwise. +func (o *RunConnectorSubactionAddevent) GetSubActionParams() RunConnectorSubactionAddeventSubActionParams { + if o == nil || IsNil(o.SubActionParams) { + var ret RunConnectorSubactionAddeventSubActionParams + return ret + } + return *o.SubActionParams +} + +// GetSubActionParamsOk returns a tuple with the SubActionParams field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionAddevent) GetSubActionParamsOk() (*RunConnectorSubactionAddeventSubActionParams, bool) { + if o == nil || IsNil(o.SubActionParams) { + return nil, false + } + return o.SubActionParams, true +} + +// HasSubActionParams returns a boolean if a field has been set. +func (o *RunConnectorSubactionAddevent) HasSubActionParams() bool { + if o != nil && !IsNil(o.SubActionParams) { + return true + } + + return false +} + +// SetSubActionParams gets a reference to the given RunConnectorSubactionAddeventSubActionParams and assigns it to the SubActionParams field. +func (o *RunConnectorSubactionAddevent) SetSubActionParams(v RunConnectorSubactionAddeventSubActionParams) { + o.SubActionParams = &v +} + +func (o RunConnectorSubactionAddevent) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionAddevent) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["subAction"] = o.SubAction + if !IsNil(o.SubActionParams) { + toSerialize["subActionParams"] = o.SubActionParams + } + return toSerialize, nil +} + +type NullableRunConnectorSubactionAddevent struct { + value *RunConnectorSubactionAddevent + isSet bool +} + +func (v NullableRunConnectorSubactionAddevent) Get() *RunConnectorSubactionAddevent { + return v.value +} + +func (v *NullableRunConnectorSubactionAddevent) Set(val *RunConnectorSubactionAddevent) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionAddevent) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionAddevent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionAddevent(val *RunConnectorSubactionAddevent) *NullableRunConnectorSubactionAddevent { + return &NullableRunConnectorSubactionAddevent{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionAddevent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionAddevent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_addevent_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_addevent_sub_action_params.go new file mode 100644 index 000000000..ec12d8298 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_addevent_sub_action_params.go @@ -0,0 +1,495 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionAddeventSubActionParams type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionAddeventSubActionParams{} + +// RunConnectorSubactionAddeventSubActionParams The set of configuration properties for the action. +type RunConnectorSubactionAddeventSubActionParams struct { + // Additional information about the event. + AdditionalInfo *string `json:"additional_info,omitempty"` + // The details about the event. + Description *string `json:"description,omitempty"` + // A specific instance of the source. + EventClass *string `json:"event_class,omitempty"` + // All actions sharing this key are associated with the same ServiceNow alert. The default value is `:`. + MessageKey *string `json:"message_key,omitempty"` + // The name of the metric. + MetricName *string `json:"metric_name,omitempty"` + // The host that the event was triggered for. + Node *string `json:"node,omitempty"` + // The name of the resource. + Resource *string `json:"resource,omitempty"` + // The severity of the event. + Severity *string `json:"severity,omitempty"` + // The name of the event source type. + Source *string `json:"source,omitempty"` + // The time of the event. + TimeOfEvent *string `json:"time_of_event,omitempty"` + // The type of event. + Type *string `json:"type,omitempty"` +} + +// NewRunConnectorSubactionAddeventSubActionParams instantiates a new RunConnectorSubactionAddeventSubActionParams object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionAddeventSubActionParams() *RunConnectorSubactionAddeventSubActionParams { + this := RunConnectorSubactionAddeventSubActionParams{} + return &this +} + +// NewRunConnectorSubactionAddeventSubActionParamsWithDefaults instantiates a new RunConnectorSubactionAddeventSubActionParams object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionAddeventSubActionParamsWithDefaults() *RunConnectorSubactionAddeventSubActionParams { + this := RunConnectorSubactionAddeventSubActionParams{} + return &this +} + +// GetAdditionalInfo returns the AdditionalInfo field value if set, zero value otherwise. +func (o *RunConnectorSubactionAddeventSubActionParams) GetAdditionalInfo() string { + if o == nil || IsNil(o.AdditionalInfo) { + var ret string + return ret + } + return *o.AdditionalInfo +} + +// GetAdditionalInfoOk returns a tuple with the AdditionalInfo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) GetAdditionalInfoOk() (*string, bool) { + if o == nil || IsNil(o.AdditionalInfo) { + return nil, false + } + return o.AdditionalInfo, true +} + +// HasAdditionalInfo returns a boolean if a field has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) HasAdditionalInfo() bool { + if o != nil && !IsNil(o.AdditionalInfo) { + return true + } + + return false +} + +// SetAdditionalInfo gets a reference to the given string and assigns it to the AdditionalInfo field. +func (o *RunConnectorSubactionAddeventSubActionParams) SetAdditionalInfo(v string) { + o.AdditionalInfo = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *RunConnectorSubactionAddeventSubActionParams) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *RunConnectorSubactionAddeventSubActionParams) SetDescription(v string) { + o.Description = &v +} + +// GetEventClass returns the EventClass field value if set, zero value otherwise. +func (o *RunConnectorSubactionAddeventSubActionParams) GetEventClass() string { + if o == nil || IsNil(o.EventClass) { + var ret string + return ret + } + return *o.EventClass +} + +// GetEventClassOk returns a tuple with the EventClass field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) GetEventClassOk() (*string, bool) { + if o == nil || IsNil(o.EventClass) { + return nil, false + } + return o.EventClass, true +} + +// HasEventClass returns a boolean if a field has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) HasEventClass() bool { + if o != nil && !IsNil(o.EventClass) { + return true + } + + return false +} + +// SetEventClass gets a reference to the given string and assigns it to the EventClass field. +func (o *RunConnectorSubactionAddeventSubActionParams) SetEventClass(v string) { + o.EventClass = &v +} + +// GetMessageKey returns the MessageKey field value if set, zero value otherwise. +func (o *RunConnectorSubactionAddeventSubActionParams) GetMessageKey() string { + if o == nil || IsNil(o.MessageKey) { + var ret string + return ret + } + return *o.MessageKey +} + +// GetMessageKeyOk returns a tuple with the MessageKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) GetMessageKeyOk() (*string, bool) { + if o == nil || IsNil(o.MessageKey) { + return nil, false + } + return o.MessageKey, true +} + +// HasMessageKey returns a boolean if a field has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) HasMessageKey() bool { + if o != nil && !IsNil(o.MessageKey) { + return true + } + + return false +} + +// SetMessageKey gets a reference to the given string and assigns it to the MessageKey field. +func (o *RunConnectorSubactionAddeventSubActionParams) SetMessageKey(v string) { + o.MessageKey = &v +} + +// GetMetricName returns the MetricName field value if set, zero value otherwise. +func (o *RunConnectorSubactionAddeventSubActionParams) GetMetricName() string { + if o == nil || IsNil(o.MetricName) { + var ret string + return ret + } + return *o.MetricName +} + +// GetMetricNameOk returns a tuple with the MetricName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) GetMetricNameOk() (*string, bool) { + if o == nil || IsNil(o.MetricName) { + return nil, false + } + return o.MetricName, true +} + +// HasMetricName returns a boolean if a field has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) HasMetricName() bool { + if o != nil && !IsNil(o.MetricName) { + return true + } + + return false +} + +// SetMetricName gets a reference to the given string and assigns it to the MetricName field. +func (o *RunConnectorSubactionAddeventSubActionParams) SetMetricName(v string) { + o.MetricName = &v +} + +// GetNode returns the Node field value if set, zero value otherwise. +func (o *RunConnectorSubactionAddeventSubActionParams) GetNode() string { + if o == nil || IsNil(o.Node) { + var ret string + return ret + } + return *o.Node +} + +// GetNodeOk returns a tuple with the Node field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) GetNodeOk() (*string, bool) { + if o == nil || IsNil(o.Node) { + return nil, false + } + return o.Node, true +} + +// HasNode returns a boolean if a field has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) HasNode() bool { + if o != nil && !IsNil(o.Node) { + return true + } + + return false +} + +// SetNode gets a reference to the given string and assigns it to the Node field. +func (o *RunConnectorSubactionAddeventSubActionParams) SetNode(v string) { + o.Node = &v +} + +// GetResource returns the Resource field value if set, zero value otherwise. +func (o *RunConnectorSubactionAddeventSubActionParams) GetResource() string { + if o == nil || IsNil(o.Resource) { + var ret string + return ret + } + return *o.Resource +} + +// GetResourceOk returns a tuple with the Resource field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) GetResourceOk() (*string, bool) { + if o == nil || IsNil(o.Resource) { + return nil, false + } + return o.Resource, true +} + +// HasResource returns a boolean if a field has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) HasResource() bool { + if o != nil && !IsNil(o.Resource) { + return true + } + + return false +} + +// SetResource gets a reference to the given string and assigns it to the Resource field. +func (o *RunConnectorSubactionAddeventSubActionParams) SetResource(v string) { + o.Resource = &v +} + +// GetSeverity returns the Severity field value if set, zero value otherwise. +func (o *RunConnectorSubactionAddeventSubActionParams) GetSeverity() string { + if o == nil || IsNil(o.Severity) { + var ret string + return ret + } + return *o.Severity +} + +// GetSeverityOk returns a tuple with the Severity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) GetSeverityOk() (*string, bool) { + if o == nil || IsNil(o.Severity) { + return nil, false + } + return o.Severity, true +} + +// HasSeverity returns a boolean if a field has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) HasSeverity() bool { + if o != nil && !IsNil(o.Severity) { + return true + } + + return false +} + +// SetSeverity gets a reference to the given string and assigns it to the Severity field. +func (o *RunConnectorSubactionAddeventSubActionParams) SetSeverity(v string) { + o.Severity = &v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *RunConnectorSubactionAddeventSubActionParams) GetSource() string { + if o == nil || IsNil(o.Source) { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) GetSourceOk() (*string, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *RunConnectorSubactionAddeventSubActionParams) SetSource(v string) { + o.Source = &v +} + +// GetTimeOfEvent returns the TimeOfEvent field value if set, zero value otherwise. +func (o *RunConnectorSubactionAddeventSubActionParams) GetTimeOfEvent() string { + if o == nil || IsNil(o.TimeOfEvent) { + var ret string + return ret + } + return *o.TimeOfEvent +} + +// GetTimeOfEventOk returns a tuple with the TimeOfEvent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) GetTimeOfEventOk() (*string, bool) { + if o == nil || IsNil(o.TimeOfEvent) { + return nil, false + } + return o.TimeOfEvent, true +} + +// HasTimeOfEvent returns a boolean if a field has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) HasTimeOfEvent() bool { + if o != nil && !IsNil(o.TimeOfEvent) { + return true + } + + return false +} + +// SetTimeOfEvent gets a reference to the given string and assigns it to the TimeOfEvent field. +func (o *RunConnectorSubactionAddeventSubActionParams) SetTimeOfEvent(v string) { + o.TimeOfEvent = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *RunConnectorSubactionAddeventSubActionParams) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *RunConnectorSubactionAddeventSubActionParams) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *RunConnectorSubactionAddeventSubActionParams) SetType(v string) { + o.Type = &v +} + +func (o RunConnectorSubactionAddeventSubActionParams) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionAddeventSubActionParams) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AdditionalInfo) { + toSerialize["additional_info"] = o.AdditionalInfo + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.EventClass) { + toSerialize["event_class"] = o.EventClass + } + if !IsNil(o.MessageKey) { + toSerialize["message_key"] = o.MessageKey + } + if !IsNil(o.MetricName) { + toSerialize["metric_name"] = o.MetricName + } + if !IsNil(o.Node) { + toSerialize["node"] = o.Node + } + if !IsNil(o.Resource) { + toSerialize["resource"] = o.Resource + } + if !IsNil(o.Severity) { + toSerialize["severity"] = o.Severity + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + if !IsNil(o.TimeOfEvent) { + toSerialize["time_of_event"] = o.TimeOfEvent + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableRunConnectorSubactionAddeventSubActionParams struct { + value *RunConnectorSubactionAddeventSubActionParams + isSet bool +} + +func (v NullableRunConnectorSubactionAddeventSubActionParams) Get() *RunConnectorSubactionAddeventSubActionParams { + return v.value +} + +func (v *NullableRunConnectorSubactionAddeventSubActionParams) Set(val *RunConnectorSubactionAddeventSubActionParams) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionAddeventSubActionParams) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionAddeventSubActionParams) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionAddeventSubActionParams(val *RunConnectorSubactionAddeventSubActionParams) *NullableRunConnectorSubactionAddeventSubActionParams { + return &NullableRunConnectorSubactionAddeventSubActionParams{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionAddeventSubActionParams) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionAddeventSubActionParams) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_closealert.go b/generated/kibanaactions/model_run_connector_subaction_closealert.go new file mode 100644 index 000000000..97d88173b --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_closealert.go @@ -0,0 +1,143 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionClosealert type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionClosealert{} + +// RunConnectorSubactionClosealert The `closeAlert` subaction for Opsgenie connectors. +type RunConnectorSubactionClosealert struct { + // The action to test. + SubAction string `json:"subAction"` + SubActionParams RunConnectorSubactionClosealertSubActionParams `json:"subActionParams"` +} + +// NewRunConnectorSubactionClosealert instantiates a new RunConnectorSubactionClosealert object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionClosealert(subAction string, subActionParams RunConnectorSubactionClosealertSubActionParams) *RunConnectorSubactionClosealert { + this := RunConnectorSubactionClosealert{} + this.SubAction = subAction + this.SubActionParams = subActionParams + return &this +} + +// NewRunConnectorSubactionClosealertWithDefaults instantiates a new RunConnectorSubactionClosealert object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionClosealertWithDefaults() *RunConnectorSubactionClosealert { + this := RunConnectorSubactionClosealert{} + return &this +} + +// GetSubAction returns the SubAction field value +func (o *RunConnectorSubactionClosealert) GetSubAction() string { + if o == nil { + var ret string + return ret + } + + return o.SubAction +} + +// GetSubActionOk returns a tuple with the SubAction field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionClosealert) GetSubActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SubAction, true +} + +// SetSubAction sets field value +func (o *RunConnectorSubactionClosealert) SetSubAction(v string) { + o.SubAction = v +} + +// GetSubActionParams returns the SubActionParams field value +func (o *RunConnectorSubactionClosealert) GetSubActionParams() RunConnectorSubactionClosealertSubActionParams { + if o == nil { + var ret RunConnectorSubactionClosealertSubActionParams + return ret + } + + return o.SubActionParams +} + +// GetSubActionParamsOk returns a tuple with the SubActionParams field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionClosealert) GetSubActionParamsOk() (*RunConnectorSubactionClosealertSubActionParams, bool) { + if o == nil { + return nil, false + } + return &o.SubActionParams, true +} + +// SetSubActionParams sets field value +func (o *RunConnectorSubactionClosealert) SetSubActionParams(v RunConnectorSubactionClosealertSubActionParams) { + o.SubActionParams = v +} + +func (o RunConnectorSubactionClosealert) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionClosealert) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["subAction"] = o.SubAction + toSerialize["subActionParams"] = o.SubActionParams + return toSerialize, nil +} + +type NullableRunConnectorSubactionClosealert struct { + value *RunConnectorSubactionClosealert + isSet bool +} + +func (v NullableRunConnectorSubactionClosealert) Get() *RunConnectorSubactionClosealert { + return v.value +} + +func (v *NullableRunConnectorSubactionClosealert) Set(val *RunConnectorSubactionClosealert) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionClosealert) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionClosealert) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionClosealert(val *RunConnectorSubactionClosealert) *NullableRunConnectorSubactionClosealert { + return &NullableRunConnectorSubactionClosealert{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionClosealert) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionClosealert) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_closealert_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_closealert_sub_action_params.go new file mode 100644 index 000000000..2b7df1cf0 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_closealert_sub_action_params.go @@ -0,0 +1,227 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionClosealertSubActionParams type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionClosealertSubActionParams{} + +// RunConnectorSubactionClosealertSubActionParams struct for RunConnectorSubactionClosealertSubActionParams +type RunConnectorSubactionClosealertSubActionParams struct { + // The unique identifier used for alert deduplication in Opsgenie. The alias must match the value used when creating the alert. + Alias string `json:"alias"` + // Additional information for the alert. + Note *string `json:"note,omitempty"` + // The display name for the source of the alert. + Source *string `json:"source,omitempty"` + // The display name for the owner. + User *string `json:"user,omitempty"` +} + +// NewRunConnectorSubactionClosealertSubActionParams instantiates a new RunConnectorSubactionClosealertSubActionParams object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionClosealertSubActionParams(alias string) *RunConnectorSubactionClosealertSubActionParams { + this := RunConnectorSubactionClosealertSubActionParams{} + this.Alias = alias + return &this +} + +// NewRunConnectorSubactionClosealertSubActionParamsWithDefaults instantiates a new RunConnectorSubactionClosealertSubActionParams object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionClosealertSubActionParamsWithDefaults() *RunConnectorSubactionClosealertSubActionParams { + this := RunConnectorSubactionClosealertSubActionParams{} + return &this +} + +// GetAlias returns the Alias field value +func (o *RunConnectorSubactionClosealertSubActionParams) GetAlias() string { + if o == nil { + var ret string + return ret + } + + return o.Alias +} + +// GetAliasOk returns a tuple with the Alias field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionClosealertSubActionParams) GetAliasOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Alias, true +} + +// SetAlias sets field value +func (o *RunConnectorSubactionClosealertSubActionParams) SetAlias(v string) { + o.Alias = v +} + +// GetNote returns the Note field value if set, zero value otherwise. +func (o *RunConnectorSubactionClosealertSubActionParams) GetNote() string { + if o == nil || IsNil(o.Note) { + var ret string + return ret + } + return *o.Note +} + +// GetNoteOk returns a tuple with the Note field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionClosealertSubActionParams) GetNoteOk() (*string, bool) { + if o == nil || IsNil(o.Note) { + return nil, false + } + return o.Note, true +} + +// HasNote returns a boolean if a field has been set. +func (o *RunConnectorSubactionClosealertSubActionParams) HasNote() bool { + if o != nil && !IsNil(o.Note) { + return true + } + + return false +} + +// SetNote gets a reference to the given string and assigns it to the Note field. +func (o *RunConnectorSubactionClosealertSubActionParams) SetNote(v string) { + o.Note = &v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *RunConnectorSubactionClosealertSubActionParams) GetSource() string { + if o == nil || IsNil(o.Source) { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionClosealertSubActionParams) GetSourceOk() (*string, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *RunConnectorSubactionClosealertSubActionParams) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *RunConnectorSubactionClosealertSubActionParams) SetSource(v string) { + o.Source = &v +} + +// GetUser returns the User field value if set, zero value otherwise. +func (o *RunConnectorSubactionClosealertSubActionParams) GetUser() string { + if o == nil || IsNil(o.User) { + var ret string + return ret + } + return *o.User +} + +// GetUserOk returns a tuple with the User field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionClosealertSubActionParams) GetUserOk() (*string, bool) { + if o == nil || IsNil(o.User) { + return nil, false + } + return o.User, true +} + +// HasUser returns a boolean if a field has been set. +func (o *RunConnectorSubactionClosealertSubActionParams) HasUser() bool { + if o != nil && !IsNil(o.User) { + return true + } + + return false +} + +// SetUser gets a reference to the given string and assigns it to the User field. +func (o *RunConnectorSubactionClosealertSubActionParams) SetUser(v string) { + o.User = &v +} + +func (o RunConnectorSubactionClosealertSubActionParams) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionClosealertSubActionParams) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["alias"] = o.Alias + if !IsNil(o.Note) { + toSerialize["note"] = o.Note + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + if !IsNil(o.User) { + toSerialize["user"] = o.User + } + return toSerialize, nil +} + +type NullableRunConnectorSubactionClosealertSubActionParams struct { + value *RunConnectorSubactionClosealertSubActionParams + isSet bool +} + +func (v NullableRunConnectorSubactionClosealertSubActionParams) Get() *RunConnectorSubactionClosealertSubActionParams { + return v.value +} + +func (v *NullableRunConnectorSubactionClosealertSubActionParams) Set(val *RunConnectorSubactionClosealertSubActionParams) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionClosealertSubActionParams) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionClosealertSubActionParams) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionClosealertSubActionParams(val *RunConnectorSubactionClosealertSubActionParams) *NullableRunConnectorSubactionClosealertSubActionParams { + return &NullableRunConnectorSubactionClosealertSubActionParams{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionClosealertSubActionParams) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionClosealertSubActionParams) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_createalert.go b/generated/kibanaactions/model_run_connector_subaction_createalert.go new file mode 100644 index 000000000..032c0bcb1 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_createalert.go @@ -0,0 +1,143 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionCreatealert type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionCreatealert{} + +// RunConnectorSubactionCreatealert The `createAlert` subaction for Opsgenie connectors. +type RunConnectorSubactionCreatealert struct { + // The action to test. + SubAction string `json:"subAction"` + SubActionParams RunConnectorSubactionCreatealertSubActionParams `json:"subActionParams"` +} + +// NewRunConnectorSubactionCreatealert instantiates a new RunConnectorSubactionCreatealert object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionCreatealert(subAction string, subActionParams RunConnectorSubactionCreatealertSubActionParams) *RunConnectorSubactionCreatealert { + this := RunConnectorSubactionCreatealert{} + this.SubAction = subAction + this.SubActionParams = subActionParams + return &this +} + +// NewRunConnectorSubactionCreatealertWithDefaults instantiates a new RunConnectorSubactionCreatealert object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionCreatealertWithDefaults() *RunConnectorSubactionCreatealert { + this := RunConnectorSubactionCreatealert{} + return &this +} + +// GetSubAction returns the SubAction field value +func (o *RunConnectorSubactionCreatealert) GetSubAction() string { + if o == nil { + var ret string + return ret + } + + return o.SubAction +} + +// GetSubActionOk returns a tuple with the SubAction field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealert) GetSubActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SubAction, true +} + +// SetSubAction sets field value +func (o *RunConnectorSubactionCreatealert) SetSubAction(v string) { + o.SubAction = v +} + +// GetSubActionParams returns the SubActionParams field value +func (o *RunConnectorSubactionCreatealert) GetSubActionParams() RunConnectorSubactionCreatealertSubActionParams { + if o == nil { + var ret RunConnectorSubactionCreatealertSubActionParams + return ret + } + + return o.SubActionParams +} + +// GetSubActionParamsOk returns a tuple with the SubActionParams field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealert) GetSubActionParamsOk() (*RunConnectorSubactionCreatealertSubActionParams, bool) { + if o == nil { + return nil, false + } + return &o.SubActionParams, true +} + +// SetSubActionParams sets field value +func (o *RunConnectorSubactionCreatealert) SetSubActionParams(v RunConnectorSubactionCreatealertSubActionParams) { + o.SubActionParams = v +} + +func (o RunConnectorSubactionCreatealert) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionCreatealert) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["subAction"] = o.SubAction + toSerialize["subActionParams"] = o.SubActionParams + return toSerialize, nil +} + +type NullableRunConnectorSubactionCreatealert struct { + value *RunConnectorSubactionCreatealert + isSet bool +} + +func (v NullableRunConnectorSubactionCreatealert) Get() *RunConnectorSubactionCreatealert { + return v.value +} + +func (v *NullableRunConnectorSubactionCreatealert) Set(val *RunConnectorSubactionCreatealert) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionCreatealert) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionCreatealert) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionCreatealert(val *RunConnectorSubactionCreatealert) *NullableRunConnectorSubactionCreatealert { + return &NullableRunConnectorSubactionCreatealert{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionCreatealert) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionCreatealert) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params.go new file mode 100644 index 000000000..078a3def7 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params.go @@ -0,0 +1,560 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionCreatealertSubActionParams type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionCreatealertSubActionParams{} + +// RunConnectorSubactionCreatealertSubActionParams struct for RunConnectorSubactionCreatealertSubActionParams +type RunConnectorSubactionCreatealertSubActionParams struct { + // The custom actions available to the alert. + Actions []string `json:"actions,omitempty"` + // The unique identifier used for alert deduplication in Opsgenie. + Alias *string `json:"alias,omitempty"` + // A description that provides detailed information about the alert. + Description *string `json:"description,omitempty"` + // The custom properties of the alert. + Details map[string]interface{} `json:"details,omitempty"` + // The domain of the alert. For example, the application or server name. + Entity *string `json:"entity,omitempty"` + // The alert message. + Message string `json:"message"` + // Additional information for the alert. + Note *string `json:"note,omitempty"` + // The priority level for the alert. + Priority *string `json:"priority,omitempty"` + // The entities to receive notifications about the alert. If `type` is `user`, either `id` or `username` is required. If `type` is `team`, either `id` or `name` is required. + Responders []RunConnectorSubactionCreatealertSubActionParamsRespondersInner `json:"responders,omitempty"` + // The display name for the source of the alert. + Source *string `json:"source,omitempty"` + // The tags for the alert. + Tags []string `json:"tags,omitempty"` + // The display name for the owner. + User *string `json:"user,omitempty"` + // The teams and users that the alert will be visible to without sending a notification. Only one of `id`, `name`, or `username` is required. + VisibleTo []RunConnectorSubactionCreatealertSubActionParamsVisibleToInner `json:"visibleTo,omitempty"` +} + +// NewRunConnectorSubactionCreatealertSubActionParams instantiates a new RunConnectorSubactionCreatealertSubActionParams object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionCreatealertSubActionParams(message string) *RunConnectorSubactionCreatealertSubActionParams { + this := RunConnectorSubactionCreatealertSubActionParams{} + this.Message = message + return &this +} + +// NewRunConnectorSubactionCreatealertSubActionParamsWithDefaults instantiates a new RunConnectorSubactionCreatealertSubActionParams object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionCreatealertSubActionParamsWithDefaults() *RunConnectorSubactionCreatealertSubActionParams { + this := RunConnectorSubactionCreatealertSubActionParams{} + return &this +} + +// GetActions returns the Actions field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetActions() []string { + if o == nil || IsNil(o.Actions) { + var ret []string + return ret + } + return o.Actions +} + +// GetActionsOk returns a tuple with the Actions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetActionsOk() ([]string, bool) { + if o == nil || IsNil(o.Actions) { + return nil, false + } + return o.Actions, true +} + +// HasActions returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) HasActions() bool { + if o != nil && !IsNil(o.Actions) { + return true + } + + return false +} + +// SetActions gets a reference to the given []string and assigns it to the Actions field. +func (o *RunConnectorSubactionCreatealertSubActionParams) SetActions(v []string) { + o.Actions = v +} + +// GetAlias returns the Alias field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetAlias() string { + if o == nil || IsNil(o.Alias) { + var ret string + return ret + } + return *o.Alias +} + +// GetAliasOk returns a tuple with the Alias field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetAliasOk() (*string, bool) { + if o == nil || IsNil(o.Alias) { + return nil, false + } + return o.Alias, true +} + +// HasAlias returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) HasAlias() bool { + if o != nil && !IsNil(o.Alias) { + return true + } + + return false +} + +// SetAlias gets a reference to the given string and assigns it to the Alias field. +func (o *RunConnectorSubactionCreatealertSubActionParams) SetAlias(v string) { + o.Alias = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *RunConnectorSubactionCreatealertSubActionParams) SetDescription(v string) { + o.Description = &v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetDetails() map[string]interface{} { + if o == nil || IsNil(o.Details) { + var ret map[string]interface{} + return ret + } + return o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetDetailsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Details) { + return map[string]interface{}{}, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field. +func (o *RunConnectorSubactionCreatealertSubActionParams) SetDetails(v map[string]interface{}) { + o.Details = v +} + +// GetEntity returns the Entity field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetEntity() string { + if o == nil || IsNil(o.Entity) { + var ret string + return ret + } + return *o.Entity +} + +// GetEntityOk returns a tuple with the Entity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetEntityOk() (*string, bool) { + if o == nil || IsNil(o.Entity) { + return nil, false + } + return o.Entity, true +} + +// HasEntity returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) HasEntity() bool { + if o != nil && !IsNil(o.Entity) { + return true + } + + return false +} + +// SetEntity gets a reference to the given string and assigns it to the Entity field. +func (o *RunConnectorSubactionCreatealertSubActionParams) SetEntity(v string) { + o.Entity = &v +} + +// GetMessage returns the Message field value +func (o *RunConnectorSubactionCreatealertSubActionParams) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *RunConnectorSubactionCreatealertSubActionParams) SetMessage(v string) { + o.Message = v +} + +// GetNote returns the Note field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetNote() string { + if o == nil || IsNil(o.Note) { + var ret string + return ret + } + return *o.Note +} + +// GetNoteOk returns a tuple with the Note field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetNoteOk() (*string, bool) { + if o == nil || IsNil(o.Note) { + return nil, false + } + return o.Note, true +} + +// HasNote returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) HasNote() bool { + if o != nil && !IsNil(o.Note) { + return true + } + + return false +} + +// SetNote gets a reference to the given string and assigns it to the Note field. +func (o *RunConnectorSubactionCreatealertSubActionParams) SetNote(v string) { + o.Note = &v +} + +// GetPriority returns the Priority field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetPriority() string { + if o == nil || IsNil(o.Priority) { + var ret string + return ret + } + return *o.Priority +} + +// GetPriorityOk returns a tuple with the Priority field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetPriorityOk() (*string, bool) { + if o == nil || IsNil(o.Priority) { + return nil, false + } + return o.Priority, true +} + +// HasPriority returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) HasPriority() bool { + if o != nil && !IsNil(o.Priority) { + return true + } + + return false +} + +// SetPriority gets a reference to the given string and assigns it to the Priority field. +func (o *RunConnectorSubactionCreatealertSubActionParams) SetPriority(v string) { + o.Priority = &v +} + +// GetResponders returns the Responders field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetResponders() []RunConnectorSubactionCreatealertSubActionParamsRespondersInner { + if o == nil || IsNil(o.Responders) { + var ret []RunConnectorSubactionCreatealertSubActionParamsRespondersInner + return ret + } + return o.Responders +} + +// GetRespondersOk returns a tuple with the Responders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetRespondersOk() ([]RunConnectorSubactionCreatealertSubActionParamsRespondersInner, bool) { + if o == nil || IsNil(o.Responders) { + return nil, false + } + return o.Responders, true +} + +// HasResponders returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) HasResponders() bool { + if o != nil && !IsNil(o.Responders) { + return true + } + + return false +} + +// SetResponders gets a reference to the given []RunConnectorSubactionCreatealertSubActionParamsRespondersInner and assigns it to the Responders field. +func (o *RunConnectorSubactionCreatealertSubActionParams) SetResponders(v []RunConnectorSubactionCreatealertSubActionParamsRespondersInner) { + o.Responders = v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetSource() string { + if o == nil || IsNil(o.Source) { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetSourceOk() (*string, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *RunConnectorSubactionCreatealertSubActionParams) SetSource(v string) { + o.Source = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *RunConnectorSubactionCreatealertSubActionParams) SetTags(v []string) { + o.Tags = v +} + +// GetUser returns the User field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetUser() string { + if o == nil || IsNil(o.User) { + var ret string + return ret + } + return *o.User +} + +// GetUserOk returns a tuple with the User field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetUserOk() (*string, bool) { + if o == nil || IsNil(o.User) { + return nil, false + } + return o.User, true +} + +// HasUser returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) HasUser() bool { + if o != nil && !IsNil(o.User) { + return true + } + + return false +} + +// SetUser gets a reference to the given string and assigns it to the User field. +func (o *RunConnectorSubactionCreatealertSubActionParams) SetUser(v string) { + o.User = &v +} + +// GetVisibleTo returns the VisibleTo field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetVisibleTo() []RunConnectorSubactionCreatealertSubActionParamsVisibleToInner { + if o == nil || IsNil(o.VisibleTo) { + var ret []RunConnectorSubactionCreatealertSubActionParamsVisibleToInner + return ret + } + return o.VisibleTo +} + +// GetVisibleToOk returns a tuple with the VisibleTo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) GetVisibleToOk() ([]RunConnectorSubactionCreatealertSubActionParamsVisibleToInner, bool) { + if o == nil || IsNil(o.VisibleTo) { + return nil, false + } + return o.VisibleTo, true +} + +// HasVisibleTo returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParams) HasVisibleTo() bool { + if o != nil && !IsNil(o.VisibleTo) { + return true + } + + return false +} + +// SetVisibleTo gets a reference to the given []RunConnectorSubactionCreatealertSubActionParamsVisibleToInner and assigns it to the VisibleTo field. +func (o *RunConnectorSubactionCreatealertSubActionParams) SetVisibleTo(v []RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) { + o.VisibleTo = v +} + +func (o RunConnectorSubactionCreatealertSubActionParams) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionCreatealertSubActionParams) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Actions) { + toSerialize["actions"] = o.Actions + } + if !IsNil(o.Alias) { + toSerialize["alias"] = o.Alias + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + if !IsNil(o.Entity) { + toSerialize["entity"] = o.Entity + } + toSerialize["message"] = o.Message + if !IsNil(o.Note) { + toSerialize["note"] = o.Note + } + if !IsNil(o.Priority) { + toSerialize["priority"] = o.Priority + } + if !IsNil(o.Responders) { + toSerialize["responders"] = o.Responders + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.User) { + toSerialize["user"] = o.User + } + if !IsNil(o.VisibleTo) { + toSerialize["visibleTo"] = o.VisibleTo + } + return toSerialize, nil +} + +type NullableRunConnectorSubactionCreatealertSubActionParams struct { + value *RunConnectorSubactionCreatealertSubActionParams + isSet bool +} + +func (v NullableRunConnectorSubactionCreatealertSubActionParams) Get() *RunConnectorSubactionCreatealertSubActionParams { + return v.value +} + +func (v *NullableRunConnectorSubactionCreatealertSubActionParams) Set(val *RunConnectorSubactionCreatealertSubActionParams) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionCreatealertSubActionParams) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionCreatealertSubActionParams) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionCreatealertSubActionParams(val *RunConnectorSubactionCreatealertSubActionParams) *NullableRunConnectorSubactionCreatealertSubActionParams { + return &NullableRunConnectorSubactionCreatealertSubActionParams{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionCreatealertSubActionParams) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionCreatealertSubActionParams) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_responders_inner.go b/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_responders_inner.go new file mode 100644 index 000000000..e51d5113e --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_responders_inner.go @@ -0,0 +1,236 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionCreatealertSubActionParamsRespondersInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionCreatealertSubActionParamsRespondersInner{} + +// RunConnectorSubactionCreatealertSubActionParamsRespondersInner struct for RunConnectorSubactionCreatealertSubActionParamsRespondersInner +type RunConnectorSubactionCreatealertSubActionParamsRespondersInner struct { + // The identifier for the entity. + Id *string `json:"id,omitempty"` + // The name of the entity. + Name *string `json:"name,omitempty"` + // The type of responders, in this case `escalation`. + Type *string `json:"type,omitempty"` + // A valid email address for the user. + Username *string `json:"username,omitempty"` +} + +// NewRunConnectorSubactionCreatealertSubActionParamsRespondersInner instantiates a new RunConnectorSubactionCreatealertSubActionParamsRespondersInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionCreatealertSubActionParamsRespondersInner() *RunConnectorSubactionCreatealertSubActionParamsRespondersInner { + this := RunConnectorSubactionCreatealertSubActionParamsRespondersInner{} + return &this +} + +// NewRunConnectorSubactionCreatealertSubActionParamsRespondersInnerWithDefaults instantiates a new RunConnectorSubactionCreatealertSubActionParamsRespondersInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionCreatealertSubActionParamsRespondersInnerWithDefaults() *RunConnectorSubactionCreatealertSubActionParamsRespondersInner { + this := RunConnectorSubactionCreatealertSubActionParamsRespondersInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) SetName(v string) { + o.Name = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) SetType(v string) { + o.Type = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) SetUsername(v string) { + o.Username = &v +} + +func (o RunConnectorSubactionCreatealertSubActionParamsRespondersInner) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionCreatealertSubActionParamsRespondersInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner struct { + value *RunConnectorSubactionCreatealertSubActionParamsRespondersInner + isSet bool +} + +func (v NullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner) Get() *RunConnectorSubactionCreatealertSubActionParamsRespondersInner { + return v.value +} + +func (v *NullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner) Set(val *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner(val *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) *NullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner { + return &NullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_visible_to_inner.go b/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_visible_to_inner.go new file mode 100644 index 000000000..baeb28a42 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_visible_to_inner.go @@ -0,0 +1,227 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionCreatealertSubActionParamsVisibleToInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionCreatealertSubActionParamsVisibleToInner{} + +// RunConnectorSubactionCreatealertSubActionParamsVisibleToInner struct for RunConnectorSubactionCreatealertSubActionParamsVisibleToInner +type RunConnectorSubactionCreatealertSubActionParamsVisibleToInner struct { + // The identifier for the entity. + Id *string `json:"id,omitempty"` + // The name of the entity. + Name *string `json:"name,omitempty"` + // Valid values are `team` and `user`. + Type string `json:"type"` + // The user name. This property is required only when the `type` is `user`. + Username *string `json:"username,omitempty"` +} + +// NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInner instantiates a new RunConnectorSubactionCreatealertSubActionParamsVisibleToInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInner(type_ string) *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner { + this := RunConnectorSubactionCreatealertSubActionParamsVisibleToInner{} + this.Type = type_ + return &this +} + +// NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInnerWithDefaults instantiates a new RunConnectorSubactionCreatealertSubActionParamsVisibleToInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInnerWithDefaults() *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner { + this := RunConnectorSubactionCreatealertSubActionParamsVisibleToInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) SetName(v string) { + o.Name = &v +} + +// GetType returns the Type field value +func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) SetType(v string) { + o.Type = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) SetUsername(v string) { + o.Username = &v +} + +func (o RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["type"] = o.Type + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner struct { + value *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner + isSet bool +} + +func (v NullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner) Get() *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner { + return v.value +} + +func (v *NullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner) Set(val *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner(val *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) *NullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner { + return &NullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype.go b/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype.go new file mode 100644 index 000000000..21d07c8cf --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype.go @@ -0,0 +1,143 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionFieldsbyissuetype type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionFieldsbyissuetype{} + +// RunConnectorSubactionFieldsbyissuetype The `fieldsByIssueType` subaction for Jira connectors. +type RunConnectorSubactionFieldsbyissuetype struct { + // The action to test. + SubAction string `json:"subAction"` + SubActionParams RunConnectorSubactionFieldsbyissuetypeSubActionParams `json:"subActionParams"` +} + +// NewRunConnectorSubactionFieldsbyissuetype instantiates a new RunConnectorSubactionFieldsbyissuetype object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionFieldsbyissuetype(subAction string, subActionParams RunConnectorSubactionFieldsbyissuetypeSubActionParams) *RunConnectorSubactionFieldsbyissuetype { + this := RunConnectorSubactionFieldsbyissuetype{} + this.SubAction = subAction + this.SubActionParams = subActionParams + return &this +} + +// NewRunConnectorSubactionFieldsbyissuetypeWithDefaults instantiates a new RunConnectorSubactionFieldsbyissuetype object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionFieldsbyissuetypeWithDefaults() *RunConnectorSubactionFieldsbyissuetype { + this := RunConnectorSubactionFieldsbyissuetype{} + return &this +} + +// GetSubAction returns the SubAction field value +func (o *RunConnectorSubactionFieldsbyissuetype) GetSubAction() string { + if o == nil { + var ret string + return ret + } + + return o.SubAction +} + +// GetSubActionOk returns a tuple with the SubAction field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionFieldsbyissuetype) GetSubActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SubAction, true +} + +// SetSubAction sets field value +func (o *RunConnectorSubactionFieldsbyissuetype) SetSubAction(v string) { + o.SubAction = v +} + +// GetSubActionParams returns the SubActionParams field value +func (o *RunConnectorSubactionFieldsbyissuetype) GetSubActionParams() RunConnectorSubactionFieldsbyissuetypeSubActionParams { + if o == nil { + var ret RunConnectorSubactionFieldsbyissuetypeSubActionParams + return ret + } + + return o.SubActionParams +} + +// GetSubActionParamsOk returns a tuple with the SubActionParams field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionFieldsbyissuetype) GetSubActionParamsOk() (*RunConnectorSubactionFieldsbyissuetypeSubActionParams, bool) { + if o == nil { + return nil, false + } + return &o.SubActionParams, true +} + +// SetSubActionParams sets field value +func (o *RunConnectorSubactionFieldsbyissuetype) SetSubActionParams(v RunConnectorSubactionFieldsbyissuetypeSubActionParams) { + o.SubActionParams = v +} + +func (o RunConnectorSubactionFieldsbyissuetype) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionFieldsbyissuetype) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["subAction"] = o.SubAction + toSerialize["subActionParams"] = o.SubActionParams + return toSerialize, nil +} + +type NullableRunConnectorSubactionFieldsbyissuetype struct { + value *RunConnectorSubactionFieldsbyissuetype + isSet bool +} + +func (v NullableRunConnectorSubactionFieldsbyissuetype) Get() *RunConnectorSubactionFieldsbyissuetype { + return v.value +} + +func (v *NullableRunConnectorSubactionFieldsbyissuetype) Set(val *RunConnectorSubactionFieldsbyissuetype) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionFieldsbyissuetype) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionFieldsbyissuetype) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionFieldsbyissuetype(val *RunConnectorSubactionFieldsbyissuetype) *NullableRunConnectorSubactionFieldsbyissuetype { + return &NullableRunConnectorSubactionFieldsbyissuetype{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionFieldsbyissuetype) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionFieldsbyissuetype) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype_sub_action_params.go new file mode 100644 index 000000000..cc12da586 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype_sub_action_params.go @@ -0,0 +1,116 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionFieldsbyissuetypeSubActionParams type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionFieldsbyissuetypeSubActionParams{} + +// RunConnectorSubactionFieldsbyissuetypeSubActionParams struct for RunConnectorSubactionFieldsbyissuetypeSubActionParams +type RunConnectorSubactionFieldsbyissuetypeSubActionParams struct { + // The Jira issue type identifier. + Id string `json:"id"` +} + +// NewRunConnectorSubactionFieldsbyissuetypeSubActionParams instantiates a new RunConnectorSubactionFieldsbyissuetypeSubActionParams object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionFieldsbyissuetypeSubActionParams(id string) *RunConnectorSubactionFieldsbyissuetypeSubActionParams { + this := RunConnectorSubactionFieldsbyissuetypeSubActionParams{} + this.Id = id + return &this +} + +// NewRunConnectorSubactionFieldsbyissuetypeSubActionParamsWithDefaults instantiates a new RunConnectorSubactionFieldsbyissuetypeSubActionParams object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionFieldsbyissuetypeSubActionParamsWithDefaults() *RunConnectorSubactionFieldsbyissuetypeSubActionParams { + this := RunConnectorSubactionFieldsbyissuetypeSubActionParams{} + return &this +} + +// GetId returns the Id field value +func (o *RunConnectorSubactionFieldsbyissuetypeSubActionParams) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionFieldsbyissuetypeSubActionParams) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *RunConnectorSubactionFieldsbyissuetypeSubActionParams) SetId(v string) { + o.Id = v +} + +func (o RunConnectorSubactionFieldsbyissuetypeSubActionParams) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionFieldsbyissuetypeSubActionParams) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + return toSerialize, nil +} + +type NullableRunConnectorSubactionFieldsbyissuetypeSubActionParams struct { + value *RunConnectorSubactionFieldsbyissuetypeSubActionParams + isSet bool +} + +func (v NullableRunConnectorSubactionFieldsbyissuetypeSubActionParams) Get() *RunConnectorSubactionFieldsbyissuetypeSubActionParams { + return v.value +} + +func (v *NullableRunConnectorSubactionFieldsbyissuetypeSubActionParams) Set(val *RunConnectorSubactionFieldsbyissuetypeSubActionParams) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionFieldsbyissuetypeSubActionParams) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionFieldsbyissuetypeSubActionParams) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionFieldsbyissuetypeSubActionParams(val *RunConnectorSubactionFieldsbyissuetypeSubActionParams) *NullableRunConnectorSubactionFieldsbyissuetypeSubActionParams { + return &NullableRunConnectorSubactionFieldsbyissuetypeSubActionParams{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionFieldsbyissuetypeSubActionParams) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionFieldsbyissuetypeSubActionParams) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_getchoices.go b/generated/kibanaactions/model_run_connector_subaction_getchoices.go new file mode 100644 index 000000000..1c0e9dc99 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_getchoices.go @@ -0,0 +1,143 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionGetchoices type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionGetchoices{} + +// RunConnectorSubactionGetchoices The `getChoices` subaction for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors. +type RunConnectorSubactionGetchoices struct { + // The action to test. + SubAction string `json:"subAction"` + SubActionParams RunConnectorSubactionGetchoicesSubActionParams `json:"subActionParams"` +} + +// NewRunConnectorSubactionGetchoices instantiates a new RunConnectorSubactionGetchoices object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionGetchoices(subAction string, subActionParams RunConnectorSubactionGetchoicesSubActionParams) *RunConnectorSubactionGetchoices { + this := RunConnectorSubactionGetchoices{} + this.SubAction = subAction + this.SubActionParams = subActionParams + return &this +} + +// NewRunConnectorSubactionGetchoicesWithDefaults instantiates a new RunConnectorSubactionGetchoices object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionGetchoicesWithDefaults() *RunConnectorSubactionGetchoices { + this := RunConnectorSubactionGetchoices{} + return &this +} + +// GetSubAction returns the SubAction field value +func (o *RunConnectorSubactionGetchoices) GetSubAction() string { + if o == nil { + var ret string + return ret + } + + return o.SubAction +} + +// GetSubActionOk returns a tuple with the SubAction field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionGetchoices) GetSubActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SubAction, true +} + +// SetSubAction sets field value +func (o *RunConnectorSubactionGetchoices) SetSubAction(v string) { + o.SubAction = v +} + +// GetSubActionParams returns the SubActionParams field value +func (o *RunConnectorSubactionGetchoices) GetSubActionParams() RunConnectorSubactionGetchoicesSubActionParams { + if o == nil { + var ret RunConnectorSubactionGetchoicesSubActionParams + return ret + } + + return o.SubActionParams +} + +// GetSubActionParamsOk returns a tuple with the SubActionParams field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionGetchoices) GetSubActionParamsOk() (*RunConnectorSubactionGetchoicesSubActionParams, bool) { + if o == nil { + return nil, false + } + return &o.SubActionParams, true +} + +// SetSubActionParams sets field value +func (o *RunConnectorSubactionGetchoices) SetSubActionParams(v RunConnectorSubactionGetchoicesSubActionParams) { + o.SubActionParams = v +} + +func (o RunConnectorSubactionGetchoices) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionGetchoices) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["subAction"] = o.SubAction + toSerialize["subActionParams"] = o.SubActionParams + return toSerialize, nil +} + +type NullableRunConnectorSubactionGetchoices struct { + value *RunConnectorSubactionGetchoices + isSet bool +} + +func (v NullableRunConnectorSubactionGetchoices) Get() *RunConnectorSubactionGetchoices { + return v.value +} + +func (v *NullableRunConnectorSubactionGetchoices) Set(val *RunConnectorSubactionGetchoices) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionGetchoices) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionGetchoices) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionGetchoices(val *RunConnectorSubactionGetchoices) *NullableRunConnectorSubactionGetchoices { + return &NullableRunConnectorSubactionGetchoices{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionGetchoices) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionGetchoices) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_getchoices_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_getchoices_sub_action_params.go new file mode 100644 index 000000000..3b7a99ea8 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_getchoices_sub_action_params.go @@ -0,0 +1,116 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionGetchoicesSubActionParams type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionGetchoicesSubActionParams{} + +// RunConnectorSubactionGetchoicesSubActionParams The set of configuration properties for the action. +type RunConnectorSubactionGetchoicesSubActionParams struct { + // An array of fields. + Fields []string `json:"fields"` +} + +// NewRunConnectorSubactionGetchoicesSubActionParams instantiates a new RunConnectorSubactionGetchoicesSubActionParams object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionGetchoicesSubActionParams(fields []string) *RunConnectorSubactionGetchoicesSubActionParams { + this := RunConnectorSubactionGetchoicesSubActionParams{} + this.Fields = fields + return &this +} + +// NewRunConnectorSubactionGetchoicesSubActionParamsWithDefaults instantiates a new RunConnectorSubactionGetchoicesSubActionParams object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionGetchoicesSubActionParamsWithDefaults() *RunConnectorSubactionGetchoicesSubActionParams { + this := RunConnectorSubactionGetchoicesSubActionParams{} + return &this +} + +// GetFields returns the Fields field value +func (o *RunConnectorSubactionGetchoicesSubActionParams) GetFields() []string { + if o == nil { + var ret []string + return ret + } + + return o.Fields +} + +// GetFieldsOk returns a tuple with the Fields field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionGetchoicesSubActionParams) GetFieldsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Fields, true +} + +// SetFields sets field value +func (o *RunConnectorSubactionGetchoicesSubActionParams) SetFields(v []string) { + o.Fields = v +} + +func (o RunConnectorSubactionGetchoicesSubActionParams) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionGetchoicesSubActionParams) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["fields"] = o.Fields + return toSerialize, nil +} + +type NullableRunConnectorSubactionGetchoicesSubActionParams struct { + value *RunConnectorSubactionGetchoicesSubActionParams + isSet bool +} + +func (v NullableRunConnectorSubactionGetchoicesSubActionParams) Get() *RunConnectorSubactionGetchoicesSubActionParams { + return v.value +} + +func (v *NullableRunConnectorSubactionGetchoicesSubActionParams) Set(val *RunConnectorSubactionGetchoicesSubActionParams) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionGetchoicesSubActionParams) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionGetchoicesSubActionParams) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionGetchoicesSubActionParams(val *RunConnectorSubactionGetchoicesSubActionParams) *NullableRunConnectorSubactionGetchoicesSubActionParams { + return &NullableRunConnectorSubactionGetchoicesSubActionParams{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionGetchoicesSubActionParams) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionGetchoicesSubActionParams) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_getfields.go b/generated/kibanaactions/model_run_connector_subaction_getfields.go new file mode 100644 index 000000000..780c9c145 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_getfields.go @@ -0,0 +1,116 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionGetfields type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionGetfields{} + +// RunConnectorSubactionGetfields The `getFields` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors. +type RunConnectorSubactionGetfields struct { + // The action to test. + SubAction string `json:"subAction"` +} + +// NewRunConnectorSubactionGetfields instantiates a new RunConnectorSubactionGetfields object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionGetfields(subAction string) *RunConnectorSubactionGetfields { + this := RunConnectorSubactionGetfields{} + this.SubAction = subAction + return &this +} + +// NewRunConnectorSubactionGetfieldsWithDefaults instantiates a new RunConnectorSubactionGetfields object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionGetfieldsWithDefaults() *RunConnectorSubactionGetfields { + this := RunConnectorSubactionGetfields{} + return &this +} + +// GetSubAction returns the SubAction field value +func (o *RunConnectorSubactionGetfields) GetSubAction() string { + if o == nil { + var ret string + return ret + } + + return o.SubAction +} + +// GetSubActionOk returns a tuple with the SubAction field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionGetfields) GetSubActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SubAction, true +} + +// SetSubAction sets field value +func (o *RunConnectorSubactionGetfields) SetSubAction(v string) { + o.SubAction = v +} + +func (o RunConnectorSubactionGetfields) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionGetfields) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["subAction"] = o.SubAction + return toSerialize, nil +} + +type NullableRunConnectorSubactionGetfields struct { + value *RunConnectorSubactionGetfields + isSet bool +} + +func (v NullableRunConnectorSubactionGetfields) Get() *RunConnectorSubactionGetfields { + return v.value +} + +func (v *NullableRunConnectorSubactionGetfields) Set(val *RunConnectorSubactionGetfields) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionGetfields) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionGetfields) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionGetfields(val *RunConnectorSubactionGetfields) *NullableRunConnectorSubactionGetfields { + return &NullableRunConnectorSubactionGetfields{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionGetfields) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionGetfields) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_getincident.go b/generated/kibanaactions/model_run_connector_subaction_getincident.go new file mode 100644 index 000000000..d89bde297 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_getincident.go @@ -0,0 +1,143 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionGetincident type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionGetincident{} + +// RunConnectorSubactionGetincident The `getIncident` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors. +type RunConnectorSubactionGetincident struct { + // The action to test. + SubAction string `json:"subAction"` + SubActionParams RunConnectorSubactionGetincidentSubActionParams `json:"subActionParams"` +} + +// NewRunConnectorSubactionGetincident instantiates a new RunConnectorSubactionGetincident object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionGetincident(subAction string, subActionParams RunConnectorSubactionGetincidentSubActionParams) *RunConnectorSubactionGetincident { + this := RunConnectorSubactionGetincident{} + this.SubAction = subAction + this.SubActionParams = subActionParams + return &this +} + +// NewRunConnectorSubactionGetincidentWithDefaults instantiates a new RunConnectorSubactionGetincident object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionGetincidentWithDefaults() *RunConnectorSubactionGetincident { + this := RunConnectorSubactionGetincident{} + return &this +} + +// GetSubAction returns the SubAction field value +func (o *RunConnectorSubactionGetincident) GetSubAction() string { + if o == nil { + var ret string + return ret + } + + return o.SubAction +} + +// GetSubActionOk returns a tuple with the SubAction field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionGetincident) GetSubActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SubAction, true +} + +// SetSubAction sets field value +func (o *RunConnectorSubactionGetincident) SetSubAction(v string) { + o.SubAction = v +} + +// GetSubActionParams returns the SubActionParams field value +func (o *RunConnectorSubactionGetincident) GetSubActionParams() RunConnectorSubactionGetincidentSubActionParams { + if o == nil { + var ret RunConnectorSubactionGetincidentSubActionParams + return ret + } + + return o.SubActionParams +} + +// GetSubActionParamsOk returns a tuple with the SubActionParams field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionGetincident) GetSubActionParamsOk() (*RunConnectorSubactionGetincidentSubActionParams, bool) { + if o == nil { + return nil, false + } + return &o.SubActionParams, true +} + +// SetSubActionParams sets field value +func (o *RunConnectorSubactionGetincident) SetSubActionParams(v RunConnectorSubactionGetincidentSubActionParams) { + o.SubActionParams = v +} + +func (o RunConnectorSubactionGetincident) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionGetincident) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["subAction"] = o.SubAction + toSerialize["subActionParams"] = o.SubActionParams + return toSerialize, nil +} + +type NullableRunConnectorSubactionGetincident struct { + value *RunConnectorSubactionGetincident + isSet bool +} + +func (v NullableRunConnectorSubactionGetincident) Get() *RunConnectorSubactionGetincident { + return v.value +} + +func (v *NullableRunConnectorSubactionGetincident) Set(val *RunConnectorSubactionGetincident) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionGetincident) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionGetincident) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionGetincident(val *RunConnectorSubactionGetincident) *NullableRunConnectorSubactionGetincident { + return &NullableRunConnectorSubactionGetincident{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionGetincident) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionGetincident) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_getincident_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_getincident_sub_action_params.go new file mode 100644 index 000000000..be962b568 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_getincident_sub_action_params.go @@ -0,0 +1,116 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionGetincidentSubActionParams type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionGetincidentSubActionParams{} + +// RunConnectorSubactionGetincidentSubActionParams struct for RunConnectorSubactionGetincidentSubActionParams +type RunConnectorSubactionGetincidentSubActionParams struct { + // The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. + ExternalId string `json:"externalId"` +} + +// NewRunConnectorSubactionGetincidentSubActionParams instantiates a new RunConnectorSubactionGetincidentSubActionParams object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionGetincidentSubActionParams(externalId string) *RunConnectorSubactionGetincidentSubActionParams { + this := RunConnectorSubactionGetincidentSubActionParams{} + this.ExternalId = externalId + return &this +} + +// NewRunConnectorSubactionGetincidentSubActionParamsWithDefaults instantiates a new RunConnectorSubactionGetincidentSubActionParams object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionGetincidentSubActionParamsWithDefaults() *RunConnectorSubactionGetincidentSubActionParams { + this := RunConnectorSubactionGetincidentSubActionParams{} + return &this +} + +// GetExternalId returns the ExternalId field value +func (o *RunConnectorSubactionGetincidentSubActionParams) GetExternalId() string { + if o == nil { + var ret string + return ret + } + + return o.ExternalId +} + +// GetExternalIdOk returns a tuple with the ExternalId field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionGetincidentSubActionParams) GetExternalIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExternalId, true +} + +// SetExternalId sets field value +func (o *RunConnectorSubactionGetincidentSubActionParams) SetExternalId(v string) { + o.ExternalId = v +} + +func (o RunConnectorSubactionGetincidentSubActionParams) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionGetincidentSubActionParams) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["externalId"] = o.ExternalId + return toSerialize, nil +} + +type NullableRunConnectorSubactionGetincidentSubActionParams struct { + value *RunConnectorSubactionGetincidentSubActionParams + isSet bool +} + +func (v NullableRunConnectorSubactionGetincidentSubActionParams) Get() *RunConnectorSubactionGetincidentSubActionParams { + return v.value +} + +func (v *NullableRunConnectorSubactionGetincidentSubActionParams) Set(val *RunConnectorSubactionGetincidentSubActionParams) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionGetincidentSubActionParams) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionGetincidentSubActionParams) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionGetincidentSubActionParams(val *RunConnectorSubactionGetincidentSubActionParams) *NullableRunConnectorSubactionGetincidentSubActionParams { + return &NullableRunConnectorSubactionGetincidentSubActionParams{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionGetincidentSubActionParams) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionGetincidentSubActionParams) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_issue.go b/generated/kibanaactions/model_run_connector_subaction_issue.go new file mode 100644 index 000000000..a546a199b --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_issue.go @@ -0,0 +1,152 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionIssue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionIssue{} + +// RunConnectorSubactionIssue The `issue` subaction for Jira connectors. +type RunConnectorSubactionIssue struct { + // The action to test. + SubAction string `json:"subAction"` + SubActionParams *RunConnectorSubactionIssueSubActionParams `json:"subActionParams,omitempty"` +} + +// NewRunConnectorSubactionIssue instantiates a new RunConnectorSubactionIssue object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionIssue(subAction string) *RunConnectorSubactionIssue { + this := RunConnectorSubactionIssue{} + this.SubAction = subAction + return &this +} + +// NewRunConnectorSubactionIssueWithDefaults instantiates a new RunConnectorSubactionIssue object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionIssueWithDefaults() *RunConnectorSubactionIssue { + this := RunConnectorSubactionIssue{} + return &this +} + +// GetSubAction returns the SubAction field value +func (o *RunConnectorSubactionIssue) GetSubAction() string { + if o == nil { + var ret string + return ret + } + + return o.SubAction +} + +// GetSubActionOk returns a tuple with the SubAction field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionIssue) GetSubActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SubAction, true +} + +// SetSubAction sets field value +func (o *RunConnectorSubactionIssue) SetSubAction(v string) { + o.SubAction = v +} + +// GetSubActionParams returns the SubActionParams field value if set, zero value otherwise. +func (o *RunConnectorSubactionIssue) GetSubActionParams() RunConnectorSubactionIssueSubActionParams { + if o == nil || IsNil(o.SubActionParams) { + var ret RunConnectorSubactionIssueSubActionParams + return ret + } + return *o.SubActionParams +} + +// GetSubActionParamsOk returns a tuple with the SubActionParams field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionIssue) GetSubActionParamsOk() (*RunConnectorSubactionIssueSubActionParams, bool) { + if o == nil || IsNil(o.SubActionParams) { + return nil, false + } + return o.SubActionParams, true +} + +// HasSubActionParams returns a boolean if a field has been set. +func (o *RunConnectorSubactionIssue) HasSubActionParams() bool { + if o != nil && !IsNil(o.SubActionParams) { + return true + } + + return false +} + +// SetSubActionParams gets a reference to the given RunConnectorSubactionIssueSubActionParams and assigns it to the SubActionParams field. +func (o *RunConnectorSubactionIssue) SetSubActionParams(v RunConnectorSubactionIssueSubActionParams) { + o.SubActionParams = &v +} + +func (o RunConnectorSubactionIssue) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionIssue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["subAction"] = o.SubAction + if !IsNil(o.SubActionParams) { + toSerialize["subActionParams"] = o.SubActionParams + } + return toSerialize, nil +} + +type NullableRunConnectorSubactionIssue struct { + value *RunConnectorSubactionIssue + isSet bool +} + +func (v NullableRunConnectorSubactionIssue) Get() *RunConnectorSubactionIssue { + return v.value +} + +func (v *NullableRunConnectorSubactionIssue) Set(val *RunConnectorSubactionIssue) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionIssue) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionIssue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionIssue(val *RunConnectorSubactionIssue) *NullableRunConnectorSubactionIssue { + return &NullableRunConnectorSubactionIssue{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionIssue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionIssue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_issue_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_issue_sub_action_params.go new file mode 100644 index 000000000..4ea3a0723 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_issue_sub_action_params.go @@ -0,0 +1,116 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionIssueSubActionParams type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionIssueSubActionParams{} + +// RunConnectorSubactionIssueSubActionParams struct for RunConnectorSubactionIssueSubActionParams +type RunConnectorSubactionIssueSubActionParams struct { + // The Jira issue identifier. + Id string `json:"id"` +} + +// NewRunConnectorSubactionIssueSubActionParams instantiates a new RunConnectorSubactionIssueSubActionParams object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionIssueSubActionParams(id string) *RunConnectorSubactionIssueSubActionParams { + this := RunConnectorSubactionIssueSubActionParams{} + this.Id = id + return &this +} + +// NewRunConnectorSubactionIssueSubActionParamsWithDefaults instantiates a new RunConnectorSubactionIssueSubActionParams object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionIssueSubActionParamsWithDefaults() *RunConnectorSubactionIssueSubActionParams { + this := RunConnectorSubactionIssueSubActionParams{} + return &this +} + +// GetId returns the Id field value +func (o *RunConnectorSubactionIssueSubActionParams) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionIssueSubActionParams) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *RunConnectorSubactionIssueSubActionParams) SetId(v string) { + o.Id = v +} + +func (o RunConnectorSubactionIssueSubActionParams) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionIssueSubActionParams) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + return toSerialize, nil +} + +type NullableRunConnectorSubactionIssueSubActionParams struct { + value *RunConnectorSubactionIssueSubActionParams + isSet bool +} + +func (v NullableRunConnectorSubactionIssueSubActionParams) Get() *RunConnectorSubactionIssueSubActionParams { + return v.value +} + +func (v *NullableRunConnectorSubactionIssueSubActionParams) Set(val *RunConnectorSubactionIssueSubActionParams) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionIssueSubActionParams) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionIssueSubActionParams) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionIssueSubActionParams(val *RunConnectorSubactionIssueSubActionParams) *NullableRunConnectorSubactionIssueSubActionParams { + return &NullableRunConnectorSubactionIssueSubActionParams{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionIssueSubActionParams) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionIssueSubActionParams) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_issues.go b/generated/kibanaactions/model_run_connector_subaction_issues.go new file mode 100644 index 000000000..23291bd08 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_issues.go @@ -0,0 +1,143 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionIssues type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionIssues{} + +// RunConnectorSubactionIssues The `issues` subaction for Jira connectors. +type RunConnectorSubactionIssues struct { + // The action to test. + SubAction string `json:"subAction"` + SubActionParams RunConnectorSubactionIssuesSubActionParams `json:"subActionParams"` +} + +// NewRunConnectorSubactionIssues instantiates a new RunConnectorSubactionIssues object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionIssues(subAction string, subActionParams RunConnectorSubactionIssuesSubActionParams) *RunConnectorSubactionIssues { + this := RunConnectorSubactionIssues{} + this.SubAction = subAction + this.SubActionParams = subActionParams + return &this +} + +// NewRunConnectorSubactionIssuesWithDefaults instantiates a new RunConnectorSubactionIssues object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionIssuesWithDefaults() *RunConnectorSubactionIssues { + this := RunConnectorSubactionIssues{} + return &this +} + +// GetSubAction returns the SubAction field value +func (o *RunConnectorSubactionIssues) GetSubAction() string { + if o == nil { + var ret string + return ret + } + + return o.SubAction +} + +// GetSubActionOk returns a tuple with the SubAction field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionIssues) GetSubActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SubAction, true +} + +// SetSubAction sets field value +func (o *RunConnectorSubactionIssues) SetSubAction(v string) { + o.SubAction = v +} + +// GetSubActionParams returns the SubActionParams field value +func (o *RunConnectorSubactionIssues) GetSubActionParams() RunConnectorSubactionIssuesSubActionParams { + if o == nil { + var ret RunConnectorSubactionIssuesSubActionParams + return ret + } + + return o.SubActionParams +} + +// GetSubActionParamsOk returns a tuple with the SubActionParams field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionIssues) GetSubActionParamsOk() (*RunConnectorSubactionIssuesSubActionParams, bool) { + if o == nil { + return nil, false + } + return &o.SubActionParams, true +} + +// SetSubActionParams sets field value +func (o *RunConnectorSubactionIssues) SetSubActionParams(v RunConnectorSubactionIssuesSubActionParams) { + o.SubActionParams = v +} + +func (o RunConnectorSubactionIssues) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionIssues) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["subAction"] = o.SubAction + toSerialize["subActionParams"] = o.SubActionParams + return toSerialize, nil +} + +type NullableRunConnectorSubactionIssues struct { + value *RunConnectorSubactionIssues + isSet bool +} + +func (v NullableRunConnectorSubactionIssues) Get() *RunConnectorSubactionIssues { + return v.value +} + +func (v *NullableRunConnectorSubactionIssues) Set(val *RunConnectorSubactionIssues) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionIssues) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionIssues) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionIssues(val *RunConnectorSubactionIssues) *NullableRunConnectorSubactionIssues { + return &NullableRunConnectorSubactionIssues{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionIssues) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionIssues) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_issues_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_issues_sub_action_params.go new file mode 100644 index 000000000..a97f6d660 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_issues_sub_action_params.go @@ -0,0 +1,116 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionIssuesSubActionParams type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionIssuesSubActionParams{} + +// RunConnectorSubactionIssuesSubActionParams struct for RunConnectorSubactionIssuesSubActionParams +type RunConnectorSubactionIssuesSubActionParams struct { + // The title of the Jira issue. + Title string `json:"title"` +} + +// NewRunConnectorSubactionIssuesSubActionParams instantiates a new RunConnectorSubactionIssuesSubActionParams object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionIssuesSubActionParams(title string) *RunConnectorSubactionIssuesSubActionParams { + this := RunConnectorSubactionIssuesSubActionParams{} + this.Title = title + return &this +} + +// NewRunConnectorSubactionIssuesSubActionParamsWithDefaults instantiates a new RunConnectorSubactionIssuesSubActionParams object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionIssuesSubActionParamsWithDefaults() *RunConnectorSubactionIssuesSubActionParams { + this := RunConnectorSubactionIssuesSubActionParams{} + return &this +} + +// GetTitle returns the Title field value +func (o *RunConnectorSubactionIssuesSubActionParams) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionIssuesSubActionParams) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *RunConnectorSubactionIssuesSubActionParams) SetTitle(v string) { + o.Title = v +} + +func (o RunConnectorSubactionIssuesSubActionParams) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionIssuesSubActionParams) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["title"] = o.Title + return toSerialize, nil +} + +type NullableRunConnectorSubactionIssuesSubActionParams struct { + value *RunConnectorSubactionIssuesSubActionParams + isSet bool +} + +func (v NullableRunConnectorSubactionIssuesSubActionParams) Get() *RunConnectorSubactionIssuesSubActionParams { + return v.value +} + +func (v *NullableRunConnectorSubactionIssuesSubActionParams) Set(val *RunConnectorSubactionIssuesSubActionParams) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionIssuesSubActionParams) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionIssuesSubActionParams) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionIssuesSubActionParams(val *RunConnectorSubactionIssuesSubActionParams) *NullableRunConnectorSubactionIssuesSubActionParams { + return &NullableRunConnectorSubactionIssuesSubActionParams{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionIssuesSubActionParams) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionIssuesSubActionParams) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_issuetypes.go b/generated/kibanaactions/model_run_connector_subaction_issuetypes.go new file mode 100644 index 000000000..b7754c27e --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_issuetypes.go @@ -0,0 +1,116 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionIssuetypes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionIssuetypes{} + +// RunConnectorSubactionIssuetypes The `issueTypes` subaction for Jira connectors. +type RunConnectorSubactionIssuetypes struct { + // The action to test. + SubAction string `json:"subAction"` +} + +// NewRunConnectorSubactionIssuetypes instantiates a new RunConnectorSubactionIssuetypes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionIssuetypes(subAction string) *RunConnectorSubactionIssuetypes { + this := RunConnectorSubactionIssuetypes{} + this.SubAction = subAction + return &this +} + +// NewRunConnectorSubactionIssuetypesWithDefaults instantiates a new RunConnectorSubactionIssuetypes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionIssuetypesWithDefaults() *RunConnectorSubactionIssuetypes { + this := RunConnectorSubactionIssuetypes{} + return &this +} + +// GetSubAction returns the SubAction field value +func (o *RunConnectorSubactionIssuetypes) GetSubAction() string { + if o == nil { + var ret string + return ret + } + + return o.SubAction +} + +// GetSubActionOk returns a tuple with the SubAction field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionIssuetypes) GetSubActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SubAction, true +} + +// SetSubAction sets field value +func (o *RunConnectorSubactionIssuetypes) SetSubAction(v string) { + o.SubAction = v +} + +func (o RunConnectorSubactionIssuetypes) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionIssuetypes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["subAction"] = o.SubAction + return toSerialize, nil +} + +type NullableRunConnectorSubactionIssuetypes struct { + value *RunConnectorSubactionIssuetypes + isSet bool +} + +func (v NullableRunConnectorSubactionIssuetypes) Get() *RunConnectorSubactionIssuetypes { + return v.value +} + +func (v *NullableRunConnectorSubactionIssuetypes) Set(val *RunConnectorSubactionIssuetypes) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionIssuetypes) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionIssuetypes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionIssuetypes(val *RunConnectorSubactionIssuetypes) *NullableRunConnectorSubactionIssuetypes { + return &NullableRunConnectorSubactionIssuetypes{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionIssuetypes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionIssuetypes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice.go new file mode 100644 index 000000000..3fecdb551 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_pushtoservice.go @@ -0,0 +1,143 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionPushtoservice type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionPushtoservice{} + +// RunConnectorSubactionPushtoservice The `pushToService` subaction for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors. +type RunConnectorSubactionPushtoservice struct { + // The action to test. + SubAction string `json:"subAction"` + SubActionParams RunConnectorSubactionPushtoserviceSubActionParams `json:"subActionParams"` +} + +// NewRunConnectorSubactionPushtoservice instantiates a new RunConnectorSubactionPushtoservice object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionPushtoservice(subAction string, subActionParams RunConnectorSubactionPushtoserviceSubActionParams) *RunConnectorSubactionPushtoservice { + this := RunConnectorSubactionPushtoservice{} + this.SubAction = subAction + this.SubActionParams = subActionParams + return &this +} + +// NewRunConnectorSubactionPushtoserviceWithDefaults instantiates a new RunConnectorSubactionPushtoservice object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionPushtoserviceWithDefaults() *RunConnectorSubactionPushtoservice { + this := RunConnectorSubactionPushtoservice{} + return &this +} + +// GetSubAction returns the SubAction field value +func (o *RunConnectorSubactionPushtoservice) GetSubAction() string { + if o == nil { + var ret string + return ret + } + + return o.SubAction +} + +// GetSubActionOk returns a tuple with the SubAction field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoservice) GetSubActionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SubAction, true +} + +// SetSubAction sets field value +func (o *RunConnectorSubactionPushtoservice) SetSubAction(v string) { + o.SubAction = v +} + +// GetSubActionParams returns the SubActionParams field value +func (o *RunConnectorSubactionPushtoservice) GetSubActionParams() RunConnectorSubactionPushtoserviceSubActionParams { + if o == nil { + var ret RunConnectorSubactionPushtoserviceSubActionParams + return ret + } + + return o.SubActionParams +} + +// GetSubActionParamsOk returns a tuple with the SubActionParams field value +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoservice) GetSubActionParamsOk() (*RunConnectorSubactionPushtoserviceSubActionParams, bool) { + if o == nil { + return nil, false + } + return &o.SubActionParams, true +} + +// SetSubActionParams sets field value +func (o *RunConnectorSubactionPushtoservice) SetSubActionParams(v RunConnectorSubactionPushtoserviceSubActionParams) { + o.SubActionParams = v +} + +func (o RunConnectorSubactionPushtoservice) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionPushtoservice) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["subAction"] = o.SubAction + toSerialize["subActionParams"] = o.SubActionParams + return toSerialize, nil +} + +type NullableRunConnectorSubactionPushtoservice struct { + value *RunConnectorSubactionPushtoservice + isSet bool +} + +func (v NullableRunConnectorSubactionPushtoservice) Get() *RunConnectorSubactionPushtoservice { + return v.value +} + +func (v *NullableRunConnectorSubactionPushtoservice) Set(val *RunConnectorSubactionPushtoservice) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionPushtoservice) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionPushtoservice) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionPushtoservice(val *RunConnectorSubactionPushtoservice) *NullableRunConnectorSubactionPushtoservice { + return &NullableRunConnectorSubactionPushtoservice{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionPushtoservice) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionPushtoservice) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params.go new file mode 100644 index 000000000..f9c3f4b6a --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params.go @@ -0,0 +1,161 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionPushtoserviceSubActionParams type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionPushtoserviceSubActionParams{} + +// RunConnectorSubactionPushtoserviceSubActionParams The set of configuration properties for the action. +type RunConnectorSubactionPushtoserviceSubActionParams struct { + // Additional information that is sent to Jira, ServiceNow ITSM, ServiceNow SecOps, or Swimlane. + Comments []RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner `json:"comments,omitempty"` + Incident *RunConnectorSubactionPushtoserviceSubActionParamsIncident `json:"incident,omitempty"` +} + +// NewRunConnectorSubactionPushtoserviceSubActionParams instantiates a new RunConnectorSubactionPushtoserviceSubActionParams object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionPushtoserviceSubActionParams() *RunConnectorSubactionPushtoserviceSubActionParams { + this := RunConnectorSubactionPushtoserviceSubActionParams{} + return &this +} + +// NewRunConnectorSubactionPushtoserviceSubActionParamsWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParams object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionPushtoserviceSubActionParamsWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParams { + this := RunConnectorSubactionPushtoserviceSubActionParams{} + return &this +} + +// GetComments returns the Comments field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParams) GetComments() []RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner { + if o == nil || IsNil(o.Comments) { + var ret []RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner + return ret + } + return o.Comments +} + +// GetCommentsOk returns a tuple with the Comments field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParams) GetCommentsOk() ([]RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner, bool) { + if o == nil || IsNil(o.Comments) { + return nil, false + } + return o.Comments, true +} + +// HasComments returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParams) HasComments() bool { + if o != nil && !IsNil(o.Comments) { + return true + } + + return false +} + +// SetComments gets a reference to the given []RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner and assigns it to the Comments field. +func (o *RunConnectorSubactionPushtoserviceSubActionParams) SetComments(v []RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) { + o.Comments = v +} + +// GetIncident returns the Incident field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParams) GetIncident() RunConnectorSubactionPushtoserviceSubActionParamsIncident { + if o == nil || IsNil(o.Incident) { + var ret RunConnectorSubactionPushtoserviceSubActionParamsIncident + return ret + } + return *o.Incident +} + +// GetIncidentOk returns a tuple with the Incident field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParams) GetIncidentOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncident, bool) { + if o == nil || IsNil(o.Incident) { + return nil, false + } + return o.Incident, true +} + +// HasIncident returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParams) HasIncident() bool { + if o != nil && !IsNil(o.Incident) { + return true + } + + return false +} + +// SetIncident gets a reference to the given RunConnectorSubactionPushtoserviceSubActionParamsIncident and assigns it to the Incident field. +func (o *RunConnectorSubactionPushtoserviceSubActionParams) SetIncident(v RunConnectorSubactionPushtoserviceSubActionParamsIncident) { + o.Incident = &v +} + +func (o RunConnectorSubactionPushtoserviceSubActionParams) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionPushtoserviceSubActionParams) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Comments) { + toSerialize["comments"] = o.Comments + } + if !IsNil(o.Incident) { + toSerialize["incident"] = o.Incident + } + return toSerialize, nil +} + +type NullableRunConnectorSubactionPushtoserviceSubActionParams struct { + value *RunConnectorSubactionPushtoserviceSubActionParams + isSet bool +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParams) Get() *RunConnectorSubactionPushtoserviceSubActionParams { + return v.value +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParams) Set(val *RunConnectorSubactionPushtoserviceSubActionParams) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParams) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParams) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionPushtoserviceSubActionParams(val *RunConnectorSubactionPushtoserviceSubActionParams) *NullableRunConnectorSubactionPushtoserviceSubActionParams { + return &NullableRunConnectorSubactionPushtoserviceSubActionParams{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParams) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParams) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_comments_inner.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_comments_inner.go new file mode 100644 index 000000000..ec94aaa3e --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_comments_inner.go @@ -0,0 +1,162 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner{} + +// RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner struct for RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner +type RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner struct { + // A comment related to the incident. For example, describe how to troubleshoot the issue. + Comment *string `json:"comment,omitempty"` + // A unique identifier for the comment. + CommentId *int32 `json:"commentId,omitempty"` +} + +// NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner() *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner { + this := RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner{} + return &this +} + +// NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInnerWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInnerWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner { + this := RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner{} + return &this +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) GetComment() string { + if o == nil || IsNil(o.Comment) { + var ret string + return ret + } + return *o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) GetCommentOk() (*string, bool) { + if o == nil || IsNil(o.Comment) { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) HasComment() bool { + if o != nil && !IsNil(o.Comment) { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) SetComment(v string) { + o.Comment = &v +} + +// GetCommentId returns the CommentId field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) GetCommentId() int32 { + if o == nil || IsNil(o.CommentId) { + var ret int32 + return ret + } + return *o.CommentId +} + +// GetCommentIdOk returns a tuple with the CommentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) GetCommentIdOk() (*int32, bool) { + if o == nil || IsNil(o.CommentId) { + return nil, false + } + return o.CommentId, true +} + +// HasCommentId returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) HasCommentId() bool { + if o != nil && !IsNil(o.CommentId) { + return true + } + + return false +} + +// SetCommentId gets a reference to the given int32 and assigns it to the CommentId field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) SetCommentId(v int32) { + o.CommentId = &v +} + +func (o RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Comment) { + toSerialize["comment"] = o.Comment + } + if !IsNil(o.CommentId) { + toSerialize["commentId"] = o.CommentId + } + return toSerialize, nil +} + +type NullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner struct { + value *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner + isSet bool +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) Get() *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner { + return v.value +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) Set(val *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner(val *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) *NullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner { + return &NullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident.go new file mode 100644 index 000000000..a3e148ecc --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident.go @@ -0,0 +1,972 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the RunConnectorSubactionPushtoserviceSubActionParamsIncident type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunConnectorSubactionPushtoserviceSubActionParamsIncident{} + +// RunConnectorSubactionPushtoserviceSubActionParamsIncident Information necessary to create or update a Jira, ServiceNow ITSM, ServiveNow SecOps, or Swimlane incident. +type RunConnectorSubactionPushtoserviceSubActionParamsIncident struct { + // The alert identifier for Swimlane connectors. + AlertId *string `json:"alertId,omitempty"` + // The case identifier for the incident for Swimlane connectors. + CaseId *string `json:"caseId,omitempty"` + // The case name for the incident for Swimlane connectors. + CaseName *string `json:"caseName,omitempty"` + // The category of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. + Category *string `json:"category,omitempty"` + // A descriptive label of the alert for correlation purposes for ServiceNow ITSM and ServiceNow SecOps connectors. + CorrelationDisplay *string `json:"correlation_display,omitempty"` + // The correlation identifier for the security incident for ServiceNow ITSM and ServiveNow SecOps connectors. Connectors using the same correlation ID are associated with the same ServiceNow incident. This value determines whether a new ServiceNow incident is created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the correlation ID value in ServiceNow. The maximum character length for this value is 100 characters. NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that ServiceNow creates a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, ServiceNow creates and continually updates a single incident record for the alert. + CorrelationId *string `json:"correlation_id,omitempty"` + // The description of the incident for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors. + Description *string `json:"description,omitempty"` + DestIp *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp `json:"dest_ip,omitempty"` + // The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. If present, the incident is updated. Otherwise, a new incident is created. + ExternalId *string `json:"externalId,omitempty"` + // The impact of the incident for ServiceNow ITSM connectors. + Impact *string `json:"impact,omitempty"` + // The type of incident for Jira connectors. For example, 10006. To obtain the list of valid values, set `subAction` to `issueTypes`. + IssueType *int32 `json:"issueType,omitempty"` + // The labels for the incident for Jira connectors. NOTE: Labels cannot contain spaces. + Labels []string `json:"labels,omitempty"` + MalwareHash *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash `json:"malware_hash,omitempty"` + MalwareUrl *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl `json:"malware_url,omitempty"` + // The ID or key of the parent issue for Jira connectors. Applies only to `Sub-task` types of issues. + Parent *string `json:"parent,omitempty"` + // The priority of the incident in Jira and ServiceNow SecOps connectors. + Priority *string `json:"priority,omitempty"` + // The rule name for Swimlane connectors. + RuleName *string `json:"ruleName,omitempty"` + // The severity of the incident for ServiceNow ITSM and Swimlane connectors. + Severity *string `json:"severity,omitempty"` + // A short description of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. It is used for searching the contents of the knowledge base. + ShortDescription *string `json:"short_description,omitempty"` + SourceIp *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp `json:"source_ip,omitempty"` + // The subcategory of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. + Subcategory *string `json:"subcategory,omitempty"` + // A summary of the incident for Jira connectors. + Summary *string `json:"summary,omitempty"` + // A title for the incident for Jira connectors. It is used for searching the contents of the knowledge base. + Title *string `json:"title,omitempty"` + // The urgency of the incident for ServiceNow ITSM connectors. + Urgency *string `json:"urgency,omitempty"` +} + +// NewRunConnectorSubactionPushtoserviceSubActionParamsIncident instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncident object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunConnectorSubactionPushtoserviceSubActionParamsIncident() *RunConnectorSubactionPushtoserviceSubActionParamsIncident { + this := RunConnectorSubactionPushtoserviceSubActionParamsIncident{} + return &this +} + +// NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncident object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParamsIncident { + this := RunConnectorSubactionPushtoserviceSubActionParamsIncident{} + return &this +} + +// GetAlertId returns the AlertId field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetAlertId() string { + if o == nil || IsNil(o.AlertId) { + var ret string + return ret + } + return *o.AlertId +} + +// GetAlertIdOk returns a tuple with the AlertId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetAlertIdOk() (*string, bool) { + if o == nil || IsNil(o.AlertId) { + return nil, false + } + return o.AlertId, true +} + +// HasAlertId returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasAlertId() bool { + if o != nil && !IsNil(o.AlertId) { + return true + } + + return false +} + +// SetAlertId gets a reference to the given string and assigns it to the AlertId field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetAlertId(v string) { + o.AlertId = &v +} + +// GetCaseId returns the CaseId field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCaseId() string { + if o == nil || IsNil(o.CaseId) { + var ret string + return ret + } + return *o.CaseId +} + +// GetCaseIdOk returns a tuple with the CaseId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCaseIdOk() (*string, bool) { + if o == nil || IsNil(o.CaseId) { + return nil, false + } + return o.CaseId, true +} + +// HasCaseId returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCaseId() bool { + if o != nil && !IsNil(o.CaseId) { + return true + } + + return false +} + +// SetCaseId gets a reference to the given string and assigns it to the CaseId field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCaseId(v string) { + o.CaseId = &v +} + +// GetCaseName returns the CaseName field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCaseName() string { + if o == nil || IsNil(o.CaseName) { + var ret string + return ret + } + return *o.CaseName +} + +// GetCaseNameOk returns a tuple with the CaseName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCaseNameOk() (*string, bool) { + if o == nil || IsNil(o.CaseName) { + return nil, false + } + return o.CaseName, true +} + +// HasCaseName returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCaseName() bool { + if o != nil && !IsNil(o.CaseName) { + return true + } + + return false +} + +// SetCaseName gets a reference to the given string and assigns it to the CaseName field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCaseName(v string) { + o.CaseName = &v +} + +// GetCategory returns the Category field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCategory() string { + if o == nil || IsNil(o.Category) { + var ret string + return ret + } + return *o.Category +} + +// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCategoryOk() (*string, bool) { + if o == nil || IsNil(o.Category) { + return nil, false + } + return o.Category, true +} + +// HasCategory returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCategory() bool { + if o != nil && !IsNil(o.Category) { + return true + } + + return false +} + +// SetCategory gets a reference to the given string and assigns it to the Category field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCategory(v string) { + o.Category = &v +} + +// GetCorrelationDisplay returns the CorrelationDisplay field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCorrelationDisplay() string { + if o == nil || IsNil(o.CorrelationDisplay) { + var ret string + return ret + } + return *o.CorrelationDisplay +} + +// GetCorrelationDisplayOk returns a tuple with the CorrelationDisplay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCorrelationDisplayOk() (*string, bool) { + if o == nil || IsNil(o.CorrelationDisplay) { + return nil, false + } + return o.CorrelationDisplay, true +} + +// HasCorrelationDisplay returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCorrelationDisplay() bool { + if o != nil && !IsNil(o.CorrelationDisplay) { + return true + } + + return false +} + +// SetCorrelationDisplay gets a reference to the given string and assigns it to the CorrelationDisplay field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCorrelationDisplay(v string) { + o.CorrelationDisplay = &v +} + +// GetCorrelationId returns the CorrelationId field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCorrelationId() string { + if o == nil || IsNil(o.CorrelationId) { + var ret string + return ret + } + return *o.CorrelationId +} + +// GetCorrelationIdOk returns a tuple with the CorrelationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCorrelationIdOk() (*string, bool) { + if o == nil || IsNil(o.CorrelationId) { + return nil, false + } + return o.CorrelationId, true +} + +// HasCorrelationId returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCorrelationId() bool { + if o != nil && !IsNil(o.CorrelationId) { + return true + } + + return false +} + +// SetCorrelationId gets a reference to the given string and assigns it to the CorrelationId field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCorrelationId(v string) { + o.CorrelationId = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetDescription(v string) { + o.Description = &v +} + +// GetDestIp returns the DestIp field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetDestIp() RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp { + if o == nil || IsNil(o.DestIp) { + var ret RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp + return ret + } + return *o.DestIp +} + +// GetDestIpOk returns a tuple with the DestIp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetDestIpOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp, bool) { + if o == nil || IsNil(o.DestIp) { + return nil, false + } + return o.DestIp, true +} + +// HasDestIp returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasDestIp() bool { + if o != nil && !IsNil(o.DestIp) { + return true + } + + return false +} + +// SetDestIp gets a reference to the given RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp and assigns it to the DestIp field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetDestIp(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) { + o.DestIp = &v +} + +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { + var ret string + return ret + } + return *o.ExternalId +} + +// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { + return nil, false + } + return o.ExternalId, true +} + +// HasExternalId returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasExternalId() bool { + if o != nil && !IsNil(o.ExternalId) { + return true + } + + return false +} + +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetExternalId(v string) { + o.ExternalId = &v +} + +// GetImpact returns the Impact field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetImpact() string { + if o == nil || IsNil(o.Impact) { + var ret string + return ret + } + return *o.Impact +} + +// GetImpactOk returns a tuple with the Impact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetImpactOk() (*string, bool) { + if o == nil || IsNil(o.Impact) { + return nil, false + } + return o.Impact, true +} + +// HasImpact returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasImpact() bool { + if o != nil && !IsNil(o.Impact) { + return true + } + + return false +} + +// SetImpact gets a reference to the given string and assigns it to the Impact field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetImpact(v string) { + o.Impact = &v +} + +// GetIssueType returns the IssueType field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetIssueType() int32 { + if o == nil || IsNil(o.IssueType) { + var ret int32 + return ret + } + return *o.IssueType +} + +// GetIssueTypeOk returns a tuple with the IssueType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetIssueTypeOk() (*int32, bool) { + if o == nil || IsNil(o.IssueType) { + return nil, false + } + return o.IssueType, true +} + +// HasIssueType returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasIssueType() bool { + if o != nil && !IsNil(o.IssueType) { + return true + } + + return false +} + +// SetIssueType gets a reference to the given int32 and assigns it to the IssueType field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetIssueType(v int32) { + o.IssueType = &v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetLabels() []string { + if o == nil || IsNil(o.Labels) { + var ret []string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetLabelsOk() ([]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given []string and assigns it to the Labels field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetLabels(v []string) { + o.Labels = v +} + +// GetMalwareHash returns the MalwareHash field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetMalwareHash() RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash { + if o == nil || IsNil(o.MalwareHash) { + var ret RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash + return ret + } + return *o.MalwareHash +} + +// GetMalwareHashOk returns a tuple with the MalwareHash field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetMalwareHashOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash, bool) { + if o == nil || IsNil(o.MalwareHash) { + return nil, false + } + return o.MalwareHash, true +} + +// HasMalwareHash returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasMalwareHash() bool { + if o != nil && !IsNil(o.MalwareHash) { + return true + } + + return false +} + +// SetMalwareHash gets a reference to the given RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash and assigns it to the MalwareHash field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetMalwareHash(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) { + o.MalwareHash = &v +} + +// GetMalwareUrl returns the MalwareUrl field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetMalwareUrl() RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl { + if o == nil || IsNil(o.MalwareUrl) { + var ret RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl + return ret + } + return *o.MalwareUrl +} + +// GetMalwareUrlOk returns a tuple with the MalwareUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetMalwareUrlOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl, bool) { + if o == nil || IsNil(o.MalwareUrl) { + return nil, false + } + return o.MalwareUrl, true +} + +// HasMalwareUrl returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasMalwareUrl() bool { + if o != nil && !IsNil(o.MalwareUrl) { + return true + } + + return false +} + +// SetMalwareUrl gets a reference to the given RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl and assigns it to the MalwareUrl field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetMalwareUrl(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) { + o.MalwareUrl = &v +} + +// GetParent returns the Parent field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetParent() string { + if o == nil || IsNil(o.Parent) { + var ret string + return ret + } + return *o.Parent +} + +// GetParentOk returns a tuple with the Parent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetParentOk() (*string, bool) { + if o == nil || IsNil(o.Parent) { + return nil, false + } + return o.Parent, true +} + +// HasParent returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasParent() bool { + if o != nil && !IsNil(o.Parent) { + return true + } + + return false +} + +// SetParent gets a reference to the given string and assigns it to the Parent field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetParent(v string) { + o.Parent = &v +} + +// GetPriority returns the Priority field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetPriority() string { + if o == nil || IsNil(o.Priority) { + var ret string + return ret + } + return *o.Priority +} + +// GetPriorityOk returns a tuple with the Priority field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetPriorityOk() (*string, bool) { + if o == nil || IsNil(o.Priority) { + return nil, false + } + return o.Priority, true +} + +// HasPriority returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasPriority() bool { + if o != nil && !IsNil(o.Priority) { + return true + } + + return false +} + +// SetPriority gets a reference to the given string and assigns it to the Priority field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetPriority(v string) { + o.Priority = &v +} + +// GetRuleName returns the RuleName field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetRuleName() string { + if o == nil || IsNil(o.RuleName) { + var ret string + return ret + } + return *o.RuleName +} + +// GetRuleNameOk returns a tuple with the RuleName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetRuleNameOk() (*string, bool) { + if o == nil || IsNil(o.RuleName) { + return nil, false + } + return o.RuleName, true +} + +// HasRuleName returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasRuleName() bool { + if o != nil && !IsNil(o.RuleName) { + return true + } + + return false +} + +// SetRuleName gets a reference to the given string and assigns it to the RuleName field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetRuleName(v string) { + o.RuleName = &v +} + +// GetSeverity returns the Severity field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSeverity() string { + if o == nil || IsNil(o.Severity) { + var ret string + return ret + } + return *o.Severity +} + +// GetSeverityOk returns a tuple with the Severity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSeverityOk() (*string, bool) { + if o == nil || IsNil(o.Severity) { + return nil, false + } + return o.Severity, true +} + +// HasSeverity returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasSeverity() bool { + if o != nil && !IsNil(o.Severity) { + return true + } + + return false +} + +// SetSeverity gets a reference to the given string and assigns it to the Severity field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetSeverity(v string) { + o.Severity = &v +} + +// GetShortDescription returns the ShortDescription field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetShortDescription() string { + if o == nil || IsNil(o.ShortDescription) { + var ret string + return ret + } + return *o.ShortDescription +} + +// GetShortDescriptionOk returns a tuple with the ShortDescription field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetShortDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.ShortDescription) { + return nil, false + } + return o.ShortDescription, true +} + +// HasShortDescription returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasShortDescription() bool { + if o != nil && !IsNil(o.ShortDescription) { + return true + } + + return false +} + +// SetShortDescription gets a reference to the given string and assigns it to the ShortDescription field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetShortDescription(v string) { + o.ShortDescription = &v +} + +// GetSourceIp returns the SourceIp field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSourceIp() RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp { + if o == nil || IsNil(o.SourceIp) { + var ret RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp + return ret + } + return *o.SourceIp +} + +// GetSourceIpOk returns a tuple with the SourceIp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSourceIpOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp, bool) { + if o == nil || IsNil(o.SourceIp) { + return nil, false + } + return o.SourceIp, true +} + +// HasSourceIp returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasSourceIp() bool { + if o != nil && !IsNil(o.SourceIp) { + return true + } + + return false +} + +// SetSourceIp gets a reference to the given RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp and assigns it to the SourceIp field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetSourceIp(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) { + o.SourceIp = &v +} + +// GetSubcategory returns the Subcategory field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSubcategory() string { + if o == nil || IsNil(o.Subcategory) { + var ret string + return ret + } + return *o.Subcategory +} + +// GetSubcategoryOk returns a tuple with the Subcategory field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSubcategoryOk() (*string, bool) { + if o == nil || IsNil(o.Subcategory) { + return nil, false + } + return o.Subcategory, true +} + +// HasSubcategory returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasSubcategory() bool { + if o != nil && !IsNil(o.Subcategory) { + return true + } + + return false +} + +// SetSubcategory gets a reference to the given string and assigns it to the Subcategory field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetSubcategory(v string) { + o.Subcategory = &v +} + +// GetSummary returns the Summary field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSummary() string { + if o == nil || IsNil(o.Summary) { + var ret string + return ret + } + return *o.Summary +} + +// GetSummaryOk returns a tuple with the Summary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSummaryOk() (*string, bool) { + if o == nil || IsNil(o.Summary) { + return nil, false + } + return o.Summary, true +} + +// HasSummary returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasSummary() bool { + if o != nil && !IsNil(o.Summary) { + return true + } + + return false +} + +// SetSummary gets a reference to the given string and assigns it to the Summary field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetSummary(v string) { + o.Summary = &v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetTitle() string { + if o == nil || IsNil(o.Title) { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetTitleOk() (*string, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasTitle() bool { + if o != nil && !IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetTitle(v string) { + o.Title = &v +} + +// GetUrgency returns the Urgency field value if set, zero value otherwise. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetUrgency() string { + if o == nil || IsNil(o.Urgency) { + var ret string + return ret + } + return *o.Urgency +} + +// GetUrgencyOk returns a tuple with the Urgency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetUrgencyOk() (*string, bool) { + if o == nil || IsNil(o.Urgency) { + return nil, false + } + return o.Urgency, true +} + +// HasUrgency returns a boolean if a field has been set. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasUrgency() bool { + if o != nil && !IsNil(o.Urgency) { + return true + } + + return false +} + +// SetUrgency gets a reference to the given string and assigns it to the Urgency field. +func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetUrgency(v string) { + o.Urgency = &v +} + +func (o RunConnectorSubactionPushtoserviceSubActionParamsIncident) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunConnectorSubactionPushtoserviceSubActionParamsIncident) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AlertId) { + toSerialize["alertId"] = o.AlertId + } + if !IsNil(o.CaseId) { + toSerialize["caseId"] = o.CaseId + } + if !IsNil(o.CaseName) { + toSerialize["caseName"] = o.CaseName + } + if !IsNil(o.Category) { + toSerialize["category"] = o.Category + } + if !IsNil(o.CorrelationDisplay) { + toSerialize["correlation_display"] = o.CorrelationDisplay + } + if !IsNil(o.CorrelationId) { + toSerialize["correlation_id"] = o.CorrelationId + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.DestIp) { + toSerialize["dest_ip"] = o.DestIp + } + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId + } + if !IsNil(o.Impact) { + toSerialize["impact"] = o.Impact + } + if !IsNil(o.IssueType) { + toSerialize["issueType"] = o.IssueType + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.MalwareHash) { + toSerialize["malware_hash"] = o.MalwareHash + } + if !IsNil(o.MalwareUrl) { + toSerialize["malware_url"] = o.MalwareUrl + } + if !IsNil(o.Parent) { + toSerialize["parent"] = o.Parent + } + if !IsNil(o.Priority) { + toSerialize["priority"] = o.Priority + } + if !IsNil(o.RuleName) { + toSerialize["ruleName"] = o.RuleName + } + if !IsNil(o.Severity) { + toSerialize["severity"] = o.Severity + } + if !IsNil(o.ShortDescription) { + toSerialize["short_description"] = o.ShortDescription + } + if !IsNil(o.SourceIp) { + toSerialize["source_ip"] = o.SourceIp + } + if !IsNil(o.Subcategory) { + toSerialize["subcategory"] = o.Subcategory + } + if !IsNil(o.Summary) { + toSerialize["summary"] = o.Summary + } + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !IsNil(o.Urgency) { + toSerialize["urgency"] = o.Urgency + } + return toSerialize, nil +} + +type NullableRunConnectorSubactionPushtoserviceSubActionParamsIncident struct { + value *RunConnectorSubactionPushtoserviceSubActionParamsIncident + isSet bool +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncident) Get() *RunConnectorSubactionPushtoserviceSubActionParamsIncident { + return v.value +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncident) Set(val *RunConnectorSubactionPushtoserviceSubActionParamsIncident) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncident) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncident) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionPushtoserviceSubActionParamsIncident(val *RunConnectorSubactionPushtoserviceSubActionParamsIncident) *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncident { + return &NullableRunConnectorSubactionPushtoserviceSubActionParamsIncident{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncident) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncident) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go new file mode 100644 index 000000000..0d23ee0c3 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go @@ -0,0 +1,145 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" + "fmt" +) + +// RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp - A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. +type RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp struct { + ArrayOfString *[]string + String *string +} + +// []stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp is a convenience function that returns []string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp +func ArrayOfStringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp(v *[]string) RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp { + return RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp{ + ArrayOfString: v, + } +} + +// stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp is a convenience function that returns string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp +func StringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp(v *string) RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp { + return RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp{ + String: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into ArrayOfString + err = newStrictDecoder(data).Decode(&dst.ArrayOfString) + if err == nil { + jsonArrayOfString, _ := json.Marshal(dst.ArrayOfString) + if string(jsonArrayOfString) == "{}" { // empty struct + dst.ArrayOfString = nil + } else { + match++ + } + } else { + dst.ArrayOfString = nil + } + + // try to unmarshal data into String + err = newStrictDecoder(data).Decode(&dst.String) + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + match++ + } + } else { + dst.String = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.ArrayOfString = nil + dst.String = nil + + return fmt.Errorf("data matches more than one schema in oneOf(RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) MarshalJSON() ([]byte, error) { + if src.ArrayOfString != nil { + return json.Marshal(&src.ArrayOfString) + } + + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.ArrayOfString != nil { + return obj.ArrayOfString + } + + if obj.String != nil { + return obj.String + } + + // all schemas are nil + return nil +} + +type NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp struct { + value *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp + isSet bool +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) Get() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp { + return v.value +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) Set(val *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp(val *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp { + return &NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go new file mode 100644 index 000000000..7d9466ab7 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go @@ -0,0 +1,145 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" + "fmt" +) + +// RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash - A list of malware hashes related to the security incident for ServiceNow SecOps connectors. The hashes are added as observables to the security incident. +type RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash struct { + ArrayOfString *[]string + String *string +} + +// []stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash is a convenience function that returns []string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash +func ArrayOfStringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash(v *[]string) RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash { + return RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash{ + ArrayOfString: v, + } +} + +// stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash is a convenience function that returns string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash +func StringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash(v *string) RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash { + return RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash{ + String: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into ArrayOfString + err = newStrictDecoder(data).Decode(&dst.ArrayOfString) + if err == nil { + jsonArrayOfString, _ := json.Marshal(dst.ArrayOfString) + if string(jsonArrayOfString) == "{}" { // empty struct + dst.ArrayOfString = nil + } else { + match++ + } + } else { + dst.ArrayOfString = nil + } + + // try to unmarshal data into String + err = newStrictDecoder(data).Decode(&dst.String) + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + match++ + } + } else { + dst.String = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.ArrayOfString = nil + dst.String = nil + + return fmt.Errorf("data matches more than one schema in oneOf(RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) MarshalJSON() ([]byte, error) { + if src.ArrayOfString != nil { + return json.Marshal(&src.ArrayOfString) + } + + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.ArrayOfString != nil { + return obj.ArrayOfString + } + + if obj.String != nil { + return obj.String + } + + // all schemas are nil + return nil +} + +type NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash struct { + value *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash + isSet bool +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) Get() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash { + return v.value +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) Set(val *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash(val *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash { + return &NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go new file mode 100644 index 000000000..bbd2894b2 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go @@ -0,0 +1,145 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" + "fmt" +) + +// RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl - A list of malware URLs related to the security incident for ServiceNow SecOps connectors. The URLs are added as observables to the security incident. +type RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl struct { + ArrayOfString *[]string + String *string +} + +// []stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl is a convenience function that returns []string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl +func ArrayOfStringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl(v *[]string) RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl { + return RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl{ + ArrayOfString: v, + } +} + +// stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl is a convenience function that returns string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl +func StringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl(v *string) RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl { + return RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl{ + String: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into ArrayOfString + err = newStrictDecoder(data).Decode(&dst.ArrayOfString) + if err == nil { + jsonArrayOfString, _ := json.Marshal(dst.ArrayOfString) + if string(jsonArrayOfString) == "{}" { // empty struct + dst.ArrayOfString = nil + } else { + match++ + } + } else { + dst.ArrayOfString = nil + } + + // try to unmarshal data into String + err = newStrictDecoder(data).Decode(&dst.String) + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + match++ + } + } else { + dst.String = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.ArrayOfString = nil + dst.String = nil + + return fmt.Errorf("data matches more than one schema in oneOf(RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) MarshalJSON() ([]byte, error) { + if src.ArrayOfString != nil { + return json.Marshal(&src.ArrayOfString) + } + + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.ArrayOfString != nil { + return obj.ArrayOfString + } + + if obj.String != nil { + return obj.String + } + + // all schemas are nil + return nil +} + +type NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl struct { + value *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl + isSet bool +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) Get() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl { + return v.value +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) Set(val *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl(val *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl { + return &NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go new file mode 100644 index 000000000..2799e237b --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go @@ -0,0 +1,145 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" + "fmt" +) + +// RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp - A list of source IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. +type RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp struct { + ArrayOfString *[]string + String *string +} + +// []stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp is a convenience function that returns []string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp +func ArrayOfStringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp(v *[]string) RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp { + return RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp{ + ArrayOfString: v, + } +} + +// stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp is a convenience function that returns string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp +func StringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp(v *string) RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp { + return RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp{ + String: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into ArrayOfString + err = newStrictDecoder(data).Decode(&dst.ArrayOfString) + if err == nil { + jsonArrayOfString, _ := json.Marshal(dst.ArrayOfString) + if string(jsonArrayOfString) == "{}" { // empty struct + dst.ArrayOfString = nil + } else { + match++ + } + } else { + dst.ArrayOfString = nil + } + + // try to unmarshal data into String + err = newStrictDecoder(data).Decode(&dst.String) + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + match++ + } + } else { + dst.String = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.ArrayOfString = nil + dst.String = nil + + return fmt.Errorf("data matches more than one schema in oneOf(RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) MarshalJSON() ([]byte, error) { + if src.ArrayOfString != nil { + return json.Marshal(&src.ArrayOfString) + } + + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.ArrayOfString != nil { + return obj.ArrayOfString + } + + if obj.String != nil { + return obj.String + } + + // all schemas are nil + return nil +} + +type NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp struct { + value *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp + isSet bool +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) Get() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp { + return v.value +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) Set(val *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) { + v.value = val + v.isSet = true +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) IsSet() bool { + return v.isSet +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp(val *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp { + return &NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp{value: val, isSet: true} +} + +func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_secrets_properties_cases_webhook.go b/generated/kibanaactions/model_secrets_properties_cases_webhook.go new file mode 100644 index 000000000..9c1123320 --- /dev/null +++ b/generated/kibanaactions/model_secrets_properties_cases_webhook.go @@ -0,0 +1,162 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the SecretsPropertiesCasesWebhook type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SecretsPropertiesCasesWebhook{} + +// SecretsPropertiesCasesWebhook struct for SecretsPropertiesCasesWebhook +type SecretsPropertiesCasesWebhook struct { + // The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. + Password *string `json:"password,omitempty"` + // The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. + User *string `json:"user,omitempty"` +} + +// NewSecretsPropertiesCasesWebhook instantiates a new SecretsPropertiesCasesWebhook object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSecretsPropertiesCasesWebhook() *SecretsPropertiesCasesWebhook { + this := SecretsPropertiesCasesWebhook{} + return &this +} + +// NewSecretsPropertiesCasesWebhookWithDefaults instantiates a new SecretsPropertiesCasesWebhook object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSecretsPropertiesCasesWebhookWithDefaults() *SecretsPropertiesCasesWebhook { + this := SecretsPropertiesCasesWebhook{} + return &this +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *SecretsPropertiesCasesWebhook) GetPassword() string { + if o == nil || IsNil(o.Password) { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecretsPropertiesCasesWebhook) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *SecretsPropertiesCasesWebhook) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *SecretsPropertiesCasesWebhook) SetPassword(v string) { + o.Password = &v +} + +// GetUser returns the User field value if set, zero value otherwise. +func (o *SecretsPropertiesCasesWebhook) GetUser() string { + if o == nil || IsNil(o.User) { + var ret string + return ret + } + return *o.User +} + +// GetUserOk returns a tuple with the User field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecretsPropertiesCasesWebhook) GetUserOk() (*string, bool) { + if o == nil || IsNil(o.User) { + return nil, false + } + return o.User, true +} + +// HasUser returns a boolean if a field has been set. +func (o *SecretsPropertiesCasesWebhook) HasUser() bool { + if o != nil && !IsNil(o.User) { + return true + } + + return false +} + +// SetUser gets a reference to the given string and assigns it to the User field. +func (o *SecretsPropertiesCasesWebhook) SetUser(v string) { + o.User = &v +} + +func (o SecretsPropertiesCasesWebhook) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SecretsPropertiesCasesWebhook) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if !IsNil(o.User) { + toSerialize["user"] = o.User + } + return toSerialize, nil +} + +type NullableSecretsPropertiesCasesWebhook struct { + value *SecretsPropertiesCasesWebhook + isSet bool +} + +func (v NullableSecretsPropertiesCasesWebhook) Get() *SecretsPropertiesCasesWebhook { + return v.value +} + +func (v *NullableSecretsPropertiesCasesWebhook) Set(val *SecretsPropertiesCasesWebhook) { + v.value = val + v.isSet = true +} + +func (v NullableSecretsPropertiesCasesWebhook) IsSet() bool { + return v.isSet +} + +func (v *NullableSecretsPropertiesCasesWebhook) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSecretsPropertiesCasesWebhook(val *SecretsPropertiesCasesWebhook) *NullableSecretsPropertiesCasesWebhook { + return &NullableSecretsPropertiesCasesWebhook{value: val, isSet: true} +} + +func (v NullableSecretsPropertiesCasesWebhook) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSecretsPropertiesCasesWebhook) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_secrets_properties_jira.go b/generated/kibanaactions/model_secrets_properties_jira.go new file mode 100644 index 000000000..956f78eb0 --- /dev/null +++ b/generated/kibanaactions/model_secrets_properties_jira.go @@ -0,0 +1,144 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the SecretsPropertiesJira type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SecretsPropertiesJira{} + +// SecretsPropertiesJira Defines secrets for connectors when type is `.jira`. +type SecretsPropertiesJira struct { + // The Jira API authentication token for HTTP basic authentication. + ApiToken string `json:"apiToken"` + // The account email for HTTP Basic authentication. + Email string `json:"email"` +} + +// NewSecretsPropertiesJira instantiates a new SecretsPropertiesJira object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSecretsPropertiesJira(apiToken string, email string) *SecretsPropertiesJira { + this := SecretsPropertiesJira{} + this.ApiToken = apiToken + this.Email = email + return &this +} + +// NewSecretsPropertiesJiraWithDefaults instantiates a new SecretsPropertiesJira object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSecretsPropertiesJiraWithDefaults() *SecretsPropertiesJira { + this := SecretsPropertiesJira{} + return &this +} + +// GetApiToken returns the ApiToken field value +func (o *SecretsPropertiesJira) GetApiToken() string { + if o == nil { + var ret string + return ret + } + + return o.ApiToken +} + +// GetApiTokenOk returns a tuple with the ApiToken field value +// and a boolean to check if the value has been set. +func (o *SecretsPropertiesJira) GetApiTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiToken, true +} + +// SetApiToken sets field value +func (o *SecretsPropertiesJira) SetApiToken(v string) { + o.ApiToken = v +} + +// GetEmail returns the Email field value +func (o *SecretsPropertiesJira) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *SecretsPropertiesJira) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *SecretsPropertiesJira) SetEmail(v string) { + o.Email = v +} + +func (o SecretsPropertiesJira) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SecretsPropertiesJira) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["apiToken"] = o.ApiToken + toSerialize["email"] = o.Email + return toSerialize, nil +} + +type NullableSecretsPropertiesJira struct { + value *SecretsPropertiesJira + isSet bool +} + +func (v NullableSecretsPropertiesJira) Get() *SecretsPropertiesJira { + return v.value +} + +func (v *NullableSecretsPropertiesJira) Set(val *SecretsPropertiesJira) { + v.value = val + v.isSet = true +} + +func (v NullableSecretsPropertiesJira) IsSet() bool { + return v.isSet +} + +func (v *NullableSecretsPropertiesJira) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSecretsPropertiesJira(val *SecretsPropertiesJira) *NullableSecretsPropertiesJira { + return &NullableSecretsPropertiesJira{value: val, isSet: true} +} + +func (v NullableSecretsPropertiesJira) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSecretsPropertiesJira) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_secrets_properties_opsgenie.go b/generated/kibanaactions/model_secrets_properties_opsgenie.go new file mode 100644 index 000000000..7374f134e --- /dev/null +++ b/generated/kibanaactions/model_secrets_properties_opsgenie.go @@ -0,0 +1,116 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the SecretsPropertiesOpsgenie type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SecretsPropertiesOpsgenie{} + +// SecretsPropertiesOpsgenie Defines secrets for connectors when type is `.opsgenie`. +type SecretsPropertiesOpsgenie struct { + // The Opsgenie API authentication key for HTTP Basic authentication. + ApiKey string `json:"apiKey"` +} + +// NewSecretsPropertiesOpsgenie instantiates a new SecretsPropertiesOpsgenie object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSecretsPropertiesOpsgenie(apiKey string) *SecretsPropertiesOpsgenie { + this := SecretsPropertiesOpsgenie{} + this.ApiKey = apiKey + return &this +} + +// NewSecretsPropertiesOpsgenieWithDefaults instantiates a new SecretsPropertiesOpsgenie object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSecretsPropertiesOpsgenieWithDefaults() *SecretsPropertiesOpsgenie { + this := SecretsPropertiesOpsgenie{} + return &this +} + +// GetApiKey returns the ApiKey field value +func (o *SecretsPropertiesOpsgenie) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *SecretsPropertiesOpsgenie) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *SecretsPropertiesOpsgenie) SetApiKey(v string) { + o.ApiKey = v +} + +func (o SecretsPropertiesOpsgenie) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SecretsPropertiesOpsgenie) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["apiKey"] = o.ApiKey + return toSerialize, nil +} + +type NullableSecretsPropertiesOpsgenie struct { + value *SecretsPropertiesOpsgenie + isSet bool +} + +func (v NullableSecretsPropertiesOpsgenie) Get() *SecretsPropertiesOpsgenie { + return v.value +} + +func (v *NullableSecretsPropertiesOpsgenie) Set(val *SecretsPropertiesOpsgenie) { + v.value = val + v.isSet = true +} + +func (v NullableSecretsPropertiesOpsgenie) IsSet() bool { + return v.isSet +} + +func (v *NullableSecretsPropertiesOpsgenie) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSecretsPropertiesOpsgenie(val *SecretsPropertiesOpsgenie) *NullableSecretsPropertiesOpsgenie { + return &NullableSecretsPropertiesOpsgenie{value: val, isSet: true} +} + +func (v NullableSecretsPropertiesOpsgenie) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSecretsPropertiesOpsgenie) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_secrets_properties_resilient.go b/generated/kibanaactions/model_secrets_properties_resilient.go new file mode 100644 index 000000000..2ad50115c --- /dev/null +++ b/generated/kibanaactions/model_secrets_properties_resilient.go @@ -0,0 +1,144 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the SecretsPropertiesResilient type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SecretsPropertiesResilient{} + +// SecretsPropertiesResilient Defines secrets for connectors when type is `.resilient`. +type SecretsPropertiesResilient struct { + // The authentication key ID for HTTP Basic authentication. + ApiKeyId string `json:"apiKeyId"` + // The authentication key secret for HTTP Basic authentication. + ApiKeySecret string `json:"apiKeySecret"` +} + +// NewSecretsPropertiesResilient instantiates a new SecretsPropertiesResilient object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSecretsPropertiesResilient(apiKeyId string, apiKeySecret string) *SecretsPropertiesResilient { + this := SecretsPropertiesResilient{} + this.ApiKeyId = apiKeyId + this.ApiKeySecret = apiKeySecret + return &this +} + +// NewSecretsPropertiesResilientWithDefaults instantiates a new SecretsPropertiesResilient object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSecretsPropertiesResilientWithDefaults() *SecretsPropertiesResilient { + this := SecretsPropertiesResilient{} + return &this +} + +// GetApiKeyId returns the ApiKeyId field value +func (o *SecretsPropertiesResilient) GetApiKeyId() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKeyId +} + +// GetApiKeyIdOk returns a tuple with the ApiKeyId field value +// and a boolean to check if the value has been set. +func (o *SecretsPropertiesResilient) GetApiKeyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKeyId, true +} + +// SetApiKeyId sets field value +func (o *SecretsPropertiesResilient) SetApiKeyId(v string) { + o.ApiKeyId = v +} + +// GetApiKeySecret returns the ApiKeySecret field value +func (o *SecretsPropertiesResilient) GetApiKeySecret() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKeySecret +} + +// GetApiKeySecretOk returns a tuple with the ApiKeySecret field value +// and a boolean to check if the value has been set. +func (o *SecretsPropertiesResilient) GetApiKeySecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKeySecret, true +} + +// SetApiKeySecret sets field value +func (o *SecretsPropertiesResilient) SetApiKeySecret(v string) { + o.ApiKeySecret = v +} + +func (o SecretsPropertiesResilient) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SecretsPropertiesResilient) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["apiKeyId"] = o.ApiKeyId + toSerialize["apiKeySecret"] = o.ApiKeySecret + return toSerialize, nil +} + +type NullableSecretsPropertiesResilient struct { + value *SecretsPropertiesResilient + isSet bool +} + +func (v NullableSecretsPropertiesResilient) Get() *SecretsPropertiesResilient { + return v.value +} + +func (v *NullableSecretsPropertiesResilient) Set(val *SecretsPropertiesResilient) { + v.value = val + v.isSet = true +} + +func (v NullableSecretsPropertiesResilient) IsSet() bool { + return v.isSet +} + +func (v *NullableSecretsPropertiesResilient) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSecretsPropertiesResilient(val *SecretsPropertiesResilient) *NullableSecretsPropertiesResilient { + return &NullableSecretsPropertiesResilient{value: val, isSet: true} +} + +func (v NullableSecretsPropertiesResilient) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSecretsPropertiesResilient) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_secrets_properties_servicenow.go b/generated/kibanaactions/model_secrets_properties_servicenow.go new file mode 100644 index 000000000..34a1817d1 --- /dev/null +++ b/generated/kibanaactions/model_secrets_properties_servicenow.go @@ -0,0 +1,273 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the SecretsPropertiesServicenow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SecretsPropertiesServicenow{} + +// SecretsPropertiesServicenow Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `.servicenow-itom`. +type SecretsPropertiesServicenow struct { + // The client secret assigned to your OAuth application. This property is required when `isOAuth` is `true`. + ClientSecret *string `json:"clientSecret,omitempty"` + // The password for HTTP basic authentication. This property is required when `isOAuth` is `false`. + Password *string `json:"password,omitempty"` + // The RSA private key that you created for use in ServiceNow. This property is required when `isOAuth` is `true`. + PrivateKey *string `json:"privateKey,omitempty"` + // The password for the RSA private key. This property is required when `isOAuth` is `true` and you set a password on your private key. + PrivateKeyPassword *string `json:"privateKeyPassword,omitempty"` + // The username for HTTP basic authentication. This property is required when `isOAuth` is `false`. + Username *string `json:"username,omitempty"` +} + +// NewSecretsPropertiesServicenow instantiates a new SecretsPropertiesServicenow object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSecretsPropertiesServicenow() *SecretsPropertiesServicenow { + this := SecretsPropertiesServicenow{} + return &this +} + +// NewSecretsPropertiesServicenowWithDefaults instantiates a new SecretsPropertiesServicenow object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSecretsPropertiesServicenowWithDefaults() *SecretsPropertiesServicenow { + this := SecretsPropertiesServicenow{} + return &this +} + +// GetClientSecret returns the ClientSecret field value if set, zero value otherwise. +func (o *SecretsPropertiesServicenow) GetClientSecret() string { + if o == nil || IsNil(o.ClientSecret) { + var ret string + return ret + } + return *o.ClientSecret +} + +// GetClientSecretOk returns a tuple with the ClientSecret field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecretsPropertiesServicenow) GetClientSecretOk() (*string, bool) { + if o == nil || IsNil(o.ClientSecret) { + return nil, false + } + return o.ClientSecret, true +} + +// HasClientSecret returns a boolean if a field has been set. +func (o *SecretsPropertiesServicenow) HasClientSecret() bool { + if o != nil && !IsNil(o.ClientSecret) { + return true + } + + return false +} + +// SetClientSecret gets a reference to the given string and assigns it to the ClientSecret field. +func (o *SecretsPropertiesServicenow) SetClientSecret(v string) { + o.ClientSecret = &v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *SecretsPropertiesServicenow) GetPassword() string { + if o == nil || IsNil(o.Password) { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecretsPropertiesServicenow) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *SecretsPropertiesServicenow) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *SecretsPropertiesServicenow) SetPassword(v string) { + o.Password = &v +} + +// GetPrivateKey returns the PrivateKey field value if set, zero value otherwise. +func (o *SecretsPropertiesServicenow) GetPrivateKey() string { + if o == nil || IsNil(o.PrivateKey) { + var ret string + return ret + } + return *o.PrivateKey +} + +// GetPrivateKeyOk returns a tuple with the PrivateKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecretsPropertiesServicenow) GetPrivateKeyOk() (*string, bool) { + if o == nil || IsNil(o.PrivateKey) { + return nil, false + } + return o.PrivateKey, true +} + +// HasPrivateKey returns a boolean if a field has been set. +func (o *SecretsPropertiesServicenow) HasPrivateKey() bool { + if o != nil && !IsNil(o.PrivateKey) { + return true + } + + return false +} + +// SetPrivateKey gets a reference to the given string and assigns it to the PrivateKey field. +func (o *SecretsPropertiesServicenow) SetPrivateKey(v string) { + o.PrivateKey = &v +} + +// GetPrivateKeyPassword returns the PrivateKeyPassword field value if set, zero value otherwise. +func (o *SecretsPropertiesServicenow) GetPrivateKeyPassword() string { + if o == nil || IsNil(o.PrivateKeyPassword) { + var ret string + return ret + } + return *o.PrivateKeyPassword +} + +// GetPrivateKeyPasswordOk returns a tuple with the PrivateKeyPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecretsPropertiesServicenow) GetPrivateKeyPasswordOk() (*string, bool) { + if o == nil || IsNil(o.PrivateKeyPassword) { + return nil, false + } + return o.PrivateKeyPassword, true +} + +// HasPrivateKeyPassword returns a boolean if a field has been set. +func (o *SecretsPropertiesServicenow) HasPrivateKeyPassword() bool { + if o != nil && !IsNil(o.PrivateKeyPassword) { + return true + } + + return false +} + +// SetPrivateKeyPassword gets a reference to the given string and assigns it to the PrivateKeyPassword field. +func (o *SecretsPropertiesServicenow) SetPrivateKeyPassword(v string) { + o.PrivateKeyPassword = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *SecretsPropertiesServicenow) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecretsPropertiesServicenow) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *SecretsPropertiesServicenow) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *SecretsPropertiesServicenow) SetUsername(v string) { + o.Username = &v +} + +func (o SecretsPropertiesServicenow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SecretsPropertiesServicenow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ClientSecret) { + toSerialize["clientSecret"] = o.ClientSecret + } + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if !IsNil(o.PrivateKey) { + toSerialize["privateKey"] = o.PrivateKey + } + if !IsNil(o.PrivateKeyPassword) { + toSerialize["privateKeyPassword"] = o.PrivateKeyPassword + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableSecretsPropertiesServicenow struct { + value *SecretsPropertiesServicenow + isSet bool +} + +func (v NullableSecretsPropertiesServicenow) Get() *SecretsPropertiesServicenow { + return v.value +} + +func (v *NullableSecretsPropertiesServicenow) Set(val *SecretsPropertiesServicenow) { + v.value = val + v.isSet = true +} + +func (v NullableSecretsPropertiesServicenow) IsSet() bool { + return v.isSet +} + +func (v *NullableSecretsPropertiesServicenow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSecretsPropertiesServicenow(val *SecretsPropertiesServicenow) *NullableSecretsPropertiesServicenow { + return &NullableSecretsPropertiesServicenow{value: val, isSet: true} +} + +func (v NullableSecretsPropertiesServicenow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSecretsPropertiesServicenow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_secrets_properties_swimlane.go b/generated/kibanaactions/model_secrets_properties_swimlane.go new file mode 100644 index 000000000..9f27c2fcc --- /dev/null +++ b/generated/kibanaactions/model_secrets_properties_swimlane.go @@ -0,0 +1,125 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the SecretsPropertiesSwimlane type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SecretsPropertiesSwimlane{} + +// SecretsPropertiesSwimlane Defines secrets for connectors when type is `.swimlane`. +type SecretsPropertiesSwimlane struct { + // Swimlane API authentication token. + ApiToken *string `json:"apiToken,omitempty"` +} + +// NewSecretsPropertiesSwimlane instantiates a new SecretsPropertiesSwimlane object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSecretsPropertiesSwimlane() *SecretsPropertiesSwimlane { + this := SecretsPropertiesSwimlane{} + return &this +} + +// NewSecretsPropertiesSwimlaneWithDefaults instantiates a new SecretsPropertiesSwimlane object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSecretsPropertiesSwimlaneWithDefaults() *SecretsPropertiesSwimlane { + this := SecretsPropertiesSwimlane{} + return &this +} + +// GetApiToken returns the ApiToken field value if set, zero value otherwise. +func (o *SecretsPropertiesSwimlane) GetApiToken() string { + if o == nil || IsNil(o.ApiToken) { + var ret string + return ret + } + return *o.ApiToken +} + +// GetApiTokenOk returns a tuple with the ApiToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SecretsPropertiesSwimlane) GetApiTokenOk() (*string, bool) { + if o == nil || IsNil(o.ApiToken) { + return nil, false + } + return o.ApiToken, true +} + +// HasApiToken returns a boolean if a field has been set. +func (o *SecretsPropertiesSwimlane) HasApiToken() bool { + if o != nil && !IsNil(o.ApiToken) { + return true + } + + return false +} + +// SetApiToken gets a reference to the given string and assigns it to the ApiToken field. +func (o *SecretsPropertiesSwimlane) SetApiToken(v string) { + o.ApiToken = &v +} + +func (o SecretsPropertiesSwimlane) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SecretsPropertiesSwimlane) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ApiToken) { + toSerialize["apiToken"] = o.ApiToken + } + return toSerialize, nil +} + +type NullableSecretsPropertiesSwimlane struct { + value *SecretsPropertiesSwimlane + isSet bool +} + +func (v NullableSecretsPropertiesSwimlane) Get() *SecretsPropertiesSwimlane { + return v.value +} + +func (v *NullableSecretsPropertiesSwimlane) Set(val *SecretsPropertiesSwimlane) { + v.value = val + v.isSet = true +} + +func (v NullableSecretsPropertiesSwimlane) IsSet() bool { + return v.isSet +} + +func (v *NullableSecretsPropertiesSwimlane) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSecretsPropertiesSwimlane(val *SecretsPropertiesSwimlane) *NullableSecretsPropertiesSwimlane { + return &NullableSecretsPropertiesSwimlane{value: val, isSet: true} +} + +func (v NullableSecretsPropertiesSwimlane) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSecretsPropertiesSwimlane) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_severity_mapping.go b/generated/kibanaactions/model_severity_mapping.go new file mode 100644 index 000000000..226d6cd4e --- /dev/null +++ b/generated/kibanaactions/model_severity_mapping.go @@ -0,0 +1,200 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the SeverityMapping type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SeverityMapping{} + +// SeverityMapping Mapping for the severity. +type SeverityMapping struct { + // The type of field in Swimlane. + FieldType string `json:"fieldType"` + // The identifier for the field in Swimlane. + Id string `json:"id"` + // The key for the field in Swimlane. + Key string `json:"key"` + // The name of the field in Swimlane. + Name string `json:"name"` +} + +// NewSeverityMapping instantiates a new SeverityMapping object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSeverityMapping(fieldType string, id string, key string, name string) *SeverityMapping { + this := SeverityMapping{} + this.FieldType = fieldType + this.Id = id + this.Key = key + this.Name = name + return &this +} + +// NewSeverityMappingWithDefaults instantiates a new SeverityMapping object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSeverityMappingWithDefaults() *SeverityMapping { + this := SeverityMapping{} + return &this +} + +// GetFieldType returns the FieldType field value +func (o *SeverityMapping) GetFieldType() string { + if o == nil { + var ret string + return ret + } + + return o.FieldType +} + +// GetFieldTypeOk returns a tuple with the FieldType field value +// and a boolean to check if the value has been set. +func (o *SeverityMapping) GetFieldTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FieldType, true +} + +// SetFieldType sets field value +func (o *SeverityMapping) SetFieldType(v string) { + o.FieldType = v +} + +// GetId returns the Id field value +func (o *SeverityMapping) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *SeverityMapping) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *SeverityMapping) SetId(v string) { + o.Id = v +} + +// GetKey returns the Key field value +func (o *SeverityMapping) GetKey() string { + if o == nil { + var ret string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *SeverityMapping) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Key, true +} + +// SetKey sets field value +func (o *SeverityMapping) SetKey(v string) { + o.Key = v +} + +// GetName returns the Name field value +func (o *SeverityMapping) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *SeverityMapping) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *SeverityMapping) SetName(v string) { + o.Name = v +} + +func (o SeverityMapping) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SeverityMapping) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["fieldType"] = o.FieldType + toSerialize["id"] = o.Id + toSerialize["key"] = o.Key + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableSeverityMapping struct { + value *SeverityMapping + isSet bool +} + +func (v NullableSeverityMapping) Get() *SeverityMapping { + return v.value +} + +func (v *NullableSeverityMapping) Set(val *SeverityMapping) { + v.value = val + v.isSet = true +} + +func (v NullableSeverityMapping) IsSet() bool { + return v.isSet +} + +func (v *NullableSeverityMapping) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSeverityMapping(val *SeverityMapping) *NullableSeverityMapping { + return &NullableSeverityMapping{value: val, isSet: true} +} + +func (v NullableSeverityMapping) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSeverityMapping) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_subaction_parameters.go b/generated/kibanaactions/model_subaction_parameters.go new file mode 100644 index 000000000..a75275500 --- /dev/null +++ b/generated/kibanaactions/model_subaction_parameters.go @@ -0,0 +1,415 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" + "fmt" +) + +// SubactionParameters - Test an action that involves a subaction. +type SubactionParameters struct { + RunConnectorSubactionAddevent *RunConnectorSubactionAddevent + RunConnectorSubactionClosealert *RunConnectorSubactionClosealert + RunConnectorSubactionCreatealert *RunConnectorSubactionCreatealert + RunConnectorSubactionFieldsbyissuetype *RunConnectorSubactionFieldsbyissuetype + RunConnectorSubactionGetchoices *RunConnectorSubactionGetchoices + RunConnectorSubactionGetfields *RunConnectorSubactionGetfields + RunConnectorSubactionGetincident *RunConnectorSubactionGetincident + RunConnectorSubactionIssue *RunConnectorSubactionIssue + RunConnectorSubactionIssues *RunConnectorSubactionIssues + RunConnectorSubactionIssuetypes *RunConnectorSubactionIssuetypes + RunConnectorSubactionPushtoservice *RunConnectorSubactionPushtoservice +} + +// RunConnectorSubactionAddeventAsSubactionParameters is a convenience function that returns RunConnectorSubactionAddevent wrapped in SubactionParameters +func RunConnectorSubactionAddeventAsSubactionParameters(v *RunConnectorSubactionAddevent) SubactionParameters { + return SubactionParameters{ + RunConnectorSubactionAddevent: v, + } +} + +// RunConnectorSubactionClosealertAsSubactionParameters is a convenience function that returns RunConnectorSubactionClosealert wrapped in SubactionParameters +func RunConnectorSubactionClosealertAsSubactionParameters(v *RunConnectorSubactionClosealert) SubactionParameters { + return SubactionParameters{ + RunConnectorSubactionClosealert: v, + } +} + +// RunConnectorSubactionCreatealertAsSubactionParameters is a convenience function that returns RunConnectorSubactionCreatealert wrapped in SubactionParameters +func RunConnectorSubactionCreatealertAsSubactionParameters(v *RunConnectorSubactionCreatealert) SubactionParameters { + return SubactionParameters{ + RunConnectorSubactionCreatealert: v, + } +} + +// RunConnectorSubactionFieldsbyissuetypeAsSubactionParameters is a convenience function that returns RunConnectorSubactionFieldsbyissuetype wrapped in SubactionParameters +func RunConnectorSubactionFieldsbyissuetypeAsSubactionParameters(v *RunConnectorSubactionFieldsbyissuetype) SubactionParameters { + return SubactionParameters{ + RunConnectorSubactionFieldsbyissuetype: v, + } +} + +// RunConnectorSubactionGetchoicesAsSubactionParameters is a convenience function that returns RunConnectorSubactionGetchoices wrapped in SubactionParameters +func RunConnectorSubactionGetchoicesAsSubactionParameters(v *RunConnectorSubactionGetchoices) SubactionParameters { + return SubactionParameters{ + RunConnectorSubactionGetchoices: v, + } +} + +// RunConnectorSubactionGetfieldsAsSubactionParameters is a convenience function that returns RunConnectorSubactionGetfields wrapped in SubactionParameters +func RunConnectorSubactionGetfieldsAsSubactionParameters(v *RunConnectorSubactionGetfields) SubactionParameters { + return SubactionParameters{ + RunConnectorSubactionGetfields: v, + } +} + +// RunConnectorSubactionGetincidentAsSubactionParameters is a convenience function that returns RunConnectorSubactionGetincident wrapped in SubactionParameters +func RunConnectorSubactionGetincidentAsSubactionParameters(v *RunConnectorSubactionGetincident) SubactionParameters { + return SubactionParameters{ + RunConnectorSubactionGetincident: v, + } +} + +// RunConnectorSubactionIssueAsSubactionParameters is a convenience function that returns RunConnectorSubactionIssue wrapped in SubactionParameters +func RunConnectorSubactionIssueAsSubactionParameters(v *RunConnectorSubactionIssue) SubactionParameters { + return SubactionParameters{ + RunConnectorSubactionIssue: v, + } +} + +// RunConnectorSubactionIssuesAsSubactionParameters is a convenience function that returns RunConnectorSubactionIssues wrapped in SubactionParameters +func RunConnectorSubactionIssuesAsSubactionParameters(v *RunConnectorSubactionIssues) SubactionParameters { + return SubactionParameters{ + RunConnectorSubactionIssues: v, + } +} + +// RunConnectorSubactionIssuetypesAsSubactionParameters is a convenience function that returns RunConnectorSubactionIssuetypes wrapped in SubactionParameters +func RunConnectorSubactionIssuetypesAsSubactionParameters(v *RunConnectorSubactionIssuetypes) SubactionParameters { + return SubactionParameters{ + RunConnectorSubactionIssuetypes: v, + } +} + +// RunConnectorSubactionPushtoserviceAsSubactionParameters is a convenience function that returns RunConnectorSubactionPushtoservice wrapped in SubactionParameters +func RunConnectorSubactionPushtoserviceAsSubactionParameters(v *RunConnectorSubactionPushtoservice) SubactionParameters { + return SubactionParameters{ + RunConnectorSubactionPushtoservice: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *SubactionParameters) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into RunConnectorSubactionAddevent + err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionAddevent) + if err == nil { + jsonRunConnectorSubactionAddevent, _ := json.Marshal(dst.RunConnectorSubactionAddevent) + if string(jsonRunConnectorSubactionAddevent) == "{}" { // empty struct + dst.RunConnectorSubactionAddevent = nil + } else { + match++ + } + } else { + dst.RunConnectorSubactionAddevent = nil + } + + // try to unmarshal data into RunConnectorSubactionClosealert + err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionClosealert) + if err == nil { + jsonRunConnectorSubactionClosealert, _ := json.Marshal(dst.RunConnectorSubactionClosealert) + if string(jsonRunConnectorSubactionClosealert) == "{}" { // empty struct + dst.RunConnectorSubactionClosealert = nil + } else { + match++ + } + } else { + dst.RunConnectorSubactionClosealert = nil + } + + // try to unmarshal data into RunConnectorSubactionCreatealert + err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionCreatealert) + if err == nil { + jsonRunConnectorSubactionCreatealert, _ := json.Marshal(dst.RunConnectorSubactionCreatealert) + if string(jsonRunConnectorSubactionCreatealert) == "{}" { // empty struct + dst.RunConnectorSubactionCreatealert = nil + } else { + match++ + } + } else { + dst.RunConnectorSubactionCreatealert = nil + } + + // try to unmarshal data into RunConnectorSubactionFieldsbyissuetype + err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionFieldsbyissuetype) + if err == nil { + jsonRunConnectorSubactionFieldsbyissuetype, _ := json.Marshal(dst.RunConnectorSubactionFieldsbyissuetype) + if string(jsonRunConnectorSubactionFieldsbyissuetype) == "{}" { // empty struct + dst.RunConnectorSubactionFieldsbyissuetype = nil + } else { + match++ + } + } else { + dst.RunConnectorSubactionFieldsbyissuetype = nil + } + + // try to unmarshal data into RunConnectorSubactionGetchoices + err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionGetchoices) + if err == nil { + jsonRunConnectorSubactionGetchoices, _ := json.Marshal(dst.RunConnectorSubactionGetchoices) + if string(jsonRunConnectorSubactionGetchoices) == "{}" { // empty struct + dst.RunConnectorSubactionGetchoices = nil + } else { + match++ + } + } else { + dst.RunConnectorSubactionGetchoices = nil + } + + // try to unmarshal data into RunConnectorSubactionGetfields + err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionGetfields) + if err == nil { + jsonRunConnectorSubactionGetfields, _ := json.Marshal(dst.RunConnectorSubactionGetfields) + if string(jsonRunConnectorSubactionGetfields) == "{}" { // empty struct + dst.RunConnectorSubactionGetfields = nil + } else { + match++ + } + } else { + dst.RunConnectorSubactionGetfields = nil + } + + // try to unmarshal data into RunConnectorSubactionGetincident + err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionGetincident) + if err == nil { + jsonRunConnectorSubactionGetincident, _ := json.Marshal(dst.RunConnectorSubactionGetincident) + if string(jsonRunConnectorSubactionGetincident) == "{}" { // empty struct + dst.RunConnectorSubactionGetincident = nil + } else { + match++ + } + } else { + dst.RunConnectorSubactionGetincident = nil + } + + // try to unmarshal data into RunConnectorSubactionIssue + err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionIssue) + if err == nil { + jsonRunConnectorSubactionIssue, _ := json.Marshal(dst.RunConnectorSubactionIssue) + if string(jsonRunConnectorSubactionIssue) == "{}" { // empty struct + dst.RunConnectorSubactionIssue = nil + } else { + match++ + } + } else { + dst.RunConnectorSubactionIssue = nil + } + + // try to unmarshal data into RunConnectorSubactionIssues + err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionIssues) + if err == nil { + jsonRunConnectorSubactionIssues, _ := json.Marshal(dst.RunConnectorSubactionIssues) + if string(jsonRunConnectorSubactionIssues) == "{}" { // empty struct + dst.RunConnectorSubactionIssues = nil + } else { + match++ + } + } else { + dst.RunConnectorSubactionIssues = nil + } + + // try to unmarshal data into RunConnectorSubactionIssuetypes + err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionIssuetypes) + if err == nil { + jsonRunConnectorSubactionIssuetypes, _ := json.Marshal(dst.RunConnectorSubactionIssuetypes) + if string(jsonRunConnectorSubactionIssuetypes) == "{}" { // empty struct + dst.RunConnectorSubactionIssuetypes = nil + } else { + match++ + } + } else { + dst.RunConnectorSubactionIssuetypes = nil + } + + // try to unmarshal data into RunConnectorSubactionPushtoservice + err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionPushtoservice) + if err == nil { + jsonRunConnectorSubactionPushtoservice, _ := json.Marshal(dst.RunConnectorSubactionPushtoservice) + if string(jsonRunConnectorSubactionPushtoservice) == "{}" { // empty struct + dst.RunConnectorSubactionPushtoservice = nil + } else { + match++ + } + } else { + dst.RunConnectorSubactionPushtoservice = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.RunConnectorSubactionAddevent = nil + dst.RunConnectorSubactionClosealert = nil + dst.RunConnectorSubactionCreatealert = nil + dst.RunConnectorSubactionFieldsbyissuetype = nil + dst.RunConnectorSubactionGetchoices = nil + dst.RunConnectorSubactionGetfields = nil + dst.RunConnectorSubactionGetincident = nil + dst.RunConnectorSubactionIssue = nil + dst.RunConnectorSubactionIssues = nil + dst.RunConnectorSubactionIssuetypes = nil + dst.RunConnectorSubactionPushtoservice = nil + + return fmt.Errorf("data matches more than one schema in oneOf(SubactionParameters)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(SubactionParameters)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src SubactionParameters) MarshalJSON() ([]byte, error) { + if src.RunConnectorSubactionAddevent != nil { + return json.Marshal(&src.RunConnectorSubactionAddevent) + } + + if src.RunConnectorSubactionClosealert != nil { + return json.Marshal(&src.RunConnectorSubactionClosealert) + } + + if src.RunConnectorSubactionCreatealert != nil { + return json.Marshal(&src.RunConnectorSubactionCreatealert) + } + + if src.RunConnectorSubactionFieldsbyissuetype != nil { + return json.Marshal(&src.RunConnectorSubactionFieldsbyissuetype) + } + + if src.RunConnectorSubactionGetchoices != nil { + return json.Marshal(&src.RunConnectorSubactionGetchoices) + } + + if src.RunConnectorSubactionGetfields != nil { + return json.Marshal(&src.RunConnectorSubactionGetfields) + } + + if src.RunConnectorSubactionGetincident != nil { + return json.Marshal(&src.RunConnectorSubactionGetincident) + } + + if src.RunConnectorSubactionIssue != nil { + return json.Marshal(&src.RunConnectorSubactionIssue) + } + + if src.RunConnectorSubactionIssues != nil { + return json.Marshal(&src.RunConnectorSubactionIssues) + } + + if src.RunConnectorSubactionIssuetypes != nil { + return json.Marshal(&src.RunConnectorSubactionIssuetypes) + } + + if src.RunConnectorSubactionPushtoservice != nil { + return json.Marshal(&src.RunConnectorSubactionPushtoservice) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *SubactionParameters) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.RunConnectorSubactionAddevent != nil { + return obj.RunConnectorSubactionAddevent + } + + if obj.RunConnectorSubactionClosealert != nil { + return obj.RunConnectorSubactionClosealert + } + + if obj.RunConnectorSubactionCreatealert != nil { + return obj.RunConnectorSubactionCreatealert + } + + if obj.RunConnectorSubactionFieldsbyissuetype != nil { + return obj.RunConnectorSubactionFieldsbyissuetype + } + + if obj.RunConnectorSubactionGetchoices != nil { + return obj.RunConnectorSubactionGetchoices + } + + if obj.RunConnectorSubactionGetfields != nil { + return obj.RunConnectorSubactionGetfields + } + + if obj.RunConnectorSubactionGetincident != nil { + return obj.RunConnectorSubactionGetincident + } + + if obj.RunConnectorSubactionIssue != nil { + return obj.RunConnectorSubactionIssue + } + + if obj.RunConnectorSubactionIssues != nil { + return obj.RunConnectorSubactionIssues + } + + if obj.RunConnectorSubactionIssuetypes != nil { + return obj.RunConnectorSubactionIssuetypes + } + + if obj.RunConnectorSubactionPushtoservice != nil { + return obj.RunConnectorSubactionPushtoservice + } + + // all schemas are nil + return nil +} + +type NullableSubactionParameters struct { + value *SubactionParameters + isSet bool +} + +func (v NullableSubactionParameters) Get() *SubactionParameters { + return v.value +} + +func (v *NullableSubactionParameters) Set(val *SubactionParameters) { + v.value = val + v.isSet = true +} + +func (v NullableSubactionParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableSubactionParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSubactionParameters(val *SubactionParameters) *NullableSubactionParameters { + return &NullableSubactionParameters{value: val, isSet: true} +} + +func (v NullableSubactionParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSubactionParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_update_connector_400_response.go b/generated/kibanaactions/model_update_connector_400_response.go new file mode 100644 index 000000000..a25dd0461 --- /dev/null +++ b/generated/kibanaactions/model_update_connector_400_response.go @@ -0,0 +1,196 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the UpdateConnector400Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateConnector400Response{} + +// UpdateConnector400Response struct for UpdateConnector400Response +type UpdateConnector400Response struct { + Error *string `json:"error,omitempty"` + Message *string `json:"message,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty"` +} + +// NewUpdateConnector400Response instantiates a new UpdateConnector400Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateConnector400Response() *UpdateConnector400Response { + this := UpdateConnector400Response{} + return &this +} + +// NewUpdateConnector400ResponseWithDefaults instantiates a new UpdateConnector400Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateConnector400ResponseWithDefaults() *UpdateConnector400Response { + this := UpdateConnector400Response{} + return &this +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *UpdateConnector400Response) GetError() string { + if o == nil || IsNil(o.Error) { + var ret string + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateConnector400Response) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *UpdateConnector400Response) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *UpdateConnector400Response) SetError(v string) { + o.Error = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *UpdateConnector400Response) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateConnector400Response) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *UpdateConnector400Response) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *UpdateConnector400Response) SetMessage(v string) { + o.Message = &v +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *UpdateConnector400Response) GetStatusCode() int32 { + if o == nil || IsNil(o.StatusCode) { + var ret int32 + return ret + } + return *o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateConnector400Response) GetStatusCodeOk() (*int32, bool) { + if o == nil || IsNil(o.StatusCode) { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *UpdateConnector400Response) HasStatusCode() bool { + if o != nil && !IsNil(o.StatusCode) { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. +func (o *UpdateConnector400Response) SetStatusCode(v int32) { + o.StatusCode = &v +} + +func (o UpdateConnector400Response) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateConnector400Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.StatusCode) { + toSerialize["statusCode"] = o.StatusCode + } + return toSerialize, nil +} + +type NullableUpdateConnector400Response struct { + value *UpdateConnector400Response + isSet bool +} + +func (v NullableUpdateConnector400Response) Get() *UpdateConnector400Response { + return v.value +} + +func (v *NullableUpdateConnector400Response) Set(val *UpdateConnector400Response) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateConnector400Response) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateConnector400Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateConnector400Response(val *UpdateConnector400Response) *NullableUpdateConnector400Response { + return &NullableUpdateConnector400Response{value: val, isSet: true} +} + +func (v NullableUpdateConnector400Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateConnector400Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_update_connector_request_body_properties.go b/generated/kibanaactions/model_update_connector_request_body_properties.go new file mode 100644 index 000000000..c5acc356d --- /dev/null +++ b/generated/kibanaactions/model_update_connector_request_body_properties.go @@ -0,0 +1,355 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" + "fmt" +) + +// UpdateConnectorRequestBodyProperties - The properties vary depending on the connector type. +type UpdateConnectorRequestBodyProperties struct { + UpdateConnectorRequestCasesWebhook *UpdateConnectorRequestCasesWebhook + UpdateConnectorRequestIndex *UpdateConnectorRequestIndex + UpdateConnectorRequestJira *UpdateConnectorRequestJira + UpdateConnectorRequestOpsgenie *UpdateConnectorRequestOpsgenie + UpdateConnectorRequestResilient *UpdateConnectorRequestResilient + UpdateConnectorRequestServerlog *UpdateConnectorRequestServerlog + UpdateConnectorRequestServicenow *UpdateConnectorRequestServicenow + UpdateConnectorRequestServicenowItom *UpdateConnectorRequestServicenowItom + UpdateConnectorRequestSwimlane *UpdateConnectorRequestSwimlane +} + +// UpdateConnectorRequestCasesWebhookAsUpdateConnectorRequestBodyProperties is a convenience function that returns UpdateConnectorRequestCasesWebhook wrapped in UpdateConnectorRequestBodyProperties +func UpdateConnectorRequestCasesWebhookAsUpdateConnectorRequestBodyProperties(v *UpdateConnectorRequestCasesWebhook) UpdateConnectorRequestBodyProperties { + return UpdateConnectorRequestBodyProperties{ + UpdateConnectorRequestCasesWebhook: v, + } +} + +// UpdateConnectorRequestIndexAsUpdateConnectorRequestBodyProperties is a convenience function that returns UpdateConnectorRequestIndex wrapped in UpdateConnectorRequestBodyProperties +func UpdateConnectorRequestIndexAsUpdateConnectorRequestBodyProperties(v *UpdateConnectorRequestIndex) UpdateConnectorRequestBodyProperties { + return UpdateConnectorRequestBodyProperties{ + UpdateConnectorRequestIndex: v, + } +} + +// UpdateConnectorRequestJiraAsUpdateConnectorRequestBodyProperties is a convenience function that returns UpdateConnectorRequestJira wrapped in UpdateConnectorRequestBodyProperties +func UpdateConnectorRequestJiraAsUpdateConnectorRequestBodyProperties(v *UpdateConnectorRequestJira) UpdateConnectorRequestBodyProperties { + return UpdateConnectorRequestBodyProperties{ + UpdateConnectorRequestJira: v, + } +} + +// UpdateConnectorRequestOpsgenieAsUpdateConnectorRequestBodyProperties is a convenience function that returns UpdateConnectorRequestOpsgenie wrapped in UpdateConnectorRequestBodyProperties +func UpdateConnectorRequestOpsgenieAsUpdateConnectorRequestBodyProperties(v *UpdateConnectorRequestOpsgenie) UpdateConnectorRequestBodyProperties { + return UpdateConnectorRequestBodyProperties{ + UpdateConnectorRequestOpsgenie: v, + } +} + +// UpdateConnectorRequestResilientAsUpdateConnectorRequestBodyProperties is a convenience function that returns UpdateConnectorRequestResilient wrapped in UpdateConnectorRequestBodyProperties +func UpdateConnectorRequestResilientAsUpdateConnectorRequestBodyProperties(v *UpdateConnectorRequestResilient) UpdateConnectorRequestBodyProperties { + return UpdateConnectorRequestBodyProperties{ + UpdateConnectorRequestResilient: v, + } +} + +// UpdateConnectorRequestServerlogAsUpdateConnectorRequestBodyProperties is a convenience function that returns UpdateConnectorRequestServerlog wrapped in UpdateConnectorRequestBodyProperties +func UpdateConnectorRequestServerlogAsUpdateConnectorRequestBodyProperties(v *UpdateConnectorRequestServerlog) UpdateConnectorRequestBodyProperties { + return UpdateConnectorRequestBodyProperties{ + UpdateConnectorRequestServerlog: v, + } +} + +// UpdateConnectorRequestServicenowAsUpdateConnectorRequestBodyProperties is a convenience function that returns UpdateConnectorRequestServicenow wrapped in UpdateConnectorRequestBodyProperties +func UpdateConnectorRequestServicenowAsUpdateConnectorRequestBodyProperties(v *UpdateConnectorRequestServicenow) UpdateConnectorRequestBodyProperties { + return UpdateConnectorRequestBodyProperties{ + UpdateConnectorRequestServicenow: v, + } +} + +// UpdateConnectorRequestServicenowItomAsUpdateConnectorRequestBodyProperties is a convenience function that returns UpdateConnectorRequestServicenowItom wrapped in UpdateConnectorRequestBodyProperties +func UpdateConnectorRequestServicenowItomAsUpdateConnectorRequestBodyProperties(v *UpdateConnectorRequestServicenowItom) UpdateConnectorRequestBodyProperties { + return UpdateConnectorRequestBodyProperties{ + UpdateConnectorRequestServicenowItom: v, + } +} + +// UpdateConnectorRequestSwimlaneAsUpdateConnectorRequestBodyProperties is a convenience function that returns UpdateConnectorRequestSwimlane wrapped in UpdateConnectorRequestBodyProperties +func UpdateConnectorRequestSwimlaneAsUpdateConnectorRequestBodyProperties(v *UpdateConnectorRequestSwimlane) UpdateConnectorRequestBodyProperties { + return UpdateConnectorRequestBodyProperties{ + UpdateConnectorRequestSwimlane: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *UpdateConnectorRequestBodyProperties) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into UpdateConnectorRequestCasesWebhook + err = newStrictDecoder(data).Decode(&dst.UpdateConnectorRequestCasesWebhook) + if err == nil { + jsonUpdateConnectorRequestCasesWebhook, _ := json.Marshal(dst.UpdateConnectorRequestCasesWebhook) + if string(jsonUpdateConnectorRequestCasesWebhook) == "{}" { // empty struct + dst.UpdateConnectorRequestCasesWebhook = nil + } else { + match++ + } + } else { + dst.UpdateConnectorRequestCasesWebhook = nil + } + + // try to unmarshal data into UpdateConnectorRequestIndex + err = newStrictDecoder(data).Decode(&dst.UpdateConnectorRequestIndex) + if err == nil { + jsonUpdateConnectorRequestIndex, _ := json.Marshal(dst.UpdateConnectorRequestIndex) + if string(jsonUpdateConnectorRequestIndex) == "{}" { // empty struct + dst.UpdateConnectorRequestIndex = nil + } else { + match++ + } + } else { + dst.UpdateConnectorRequestIndex = nil + } + + // try to unmarshal data into UpdateConnectorRequestJira + err = newStrictDecoder(data).Decode(&dst.UpdateConnectorRequestJira) + if err == nil { + jsonUpdateConnectorRequestJira, _ := json.Marshal(dst.UpdateConnectorRequestJira) + if string(jsonUpdateConnectorRequestJira) == "{}" { // empty struct + dst.UpdateConnectorRequestJira = nil + } else { + match++ + } + } else { + dst.UpdateConnectorRequestJira = nil + } + + // try to unmarshal data into UpdateConnectorRequestOpsgenie + err = newStrictDecoder(data).Decode(&dst.UpdateConnectorRequestOpsgenie) + if err == nil { + jsonUpdateConnectorRequestOpsgenie, _ := json.Marshal(dst.UpdateConnectorRequestOpsgenie) + if string(jsonUpdateConnectorRequestOpsgenie) == "{}" { // empty struct + dst.UpdateConnectorRequestOpsgenie = nil + } else { + match++ + } + } else { + dst.UpdateConnectorRequestOpsgenie = nil + } + + // try to unmarshal data into UpdateConnectorRequestResilient + err = newStrictDecoder(data).Decode(&dst.UpdateConnectorRequestResilient) + if err == nil { + jsonUpdateConnectorRequestResilient, _ := json.Marshal(dst.UpdateConnectorRequestResilient) + if string(jsonUpdateConnectorRequestResilient) == "{}" { // empty struct + dst.UpdateConnectorRequestResilient = nil + } else { + match++ + } + } else { + dst.UpdateConnectorRequestResilient = nil + } + + // try to unmarshal data into UpdateConnectorRequestServerlog + err = newStrictDecoder(data).Decode(&dst.UpdateConnectorRequestServerlog) + if err == nil { + jsonUpdateConnectorRequestServerlog, _ := json.Marshal(dst.UpdateConnectorRequestServerlog) + if string(jsonUpdateConnectorRequestServerlog) == "{}" { // empty struct + dst.UpdateConnectorRequestServerlog = nil + } else { + match++ + } + } else { + dst.UpdateConnectorRequestServerlog = nil + } + + // try to unmarshal data into UpdateConnectorRequestServicenow + err = newStrictDecoder(data).Decode(&dst.UpdateConnectorRequestServicenow) + if err == nil { + jsonUpdateConnectorRequestServicenow, _ := json.Marshal(dst.UpdateConnectorRequestServicenow) + if string(jsonUpdateConnectorRequestServicenow) == "{}" { // empty struct + dst.UpdateConnectorRequestServicenow = nil + } else { + match++ + } + } else { + dst.UpdateConnectorRequestServicenow = nil + } + + // try to unmarshal data into UpdateConnectorRequestServicenowItom + err = newStrictDecoder(data).Decode(&dst.UpdateConnectorRequestServicenowItom) + if err == nil { + jsonUpdateConnectorRequestServicenowItom, _ := json.Marshal(dst.UpdateConnectorRequestServicenowItom) + if string(jsonUpdateConnectorRequestServicenowItom) == "{}" { // empty struct + dst.UpdateConnectorRequestServicenowItom = nil + } else { + match++ + } + } else { + dst.UpdateConnectorRequestServicenowItom = nil + } + + // try to unmarshal data into UpdateConnectorRequestSwimlane + err = newStrictDecoder(data).Decode(&dst.UpdateConnectorRequestSwimlane) + if err == nil { + jsonUpdateConnectorRequestSwimlane, _ := json.Marshal(dst.UpdateConnectorRequestSwimlane) + if string(jsonUpdateConnectorRequestSwimlane) == "{}" { // empty struct + dst.UpdateConnectorRequestSwimlane = nil + } else { + match++ + } + } else { + dst.UpdateConnectorRequestSwimlane = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.UpdateConnectorRequestCasesWebhook = nil + dst.UpdateConnectorRequestIndex = nil + dst.UpdateConnectorRequestJira = nil + dst.UpdateConnectorRequestOpsgenie = nil + dst.UpdateConnectorRequestResilient = nil + dst.UpdateConnectorRequestServerlog = nil + dst.UpdateConnectorRequestServicenow = nil + dst.UpdateConnectorRequestServicenowItom = nil + dst.UpdateConnectorRequestSwimlane = nil + + return fmt.Errorf("data matches more than one schema in oneOf(UpdateConnectorRequestBodyProperties)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(UpdateConnectorRequestBodyProperties)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src UpdateConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { + if src.UpdateConnectorRequestCasesWebhook != nil { + return json.Marshal(&src.UpdateConnectorRequestCasesWebhook) + } + + if src.UpdateConnectorRequestIndex != nil { + return json.Marshal(&src.UpdateConnectorRequestIndex) + } + + if src.UpdateConnectorRequestJira != nil { + return json.Marshal(&src.UpdateConnectorRequestJira) + } + + if src.UpdateConnectorRequestOpsgenie != nil { + return json.Marshal(&src.UpdateConnectorRequestOpsgenie) + } + + if src.UpdateConnectorRequestResilient != nil { + return json.Marshal(&src.UpdateConnectorRequestResilient) + } + + if src.UpdateConnectorRequestServerlog != nil { + return json.Marshal(&src.UpdateConnectorRequestServerlog) + } + + if src.UpdateConnectorRequestServicenow != nil { + return json.Marshal(&src.UpdateConnectorRequestServicenow) + } + + if src.UpdateConnectorRequestServicenowItom != nil { + return json.Marshal(&src.UpdateConnectorRequestServicenowItom) + } + + if src.UpdateConnectorRequestSwimlane != nil { + return json.Marshal(&src.UpdateConnectorRequestSwimlane) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *UpdateConnectorRequestBodyProperties) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.UpdateConnectorRequestCasesWebhook != nil { + return obj.UpdateConnectorRequestCasesWebhook + } + + if obj.UpdateConnectorRequestIndex != nil { + return obj.UpdateConnectorRequestIndex + } + + if obj.UpdateConnectorRequestJira != nil { + return obj.UpdateConnectorRequestJira + } + + if obj.UpdateConnectorRequestOpsgenie != nil { + return obj.UpdateConnectorRequestOpsgenie + } + + if obj.UpdateConnectorRequestResilient != nil { + return obj.UpdateConnectorRequestResilient + } + + if obj.UpdateConnectorRequestServerlog != nil { + return obj.UpdateConnectorRequestServerlog + } + + if obj.UpdateConnectorRequestServicenow != nil { + return obj.UpdateConnectorRequestServicenow + } + + if obj.UpdateConnectorRequestServicenowItom != nil { + return obj.UpdateConnectorRequestServicenowItom + } + + if obj.UpdateConnectorRequestSwimlane != nil { + return obj.UpdateConnectorRequestSwimlane + } + + // all schemas are nil + return nil +} + +type NullableUpdateConnectorRequestBodyProperties struct { + value *UpdateConnectorRequestBodyProperties + isSet bool +} + +func (v NullableUpdateConnectorRequestBodyProperties) Get() *UpdateConnectorRequestBodyProperties { + return v.value +} + +func (v *NullableUpdateConnectorRequestBodyProperties) Set(val *UpdateConnectorRequestBodyProperties) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateConnectorRequestBodyProperties) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateConnectorRequestBodyProperties) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateConnectorRequestBodyProperties(val *UpdateConnectorRequestBodyProperties) *NullableUpdateConnectorRequestBodyProperties { + return &NullableUpdateConnectorRequestBodyProperties{value: val, isSet: true} +} + +func (v NullableUpdateConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateConnectorRequestBodyProperties) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_update_connector_request_cases_webhook.go b/generated/kibanaactions/model_update_connector_request_cases_webhook.go new file mode 100644 index 000000000..34266f507 --- /dev/null +++ b/generated/kibanaactions/model_update_connector_request_cases_webhook.go @@ -0,0 +1,179 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the UpdateConnectorRequestCasesWebhook type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateConnectorRequestCasesWebhook{} + +// UpdateConnectorRequestCasesWebhook struct for UpdateConnectorRequestCasesWebhook +type UpdateConnectorRequestCasesWebhook struct { + Config ConfigPropertiesCasesWebhook `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets *SecretsPropertiesCasesWebhook `json:"secrets,omitempty"` +} + +// NewUpdateConnectorRequestCasesWebhook instantiates a new UpdateConnectorRequestCasesWebhook object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateConnectorRequestCasesWebhook(config ConfigPropertiesCasesWebhook, name string) *UpdateConnectorRequestCasesWebhook { + this := UpdateConnectorRequestCasesWebhook{} + this.Config = config + this.Name = name + return &this +} + +// NewUpdateConnectorRequestCasesWebhookWithDefaults instantiates a new UpdateConnectorRequestCasesWebhook object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateConnectorRequestCasesWebhookWithDefaults() *UpdateConnectorRequestCasesWebhook { + this := UpdateConnectorRequestCasesWebhook{} + return &this +} + +// GetConfig returns the Config field value +func (o *UpdateConnectorRequestCasesWebhook) GetConfig() ConfigPropertiesCasesWebhook { + if o == nil { + var ret ConfigPropertiesCasesWebhook + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestCasesWebhook) GetConfigOk() (*ConfigPropertiesCasesWebhook, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *UpdateConnectorRequestCasesWebhook) SetConfig(v ConfigPropertiesCasesWebhook) { + o.Config = v +} + +// GetName returns the Name field value +func (o *UpdateConnectorRequestCasesWebhook) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestCasesWebhook) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpdateConnectorRequestCasesWebhook) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value if set, zero value otherwise. +func (o *UpdateConnectorRequestCasesWebhook) GetSecrets() SecretsPropertiesCasesWebhook { + if o == nil || IsNil(o.Secrets) { + var ret SecretsPropertiesCasesWebhook + return ret + } + return *o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestCasesWebhook) GetSecretsOk() (*SecretsPropertiesCasesWebhook, bool) { + if o == nil || IsNil(o.Secrets) { + return nil, false + } + return o.Secrets, true +} + +// HasSecrets returns a boolean if a field has been set. +func (o *UpdateConnectorRequestCasesWebhook) HasSecrets() bool { + if o != nil && !IsNil(o.Secrets) { + return true + } + + return false +} + +// SetSecrets gets a reference to the given SecretsPropertiesCasesWebhook and assigns it to the Secrets field. +func (o *UpdateConnectorRequestCasesWebhook) SetSecrets(v SecretsPropertiesCasesWebhook) { + o.Secrets = &v +} + +func (o UpdateConnectorRequestCasesWebhook) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateConnectorRequestCasesWebhook) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["name"] = o.Name + if !IsNil(o.Secrets) { + toSerialize["secrets"] = o.Secrets + } + return toSerialize, nil +} + +type NullableUpdateConnectorRequestCasesWebhook struct { + value *UpdateConnectorRequestCasesWebhook + isSet bool +} + +func (v NullableUpdateConnectorRequestCasesWebhook) Get() *UpdateConnectorRequestCasesWebhook { + return v.value +} + +func (v *NullableUpdateConnectorRequestCasesWebhook) Set(val *UpdateConnectorRequestCasesWebhook) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateConnectorRequestCasesWebhook) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateConnectorRequestCasesWebhook) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateConnectorRequestCasesWebhook(val *UpdateConnectorRequestCasesWebhook) *NullableUpdateConnectorRequestCasesWebhook { + return &NullableUpdateConnectorRequestCasesWebhook{value: val, isSet: true} +} + +func (v NullableUpdateConnectorRequestCasesWebhook) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateConnectorRequestCasesWebhook) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_update_connector_request_index.go b/generated/kibanaactions/model_update_connector_request_index.go new file mode 100644 index 000000000..3c5908d2e --- /dev/null +++ b/generated/kibanaactions/model_update_connector_request_index.go @@ -0,0 +1,143 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the UpdateConnectorRequestIndex type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateConnectorRequestIndex{} + +// UpdateConnectorRequestIndex struct for UpdateConnectorRequestIndex +type UpdateConnectorRequestIndex struct { + Config ConfigPropertiesIndex `json:"config"` + // The display name for the connector. + Name string `json:"name"` +} + +// NewUpdateConnectorRequestIndex instantiates a new UpdateConnectorRequestIndex object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateConnectorRequestIndex(config ConfigPropertiesIndex, name string) *UpdateConnectorRequestIndex { + this := UpdateConnectorRequestIndex{} + this.Config = config + this.Name = name + return &this +} + +// NewUpdateConnectorRequestIndexWithDefaults instantiates a new UpdateConnectorRequestIndex object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateConnectorRequestIndexWithDefaults() *UpdateConnectorRequestIndex { + this := UpdateConnectorRequestIndex{} + return &this +} + +// GetConfig returns the Config field value +func (o *UpdateConnectorRequestIndex) GetConfig() ConfigPropertiesIndex { + if o == nil { + var ret ConfigPropertiesIndex + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestIndex) GetConfigOk() (*ConfigPropertiesIndex, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *UpdateConnectorRequestIndex) SetConfig(v ConfigPropertiesIndex) { + o.Config = v +} + +// GetName returns the Name field value +func (o *UpdateConnectorRequestIndex) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestIndex) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpdateConnectorRequestIndex) SetName(v string) { + o.Name = v +} + +func (o UpdateConnectorRequestIndex) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateConnectorRequestIndex) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableUpdateConnectorRequestIndex struct { + value *UpdateConnectorRequestIndex + isSet bool +} + +func (v NullableUpdateConnectorRequestIndex) Get() *UpdateConnectorRequestIndex { + return v.value +} + +func (v *NullableUpdateConnectorRequestIndex) Set(val *UpdateConnectorRequestIndex) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateConnectorRequestIndex) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateConnectorRequestIndex) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateConnectorRequestIndex(val *UpdateConnectorRequestIndex) *NullableUpdateConnectorRequestIndex { + return &NullableUpdateConnectorRequestIndex{value: val, isSet: true} +} + +func (v NullableUpdateConnectorRequestIndex) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateConnectorRequestIndex) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_update_connector_request_jira.go b/generated/kibanaactions/model_update_connector_request_jira.go new file mode 100644 index 000000000..60ee7c859 --- /dev/null +++ b/generated/kibanaactions/model_update_connector_request_jira.go @@ -0,0 +1,170 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the UpdateConnectorRequestJira type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateConnectorRequestJira{} + +// UpdateConnectorRequestJira struct for UpdateConnectorRequestJira +type UpdateConnectorRequestJira struct { + Config ConfigPropertiesJira `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesJira `json:"secrets"` +} + +// NewUpdateConnectorRequestJira instantiates a new UpdateConnectorRequestJira object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateConnectorRequestJira(config ConfigPropertiesJira, name string, secrets SecretsPropertiesJira) *UpdateConnectorRequestJira { + this := UpdateConnectorRequestJira{} + this.Config = config + this.Name = name + this.Secrets = secrets + return &this +} + +// NewUpdateConnectorRequestJiraWithDefaults instantiates a new UpdateConnectorRequestJira object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateConnectorRequestJiraWithDefaults() *UpdateConnectorRequestJira { + this := UpdateConnectorRequestJira{} + return &this +} + +// GetConfig returns the Config field value +func (o *UpdateConnectorRequestJira) GetConfig() ConfigPropertiesJira { + if o == nil { + var ret ConfigPropertiesJira + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestJira) GetConfigOk() (*ConfigPropertiesJira, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *UpdateConnectorRequestJira) SetConfig(v ConfigPropertiesJira) { + o.Config = v +} + +// GetName returns the Name field value +func (o *UpdateConnectorRequestJira) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestJira) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpdateConnectorRequestJira) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *UpdateConnectorRequestJira) GetSecrets() SecretsPropertiesJira { + if o == nil { + var ret SecretsPropertiesJira + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestJira) GetSecretsOk() (*SecretsPropertiesJira, bool) { + if o == nil { + return nil, false + } + return &o.Secrets, true +} + +// SetSecrets sets field value +func (o *UpdateConnectorRequestJira) SetSecrets(v SecretsPropertiesJira) { + o.Secrets = v +} + +func (o UpdateConnectorRequestJira) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateConnectorRequestJira) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableUpdateConnectorRequestJira struct { + value *UpdateConnectorRequestJira + isSet bool +} + +func (v NullableUpdateConnectorRequestJira) Get() *UpdateConnectorRequestJira { + return v.value +} + +func (v *NullableUpdateConnectorRequestJira) Set(val *UpdateConnectorRequestJira) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateConnectorRequestJira) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateConnectorRequestJira) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateConnectorRequestJira(val *UpdateConnectorRequestJira) *NullableUpdateConnectorRequestJira { + return &NullableUpdateConnectorRequestJira{value: val, isSet: true} +} + +func (v NullableUpdateConnectorRequestJira) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateConnectorRequestJira) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_update_connector_request_opsgenie.go b/generated/kibanaactions/model_update_connector_request_opsgenie.go new file mode 100644 index 000000000..e9761e873 --- /dev/null +++ b/generated/kibanaactions/model_update_connector_request_opsgenie.go @@ -0,0 +1,170 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the UpdateConnectorRequestOpsgenie type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateConnectorRequestOpsgenie{} + +// UpdateConnectorRequestOpsgenie struct for UpdateConnectorRequestOpsgenie +type UpdateConnectorRequestOpsgenie struct { + Config ConfigPropertiesOpsgenie `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesOpsgenie `json:"secrets"` +} + +// NewUpdateConnectorRequestOpsgenie instantiates a new UpdateConnectorRequestOpsgenie object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateConnectorRequestOpsgenie(config ConfigPropertiesOpsgenie, name string, secrets SecretsPropertiesOpsgenie) *UpdateConnectorRequestOpsgenie { + this := UpdateConnectorRequestOpsgenie{} + this.Config = config + this.Name = name + this.Secrets = secrets + return &this +} + +// NewUpdateConnectorRequestOpsgenieWithDefaults instantiates a new UpdateConnectorRequestOpsgenie object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateConnectorRequestOpsgenieWithDefaults() *UpdateConnectorRequestOpsgenie { + this := UpdateConnectorRequestOpsgenie{} + return &this +} + +// GetConfig returns the Config field value +func (o *UpdateConnectorRequestOpsgenie) GetConfig() ConfigPropertiesOpsgenie { + if o == nil { + var ret ConfigPropertiesOpsgenie + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestOpsgenie) GetConfigOk() (*ConfigPropertiesOpsgenie, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *UpdateConnectorRequestOpsgenie) SetConfig(v ConfigPropertiesOpsgenie) { + o.Config = v +} + +// GetName returns the Name field value +func (o *UpdateConnectorRequestOpsgenie) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestOpsgenie) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpdateConnectorRequestOpsgenie) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *UpdateConnectorRequestOpsgenie) GetSecrets() SecretsPropertiesOpsgenie { + if o == nil { + var ret SecretsPropertiesOpsgenie + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestOpsgenie) GetSecretsOk() (*SecretsPropertiesOpsgenie, bool) { + if o == nil { + return nil, false + } + return &o.Secrets, true +} + +// SetSecrets sets field value +func (o *UpdateConnectorRequestOpsgenie) SetSecrets(v SecretsPropertiesOpsgenie) { + o.Secrets = v +} + +func (o UpdateConnectorRequestOpsgenie) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateConnectorRequestOpsgenie) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableUpdateConnectorRequestOpsgenie struct { + value *UpdateConnectorRequestOpsgenie + isSet bool +} + +func (v NullableUpdateConnectorRequestOpsgenie) Get() *UpdateConnectorRequestOpsgenie { + return v.value +} + +func (v *NullableUpdateConnectorRequestOpsgenie) Set(val *UpdateConnectorRequestOpsgenie) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateConnectorRequestOpsgenie) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateConnectorRequestOpsgenie) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateConnectorRequestOpsgenie(val *UpdateConnectorRequestOpsgenie) *NullableUpdateConnectorRequestOpsgenie { + return &NullableUpdateConnectorRequestOpsgenie{value: val, isSet: true} +} + +func (v NullableUpdateConnectorRequestOpsgenie) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateConnectorRequestOpsgenie) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_update_connector_request_resilient.go b/generated/kibanaactions/model_update_connector_request_resilient.go new file mode 100644 index 000000000..18a64c24c --- /dev/null +++ b/generated/kibanaactions/model_update_connector_request_resilient.go @@ -0,0 +1,170 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the UpdateConnectorRequestResilient type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateConnectorRequestResilient{} + +// UpdateConnectorRequestResilient struct for UpdateConnectorRequestResilient +type UpdateConnectorRequestResilient struct { + Config ConfigPropertiesResilient `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesResilient `json:"secrets"` +} + +// NewUpdateConnectorRequestResilient instantiates a new UpdateConnectorRequestResilient object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateConnectorRequestResilient(config ConfigPropertiesResilient, name string, secrets SecretsPropertiesResilient) *UpdateConnectorRequestResilient { + this := UpdateConnectorRequestResilient{} + this.Config = config + this.Name = name + this.Secrets = secrets + return &this +} + +// NewUpdateConnectorRequestResilientWithDefaults instantiates a new UpdateConnectorRequestResilient object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateConnectorRequestResilientWithDefaults() *UpdateConnectorRequestResilient { + this := UpdateConnectorRequestResilient{} + return &this +} + +// GetConfig returns the Config field value +func (o *UpdateConnectorRequestResilient) GetConfig() ConfigPropertiesResilient { + if o == nil { + var ret ConfigPropertiesResilient + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestResilient) GetConfigOk() (*ConfigPropertiesResilient, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *UpdateConnectorRequestResilient) SetConfig(v ConfigPropertiesResilient) { + o.Config = v +} + +// GetName returns the Name field value +func (o *UpdateConnectorRequestResilient) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestResilient) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpdateConnectorRequestResilient) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *UpdateConnectorRequestResilient) GetSecrets() SecretsPropertiesResilient { + if o == nil { + var ret SecretsPropertiesResilient + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestResilient) GetSecretsOk() (*SecretsPropertiesResilient, bool) { + if o == nil { + return nil, false + } + return &o.Secrets, true +} + +// SetSecrets sets field value +func (o *UpdateConnectorRequestResilient) SetSecrets(v SecretsPropertiesResilient) { + o.Secrets = v +} + +func (o UpdateConnectorRequestResilient) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateConnectorRequestResilient) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableUpdateConnectorRequestResilient struct { + value *UpdateConnectorRequestResilient + isSet bool +} + +func (v NullableUpdateConnectorRequestResilient) Get() *UpdateConnectorRequestResilient { + return v.value +} + +func (v *NullableUpdateConnectorRequestResilient) Set(val *UpdateConnectorRequestResilient) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateConnectorRequestResilient) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateConnectorRequestResilient) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateConnectorRequestResilient(val *UpdateConnectorRequestResilient) *NullableUpdateConnectorRequestResilient { + return &NullableUpdateConnectorRequestResilient{value: val, isSet: true} +} + +func (v NullableUpdateConnectorRequestResilient) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateConnectorRequestResilient) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_update_connector_request_serverlog.go b/generated/kibanaactions/model_update_connector_request_serverlog.go new file mode 100644 index 000000000..cb0a3ebcb --- /dev/null +++ b/generated/kibanaactions/model_update_connector_request_serverlog.go @@ -0,0 +1,116 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the UpdateConnectorRequestServerlog type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateConnectorRequestServerlog{} + +// UpdateConnectorRequestServerlog struct for UpdateConnectorRequestServerlog +type UpdateConnectorRequestServerlog struct { + // The display name for the connector. + Name string `json:"name"` +} + +// NewUpdateConnectorRequestServerlog instantiates a new UpdateConnectorRequestServerlog object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateConnectorRequestServerlog(name string) *UpdateConnectorRequestServerlog { + this := UpdateConnectorRequestServerlog{} + this.Name = name + return &this +} + +// NewUpdateConnectorRequestServerlogWithDefaults instantiates a new UpdateConnectorRequestServerlog object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateConnectorRequestServerlogWithDefaults() *UpdateConnectorRequestServerlog { + this := UpdateConnectorRequestServerlog{} + return &this +} + +// GetName returns the Name field value +func (o *UpdateConnectorRequestServerlog) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestServerlog) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpdateConnectorRequestServerlog) SetName(v string) { + o.Name = v +} + +func (o UpdateConnectorRequestServerlog) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateConnectorRequestServerlog) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + return toSerialize, nil +} + +type NullableUpdateConnectorRequestServerlog struct { + value *UpdateConnectorRequestServerlog + isSet bool +} + +func (v NullableUpdateConnectorRequestServerlog) Get() *UpdateConnectorRequestServerlog { + return v.value +} + +func (v *NullableUpdateConnectorRequestServerlog) Set(val *UpdateConnectorRequestServerlog) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateConnectorRequestServerlog) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateConnectorRequestServerlog) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateConnectorRequestServerlog(val *UpdateConnectorRequestServerlog) *NullableUpdateConnectorRequestServerlog { + return &NullableUpdateConnectorRequestServerlog{value: val, isSet: true} +} + +func (v NullableUpdateConnectorRequestServerlog) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateConnectorRequestServerlog) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_update_connector_request_servicenow.go b/generated/kibanaactions/model_update_connector_request_servicenow.go new file mode 100644 index 000000000..1853a9460 --- /dev/null +++ b/generated/kibanaactions/model_update_connector_request_servicenow.go @@ -0,0 +1,170 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the UpdateConnectorRequestServicenow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateConnectorRequestServicenow{} + +// UpdateConnectorRequestServicenow struct for UpdateConnectorRequestServicenow +type UpdateConnectorRequestServicenow struct { + Config ConfigPropertiesServicenow `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesServicenow `json:"secrets"` +} + +// NewUpdateConnectorRequestServicenow instantiates a new UpdateConnectorRequestServicenow object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateConnectorRequestServicenow(config ConfigPropertiesServicenow, name string, secrets SecretsPropertiesServicenow) *UpdateConnectorRequestServicenow { + this := UpdateConnectorRequestServicenow{} + this.Config = config + this.Name = name + this.Secrets = secrets + return &this +} + +// NewUpdateConnectorRequestServicenowWithDefaults instantiates a new UpdateConnectorRequestServicenow object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateConnectorRequestServicenowWithDefaults() *UpdateConnectorRequestServicenow { + this := UpdateConnectorRequestServicenow{} + return &this +} + +// GetConfig returns the Config field value +func (o *UpdateConnectorRequestServicenow) GetConfig() ConfigPropertiesServicenow { + if o == nil { + var ret ConfigPropertiesServicenow + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestServicenow) GetConfigOk() (*ConfigPropertiesServicenow, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *UpdateConnectorRequestServicenow) SetConfig(v ConfigPropertiesServicenow) { + o.Config = v +} + +// GetName returns the Name field value +func (o *UpdateConnectorRequestServicenow) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestServicenow) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpdateConnectorRequestServicenow) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *UpdateConnectorRequestServicenow) GetSecrets() SecretsPropertiesServicenow { + if o == nil { + var ret SecretsPropertiesServicenow + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestServicenow) GetSecretsOk() (*SecretsPropertiesServicenow, bool) { + if o == nil { + return nil, false + } + return &o.Secrets, true +} + +// SetSecrets sets field value +func (o *UpdateConnectorRequestServicenow) SetSecrets(v SecretsPropertiesServicenow) { + o.Secrets = v +} + +func (o UpdateConnectorRequestServicenow) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateConnectorRequestServicenow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableUpdateConnectorRequestServicenow struct { + value *UpdateConnectorRequestServicenow + isSet bool +} + +func (v NullableUpdateConnectorRequestServicenow) Get() *UpdateConnectorRequestServicenow { + return v.value +} + +func (v *NullableUpdateConnectorRequestServicenow) Set(val *UpdateConnectorRequestServicenow) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateConnectorRequestServicenow) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateConnectorRequestServicenow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateConnectorRequestServicenow(val *UpdateConnectorRequestServicenow) *NullableUpdateConnectorRequestServicenow { + return &NullableUpdateConnectorRequestServicenow{value: val, isSet: true} +} + +func (v NullableUpdateConnectorRequestServicenow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateConnectorRequestServicenow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_update_connector_request_servicenow_itom.go b/generated/kibanaactions/model_update_connector_request_servicenow_itom.go new file mode 100644 index 000000000..d99ef90b2 --- /dev/null +++ b/generated/kibanaactions/model_update_connector_request_servicenow_itom.go @@ -0,0 +1,170 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the UpdateConnectorRequestServicenowItom type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateConnectorRequestServicenowItom{} + +// UpdateConnectorRequestServicenowItom struct for UpdateConnectorRequestServicenowItom +type UpdateConnectorRequestServicenowItom struct { + Config ConfigPropertiesServicenowItom `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesServicenow `json:"secrets"` +} + +// NewUpdateConnectorRequestServicenowItom instantiates a new UpdateConnectorRequestServicenowItom object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateConnectorRequestServicenowItom(config ConfigPropertiesServicenowItom, name string, secrets SecretsPropertiesServicenow) *UpdateConnectorRequestServicenowItom { + this := UpdateConnectorRequestServicenowItom{} + this.Config = config + this.Name = name + this.Secrets = secrets + return &this +} + +// NewUpdateConnectorRequestServicenowItomWithDefaults instantiates a new UpdateConnectorRequestServicenowItom object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateConnectorRequestServicenowItomWithDefaults() *UpdateConnectorRequestServicenowItom { + this := UpdateConnectorRequestServicenowItom{} + return &this +} + +// GetConfig returns the Config field value +func (o *UpdateConnectorRequestServicenowItom) GetConfig() ConfigPropertiesServicenowItom { + if o == nil { + var ret ConfigPropertiesServicenowItom + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestServicenowItom) GetConfigOk() (*ConfigPropertiesServicenowItom, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *UpdateConnectorRequestServicenowItom) SetConfig(v ConfigPropertiesServicenowItom) { + o.Config = v +} + +// GetName returns the Name field value +func (o *UpdateConnectorRequestServicenowItom) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestServicenowItom) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpdateConnectorRequestServicenowItom) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *UpdateConnectorRequestServicenowItom) GetSecrets() SecretsPropertiesServicenow { + if o == nil { + var ret SecretsPropertiesServicenow + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestServicenowItom) GetSecretsOk() (*SecretsPropertiesServicenow, bool) { + if o == nil { + return nil, false + } + return &o.Secrets, true +} + +// SetSecrets sets field value +func (o *UpdateConnectorRequestServicenowItom) SetSecrets(v SecretsPropertiesServicenow) { + o.Secrets = v +} + +func (o UpdateConnectorRequestServicenowItom) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateConnectorRequestServicenowItom) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableUpdateConnectorRequestServicenowItom struct { + value *UpdateConnectorRequestServicenowItom + isSet bool +} + +func (v NullableUpdateConnectorRequestServicenowItom) Get() *UpdateConnectorRequestServicenowItom { + return v.value +} + +func (v *NullableUpdateConnectorRequestServicenowItom) Set(val *UpdateConnectorRequestServicenowItom) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateConnectorRequestServicenowItom) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateConnectorRequestServicenowItom) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateConnectorRequestServicenowItom(val *UpdateConnectorRequestServicenowItom) *NullableUpdateConnectorRequestServicenowItom { + return &NullableUpdateConnectorRequestServicenowItom{value: val, isSet: true} +} + +func (v NullableUpdateConnectorRequestServicenowItom) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateConnectorRequestServicenowItom) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_update_connector_request_swimlane.go b/generated/kibanaactions/model_update_connector_request_swimlane.go new file mode 100644 index 000000000..970750e50 --- /dev/null +++ b/generated/kibanaactions/model_update_connector_request_swimlane.go @@ -0,0 +1,170 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the UpdateConnectorRequestSwimlane type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateConnectorRequestSwimlane{} + +// UpdateConnectorRequestSwimlane struct for UpdateConnectorRequestSwimlane +type UpdateConnectorRequestSwimlane struct { + Config ConfigPropertiesSwimlane `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesSwimlane `json:"secrets"` +} + +// NewUpdateConnectorRequestSwimlane instantiates a new UpdateConnectorRequestSwimlane object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateConnectorRequestSwimlane(config ConfigPropertiesSwimlane, name string, secrets SecretsPropertiesSwimlane) *UpdateConnectorRequestSwimlane { + this := UpdateConnectorRequestSwimlane{} + this.Config = config + this.Name = name + this.Secrets = secrets + return &this +} + +// NewUpdateConnectorRequestSwimlaneWithDefaults instantiates a new UpdateConnectorRequestSwimlane object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateConnectorRequestSwimlaneWithDefaults() *UpdateConnectorRequestSwimlane { + this := UpdateConnectorRequestSwimlane{} + return &this +} + +// GetConfig returns the Config field value +func (o *UpdateConnectorRequestSwimlane) GetConfig() ConfigPropertiesSwimlane { + if o == nil { + var ret ConfigPropertiesSwimlane + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestSwimlane) GetConfigOk() (*ConfigPropertiesSwimlane, bool) { + if o == nil { + return nil, false + } + return &o.Config, true +} + +// SetConfig sets field value +func (o *UpdateConnectorRequestSwimlane) SetConfig(v ConfigPropertiesSwimlane) { + o.Config = v +} + +// GetName returns the Name field value +func (o *UpdateConnectorRequestSwimlane) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestSwimlane) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpdateConnectorRequestSwimlane) SetName(v string) { + o.Name = v +} + +// GetSecrets returns the Secrets field value +func (o *UpdateConnectorRequestSwimlane) GetSecrets() SecretsPropertiesSwimlane { + if o == nil { + var ret SecretsPropertiesSwimlane + return ret + } + + return o.Secrets +} + +// GetSecretsOk returns a tuple with the Secrets field value +// and a boolean to check if the value has been set. +func (o *UpdateConnectorRequestSwimlane) GetSecretsOk() (*SecretsPropertiesSwimlane, bool) { + if o == nil { + return nil, false + } + return &o.Secrets, true +} + +// SetSecrets sets field value +func (o *UpdateConnectorRequestSwimlane) SetSecrets(v SecretsPropertiesSwimlane) { + o.Secrets = v +} + +func (o UpdateConnectorRequestSwimlane) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateConnectorRequestSwimlane) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + toSerialize["name"] = o.Name + toSerialize["secrets"] = o.Secrets + return toSerialize, nil +} + +type NullableUpdateConnectorRequestSwimlane struct { + value *UpdateConnectorRequestSwimlane + isSet bool +} + +func (v NullableUpdateConnectorRequestSwimlane) Get() *UpdateConnectorRequestSwimlane { + return v.value +} + +func (v *NullableUpdateConnectorRequestSwimlane) Set(val *UpdateConnectorRequestSwimlane) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateConnectorRequestSwimlane) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateConnectorRequestSwimlane) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateConnectorRequestSwimlane(val *UpdateConnectorRequestSwimlane) *NullableUpdateConnectorRequestSwimlane { + return &NullableUpdateConnectorRequestSwimlane{value: val, isSet: true} +} + +func (v NullableUpdateConnectorRequestSwimlane) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateConnectorRequestSwimlane) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/response.go b/generated/kibanaactions/response.go new file mode 100644 index 000000000..7f6195387 --- /dev/null +++ b/generated/kibanaactions/response.go @@ -0,0 +1,47 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/generated/kibanaactions/utils.go b/generated/kibanaactions/utils.go new file mode 100644 index 000000000..4cdad30dc --- /dev/null +++ b/generated/kibanaactions/utils.go @@ -0,0 +1,347 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return v.value.MarshalJSON() +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} diff --git a/go.mod b/go.mod index 7ea0c962c..5979b18ed 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/hashicorp/terraform-plugin-log v0.8.0 github.com/hashicorp/terraform-plugin-mux v0.9.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 - github.com/stretchr/testify v1.8.1 + github.com/stretchr/testify v1.8.2 ) require ( diff --git a/go.sum b/go.sum index 531e493e7..c71dad957 100644 --- a/go.sum +++ b/go.sum @@ -175,8 +175,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= diff --git a/internal/clients/api_client.go b/internal/clients/api_client.go index ee8c4958c..c84a71f30 100644 --- a/internal/clients/api_client.go +++ b/internal/clients/api_client.go @@ -13,6 +13,7 @@ import ( "github.com/disaster37/go-kibana-rest/v8" "github.com/elastic/go-elasticsearch/v7" "github.com/elastic/terraform-provider-elasticstack/generated/alerting" + "github.com/elastic/terraform-provider-elasticstack/generated/kibanaactions" "github.com/elastic/terraform-provider-elasticstack/internal/models" "github.com/elastic/terraform-provider-elasticstack/internal/utils" "github.com/hashicorp/go-version" @@ -62,6 +63,7 @@ type ApiClient struct { elasticsearchClusterInfo *models.ClusterInfo kibana *kibana.Client alerting alerting.AlertingApi + actionConnectors kibanaactions.ConnectorsApi kibanaConfig kibana.Config version string } @@ -121,11 +123,12 @@ func NewAcceptanceTestingClient() (*ApiClient, error) { } return &ApiClient{ - elasticsearch: es, - kibana: kib, - alerting: buildAlertingClient(baseConfig, kibanaConfig).AlertingApi, - kibanaConfig: kibanaConfig, - version: "acceptance-testing", + elasticsearch: es, + kibana: kib, + alerting: buildAlertingClient(baseConfig, kibanaConfig).AlertingApi, + actionConnectors: buildActionConnectorClient(baseConfig, kibanaConfig).ConnectorsApi, + kibanaConfig: kibanaConfig, + version: "acceptance-testing", }, nil } @@ -189,6 +192,19 @@ func (a *ApiClient) GetAlertingClient() (alerting.AlertingApi, error) { return a.alerting, nil } +func (a *ApiClient) GetKibanaActionConnectorClient(ctx context.Context) (kibanaactions.ConnectorsApi, context.Context, error) { + if a.actionConnectors == nil { + return nil, nil, errors.New("kibana action connector client not found") + } + + ctx = context.WithValue(ctx, alerting.ContextBasicAuth, alerting.BasicAuth{ + UserName: a.kibanaConfig.Username, + Password: a.kibanaConfig.Password, + }) + + return a.actionConnectors, ctx, nil +} + func (a *ApiClient) SetAlertingAuthContext(ctx context.Context) context.Context { return context.WithValue(ctx, alerting.ContextBasicAuth, alerting.BasicAuth{ UserName: a.kibanaConfig.Username, @@ -503,6 +519,19 @@ func buildAlertingClient(baseConfig BaseConfig, config kibana.Config) *alerting. return alerting.NewAPIClient(&alertingConfig) } +func buildActionConnectorClient(baseConfig BaseConfig, config kibana.Config) *kibanaactions.APIClient { + connectorsConfig := kibanaactions.Configuration{ + UserAgent: baseConfig.UserAgent, + Servers: kibanaactions.ServerConfigurations{ + { + URL: config.Address, + }, + }, + Debug: logging.IsDebugOrHigher(), + } + return kibanaactions.NewAPIClient(&connectorsConfig) +} + const esKey string = "elasticsearch" func newApiClient(d *schema.ResourceData, version string) (*ApiClient, diag.Diagnostics) { @@ -525,12 +554,15 @@ func newApiClient(d *schema.ResourceData, version string) (*ApiClient, diag.Diag alertingClient := buildAlertingClient(baseConfig, kibanaConfig) + actionConnectorClient := buildActionConnectorClient(baseConfig, kibanaConfig) + return &ApiClient{ elasticsearch: esClient, elasticsearchClusterInfo: nil, kibana: kibanaClient, kibanaConfig: kibanaConfig, alerting: alertingClient.AlertingApi, + actionConnectors: actionConnectorClient.ConnectorsApi, version: version, }, diags } diff --git a/internal/clients/kibana/action_connector.go b/internal/clients/kibana/action_connector.go new file mode 100644 index 000000000..871fe3dea --- /dev/null +++ b/internal/clients/kibana/action_connector.go @@ -0,0 +1,789 @@ +package kibana + +import ( + "context" + "fmt" + "net/http" + + "github.com/elastic/terraform-provider-elasticstack/generated/kibanaactions" + "github.com/elastic/terraform-provider-elasticstack/internal/clients" + "github.com/elastic/terraform-provider-elasticstack/internal/models" + "github.com/elastic/terraform-provider-elasticstack/internal/utils" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" +) + +func CreateActionConnector(ctx context.Context, apiClient *clients.ApiClient, connectorOld models.KibanaActionConnector) (string, diag.Diagnostics) { + client, ctxWithAuth, err := apiClient.GetKibanaActionConnectorClient(ctx) + if err != nil { + return "", diag.FromErr(err) + } + + createProperties, err := createConnectorRequestBodyProperties(connectorOld) + if err != nil { + return "", diag.FromErr(err) + } + + req := client.CreateConnector(ctxWithAuth, connectorOld.SpaceID).KbnXsrf("true").CreateConnectorRequestBodyProperties(createProperties) + + responseProperties, httpRes, err := req.Execute() + if err != nil && httpRes == nil { + return "", diag.FromErr(err) + } + defer httpRes.Body.Close() + + if diags := utils.CheckHttpError(httpRes, "Unabled to create action connector"); diags.HasError() { + return "", diag.FromErr(err) + } + + connectorNew, err := actionConnectorToModel(connectorOld.SpaceID, responseProperties) + if err != nil { + return "", diag.FromErr(err) + } + + return connectorNew.ConnectorID, nil +} + +func UpdateActionConnector(ctx context.Context, apiClient *clients.ApiClient, connectorOld models.KibanaActionConnector) (string, diag.Diagnostics) { + client, ctxWithAuth, err := apiClient.GetKibanaActionConnectorClient(ctx) + if err != nil { + return "", diag.FromErr(err) + } + + updateProperties, err := updateConnectorRequestBodyProperties(connectorOld) + if err != nil { + return "", diag.FromErr(err) + } + + req := client.UpdateConnector(ctxWithAuth, connectorOld.ConnectorID, connectorOld.SpaceID).KbnXsrf("true").UpdateConnectorRequestBodyProperties(updateProperties) + + responseProperties, httpRes, err := req.Execute() + if err != nil && httpRes == nil { + return "", diag.FromErr(err) + } + defer httpRes.Body.Close() + + if diags := utils.CheckHttpError(httpRes, "Unabled to update action connector"); diags.HasError() { + return "", diags + } + + connectorNew, err := actionConnectorToModel(connectorOld.SpaceID, responseProperties) + if err != nil { + return "", diag.FromErr(err) + } + + return connectorNew.ConnectorID, nil +} + +func GetActionConnector(ctx context.Context, apiClient *clients.ApiClient, connectorID, spaceID string) (*models.KibanaActionConnector, diag.Diagnostics) { + client, ctxWithAuth, err := apiClient.GetKibanaActionConnectorClient(ctx) + if err != nil { + return nil, diag.FromErr(err) + } + + req := client.GetConnector(ctxWithAuth, connectorID, spaceID) + + properties, res, err := req.Execute() + if err != nil && res == nil { + return nil, diag.FromErr(err) + } + defer res.Body.Close() + + if res.StatusCode == http.StatusNotFound { + return nil, nil + } + + if diags := utils.CheckHttpError(res, "Unabled to get action connector"); diags.HasError() { + return nil, diags + } + + connector, err := actionConnectorToModel(spaceID, properties) + if err != nil { + return nil, diag.FromErr(err) + } + + return connector, nil +} + +func DeleteActionConnector(ctx context.Context, apiClient *clients.ApiClient, connectorID string, spaceID string) diag.Diagnostics { + client, ctxWithAuth, err := apiClient.GetKibanaActionConnectorClient(ctx) + if err != nil { + return diag.FromErr(err) + } + + req := client.DeleteConnector(ctxWithAuth, connectorID, spaceID).KbnXsrf("true") + res, err := req.Execute() + if err != nil && res == nil { + return diag.FromErr(err) + } + defer res.Body.Close() + + return utils.CheckHttpError(res, "Unabled to delete action connector") +} + +func createConnectorRequestBodyProperties(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { + connectorType, err := kibanaactions.NewConnectorTypesFromValue(connector.ConnectorTypeID) + if err != nil { + return kibanaactions.CreateConnectorRequestBodyProperties{}, err + } + + switch *connectorType { + case kibanaactions.CASES_WEBHOOK: + return createConnectorRequestCasesWebhook(connector) + // case kibanaactions.EMAIL: + // return createConnectorRequestEmail(connector) + case kibanaactions.INDEX: + return createConnectorRequestIndex(connector) + case kibanaactions.JIRA: + return createConnectorRequestJira(connector) + case kibanaactions.OPSGENIE: + return createConnectorRequestOpsgenie(connector) + // case kibanaactions.PAGERDUTY: + // return createConnectorRequestPagerduty(connector) + case kibanaactions.RESILIENT: + return createConnectorRequestResilient(connector) + case kibanaactions.SERVICENOW: + return createConnectorRequestServicenow(connector) + case kibanaactions.SERVICENOW_ITOM: + return createConnectorRequestServicenowItom(connector) + // case kibanaactions.SERVICENOW_SIR: + // return createConnectorRequestServicenowSir(connector) + case kibanaactions.SERVER_LOG: + return createConnectorRequestServerLog(connector) + // case kibanaactions.SLACK: + // return createConnectorRequestSlack(connector) + case kibanaactions.SWIMLANE: + return createConnectorRequestSwimlane(connector) + // case kibanaactions.TEAMS: + // return createConnectorRequestTeams(connector) + // case kibanaactions.TINES: + // return createConnectorRequestTines(connector) + // case kibanaactions.WEBHOOK: + // return createConnectorRequestWebhook(connector) + // case kibanaactions.XMATTERS: + // return createConnectorRequestXmatters(connector) + } + + return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("unknown connector type [%s]", connector.ConnectorTypeID) +} + +func updateConnectorRequestBodyProperties(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { + connectorType, err := kibanaactions.NewConnectorTypesFromValue(connector.ConnectorTypeID) + if err != nil { + return kibanaactions.UpdateConnectorRequestBodyProperties{}, err + } + + switch *connectorType { + case kibanaactions.CASES_WEBHOOK: + return updateConnectorRequestCasesWebhook(connector) + // case kibanaactions.EMAIL: + // return updateConnectorRequestEmail(connector) + case kibanaactions.INDEX: + return updateConnectorRequestIndex(connector) + case kibanaactions.JIRA: + return updateConnectorRequestJira(connector) + case kibanaactions.OPSGENIE: + return updateConnectorRequestOpsgenie(connector) + // case kibanaactions.PAGERDUTY: + // return updateConnectorRequestPagerduty(connector) + case kibanaactions.RESILIENT: + return updateConnectorRequestResilient(connector) + case kibanaactions.SERVICENOW: + return updateConnectorRequestServicenow(connector) + case kibanaactions.SERVICENOW_ITOM: + return updateConnectorRequestServicenowItom(connector) + // case kibanaactions.SERVICENOW_SIR: + // return updateConnectorRequestServicenowSir(connector) + case kibanaactions.SERVER_LOG: + return updateConnectorRequestServerLog(connector) + // case kibanaactions.SLACK: + // return updateConnectorRequestSlack(connector) + case kibanaactions.SWIMLANE: + return updateConnectorRequestSwimlane(connector) + // case kibanaactions.TEAMS: + // return updateConnectorRequestTeams(connector) + // case kibanaactions.TINES: + // return updateConnectorRequestTines(connector) + // case kibanaactions.WEBHOOK: + // return updateConnectorRequestWebhook(connector) + // case kibanaactions.XMATTERS: + // return updateConnectorRequestXmatters(connector) + } + + return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("unknown connector type [%s]", connector.ConnectorTypeID) +} + +func createConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { + prefixError := "failed to compose create connector request for CasesWebhook" + + config := kibanaactions.NullableConfigPropertiesCasesWebhook{} + if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) + } + + secrets := kibanaactions.NullableSecretsPropertiesCasesWebhook{} + if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { + return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) + } + + c := kibanaactions.CreateConnectorRequestCasesWebhook{ + ConnectorTypeId: connector.ConnectorTypeID, + Name: connector.Name, + Config: *config.Get(), + Secrets: secrets.Get(), + } + + return kibanaactions.CreateConnectorRequestCasesWebhookAsCreateConnectorRequestBodyProperties(&c), nil +} + +// func createConnectorRequestEmail(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose create connector request for Email" + +// var config map[string]interface{} +// if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } + +// var secrets map[string]interface{} +// if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } + +// c := kibanaactions.CreateConnectorRequestEmail{ +// ConnectorTypeId: connector.ConnectorTypeID, +// Name: connector.Name, +// Config: config, +// Secrets: secrets, +// } + +// return kibanaactions.CreateConnectorRequestEmailAsCreateConnectorRequestBodyProperties(&c), nil +// } + +func createConnectorRequestIndex(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { + prefixError := "failed to compose create connector request for Index" + + config := kibanaactions.NullableConfigPropertiesIndex{} + if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) + } + + c := kibanaactions.CreateConnectorRequestIndex{ + ConnectorTypeId: connector.ConnectorTypeID, + Name: connector.Name, + Config: *config.Get(), + } + + return kibanaactions.CreateConnectorRequestIndexAsCreateConnectorRequestBodyProperties(&c), nil +} + +func createConnectorRequestJira(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { + prefixError := "failed to compose create connector request for Jira" + + config := kibanaactions.NullableConfigPropertiesJira{} + if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) + } + + secrets := kibanaactions.NullableSecretsPropertiesJira{} + if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { + return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) + } + + c := kibanaactions.CreateConnectorRequestJira{ + ConnectorTypeId: connector.ConnectorTypeID, + Name: connector.Name, + Config: *config.Get(), + Secrets: *secrets.Get(), + } + + return kibanaactions.CreateConnectorRequestJiraAsCreateConnectorRequestBodyProperties(&c), nil +} + +func createConnectorRequestOpsgenie(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { + prefixError := "failed to compose create connector request for Opsgenie" + + config := kibanaactions.NullableConfigPropertiesOpsgenie{} + if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) + } + + secrets := kibanaactions.NullableSecretsPropertiesOpsgenie{} + if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { + return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) + } + + c := kibanaactions.CreateConnectorRequestOpsgenie{ + ConnectorTypeId: connector.ConnectorTypeID, + Name: connector.Name, + Config: *config.Get(), + Secrets: *secrets.Get(), + } + + return kibanaactions.CreateConnectorRequestOpsgenieAsCreateConnectorRequestBodyProperties(&c), nil +} + +// func createConnectorRequestPagerduty(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose create connector request for PagerDuty" + +// var config map[string]interface{} +// if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } + +// var secrets map[string]interface{} +// if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } + +// c := kibanaactions.CreateConnectorRequestPagerduty{ +// ConnectorTypeId: connector.ConnectorTypeID, +// Name: connector.Name, +// Config: config, +// Secrets: secrets, +// } + +// return kibanaactions.CreateConnectorRequestPagerdutyAsCreateConnectorRequestBodyProperties(&c), nil +// } + +func createConnectorRequestResilient(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { + prefixError := "failed to compose create connector request for Resilient" + + config := kibanaactions.NullableConfigPropertiesResilient{} + if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) + } + + secrets := kibanaactions.NullableSecretsPropertiesResilient{} + if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { + return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) + } + + c := kibanaactions.CreateConnectorRequestResilient{ + ConnectorTypeId: connector.ConnectorTypeID, + Name: connector.Name, + Config: *config.Get(), + Secrets: *secrets.Get(), + } + + return kibanaactions.CreateConnectorRequestResilientAsCreateConnectorRequestBodyProperties(&c), nil +} + +func createConnectorRequestServicenow(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { + prefixError := "failed to compose create connector request for Servicenow" + + config := kibanaactions.NullableConfigPropertiesServicenow{} + if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) + } + + secrets := kibanaactions.NullableSecretsPropertiesServicenow{} + if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { + return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) + } + + c := kibanaactions.CreateConnectorRequestServicenow{ + ConnectorTypeId: connector.ConnectorTypeID, + Name: connector.Name, + Config: *config.Get(), + Secrets: *secrets.Get(), + } + + return kibanaactions.CreateConnectorRequestServicenowAsCreateConnectorRequestBodyProperties(&c), nil +} + +func createConnectorRequestServicenowItom(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { + prefixError := "failed to compose create connector request for ServicenowItom" + + config := kibanaactions.NullableConfigPropertiesServicenowItom{} + if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) + } + + secrets := kibanaactions.NullableSecretsPropertiesServicenow{} + if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { + return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) + } + + c := kibanaactions.CreateConnectorRequestServicenowItom{ + ConnectorTypeId: connector.ConnectorTypeID, + Name: connector.Name, + Config: *config.Get(), + Secrets: *secrets.Get(), + } + + return kibanaactions.CreateConnectorRequestServicenowItomAsCreateConnectorRequestBodyProperties(&c), nil +} + +// func createConnectorRequestServicenowSir(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose create connector request for ServicenowSir" + +// config := kibanaactions.NullableConfigPropertiesServicenow{} +// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } + +// secrets := kibanaactions.NullableSecretsPropertiesServicenow{} +// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } + +// c := kibanaactions.CreateConnectorRequestServicenowSir{ +// ConnectorTypeId: connector.ConnectorTypeID, +// Name: connector.Name, +// Config: *config.Get(), +// Secrets: *secrets.Get(), +// } + +// return kibanaactions.CreateConnectorRequestServicenowSirAsCreateConnectorRequestBodyProperties(&c), nil +// } + +func createConnectorRequestServerLog(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { + c := kibanaactions.CreateConnectorRequestServerlog{ + ConnectorTypeId: connector.ConnectorTypeID, + Name: connector.Name, + } + + return kibanaactions.CreateConnectorRequestServerlogAsCreateConnectorRequestBodyProperties(&c), nil +} + +// func createConnectorRequestSlack(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose create connector request for Slack" + +// var secrets map[string]interface{} +// if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } + +// c := kibanaactions.CreateConnectorRequestSlack{ +// ConnectorTypeId: connector.ConnectorTypeID, +// Name: connector.Name, +// Secrets: secrets, +// } + +// return kibanaactions.CreateConnectorRequestSlackAsCreateConnectorRequestBodyProperties(&c), nil +// } + +func createConnectorRequestSwimlane(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { + prefixError := "failed to compose create connector request for Swimlane" + + config := kibanaactions.NullableConfigPropertiesSwimlane{} + if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) + } + + secrets := kibanaactions.NullableSecretsPropertiesSwimlane{} + if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { + return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) + } + + c := kibanaactions.CreateConnectorRequestSwimlane{ + ConnectorTypeId: connector.ConnectorTypeID, + Name: connector.Name, + Config: *config.Get(), + Secrets: *secrets.Get(), + } + + return kibanaactions.CreateConnectorRequestSwimlaneAsCreateConnectorRequestBodyProperties(&c), nil +} + +// func createConnectorRequestTeams(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose create connector request for Teams" + +// var secrets map[string]interface{} +// if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } + +// c := kibanaactions.CreateConnectorRequestTeams{ +// ConnectorTypeId: connector.ConnectorTypeID, +// Name: connector.Name, +// Secrets: secrets, +// } + +// return kibanaactions.CreateConnectorRequestTeamsAsCreateConnectorRequestBodyProperties(&c), nil +// } + +// func createConnectorRequestTines(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose create connector request for Tines" + +// var config map[string]interface{} +// if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } + +// var secrets map[string]interface{} +// if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } + +// c := kibanaactions.CreateConnectorRequestTines{ +// ConnectorTypeId: connector.ConnectorTypeID, +// Name: connector.Name, +// Config: config, +// Secrets: secrets, +// } + +// return kibanaactions.CreateConnectorRequestTinesAsCreateConnectorRequestBodyProperties(&c), nil +// } + +// func createConnectorRequestWebhook(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose create connector request for Webhook" + +// var config map[string]interface{} +// if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } + +// var secrets map[string]interface{} +// if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } + +// c := kibanaactions.CreateConnectorRequestWebhook{ +// ConnectorTypeId: connector.ConnectorTypeID, +// Name: connector.Name, +// Config: config, +// Secrets: secrets, +// } + +// return kibanaactions.CreateConnectorRequestWebhookAsCreateConnectorRequestBodyProperties(&c), nil +// } + +// func createConnectorRequestXmatters(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose create connector request for Xmatters" + +// var config map[string]interface{} +// if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } + +// var secrets map[string]interface{} +// if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } + +// c := kibanaactions.CreateConnectorRequestXmatters{ +// ConnectorTypeId: connector.ConnectorTypeID, +// Name: connector.Name, +// Config: config, +// Secrets: secrets, +// } + +// return kibanaactions.CreateConnectorRequestXmattersAsCreateConnectorRequestBodyProperties(&c), nil +// } + +func updateConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { + prefixError := "failed to compose update connector request for CasesWebhook" + + nullableConfig := kibanaactions.NullableConfigPropertiesCasesWebhook{} + if err := nullableConfig.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) + } + + nullableSecrets := kibanaactions.NullableSecretsPropertiesCasesWebhook{} + if err := nullableSecrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { + return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) + } + + c := kibanaactions.UpdateConnectorRequestCasesWebhook{ + Name: connector.Name, + Config: *nullableConfig.Get(), + Secrets: nullableSecrets.Get(), + } + + return kibanaactions.UpdateConnectorRequestCasesWebhookAsUpdateConnectorRequestBodyProperties(&c), nil +} + +func updateConnectorRequestIndex(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { + prefixError := "failed to compose update connector request for Index" + + config := kibanaactions.NullableConfigPropertiesIndex{} + if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) + } + + c := kibanaactions.UpdateConnectorRequestIndex{ + Name: connector.Name, + Config: *config.Get(), + } + + return kibanaactions.UpdateConnectorRequestIndexAsUpdateConnectorRequestBodyProperties(&c), nil +} + +func updateConnectorRequestJira(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { + prefixError := "failed to compose update connector request for Jira" + + config := kibanaactions.NullableConfigPropertiesJira{} + if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) + } + + secrets := kibanaactions.NullableSecretsPropertiesJira{} + if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { + return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) + } + + c := kibanaactions.UpdateConnectorRequestJira{ + Name: connector.Name, + Config: *config.Get(), + Secrets: *secrets.Get(), + } + + return kibanaactions.UpdateConnectorRequestJiraAsUpdateConnectorRequestBodyProperties(&c), nil +} + +func updateConnectorRequestOpsgenie(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { + prefixError := "failed to compose update connector request for Opsgenie" + + config := kibanaactions.NullableConfigPropertiesOpsgenie{} + if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) + } + + secrets := kibanaactions.NullableSecretsPropertiesOpsgenie{} + if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { + return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) + } + + c := kibanaactions.UpdateConnectorRequestOpsgenie{ + Name: connector.Name, + Config: *config.Get(), + Secrets: *secrets.Get(), + } + + return kibanaactions.UpdateConnectorRequestOpsgenieAsUpdateConnectorRequestBodyProperties(&c), nil +} + +func updateConnectorRequestResilient(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { + prefixError := "failed to compose update connector request for Resilient" + + config := kibanaactions.NullableConfigPropertiesResilient{} + if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) + } + + secrets := kibanaactions.NullableSecretsPropertiesResilient{} + if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { + return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) + } + + c := kibanaactions.UpdateConnectorRequestResilient{ + Name: connector.Name, + Config: *config.Get(), + Secrets: *secrets.Get(), + } + + return kibanaactions.UpdateConnectorRequestResilientAsUpdateConnectorRequestBodyProperties(&c), nil +} + +func updateConnectorRequestServicenow(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { + prefixError := "failed to compose update connector request for Servicenow" + + config := kibanaactions.NullableConfigPropertiesServicenow{} + if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) + } + + secrets := kibanaactions.NullableSecretsPropertiesServicenow{} + if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { + return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) + } + + c := kibanaactions.UpdateConnectorRequestServicenow{ + Name: connector.Name, + Config: *config.Get(), + Secrets: *secrets.Get(), + } + + return kibanaactions.UpdateConnectorRequestServicenowAsUpdateConnectorRequestBodyProperties(&c), nil +} + +func updateConnectorRequestServicenowItom(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { + prefixError := "failed to compose update connector request for ServicenowItom" + + config := kibanaactions.NullableConfigPropertiesServicenowItom{} + if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) + } + + secrets := kibanaactions.NullableSecretsPropertiesServicenow{} + if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { + return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) + } + + c := kibanaactions.UpdateConnectorRequestServicenowItom{ + Name: connector.Name, + Config: *config.Get(), + Secrets: *secrets.Get(), + } + + return kibanaactions.UpdateConnectorRequestServicenowItomAsUpdateConnectorRequestBodyProperties(&c), nil +} + +func updateConnectorRequestServerLog(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { + c := kibanaactions.UpdateConnectorRequestServerlog{ + Name: connector.Name, + } + + return kibanaactions.UpdateConnectorRequestServerlogAsUpdateConnectorRequestBodyProperties(&c), nil +} + +func updateConnectorRequestSwimlane(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { + prefixError := "failed to compose update connector request for Swimlane" + + config := kibanaactions.NullableConfigPropertiesSwimlane{} + if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) + } + + secrets := kibanaactions.NullableSecretsPropertiesSwimlane{} + if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { + return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) + } + + c := kibanaactions.UpdateConnectorRequestSwimlane{ + Name: connector.Name, + Config: *config.Get(), + Secrets: *secrets.Get(), + } + + return kibanaactions.UpdateConnectorRequestSwimlaneAsUpdateConnectorRequestBodyProperties(&c), nil +} + +func actionConnectorToModel(spaceID string, properties *kibanaactions.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + instance := properties.GetActualInstance() + commonProps, ok := instance.(connectorCommon) + if !ok { + return nil, fmt.Errorf("failed parse common connector properties") + } + name, ok := commonProps.GetNameOk() + if !ok { + return nil, fmt.Errorf("failed parse connector name") + } + typeId, ok := commonProps.GetNameOk() + if !ok { + return nil, fmt.Errorf("failed parse connector type id") + } + id, ok := commonProps.GetIdOk() + if !ok { + return nil, fmt.Errorf("failed parse connector id") + } + connector := models.KibanaActionConnector{ + ConnectorID: *id, + SpaceID: spaceID, + Name: *name, + ConnectorTypeID: *typeId, + IsDeprecated: commonProps.GetIsDeprecated(), + IsMissingSecrets: commonProps.GetIsMissingSecrets(), + IsPreconfigured: commonProps.GetIsPreconfigured(), + } + return &connector, nil +} + +type connectorCommon interface { + GetIdOk() (*string, bool) + GetConnectorTypeIdOk() (*string, bool) + GetNameOk() (*string, bool) + GetIsDeprecated() bool + GetIsMissingSecrets() bool + GetIsPreconfigured() bool +} diff --git a/internal/kibana/action_connector.go b/internal/kibana/action_connector.go new file mode 100644 index 000000000..31761088e --- /dev/null +++ b/internal/kibana/action_connector.go @@ -0,0 +1,238 @@ +package kibana + +import ( + "context" + + "github.com/elastic/terraform-provider-elasticstack/internal/clients" + "github.com/elastic/terraform-provider-elasticstack/internal/clients/kibana" + "github.com/elastic/terraform-provider-elasticstack/internal/models" + "github.com/elastic/terraform-provider-elasticstack/internal/utils" + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" +) + +func ResourceActionConnector() *schema.Resource { + apikeySchema := map[string]*schema.Schema{ + "connector_id": { + Description: "A UUID v1 or v4 to use instead of a randomly generated ID.", + Type: schema.TypeString, + Computed: true, + Optional: true, + ForceNew: true, + }, + "space_id": { + Description: "An identifier for the space. If space_id is not provided, the default space is used.", + Type: schema.TypeString, + Optional: true, + Default: "default", + ForceNew: true, + }, + "name": { + Description: "The name of the connector. While this name does not have to be unique, a distinctive name can help you identify a connector.", + Type: schema.TypeString, + Required: true, + }, + "connector_type_id": { + Description: "The ID of the connector type, e.g. `.index`.", + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "config": { + Description: "The configuration for the connector. Configuration properties vary depending on the connector type.", + Type: schema.TypeString, + Required: true, + DiffSuppressFunc: utils.DiffJsonSuppress, + ValidateFunc: validation.StringIsJSON, + }, + "secrets": { + Description: "The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type.", + Type: schema.TypeString, + Required: true, + DiffSuppressFunc: utils.DiffJsonSuppress, + ValidateFunc: validation.StringIsJSON, + }, + "is_deprecated": { + Description: "Indicates whether the connector type is deprecated.", + Type: schema.TypeBool, + Computed: true, + }, + "is_missing_secrets": { + Description: "Indicates whether secrets are missing for the connector.", + Type: schema.TypeBool, + Computed: true, + }, + "is_preconfigured": { + Description: "Indicates whether it is a preconfigured connector.", + Type: schema.TypeBool, + Computed: true, + }, + } + + return &schema.Resource{ + Description: "Creates a Kibana action connector. See https://www.elastic.co/guide/en/kibana/8.7/action-types.html", + + CreateContext: resourceConnectorCreate, + UpdateContext: resourceConnectorUpdate, + ReadContext: resourceConnectorRead, + DeleteContext: resourceConnectorDelete, + + Importer: &schema.ResourceImporter{ + StateContext: schema.ImportStatePassthroughContext, + }, + + Schema: apikeySchema, + } +} + +func resourceConnectorCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + client, diags := clients.NewApiClient(d, meta) + if diags.HasError() { + return diags + } + + connectorOld, diags := expandActionConnector(d) + if diags.HasError() { + return diags + } + + connectorID, diags := kibana.CreateActionConnector(ctx, client, connectorOld) + + if diags.HasError() { + return diags + } + + compositeID := &clients.CompositeId{ClusterId: connectorOld.SpaceID, ResourceId: connectorID} + d.SetId(compositeID.String()) + + return resourceConnectorRead(ctx, d, meta) +} + +func resourceConnectorUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + client, diags := clients.NewApiClient(d, meta) + if diags.HasError() { + return diags + } + + connectorOld, diags := expandActionConnector(d) + if diags.HasError() { + return diags + } + + compositeId, diags := clients.CompositeIdFromStr(d.Id()) + if diags.HasError() { + return diags + } + connectorOld.ConnectorID = compositeId.ResourceId + + connectorID, diags := kibana.UpdateActionConnector(ctx, client, connectorOld) + + if diags.HasError() { + return diags + } + + compositeID := &clients.CompositeId{ClusterId: connectorOld.SpaceID, ResourceId: connectorID} + d.SetId(compositeID.String()) + + return resourceConnectorRead(ctx, d, meta) +} + +func resourceConnectorRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + client, diags := clients.NewApiClient(d, meta) + if diags.HasError() { + return diags + } + + compositeID, diags := clients.CompositeIdFromStr(d.Id()) + if diags.HasError() { + return diags + } + connectorID := compositeID.ResourceId + spaceId := compositeID.ClusterId + + connector, diags := kibana.GetActionConnector(ctx, client, connectorID, spaceId) + if connector == nil && diags == nil { + d.SetId("") + return diags + } + if diags.HasError() { + return diags + } + + return flattenActionConnector(connector, d) +} + +func resourceConnectorDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + client, diags := clients.NewApiClient(d, meta) + if diags.HasError() { + return diags + } + + compositeID, diags := clients.CompositeIdFromStr(d.Id()) + if diags.HasError() { + return diags + } + + spaceId := d.Get("space_id").(string) + + if diags := kibana.DeleteActionConnector(ctx, client, compositeID.ResourceId, spaceId); diags.HasError() { + return diags + } + + d.SetId("") + return nil +} + +// func jsonStrToMap(d *schema.ResourceData, fieldName string, diags *diag.Diagnostics) map[string]interface{} { +// jsonStr := d.Get(fieldName) +// res := map[string]interface{}{} +// if err := json.NewDecoder(strings.NewReader(jsonStr.(string))).Decode(&res); err != nil { +// *diags = append(*diags, diag.FromErr(err)...) +// } +// return res +// } + +func expandActionConnector(d *schema.ResourceData) (models.KibanaActionConnector, diag.Diagnostics) { + var diags diag.Diagnostics + + connector := models.KibanaActionConnector{ + SpaceID: d.Get("space_id").(string), + Name: d.Get("name").(string), + ConnectorTypeID: d.Get("connector_type_id").(string), + } + + connector.ConfigJSON = d.Get("config").(string) + connector.SecretsJSON = d.Get("secrets").(string) + + return connector, diags +} + +func flattenActionConnector(connector *models.KibanaActionConnector, d *schema.ResourceData) diag.Diagnostics { + if err := d.Set("connector_id", connector.ConnectorID); err != nil { + return diag.FromErr(err) + } + if err := d.Set("space_id", connector.SpaceID); err != nil { + return diag.FromErr(err) + } + if err := d.Set("name", connector.Name); err != nil { + return diag.FromErr(err) + } + if err := d.Set("connector_type_id", connector.ConnectorTypeID); err != nil { + return diag.FromErr(err) + } + if err := d.Set("config", connector.ConfigJSON); err != nil { + return diag.FromErr(err) + } + if err := d.Set("is_deprecated", connector.IsDeprecated); err != nil { + return diag.FromErr(err) + } + if err := d.Set("is_missing_secrets", connector.IsMissingSecrets); err != nil { + return diag.FromErr(err) + } + if err := d.Set("is_preconfigured", connector.IsPreconfigured); err != nil { + return diag.FromErr(err) + } + + return nil +} diff --git a/internal/models/action_connector.go b/internal/models/action_connector.go new file mode 100644 index 000000000..031e83a4d --- /dev/null +++ b/internal/models/action_connector.go @@ -0,0 +1,13 @@ +package models + +type KibanaActionConnector struct { + ConnectorID string + SpaceID string + Name string + ConnectorTypeID string + ConfigJSON string + SecretsJSON string + IsDeprecated bool + IsMissingSecrets bool + IsPreconfigured bool +} diff --git a/provider/provider.go b/provider/provider.go index 691a013d9..3d93859da 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -95,8 +95,9 @@ func New(version string) *schema.Provider { "elasticstack_elasticsearch_transform": transform.ResourceTransform(), "elasticstack_elasticsearch_watch": watcher.ResourceWatch(), - "elasticstack_kibana_alerting_rule": kibana.ResourceAlertingRule(), - "elasticstack_kibana_space": kibana.ResourceSpace(), + "elasticstack_kibana_alerting_rule": kibana.ResourceAlertingRule(), + "elasticstack_kibana_space": kibana.ResourceSpace(), + "elasticstack_kibana_action_connector": kibana.ResourceActionConnector(), }, } From e6a8853ea02f932ff37c7d7112132c4e27f6b4c0 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Wed, 12 Apr 2023 18:26:09 +0200 Subject: [PATCH 02/59] Acc test for Kibana action connector --- internal/kibana/action_connector_test.go | 109 +++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 internal/kibana/action_connector_test.go diff --git a/internal/kibana/action_connector_test.go b/internal/kibana/action_connector_test.go new file mode 100644 index 000000000..3c97d0c36 --- /dev/null +++ b/internal/kibana/action_connector_test.go @@ -0,0 +1,109 @@ +package kibana_test + +import ( + "context" + "fmt" + "testing" + + "github.com/elastic/terraform-provider-elasticstack/internal/acctest" + "github.com/elastic/terraform-provider-elasticstack/internal/clients" + "github.com/elastic/terraform-provider-elasticstack/internal/clients/kibana" + "github.com/elastic/terraform-provider-elasticstack/internal/versionutils" + sdkacctest "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" +) + +func TestAccResourceActionConnector(t *testing.T) { + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(t) }, + CheckDestroy: checkResourceActionConnectorDestroy, + ProtoV5ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: testAccResourceActionConnectorCreate(connectorName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "name", connectorName), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "connector_type_id", ".index"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "is_preconfigured", "false"), + ), + }, + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: testAccResourceActionConnectorUpdate(connectorName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "name", fmt.Sprintf("Updated %s", connectorName)), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "connector_type_id", ".index"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "is_preconfigured", "false"), + ), + }, + }, + }) +} + +func testAccResourceActionConnectorCreate(name string) string { + return fmt.Sprintf(` +provider "elasticstack" { + elasticsearch {} + kibana {} +} + +resource "elasticstack_kibana_action_connector" "test_connector" { + name = "%s" + config = jsonencode({ + index = ".kibana" + refresh = true + }) + connector_type_id = ".index" +} + `, name) +} + +func testAccResourceActionConnectorUpdate(name string) string { + return fmt.Sprintf(` +provider "elasticstack" { + elasticsearch {} + kibana {} +} + +resource "elasticstack_kibana_alerting_rule" "test_rule" { + name = "Updated %s" + config = jsonencode({ + index = ".kibana" + refresh = false + }) + connector_type_id = ".index-threshold" +} + `, name) +} + +func checkResourceActionConnectorDestroy(s *terraform.State) error { + client, err := clients.NewAcceptanceTestingClient() + if err != nil { + return err + } + + for _, rs := range s.RootModule().Resources { + if rs.Type != "elasticstack_kibana_action_connector" { + continue + } + compId, _ := clients.CompositeIdFromStr(rs.Primary.ID) + + rule, diags := kibana.GetActionConnector(context.Background(), client, compId.ResourceId, compId.ClusterId) + if diags.HasError() { + return fmt.Errorf("Failed to get action connector: %v", diags) + } + + if rule != nil { + return fmt.Errorf("Action connector (%s) still exists", compId.ResourceId) + } + } + return nil +} From dc54742f997856f0f1deff35f1f6003341f94e2a Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Wed, 12 Apr 2023 18:42:31 +0200 Subject: [PATCH 03/59] make secrets optional --- docs/resources/kibana_action_connector.md | 2 +- internal/kibana/action_connector.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/resources/kibana_action_connector.md b/docs/resources/kibana_action_connector.md index 6843d132f..716ab8d5c 100644 --- a/docs/resources/kibana_action_connector.md +++ b/docs/resources/kibana_action_connector.md @@ -35,11 +35,11 @@ resource "elasticstack_kibana_action_connector" "example" { - `config` (String) The configuration for the connector. Configuration properties vary depending on the connector type. - `connector_type_id` (String) The ID of the connector type, e.g. `.index`. - `name` (String) The name of the connector. While this name does not have to be unique, a distinctive name can help you identify a connector. -- `secrets` (String) The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. ### Optional - `connector_id` (String) A UUID v1 or v4 to use instead of a randomly generated ID. +- `secrets` (String) The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. - `space_id` (String) An identifier for the space. If space_id is not provided, the default space is used. ### Read-Only diff --git a/internal/kibana/action_connector.go b/internal/kibana/action_connector.go index 31761088e..f1ca256f7 100644 --- a/internal/kibana/action_connector.go +++ b/internal/kibana/action_connector.go @@ -49,7 +49,7 @@ func ResourceActionConnector() *schema.Resource { "secrets": { Description: "The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type.", Type: schema.TypeString, - Required: true, + Optional: true, DiffSuppressFunc: utils.DiffJsonSuppress, ValidateFunc: validation.StringIsJSON, }, From 926cb619137f361442e0e7f3a710ab7905cfa203 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 13 Apr 2023 19:12:21 +0200 Subject: [PATCH 04/59] Fixes and improvements --- Makefile | 11 +- internal/clients/api_client.go | 2 +- internal/clients/kibana/action_connector.go | 364 ++++++++++++++++++-- 3 files changed, 341 insertions(+), 36 deletions(-) diff --git a/Makefile b/Makefile index 8d6452b97..a2e1b9f02 100644 --- a/Makefile +++ b/Makefile @@ -67,6 +67,8 @@ retry = until [ $$(if [ -z "$$attempt" ]; then echo -n "0"; else echo -n "$$atte backoff=$$((backoff * 2)); \ done +# To run specific test (e.g. TestAccResourceActionConnector) execute `make docker-testacc TESTARGS='-run ^TestAccResourceActionConnector$$'` +# To enable tracing (or debugging), execute `make docker-testacc TFLOG=TRACE` .PHONY: docker-testacc docker-testacc: docker-elasticsearch docker-kibana ## Run acceptance tests in the docker container @ docker run --rm \ @@ -74,10 +76,11 @@ docker-testacc: docker-elasticsearch docker-kibana ## Run acceptance tests in th -e KIBANA_ENDPOINT="$(KIBANA_ENDPOINT)" \ -e ELASTICSEARCH_USERNAME="$(ELASTICSEARCH_USERNAME)" \ -e ELASTICSEARCH_PASSWORD="$(ELASTICSEARCH_PASSWORD)" \ + -e TF_LOG="$(TF_LOG)" \ --network $(ELASTICSEARCH_NETWORK) \ -w "/provider" \ -v "$(SOURCE_LOCATION):/provider" \ - golang:$(GOVERSION) make testacc + golang:$(GOVERSION) make testacc TESTARGS="$(TESTARGS)" .PHONY: docker-elasticsearch docker-elasticsearch: docker-network ## Start Elasticsearch single node cluster in docker container @@ -124,6 +127,12 @@ docker-network: ## Create a dedicated network for ES and test runs set-kibana-password: ## Sets the ES KIBANA_SYSTEM_USERNAME's password to KIBANA_SYSTEM_PASSWORD. This expects Elasticsearch to be available at localhost:9200 @ $(call retry, 10, curl -X POST -u $(ELASTICSEARCH_USERNAME):$(ELASTICSEARCH_PASSWORD) -H "Content-Type: application/json" http://localhost:9200/_security/user/$(KIBANA_SYSTEM_USERNAME)/_password -d "{\"password\":\"$(KIBANA_SYSTEM_PASSWORD)\"}" | grep -q "^{}") +## TODO +# .PHONY: create-kibana-role +# ## {"elasticsearch":{"cluster":["all"],"indices":[],"run_as":["elastic"]},"kibana":[{"spaces":["*"],"base":[],"feature":{"actions":["all"]}}]} +# create-kibana-role: ## create role for testing kibana action connectors +# @ $(call retry, 10, curl -X PUT -u $(ELASTICSEARCH_USERNAME):$(ELASTICSEARCH_PASSWORD) -H "Content-Type: application/json" http://localhost:5601/api/security/role/test-connectors -d "{\"password\":\"$(KIBANA_SYSTEM_PASSWORD)\"}" | grep -q "^{}") + .PHONY: docker-clean docker-clean: ## Try to remove provisioned nodes and assigned network @ docker rm -f $(ELASTICSEARCH_NAME) $(KIBANA_NAME) || true diff --git a/internal/clients/api_client.go b/internal/clients/api_client.go index c84a71f30..7713f6d8e 100644 --- a/internal/clients/api_client.go +++ b/internal/clients/api_client.go @@ -197,7 +197,7 @@ func (a *ApiClient) GetKibanaActionConnectorClient(ctx context.Context) (kibanaa return nil, nil, errors.New("kibana action connector client not found") } - ctx = context.WithValue(ctx, alerting.ContextBasicAuth, alerting.BasicAuth{ + ctx = context.WithValue(ctx, kibanaactions.ContextBasicAuth, kibanaactions.BasicAuth{ UserName: a.kibanaConfig.Username, Password: a.kibanaConfig.Password, }) diff --git a/internal/clients/kibana/action_connector.go b/internal/clients/kibana/action_connector.go index 871fe3dea..7798bbf5c 100644 --- a/internal/clients/kibana/action_connector.go +++ b/internal/clients/kibana/action_connector.go @@ -2,6 +2,7 @@ package kibana import ( "context" + "encoding/json" "fmt" "net/http" @@ -35,6 +36,10 @@ func CreateActionConnector(ctx context.Context, apiClient *clients.ApiClient, co return "", diag.FromErr(err) } + if err != nil { + return "", diag.FromErr(err) + } + connectorNew, err := actionConnectorToModel(connectorOld.SpaceID, responseProperties) if err != nil { return "", diag.FromErr(err) @@ -751,39 +756,330 @@ func updateConnectorRequestSwimlane(connector models.KibanaActionConnector) (kib func actionConnectorToModel(spaceID string, properties *kibanaactions.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { instance := properties.GetActualInstance() - commonProps, ok := instance.(connectorCommon) - if !ok { - return nil, fmt.Errorf("failed parse common connector properties") - } - name, ok := commonProps.GetNameOk() - if !ok { - return nil, fmt.Errorf("failed parse connector name") - } - typeId, ok := commonProps.GetNameOk() - if !ok { - return nil, fmt.Errorf("failed parse connector type id") - } - id, ok := commonProps.GetIdOk() - if !ok { - return nil, fmt.Errorf("failed parse connector id") - } - connector := models.KibanaActionConnector{ - ConnectorID: *id, - SpaceID: spaceID, - Name: *name, - ConnectorTypeID: *typeId, - IsDeprecated: commonProps.GetIsDeprecated(), - IsMissingSecrets: commonProps.GetIsMissingSecrets(), - IsPreconfigured: commonProps.GetIsPreconfigured(), - } - return &connector, nil -} -type connectorCommon interface { - GetIdOk() (*string, bool) - GetConnectorTypeIdOk() (*string, bool) - GetNameOk() (*string, bool) - GetIsDeprecated() bool - GetIsMissingSecrets() bool - GetIsPreconfigured() bool + switch response := instance.(type) { + + case *kibanaactions.ConnectorResponsePropertiesCasesWebhook: + config, err := response.GetConfig().MarshalJSON() + if err != nil { + return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + } + // return responseToConnector(response, config, spaceID), nil + + connector := models.KibanaActionConnector{ + ConnectorID: response.GetId(), + SpaceID: spaceID, + Name: response.GetName(), + ConnectorTypeID: response.GetConnectorTypeId(), + IsDeprecated: response.GetIsDeprecated(), + IsMissingSecrets: response.GetIsMissingSecrets(), + IsPreconfigured: response.GetIsPreconfigured(), + ConfigJSON: string(config), + } + return &connector, nil + + case *kibanaactions.ConnectorResponsePropertiesEmail: + config, err := json.Marshal(response.GetConfig()) + if err != nil { + return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesEmail - [%w]", err) + } + // return responseToConnector(response, config, spaceID), nil + connector := models.KibanaActionConnector{ + ConnectorID: response.GetId(), + SpaceID: spaceID, + Name: response.GetName(), + ConnectorTypeID: response.GetConnectorTypeId(), + IsDeprecated: response.GetIsDeprecated(), + IsMissingSecrets: response.GetIsMissingSecrets(), + IsPreconfigured: response.GetIsPreconfigured(), + ConfigJSON: string(config), + } + return &connector, nil + + case *kibanaactions.ConnectorResponsePropertiesIndex: + config, err := response.GetConfig().MarshalJSON() + if err != nil { + return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + } + // return responseToConnector(response, config, spaceID), nil + connector := models.KibanaActionConnector{ + ConnectorID: response.GetId(), + SpaceID: spaceID, + Name: response.GetName(), + ConnectorTypeID: response.GetConnectorTypeId(), + IsDeprecated: response.GetIsDeprecated(), + IsMissingSecrets: response.GetIsMissingSecrets(), + IsPreconfigured: response.GetIsPreconfigured(), + ConfigJSON: string(config), + } + return &connector, nil + + case *kibanaactions.ConnectorResponsePropertiesJira: + config, err := response.GetConfig().MarshalJSON() + if err != nil { + return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + } + // return responseToConnector(response, config, spaceID), nil + connector := models.KibanaActionConnector{ + ConnectorID: response.GetId(), + SpaceID: spaceID, + Name: response.GetName(), + ConnectorTypeID: response.GetConnectorTypeId(), + IsDeprecated: response.GetIsDeprecated(), + IsMissingSecrets: response.GetIsMissingSecrets(), + IsPreconfigured: response.GetIsPreconfigured(), + ConfigJSON: string(config), + } + return &connector, nil + + case *kibanaactions.ConnectorResponsePropertiesOpsgenie: + config, err := response.GetConfig().MarshalJSON() + if err != nil { + return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + } + // return responseToConnector(response, config, spaceID), nil + connector := models.KibanaActionConnector{ + ConnectorID: response.GetId(), + SpaceID: spaceID, + Name: response.GetName(), + ConnectorTypeID: response.GetConnectorTypeId(), + IsDeprecated: response.GetIsDeprecated(), + IsMissingSecrets: response.GetIsMissingSecrets(), + IsPreconfigured: response.GetIsPreconfigured(), + ConfigJSON: string(config), + } + return &connector, nil + + case *kibanaactions.ConnectorResponsePropertiesPagerduty: + config, err := json.Marshal(response.GetConfig()) + if err != nil { + return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + } + // return responseToConnector(response, config, spaceID), nil + connector := models.KibanaActionConnector{ + ConnectorID: response.GetId(), + SpaceID: spaceID, + Name: response.GetName(), + ConnectorTypeID: response.GetConnectorTypeId(), + IsDeprecated: response.GetIsDeprecated(), + IsMissingSecrets: response.GetIsMissingSecrets(), + IsPreconfigured: response.GetIsPreconfigured(), + ConfigJSON: string(config), + } + return &connector, nil + + case *kibanaactions.ConnectorResponsePropertiesResilient: + config, err := response.GetConfig().MarshalJSON() + if err != nil { + return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + } + // return responseToConnector(response, config, spaceID), nil + connector := models.KibanaActionConnector{ + ConnectorID: response.GetId(), + SpaceID: spaceID, + Name: response.GetName(), + ConnectorTypeID: response.GetConnectorTypeId(), + IsDeprecated: response.GetIsDeprecated(), + IsMissingSecrets: response.GetIsMissingSecrets(), + IsPreconfigured: response.GetIsPreconfigured(), + ConfigJSON: string(config), + } + return &connector, nil + + case *kibanaactions.ConnectorResponsePropertiesServerlog: + config, err := json.Marshal(response.GetConfig()) + if err != nil { + return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + } + // return responseToConnector(response, config, spaceID), nil + connector := models.KibanaActionConnector{ + ConnectorID: response.GetId(), + SpaceID: spaceID, + Name: response.GetName(), + ConnectorTypeID: response.GetConnectorTypeId(), + IsDeprecated: response.GetIsDeprecated(), + IsMissingSecrets: response.GetIsMissingSecrets(), + IsPreconfigured: response.GetIsPreconfigured(), + ConfigJSON: string(config), + } + return &connector, nil + + case *kibanaactions.ConnectorResponsePropertiesServicenow: + config, err := response.GetConfig().MarshalJSON() + if err != nil { + return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + } + // return responseToConnector(response, config, spaceID), nil + connector := models.KibanaActionConnector{ + ConnectorID: response.GetId(), + SpaceID: spaceID, + Name: response.GetName(), + ConnectorTypeID: response.GetConnectorTypeId(), + IsDeprecated: response.GetIsDeprecated(), + IsMissingSecrets: response.GetIsMissingSecrets(), + IsPreconfigured: response.GetIsPreconfigured(), + ConfigJSON: string(config), + } + return &connector, nil + + case *kibanaactions.ConnectorResponsePropertiesServicenowItom: + config, err := response.GetConfig().MarshalJSON() + if err != nil { + return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + } + // return responseToConnector(response, config, spaceID), nil + connector := models.KibanaActionConnector{ + ConnectorID: response.GetId(), + SpaceID: spaceID, + Name: response.GetName(), + ConnectorTypeID: response.GetConnectorTypeId(), + IsDeprecated: response.GetIsDeprecated(), + IsMissingSecrets: response.GetIsMissingSecrets(), + IsPreconfigured: response.GetIsPreconfigured(), + ConfigJSON: string(config), + } + return &connector, nil + + case *kibanaactions.ConnectorResponsePropertiesServicenowSir: + config, err := response.GetConfig().MarshalJSON() + if err != nil { + return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + } + // return responseToConnector(response, config, spaceID), nil + connector := models.KibanaActionConnector{ + ConnectorID: response.GetId(), + SpaceID: spaceID, + Name: response.GetName(), + ConnectorTypeID: response.GetConnectorTypeId(), + IsDeprecated: response.GetIsDeprecated(), + IsMissingSecrets: response.GetIsMissingSecrets(), + IsPreconfigured: response.GetIsPreconfigured(), + ConfigJSON: string(config), + } + return &connector, nil + + case *kibanaactions.ConnectorResponsePropertiesSlack: + // return responseToConnector(response, config, spaceID), nil + connector := models.KibanaActionConnector{ + ConnectorID: response.GetId(), + SpaceID: spaceID, + Name: response.GetName(), + ConnectorTypeID: response.GetConnectorTypeId(), + IsDeprecated: response.GetIsDeprecated(), + IsMissingSecrets: response.GetIsMissingSecrets(), + IsPreconfigured: response.GetIsPreconfigured(), + } + return &connector, nil + + case *kibanaactions.ConnectorResponsePropertiesSwimlane: + config, err := response.GetConfig().MarshalJSON() + if err != nil { + return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + } + // return responseToConnector(response, config, spaceID), nil + connector := models.KibanaActionConnector{ + ConnectorID: response.GetId(), + SpaceID: spaceID, + Name: response.GetName(), + ConnectorTypeID: response.GetConnectorTypeId(), + IsDeprecated: response.GetIsDeprecated(), + IsMissingSecrets: response.GetIsMissingSecrets(), + IsPreconfigured: response.GetIsPreconfigured(), + ConfigJSON: string(config), + } + return &connector, nil + + case *kibanaactions.ConnectorResponsePropertiesTeams: + // return responseToConnector(response, config, spaceID), nil + connector := models.KibanaActionConnector{ + ConnectorID: response.GetId(), + SpaceID: spaceID, + Name: response.GetName(), + ConnectorTypeID: response.GetConnectorTypeId(), + IsDeprecated: response.GetIsDeprecated(), + IsMissingSecrets: response.GetIsMissingSecrets(), + IsPreconfigured: response.GetIsPreconfigured(), + } + return &connector, nil + + case *kibanaactions.ConnectorResponsePropertiesTines: + config, err := json.Marshal(response.GetConfig()) + if err != nil { + return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + } + // return responseToConnector(response, config, spaceID), nil + connector := models.KibanaActionConnector{ + ConnectorID: response.GetId(), + SpaceID: spaceID, + Name: response.GetName(), + ConnectorTypeID: response.GetConnectorTypeId(), + IsDeprecated: response.GetIsDeprecated(), + IsMissingSecrets: response.GetIsMissingSecrets(), + IsPreconfigured: response.GetIsPreconfigured(), + ConfigJSON: string(config), + } + return &connector, nil + + case *kibanaactions.ConnectorResponsePropertiesWebhook: + config, err := json.Marshal(response.GetConfig()) + if err != nil { + return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + } + // return responseToConnector(response, config, spaceID), nil + connector := models.KibanaActionConnector{ + ConnectorID: response.GetId(), + SpaceID: spaceID, + Name: response.GetName(), + ConnectorTypeID: response.GetConnectorTypeId(), + IsDeprecated: response.GetIsDeprecated(), + IsMissingSecrets: response.GetIsMissingSecrets(), + IsPreconfigured: response.GetIsPreconfigured(), + ConfigJSON: string(config), + } + return &connector, nil + + case *kibanaactions.ConnectorResponsePropertiesXmatters: + config, err := json.Marshal(response.GetConfig()) + if err != nil { + return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + } + // return responseToConnector(response, config, spaceID), nil + connector := models.KibanaActionConnector{ + ConnectorID: response.GetId(), + SpaceID: spaceID, + Name: response.GetName(), + ConnectorTypeID: response.GetConnectorTypeId(), + IsDeprecated: response.GetIsDeprecated(), + IsMissingSecrets: response.GetIsMissingSecrets(), + IsPreconfigured: response.GetIsPreconfigured(), + ConfigJSON: string(config), + } + return &connector, nil + } + + return nil, fmt.Errorf("unknown connector type [%+v]", properties) } + +// func responseToConnector[T responseType](response T, config []byte, spaceID string) *models.KibanaActionConnector { +// return &models.KibanaActionConnector{ +// ConnectorID: response.GetId(), +// SpaceID: spaceID, +// Name: response.GetName(), +// ConnectorTypeID: response.GetConnectorTypeId(), +// IsDeprecated: response.GetIsDeprecated(), +// IsMissingSecrets: response.GetIsMissingSecrets(), +// IsPreconfigured: response.GetIsPreconfigured(), +// ConfigJSON: string(config), +// } +// } + +// type responseType interface { +// *kibanaactions.ConnectorResponsePropertiesCasesWebhook | *kibanaactions.ConnectorResponsePropertiesEmail | +// *kibanaactions.ConnectorResponsePropertiesIndex +// GetId() string +// GetName() string +// GetConnectorTypeId() string +// GetIsDeprecated() bool +// GetIsMissingSecrets() bool +// GetIsPreconfigured() bool +// } From 999c7fc5d25d19500661ceaed496cdad2a6ccc2f Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Fri, 14 Apr 2023 11:04:32 +0200 Subject: [PATCH 05/59] Improve code generation for kibana action connectors --- Makefile | 3 +- .../kibanaactions/.openapi-generator/FILES | 8 +- .../kibanaactions/.openapi-generator/VERSION | 2 +- generated/kibanaactions/README.md | 4 +- generated/kibanaactions/api/openapi.yaml | 116 +- generated/kibanaactions/api_connectors.go | 30 +- generated/kibanaactions/bundled.json | 4540 +++++++++++++++++ .../kibanaactions/docs/NotFoundResponse.md | 108 + .../docs/UnauthorizedResponse.md | 108 + .../model_connector_response_properties.go | 326 +- ...reate_connector_request_body_properties.go | 326 +- .../kibanaactions/model_not_found_response.go | 196 + .../model_run_connector_200_response_data.go | 19 +- ...onnector_request_body_properties_params.go | 6 +- ...vice_sub_action_params_incident_dest_ip.go | 21 +- ...sub_action_params_incident_malware_hash.go | 19 +- ..._sub_action_params_incident_malware_url.go | 19 +- ...ce_sub_action_params_incident_source_ip.go | 19 +- .../model_subaction_parameters.go | 218 +- .../model_unauthorized_response.go | 196 + ...pdate_connector_request_body_properties.go | 18 +- 21 files changed, 5695 insertions(+), 607 deletions(-) create mode 100644 generated/kibanaactions/bundled.json create mode 100644 generated/kibanaactions/docs/NotFoundResponse.md create mode 100644 generated/kibanaactions/docs/UnauthorizedResponse.md create mode 100644 generated/kibanaactions/model_not_found_response.go create mode 100644 generated/kibanaactions/model_unauthorized_response.go diff --git a/Makefile b/Makefile index a2e1b9f02..a998ce32b 100644 --- a/Makefile +++ b/Makefile @@ -268,6 +268,7 @@ generate-kibana-actions-client: ## generate Kibana actions client -p packageName=kibanaactions \ -p generateInterfaces=true \ -g go \ - -o /local/generated/kibanaactions + -o /local/generated/kibanaactions \ + --additional-properties=useOneOfDiscriminatorLookup=true @ rm -rf generated/kibanaactions/go.mod generated/kibanaactions/go.sum generated/kibanaactions/test @ go fmt ./generated/kibanaactions/... diff --git a/generated/kibanaactions/.openapi-generator/FILES b/generated/kibanaactions/.openapi-generator/FILES index 1437b7472..c61a90409 100644 --- a/generated/kibanaactions/.openapi-generator/FILES +++ b/generated/kibanaactions/.openapi-generator/FILES @@ -67,8 +67,7 @@ docs/LegacyGetConnectorTypesResponseBodyPropertiesInner.md docs/LegacyRunConnector200Response.md docs/LegacyRunConnectorRequestBodyProperties.md docs/LegacyUpdateConnectorRequestBodyProperties.md -docs/Model401Response.md -docs/Model404Response.md +docs/NotFoundResponse.md docs/RuleNameMapping.md docs/RunConnector200Response.md docs/RunConnector200ResponseData.md @@ -112,6 +111,7 @@ docs/SecretsPropertiesServicenow.md docs/SecretsPropertiesSwimlane.md docs/SeverityMapping.md docs/SubactionParameters.md +docs/UnauthorizedResponse.md docs/UpdateConnector400Response.md docs/UpdateConnectorRequestBodyProperties.md docs/UpdateConnectorRequestCasesWebhook.md @@ -126,8 +126,6 @@ docs/UpdateConnectorRequestSwimlane.md git_push.sh go.mod go.sum -model_401_response.go -model_404_response.go model_action_response_properties.go model_alert_identifier_mapping.go model_case_comment_mapping.go @@ -189,6 +187,7 @@ model_legacy_get_connector_types_response_body_properties_inner.go model_legacy_run_connector_200_response.go model_legacy_run_connector_request_body_properties.go model_legacy_update_connector_request_body_properties.go +model_not_found_response.go model_rule_name_mapping.go model_run_connector_200_response.go model_run_connector_200_response_data.go @@ -232,6 +231,7 @@ model_secrets_properties_servicenow.go model_secrets_properties_swimlane.go model_severity_mapping.go model_subaction_parameters.go +model_unauthorized_response.go model_update_connector_400_response.go model_update_connector_request_body_properties.go model_update_connector_request_cases_webhook.go diff --git a/generated/kibanaactions/.openapi-generator/VERSION b/generated/kibanaactions/.openapi-generator/VERSION index c0be8a799..7f4d792ec 100644 --- a/generated/kibanaactions/.openapi-generator/VERSION +++ b/generated/kibanaactions/.openapi-generator/VERSION @@ -1 +1 @@ -6.4.0 \ No newline at end of file +6.5.0-SNAPSHOT \ No newline at end of file diff --git a/generated/kibanaactions/README.md b/generated/kibanaactions/README.md index a6dccfbf2..dc27fdb55 100644 --- a/generated/kibanaactions/README.md +++ b/generated/kibanaactions/README.md @@ -156,8 +156,7 @@ Class | Method | HTTP request | Description - [LegacyRunConnector200Response](docs/LegacyRunConnector200Response.md) - [LegacyRunConnectorRequestBodyProperties](docs/LegacyRunConnectorRequestBodyProperties.md) - [LegacyUpdateConnectorRequestBodyProperties](docs/LegacyUpdateConnectorRequestBodyProperties.md) - - [Model401Response](docs/Model401Response.md) - - [Model404Response](docs/Model404Response.md) + - [NotFoundResponse](docs/NotFoundResponse.md) - [RuleNameMapping](docs/RuleNameMapping.md) - [RunConnector200Response](docs/RunConnector200Response.md) - [RunConnector200ResponseData](docs/RunConnector200ResponseData.md) @@ -201,6 +200,7 @@ Class | Method | HTTP request | Description - [SecretsPropertiesSwimlane](docs/SecretsPropertiesSwimlane.md) - [SeverityMapping](docs/SeverityMapping.md) - [SubactionParameters](docs/SubactionParameters.md) + - [UnauthorizedResponse](docs/UnauthorizedResponse.md) - [UpdateConnector400Response](docs/UpdateConnector400Response.md) - [UpdateConnectorRequestBodyProperties](docs/UpdateConnectorRequestBodyProperties.md) - [UpdateConnectorRequestCasesWebhook](docs/UpdateConnectorRequestCasesWebhook.md) diff --git a/generated/kibanaactions/api/openapi.yaml b/generated/kibanaactions/api/openapi.yaml index 22c2ea871..c90dd35cc 100644 --- a/generated/kibanaactions/api/openapi.yaml +++ b/generated/kibanaactions/api/openapi.yaml @@ -67,7 +67,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: '#/components/schemas/Unauthorized_response' description: Authorization information is missing or invalid. servers: - url: https://localhost:5601 @@ -116,7 +116,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: '#/components/schemas/Unauthorized_response' description: Authorization information is missing or invalid. "404": content: @@ -168,7 +168,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: '#/components/schemas/Unauthorized_response' description: Authorization information is missing or invalid. "404": content: @@ -240,13 +240,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: '#/components/schemas/Unauthorized_response' description: Authorization information is missing or invalid. "404": content: application/json: schema: - $ref: '#/components/schemas/404_response' + $ref: '#/components/schemas/Not_found_response' description: Object is not found. servers: - url: https://localhost:5601 @@ -288,7 +288,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: '#/components/schemas/Unauthorized_response' description: Authorization information is missing or invalid. servers: - url: https://localhost:5601 @@ -341,7 +341,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: '#/components/schemas/Unauthorized_response' description: Authorization information is missing or invalid. servers: - url: https://localhost:5601 @@ -432,7 +432,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: '#/components/schemas/Unauthorized_response' description: Authorization information is missing or invalid. servers: - url: https://localhost:5601 @@ -482,7 +482,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: '#/components/schemas/Unauthorized_response' description: Authorization information is missing or invalid. servers: - url: https://localhost:5601 @@ -524,7 +524,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: '#/components/schemas/Unauthorized_response' description: Authorization information is missing or invalid. servers: - url: https://localhost:5601 @@ -580,7 +580,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/404_response' + $ref: '#/components/schemas/Not_found_response' description: Object is not found. servers: - url: https://localhost:5601 @@ -618,7 +618,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: '#/components/schemas/Unauthorized_response' description: Authorization information is missing or invalid. servers: - url: https://localhost:5601 @@ -665,7 +665,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: '#/components/schemas/Unauthorized_response' description: Authorization information is missing or invalid. servers: - url: https://localhost:5601 @@ -705,7 +705,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: '#/components/schemas/Unauthorized_response' description: Authorization information is missing or invalid. servers: - url: https://localhost:5601 @@ -764,7 +764,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/401_response' + $ref: '#/components/schemas/Unauthorized_response' description: Authorization information is missing or invalid. servers: - url: https://localhost:5601 @@ -1045,6 +1045,25 @@ components: example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad type: string style: simple + responses: + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized_response' + description: Authorization information is missing or invalid. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Not_found_response' + description: Object is not found. + "200_actions": + content: + application/json: + schema: + $ref: '#/components/schemas/action_response_properties' + description: Indicates a successful call. schemas: config_properties_cases_webhook: description: Defines properties for connectors when type is `.cases-webhook`. @@ -2582,22 +2601,6 @@ components: - $ref: '#/components/schemas/connector_response_properties_webhook' - $ref: '#/components/schemas/connector_response_properties_xmatters' title: Connector response properties - "401_response": - properties: - error: - enum: - - Unauthorized - example: Unauthorized - type: string - message: - type: string - statusCode: - enum: - - 401 - example: 401 - type: integer - title: Unsuccessful rule API response - type: object update_connector_request_cases_webhook: properties: config: @@ -2725,23 +2728,6 @@ components: - secrets title: Update Swimlane connector request type: object - "404_response": - properties: - error: - enum: - - Not Found - example: Not Found - type: string - message: - example: "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not\ - \ found" - type: string - statusCode: - enum: - - 404 - example: 404 - type: integer - type: object connector_types: description: "The type of connector. For example, `.email`, `.index`, `.jira`,\ \ `.opsgenie`, or `.server-log`." @@ -3023,6 +3009,22 @@ components: - $ref: '#/components/schemas/create_connector_request_webhook' - $ref: '#/components/schemas/create_connector_request_xmatters' title: Create connector request body properties + Unauthorized_response: + properties: + error: + enum: + - Unauthorized + example: Unauthorized + type: string + message: + type: string + statusCode: + enum: + - 401 + example: 401 + type: integer + title: Unauthorized response + type: object getConnector_404_response: properties: error: @@ -3062,6 +3064,24 @@ components: example: 400 type: integer type: object + Not_found_response: + properties: + error: + enum: + - Not Found + example: Not Found + type: string + message: + example: "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not\ + \ found" + type: string + statusCode: + enum: + - 404 + example: 404 + type: integer + title: Not found response + type: object Get_connectors_response_body_properties: description: The properties vary for each connector type. example: diff --git a/generated/kibanaactions/api_connectors.go b/generated/kibanaactions/api_connectors.go index c0ad753df..f16fc3b87 100644 --- a/generated/kibanaactions/api_connectors.go +++ b/generated/kibanaactions/api_connectors.go @@ -396,7 +396,7 @@ func (a *ConnectorsApiService) CreateConnectorExecute(r ApiCreateConnectorReques error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 401 { - var v Model401Response + var v UnauthorizedResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -536,7 +536,7 @@ func (a *ConnectorsApiService) DeleteConnectorExecute(r ApiDeleteConnectorReques error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 401 { - var v Model401Response + var v UnauthorizedResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -670,7 +670,7 @@ func (a *ConnectorsApiService) GetConnectorExecute(r ApiGetConnectorRequest) (*C error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 401 { - var v Model401Response + var v UnauthorizedResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -819,7 +819,7 @@ func (a *ConnectorsApiService) GetConnectorTypesExecute(r ApiGetConnectorTypesRe error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 401 { - var v Model401Response + var v UnauthorizedResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -947,7 +947,7 @@ func (a *ConnectorsApiService) GetConnectorsExecute(r ApiGetConnectorsRequest) ( error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 401 { - var v Model401Response + var v UnauthorizedResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1101,7 +1101,7 @@ func (a *ConnectorsApiService) LegacyCreateConnectorExecute(r ApiLegacyCreateCon error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 401 { - var v Model401Response + var v UnauthorizedResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1244,7 +1244,7 @@ func (a *ConnectorsApiService) LegacyDeleteConnectorExecute(r ApiLegacyDeleteCon error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 401 { - var v Model401Response + var v UnauthorizedResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1371,7 +1371,7 @@ func (a *ConnectorsApiService) LegacyGetConnectorExecute(r ApiLegacyGetConnector error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 401 { - var v Model401Response + var v UnauthorizedResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1503,7 +1503,7 @@ func (a *ConnectorsApiService) LegacyGetConnectorTypesExecute(r ApiLegacyGetConn error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 401 { - var v Model401Response + var v UnauthorizedResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1635,7 +1635,7 @@ func (a *ConnectorsApiService) LegacyGetConnectorsExecute(r ApiLegacyGetConnecto error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 401 { - var v Model401Response + var v UnauthorizedResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1793,7 +1793,7 @@ func (a *ConnectorsApiService) LegacyRunConnectorExecute(r ApiLegacyRunConnector error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 401 { - var v Model401Response + var v UnauthorizedResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1951,7 +1951,7 @@ func (a *ConnectorsApiService) LegacyUpdateConnectorExecute(r ApiLegacyUpdateCon error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 404 { - var v Model404Response + var v NotFoundResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -2105,7 +2105,7 @@ func (a *ConnectorsApiService) RunConnectorExecute(r ApiRunConnectorRequest) (*R error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 401 { - var v Model401Response + var v UnauthorizedResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -2270,7 +2270,7 @@ func (a *ConnectorsApiService) UpdateConnectorExecute(r ApiUpdateConnectorReques return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v Model401Response + var v UnauthorizedResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -2281,7 +2281,7 @@ func (a *ConnectorsApiService) UpdateConnectorExecute(r ApiUpdateConnectorReques return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 404 { - var v Model404Response + var v NotFoundResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() diff --git a/generated/kibanaactions/bundled.json b/generated/kibanaactions/bundled.json new file mode 100644 index 000000000..aa9cdcd3d --- /dev/null +++ b/generated/kibanaactions/bundled.json @@ -0,0 +1,4540 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Connectors", + "description": "OpenAPI schema for Connectors endpoints", + "version": "0.1", + "contact": { + "name": "Connectors Team" + }, + "license": { + "name": "Elastic License 2.0", + "url": "https://www.elastic.co/licensing/elastic-license" + } + }, + "tags": [ + { + "name": "connectors", + "description": "Connector APIs enable you to create and manage connectors." + } + ], + "servers": [ + { + "url": "http://localhost:5601", + "description": "local" + } + ], + "paths": { + "/s/{spaceId}/api/actions/connector": { + "post": { + "summary": "Creates a connector.", + "operationId": "createConnector", + "description": "You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "$ref": "#/components/parameters/space_id" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "title": "Create connector request body properties", + "description": "The properties vary depending on the connector type.", + "oneOf": [ + { + "$ref": "#/components/schemas/create_connector_request_cases_webhook" + }, + { + "$ref": "#/components/schemas/create_connector_request_email" + }, + { + "$ref": "#/components/schemas/create_connector_request_index" + }, + { + "$ref": "#/components/schemas/create_connector_request_jira" + }, + { + "$ref": "#/components/schemas/create_connector_request_opsgenie" + }, + { + "$ref": "#/components/schemas/create_connector_request_pagerduty" + }, + { + "$ref": "#/components/schemas/create_connector_request_resilient" + }, + { + "$ref": "#/components/schemas/create_connector_request_serverlog" + }, + { + "$ref": "#/components/schemas/create_connector_request_servicenow" + }, + { + "$ref": "#/components/schemas/create_connector_request_servicenow_itom" + }, + { + "$ref": "#/components/schemas/create_connector_request_servicenow_sir" + }, + { + "$ref": "#/components/schemas/create_connector_request_slack" + }, + { + "$ref": "#/components/schemas/create_connector_request_swimlane" + }, + { + "$ref": "#/components/schemas/create_connector_request_teams" + }, + { + "$ref": "#/components/schemas/create_connector_request_tines" + }, + { + "$ref": "#/components/schemas/create_connector_request_webhook" + }, + { + "$ref": "#/components/schemas/create_connector_request_xmatters" + } + ], + "discriminator": { + "propertyName": "connector_type_id" + } + }, + "examples": { + "createIndexConnectorRequest": { + "$ref": "#/components/examples/create_index_connector_request" + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/connector_response_properties" + }, + "examples": { + "createIndexConnectorResponse": { + "$ref": "#/components/examples/create_index_connector_response" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "/s/{spaceId}/api/actions/connector/{connectorId}": { + "get": { + "summary": "Retrieves a connector by ID.", + "operationId": "getConnector", + "description": "You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/connector_id" + }, + { + "$ref": "#/components/parameters/space_id" + } + ], + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/connector_response_properties" + }, + "examples": { + "getConnectorResponse": { + "$ref": "#/components/examples/get_connector_response" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "description": "Object is not found.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "Not Found" + }, + "message": { + "type": "string", + "example": "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found" + }, + "statusCode": { + "type": "integer", + "example": 404 + } + } + } + } + } + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "delete": { + "summary": "Deletes a connector.", + "operationId": "deleteConnector", + "description": "You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be recovered.\n", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "$ref": "#/components/parameters/connector_id" + }, + { + "$ref": "#/components/parameters/space_id" + } + ], + "responses": { + "204": { + "description": "Indicates a successful call." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "description": "Object is not found.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "Not Found" + }, + "message": { + "type": "string", + "example": "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found" + }, + "statusCode": { + "type": "integer", + "example": 404 + } + } + } + } + } + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "put": { + "summary": "Updates the attributes for a connector.", + "operationId": "updateConnector", + "description": "You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "$ref": "#/components/parameters/connector_id" + }, + { + "$ref": "#/components/parameters/space_id" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "title": "Update connector request body properties", + "description": "The properties vary depending on the connector type.", + "oneOf": [ + { + "$ref": "#/components/schemas/update_connector_request_cases_webhook" + }, + { + "$ref": "#/components/schemas/update_connector_request_index" + }, + { + "$ref": "#/components/schemas/update_connector_request_jira" + }, + { + "$ref": "#/components/schemas/update_connector_request_opsgenie" + }, + { + "$ref": "#/components/schemas/update_connector_request_resilient" + }, + { + "$ref": "#/components/schemas/update_connector_request_serverlog" + }, + { + "$ref": "#/components/schemas/update_connector_request_servicenow" + }, + { + "$ref": "#/components/schemas/update_connector_request_servicenow_itom" + }, + { + "$ref": "#/components/schemas/update_connector_request_swimlane" + } + ] + }, + "examples": { + "updateIndexConnectorRequest": { + "$ref": "#/components/examples/update_index_connector_request" + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/connector_response_properties" + } + } + } + }, + "400": { + "description": "Indicates a bad request.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "Bad Request" + }, + "message": { + "type": "string", + "example": "error validating action type config: [index]: expected value of type [string] but got [undefined]" + }, + "statusCode": { + "type": "integer", + "example": 400 + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "/s/{spaceId}/api/actions/connectors": { + "get": { + "summary": "Retrieves all connectors.", + "operationId": "getConnectors", + "description": "You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/space_id" + } + ], + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "title": "Get connectors response body properties", + "description": "The properties vary for each connector type.", + "type": "object", + "required": [ + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name", + "referenced_by_count" + ], + "properties": { + "connector_type_id": { + "$ref": "#/components/schemas/connector_types" + }, + "config": { + "type": "object", + "description": "The configuration for the connector. Configuration properties vary depending on the connector type.", + "additionalProperties": true, + "nullable": true + }, + "id": { + "type": "string", + "description": "The identifier for the connector.", + "example": "b0766e10-d190-11ec-b04c-776c77d14fca" + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "referenced_by_count": { + "type": "integer", + "description": "Indicates the number of saved objects that reference the connector. If `is_preconfigured` is true, this value is not calculated.", + "example": 2, + "default": 0 + } + } + } + }, + "examples": { + "getConnectorsResponse": { + "$ref": "#/components/examples/get_connectors_response" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "/s/{spaceId}/api/actions/connector_types": { + "get": { + "summary": "Retrieves a list of all connector types.", + "operationId": "getConnectorTypes", + "description": "You do not need any Kibana feature privileges to run this API.\n", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/space_id" + }, + { + "in": "query", + "name": "feature_id", + "description": "A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases).", + "schema": { + "$ref": "#/components/schemas/features" + } + } + ], + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "title": "Get connector types response body properties", + "description": "The properties vary for each connector type.", + "type": "array", + "items": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Indicates whether the connector type is enabled in Kibana.", + "example": true + }, + "enabled_in_config": { + "type": "boolean", + "description": "Indicates whether the connector type is enabled in the Kibana `.yml` file.", + "example": true + }, + "enabled_in_license": { + "type": "boolean", + "description": "Indicates whether the connector is enabled in the license.", + "example": true + }, + "id": { + "$ref": "#/components/schemas/connector_types" + }, + "minimum_license_required": { + "type": "string", + "description": "The license that is required to use the connector type.", + "example": "basic" + }, + "name": { + "type": "string", + "description": "The name of the connector type.", + "example": "Index" + }, + "supported_feature_ids": { + "type": "array", + "description": "The Kibana features that are supported by the connector type.", + "items": { + "$ref": "#/components/schemas/features" + }, + "example": [ + "alerting", + "uptime", + "siem" + ] + } + } + } + }, + "examples": { + "getConnectorTypesResponse": { + "$ref": "#/components/examples/get_connector_types_response" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "/s/{spaceId}/api/actions/connector/{connectorId}/_execute": { + "post": { + "summary": "Runs a connector.", + "operationId": "runConnector", + "description": "You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. If you use an index connector, you must also have `all`, `create`, `index`, or `write` indices privileges.\n", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "$ref": "#/components/parameters/connector_id" + }, + { + "$ref": "#/components/parameters/space_id" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "title": "Run connector request body properties", + "description": "The properties vary depending on the connector type.", + "type": "object", + "required": [ + "params" + ], + "properties": { + "params": { + "oneOf": [ + { + "$ref": "#/components/schemas/run_connector_params_documents" + }, + { + "$ref": "#/components/schemas/run_connector_params_level_message" + }, + { + "title": "Subaction parameters", + "description": "Test an action that involves a subaction.", + "oneOf": [ + { + "$ref": "#/components/schemas/run_connector_subaction_addevent" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_closealert" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_createalert" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_fieldsbyissuetype" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_getchoices" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_getfields" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_getincident" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_issue" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_issues" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_issuetypes" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_pushtoservice" + } + ], + "discriminator": { + "propertyName": "subAction" + } + } + ] + } + } + }, + "examples": { + "runIndexConnectorRequest": { + "$ref": "#/components/examples/run_index_connector_request" + }, + "runJiraConnectorRequest": { + "$ref": "#/components/examples/run_jira_connector_request" + }, + "runServerLogConnectorRequest": { + "$ref": "#/components/examples/run_server_log_connector_request" + }, + "runServiceNowITOMConnectorRequest": { + "$ref": "#/components/examples/run_servicenow_itom_connector_request" + }, + "runSwimlaneConnectorRequest": { + "$ref": "#/components/examples/run_swimlane_connector_request" + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "connector_id", + "status" + ], + "properties": { + "connector_id": { + "type": "string", + "description": "The identifier for the connector." + }, + "data": { + "oneOf": [ + { + "type": "object", + "description": "Information returned from the action.", + "additionalProperties": true + }, + { + "type": "array", + "description": "An array of information returned from the action.", + "items": { + "type": "object" + } + } + ] + }, + "status": { + "type": "string", + "description": "The status of the action.", + "enum": [ + "error", + "ok" + ] + } + } + }, + "examples": { + "runIndexConnectorResponse": { + "$ref": "#/components/examples/run_index_connector_response" + }, + "runJiraConnectorResponse": { + "$ref": "#/components/examples/run_jira_connector_response" + }, + "runServerLogConnectorResponse": { + "$ref": "#/components/examples/run_server_log_connector_response" + }, + "runServiceNowITOMConnectorResponse": { + "$ref": "#/components/examples/run_servicenow_itom_connector_response" + }, + "runSwimlaneConnectorResponse": { + "$ref": "#/components/examples/run_swimlane_connector_response" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "/s/{spaceId}/api/actions/action/{actionId}": { + "delete": { + "summary": "Deletes a connector.", + "operationId": "legacyDeleteConnector", + "deprecated": true, + "description": "Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, it cannot be recovered.\n", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "$ref": "#/components/parameters/action_id" + }, + { + "$ref": "#/components/parameters/space_id" + } + ], + "responses": { + "204": { + "description": "Indicates a successful call." + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "get": { + "summary": "Retrieves a connector by ID.", + "operationId": "legacyGetConnector", + "description": "Deprecated in 7.13.0. Use the get connector API instead.", + "deprecated": true, + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/action_id" + }, + { + "$ref": "#/components/parameters/space_id" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200_actions" + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "put": { + "summary": "Updates the attributes for a connector.", + "operationId": "legacyUpdateConnector", + "deprecated": true, + "description": "Deprecated in 7.13.0. Use the update connector API instead.", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "$ref": "#/components/parameters/action_id" + }, + { + "$ref": "#/components/parameters/space_id" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "title": "Legacy update connector request body properties", + "description": "The properties vary depending on the connector type.", + "type": "object", + "properties": { + "config": { + "type": "object", + "description": "The new connector configuration. Configuration properties vary depending on the connector type." + }, + "name": { + "type": "string", + "description": "The new name for the connector." + }, + "secrets": { + "type": "object", + "description": "The updated secrets configuration for the connector. Secrets properties vary depending on the connector type." + } + } + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/200_actions" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "/s/{spaceId}/api/actions": { + "get": { + "summary": "Retrieves all connectors.", + "operationId": "legacyGetConnectors", + "deprecated": true, + "description": "Deprecated in 7.13.0. Use the get all connectors API instead.", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/space_id" + } + ], + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/action_response_properties" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "post": { + "summary": "Creates a connector.", + "operationId": "legacyCreateConnector", + "deprecated": true, + "description": "Deprecated in 7.13.0. Use the create connector API instead.", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "$ref": "#/components/parameters/space_id" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "title": "Legacy create connector request properties", + "type": "object", + "properties": { + "actionTypeId": { + "type": "string", + "description": "The connector type identifier." + }, + "config": { + "type": "object", + "description": "The configuration for the connector. Configuration properties vary depending on the connector type." + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "type": "object", + "description": "The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. NOTE: Remember these values. You must provide them each time you update the connector.\n" + } + } + } + } + } + }, + "responses": { + "200": { + "$ref": "#/components/responses/200_actions" + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "/s/{spaceId}/api/actions/list_action_types": { + "get": { + "summary": "Retrieves a list of all connector types.", + "operationId": "legacyGetConnectorTypes", + "deprecated": true, + "description": "Deprecated in 7.13.0. Use the get all connector types API instead.", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/space_id" + } + ], + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "title": "Legacy get connector types response body properties", + "description": "The properties vary for each connector type.", + "type": "array", + "items": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Indicates whether the connector type is enabled in Kibana." + }, + "enabledInConfig": { + "type": "boolean", + "description": "Indicates whether the connector type is enabled in the Kibana `.yml` file." + }, + "enabledInLicense": { + "type": "boolean", + "description": "Indicates whether the connector is enabled in the license.", + "example": true + }, + "id": { + "type": "string", + "description": "The unique identifier for the connector type." + }, + "minimumLicenseRequired": { + "type": "string", + "description": "The license that is required to use the connector type." + }, + "name": { + "type": "string", + "description": "The name of the connector type." + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "/s/{spaceId}/api/actions/action/{actionId}/_execute": { + "post": { + "summary": "Runs a connector.", + "operationId": "legacyRunConnector", + "deprecated": true, + "description": "Deprecated in 7.13.0. Use the run connector API instead.", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "$ref": "#/components/parameters/action_id" + }, + { + "$ref": "#/components/parameters/space_id" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "title": "Legacy run connector request body properties", + "description": "The properties vary depending on the connector type.", + "type": "object", + "required": [ + "params" + ], + "properties": { + "params": { + "type": "object", + "description": "The parameters of the connector. Parameter properties vary depending on the connector type." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "actionId": { + "type": "string" + }, + "data": { + "oneOf": [ + { + "type": "object", + "description": "Information returned from the action.", + "additionalProperties": true + }, + { + "type": "array", + "description": "An array of information returned from the action.", + "items": { + "type": "object" + } + } + ] + }, + "status": { + "type": "string", + "description": "The status of the action." + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + } + }, + "components": { + "securitySchemes": { + "basicAuth": { + "type": "http", + "scheme": "basic" + }, + "apiKeyAuth": { + "type": "apiKey", + "in": "header", + "name": "ApiKey" + } + }, + "parameters": { + "kbn_xsrf": { + "schema": { + "type": "string" + }, + "in": "header", + "name": "kbn-xsrf", + "description": "Cross-site request forgery protection", + "required": true + }, + "space_id": { + "in": "path", + "name": "spaceId", + "description": "An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.", + "required": true, + "schema": { + "type": "string", + "example": "default" + } + }, + "connector_id": { + "in": "path", + "name": "connectorId", + "description": "An identifier for the connector.", + "required": true, + "schema": { + "type": "string", + "example": "df770e30-8b8b-11ed-a780-3b746c987a81" + } + }, + "action_id": { + "in": "path", + "name": "actionId", + "description": "An identifier for the action.", + "required": true, + "schema": { + "type": "string", + "example": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad" + } + } + }, + "schemas": { + "config_properties_cases_webhook": { + "title": "Connector request properties for Webhook - Case Management connector", + "required": [ + "createIncidentJson", + "createIncidentResponseKey", + "createIncidentUrl", + "getIncidentResponseExternalTitleKey", + "getIncidentUrl", + "updateIncidentJson", + "updateIncidentUrl", + "viewIncidentUrl" + ], + "description": "Defines properties for connectors when type is `.cases-webhook`.", + "type": "object", + "properties": { + "createCommentJson": { + "type": "string", + "description": "A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass.\n", + "example": { + "body": { + "[object Object]": null + } + } + }, + "createCommentMethod": { + "type": "string", + "description": "The REST API HTTP request method to create a case comment in the third-party system. Valid values are `patch`, `post`, and `put`.\n", + "default": "put", + "enum": [ + "patch", + "post", + "put" + ] + }, + "createCommentUrl": { + "type": "string", + "description": "The REST API URL to create a case comment by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts setting`, add the hostname to the allowed hosts.\n", + "example": "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}/comment" + }, + "createIncidentJson": { + "type": "string", + "description": "A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.\n", + "example": { + "fields": { + "summary": { + "[object Object]": null + }, + "description": { + "[object Object]": null + }, + "labels": { + "[object Object]": null + } + } + } + }, + "createIncidentMethod": { + "type": "string", + "description": "The REST API HTTP request method to create a case in the third-party system. Valid values are `patch`, `post`, and `put`.\n", + "enum": [ + "patch", + "post", + "put" + ], + "default": "post" + }, + "createIncidentResponseKey": { + "type": "string", + "description": "The JSON key in the create case response that contains the external case ID." + }, + "createIncidentUrl": { + "type": "string", + "description": "The REST API URL to create a case in the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n" + }, + "getIncidentResponseExternalTitleKey": { + "type": "string", + "description": "The JSON key in get case response that contains the external case title." + }, + "getIncidentUrl": { + "type": "string", + "description": "The REST API URL to get the case by ID from the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. You can use a variable to add the external system ID to the URL. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass.\n", + "example": "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}" + }, + "hasAuth": { + "type": "boolean", + "description": "If true, a username and password for login type authentication must be provided.", + "default": true + }, + "headers": { + "type": "string", + "description": "A set of key-value pairs sent as headers with the request URLs for the create case, update case, get case, and create comment methods.\n" + }, + "updateIncidentJson": { + "type": "string", + "description": "The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.\n", + "example": { + "fields": { + "summary": { + "[object Object]": null + }, + "description": { + "[object Object]": null + }, + "labels": { + "[object Object]": null + } + } + } + }, + "updateIncidentMethod": { + "type": "string", + "description": "The REST API HTTP request method to update the case in the third-party system. Valid values are `patch`, `post`, and `put`.\n", + "default": "put", + "enum": [ + "patch", + "post", + "put" + ] + }, + "updateIncidentUrl": { + "type": "string", + "description": "The REST API URL to update the case by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n", + "example": "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.ID}}}" + }, + "viewIncidentUrl": { + "type": "string", + "description": "The URL to view the case in the external system. You can use variables to add the external system ID or external system title to the URL.\n", + "example": "https://testing-jira.atlassian.net/browse/{{{external.system.title}}}" + } + } + }, + "secrets_properties_cases_webhook": { + "title": "Connector secrets properties for Webhook - Case Management connector", + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required." + }, + "user": { + "type": "string", + "description": "The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required." + } + } + }, + "create_connector_request_cases_webhook": { + "title": "Create Webhook - Case Managment connector request", + "description": "The Webhook - Case Management connector uses axios to send POST, PUT, and GET requests to a case management RESTful API web service.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_cases_webhook" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".cases-webhook" + ], + "example": ".cases-webhook" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_cases_webhook" + } + } + }, + "config_properties_email": { + "title": "Connector request properties for an email connector", + "description": "Defines properties for connectors when type is `.email`.", + "type": "object", + "additionalProperties": true + }, + "secrets_properties_email": { + "title": "Connector secrets properties for an email connector", + "description": "Defines secrets for connectors when type is `.email`.", + "type": "object", + "additionalProperties": true + }, + "create_connector_request_email": { + "title": "Create email connector request", + "description": "The email connector uses the SMTP protocol to send mail messages, using an integration of Nodemailer. An exception is Microsoft Exchange, which uses HTTP protocol for sending emails, Send mail. Email message text is sent as both plain text and html text.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_email" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".email" + ], + "example": ".email" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_email" + } + } + }, + "config_properties_index": { + "title": "Connector request properties for an index connector", + "required": [ + "index" + ], + "description": "Defines properties for connectors when type is `.index`.", + "type": "object", + "properties": { + "executionTimeField": { + "description": "Specifies a field that will contain the time the alert condition was detected.", + "default": null, + "type": "string", + "nullable": true + }, + "index": { + "description": "The Elasticsearch index to be written to.", + "type": "string" + }, + "refresh": { + "description": "The refresh policy for the write request, which affects when changes are made visible to search. Refer to the refresh setting for Elasticsearch document APIs.\n", + "default": false, + "type": "boolean" + } + } + }, + "create_connector_request_index": { + "title": "Create index connector request", + "description": "The index connector indexes a document into Elasticsearch.", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_index" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".index" + ], + "example": ".index" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + } + } + }, + "config_properties_jira": { + "title": "Connector request properties for a Jira connector", + "required": [ + "apiUrl", + "projectKey" + ], + "description": "Defines properties for connectors when type is `.jira`.", + "type": "object", + "properties": { + "apiUrl": { + "description": "The Jira instance URL.", + "type": "string" + }, + "projectKey": { + "description": "The Jira project key.", + "type": "string" + } + } + }, + "secrets_properties_jira": { + "title": "Connector secrets properties for a Jira connector", + "required": [ + "apiToken", + "email" + ], + "description": "Defines secrets for connectors when type is `.jira`.", + "type": "object", + "properties": { + "apiToken": { + "description": "The Jira API authentication token for HTTP basic authentication.", + "type": "string" + }, + "email": { + "description": "The account email for HTTP Basic authentication.", + "type": "string" + } + } + }, + "create_connector_request_jira": { + "title": "Create Jira connector request", + "description": "The Jira connector uses the REST API v2 to create Jira issues.", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_jira" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".jira" + ], + "example": ".jira" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_jira" + } + } + }, + "config_properties_opsgenie": { + "title": "Connector request properties for an Opsgenie connector", + "required": [ + "apiUrl" + ], + "description": "Defines properties for connectors when type is `.opsgenie`.", + "type": "object", + "properties": { + "apiUrl": { + "description": "The Opsgenie URL. For example, `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n", + "type": "string" + } + } + }, + "secrets_properties_opsgenie": { + "title": "Connector secrets properties for an Opsgenie connector", + "required": [ + "apiKey" + ], + "description": "Defines secrets for connectors when type is `.opsgenie`.", + "type": "object", + "properties": { + "apiKey": { + "description": "The Opsgenie API authentication key for HTTP Basic authentication.", + "type": "string" + } + } + }, + "create_connector_request_opsgenie": { + "title": "Create Opsgenie connector request", + "description": "The Opsgenie connector uses the Opsgenie alert API.", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_opsgenie" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".opsgenie" + ], + "example": ".opsgenie" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_opsgenie" + } + } + }, + "config_properties_pagerduty": { + "title": "Connector request properties for a PagerDuty connector", + "description": "Defines properties for connectors when type is `.pagerduty`.", + "type": "object", + "additionalProperties": true + }, + "secrets_properties_pagerduty": { + "title": "Connector secrets properties for a PagerDuty connector", + "description": "Defines secrets for connectors when type is `.pagerduty`.", + "type": "object", + "additionalProperties": true + }, + "create_connector_request_pagerduty": { + "title": "Create PagerDuty connector request", + "description": "The PagerDuty connector uses the v2 Events API to trigger, acknowledge, and resolve PagerDuty alerts.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_pagerduty" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".pagerduty" + ], + "example": ".pagerduty" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_pagerduty" + } + } + }, + "config_properties_resilient": { + "title": "Connector request properties for a IBM Resilient connector", + "required": [ + "apiUrl", + "orgId" + ], + "description": "Defines properties for connectors when type is `.resilient`.", + "type": "object", + "properties": { + "apiUrl": { + "description": "The IBM Resilient instance URL.", + "type": "string" + }, + "orgId": { + "description": "The IBM Resilient organization ID.", + "type": "string" + } + } + }, + "secrets_properties_resilient": { + "title": "Connector secrets properties for IBM Resilient connector", + "required": [ + "apiKeyId", + "apiKeySecret" + ], + "description": "Defines secrets for connectors when type is `.resilient`.", + "type": "object", + "properties": { + "apiKeyId": { + "type": "string", + "description": "The authentication key ID for HTTP Basic authentication." + }, + "apiKeySecret": { + "type": "string", + "description": "The authentication key secret for HTTP Basic authentication." + } + } + }, + "create_connector_request_resilient": { + "title": "Create IBM Resilient connector request", + "description": "The IBM Resilient connector uses the RESILIENT REST v2 to create IBM Resilient incidents.", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_resilient" + }, + "connector_type_id": { + "description": "The type of connector.", + "type": "string", + "example": ".resilient", + "enum": [ + ".resilient" + ] + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_resilient" + } + } + }, + "create_connector_request_serverlog": { + "title": "Create server log connector request", + "description": "This connector writes an entry to the Kibana server log.", + "type": "object", + "required": [ + "connector_type_id", + "name" + ], + "properties": { + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".server-log" + ], + "example": ".server-log" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + } + } + }, + "config_properties_servicenow": { + "title": "Connector request properties for a ServiceNow ITSM connector", + "required": [ + "apiUrl" + ], + "description": "Defines properties for connectors when type is `.servicenow`.", + "type": "object", + "properties": { + "apiUrl": { + "type": "string", + "description": "The ServiceNow instance URL." + }, + "clientId": { + "description": "The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`.\n", + "type": "string" + }, + "isOAuth": { + "description": "The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth).\n", + "default": false, + "type": "boolean" + }, + "jwtKeyId": { + "description": "The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`.\n", + "type": "string" + }, + "userIdentifierValue": { + "description": "The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`.\n", + "type": "string" + }, + "usesTableApi": { + "description": "Determines whether the connector uses the Table API or the Import Set API. This property is supported only for ServiceNow ITSM and ServiceNow SecOps connectors. NOTE: If this property is set to `false`, the Elastic application should be installed in ServiceNow.\n", + "default": true, + "type": "boolean" + } + } + }, + "secrets_properties_servicenow": { + "title": "Connector secrets properties for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors", + "description": "Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `.servicenow-itom`.", + "type": "object", + "properties": { + "clientSecret": { + "type": "string", + "description": "The client secret assigned to your OAuth application. This property is required when `isOAuth` is `true`." + }, + "password": { + "type": "string", + "description": "The password for HTTP basic authentication. This property is required when `isOAuth` is `false`." + }, + "privateKey": { + "type": "string", + "description": "The RSA private key that you created for use in ServiceNow. This property is required when `isOAuth` is `true`." + }, + "privateKeyPassword": { + "type": "string", + "description": "The password for the RSA private key. This property is required when `isOAuth` is `true` and you set a password on your private key." + }, + "username": { + "type": "string", + "description": "The username for HTTP basic authentication. This property is required when `isOAuth` is `false`." + } + } + }, + "create_connector_request_servicenow": { + "title": "Create ServiceNow ITSM connector request", + "description": "The ServiceNow ITSM connector uses the import set API to create ServiceNow incidents. You can use the connector for rule actions and cases.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_servicenow" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".servicenow" + ], + "example": ".servicenow" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_servicenow" + } + } + }, + "config_properties_servicenow_itom": { + "title": "Connector request properties for a ServiceNow ITSM connector", + "required": [ + "apiUrl" + ], + "description": "Defines properties for connectors when type is `.servicenow`.", + "type": "object", + "properties": { + "apiUrl": { + "type": "string", + "description": "The ServiceNow instance URL." + }, + "clientId": { + "description": "The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`.\n", + "type": "string" + }, + "isOAuth": { + "description": "The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth).\n", + "default": false, + "type": "boolean" + }, + "jwtKeyId": { + "description": "The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`.\n", + "type": "string" + }, + "userIdentifierValue": { + "description": "The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`.\n", + "type": "string" + } + } + }, + "create_connector_request_servicenow_itom": { + "title": "Create ServiceNow ITOM connector request", + "description": "The ServiceNow ITOM connector uses the event API to create ServiceNow events. You can use the connector for rule actions.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_servicenow_itom" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".servicenow-itom" + ], + "example": ".servicenow-itom" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_servicenow" + } + } + }, + "create_connector_request_servicenow_sir": { + "title": "Create ServiceNow SecOps connector request", + "description": "The ServiceNow SecOps connector uses the import set API to create ServiceNow security incidents. You can use the connector for rule actions and cases.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_servicenow" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".servicenow-sir" + ], + "example": ".servicenow-sir" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_servicenow" + } + } + }, + "secrets_properties_slack": { + "title": "Connector secrets properties for a Slack connector", + "description": "Defines secrets for connectors when type is `.slack`.", + "type": "object", + "additionalProperties": true + }, + "create_connector_request_slack": { + "title": "Create Slack connector request", + "description": "The Slack connector uses Slack Incoming Webhooks.", + "type": "object", + "required": [ + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".slack" + ], + "example": ".slack" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_slack" + } + } + }, + "config_properties_swimlane": { + "title": "Connector request properties for a Swimlane connector", + "required": [ + "apiUrl", + "appId", + "connectorType" + ], + "description": "Defines properties for connectors when type is `.swimlane`.", + "type": "object", + "properties": { + "apiUrl": { + "description": "The Swimlane instance URL.", + "type": "string" + }, + "appId": { + "description": "The Swimlane application ID.", + "type": "string" + }, + "connectorType": { + "description": "The type of connector. Valid values are `all`, `alerts`, and `cases`.", + "type": "string", + "enum": [ + "all", + "alerts", + "cases" + ] + }, + "mappings": { + "title": "Connector mappings properties for a Swimlane connector", + "description": "The field mapping.", + "type": "object", + "properties": { + "alertIdConfig": { + "title": "Alert identifier mapping", + "description": "Mapping for the alert ID.", + "type": "object", + "required": [ + "fieldType", + "id", + "key", + "name" + ], + "properties": { + "fieldType": { + "type": "string", + "description": "The type of field in Swimlane." + }, + "id": { + "type": "string", + "description": "The identifier for the field in Swimlane." + }, + "key": { + "type": "string", + "description": "The key for the field in Swimlane." + }, + "name": { + "type": "string", + "description": "The name of the field in Swimlane." + } + } + }, + "caseIdConfig": { + "title": "Case identifier mapping", + "description": "Mapping for the case ID.", + "type": "object", + "required": [ + "fieldType", + "id", + "key", + "name" + ], + "properties": { + "fieldType": { + "type": "string", + "description": "The type of field in Swimlane." + }, + "id": { + "type": "string", + "description": "The identifier for the field in Swimlane." + }, + "key": { + "type": "string", + "description": "The key for the field in Swimlane." + }, + "name": { + "type": "string", + "description": "The name of the field in Swimlane." + } + } + }, + "caseNameConfig": { + "title": "Case name mapping", + "description": "Mapping for the case name.", + "type": "object", + "required": [ + "fieldType", + "id", + "key", + "name" + ], + "properties": { + "fieldType": { + "type": "string", + "description": "The type of field in Swimlane." + }, + "id": { + "type": "string", + "description": "The identifier for the field in Swimlane." + }, + "key": { + "type": "string", + "description": "The key for the field in Swimlane." + }, + "name": { + "type": "string", + "description": "The name of the field in Swimlane." + } + } + }, + "commentsConfig": { + "title": "Case comment mapping", + "description": "Mapping for the case comments.", + "type": "object", + "required": [ + "fieldType", + "id", + "key", + "name" + ], + "properties": { + "fieldType": { + "type": "string", + "description": "The type of field in Swimlane." + }, + "id": { + "type": "string", + "description": "The identifier for the field in Swimlane." + }, + "key": { + "type": "string", + "description": "The key for the field in Swimlane." + }, + "name": { + "type": "string", + "description": "The name of the field in Swimlane." + } + } + }, + "descriptionConfig": { + "title": "Case description mapping", + "description": "Mapping for the case description.", + "type": "object", + "required": [ + "fieldType", + "id", + "key", + "name" + ], + "properties": { + "fieldType": { + "type": "string", + "description": "The type of field in Swimlane." + }, + "id": { + "type": "string", + "description": "The identifier for the field in Swimlane." + }, + "key": { + "type": "string", + "description": "The key for the field in Swimlane." + }, + "name": { + "type": "string", + "description": "The name of the field in Swimlane." + } + } + }, + "ruleNameConfig": { + "title": "Rule name mapping", + "description": "Mapping for the name of the alert's rule.", + "type": "object", + "required": [ + "fieldType", + "id", + "key", + "name" + ], + "properties": { + "fieldType": { + "type": "string", + "description": "The type of field in Swimlane." + }, + "id": { + "type": "string", + "description": "The identifier for the field in Swimlane." + }, + "key": { + "type": "string", + "description": "The key for the field in Swimlane." + }, + "name": { + "type": "string", + "description": "The name of the field in Swimlane." + } + } + }, + "severityConfig": { + "title": "Severity mapping", + "description": "Mapping for the severity.", + "type": "object", + "required": [ + "fieldType", + "id", + "key", + "name" + ], + "properties": { + "fieldType": { + "type": "string", + "description": "The type of field in Swimlane." + }, + "id": { + "type": "string", + "description": "The identifier for the field in Swimlane." + }, + "key": { + "type": "string", + "description": "The key for the field in Swimlane." + }, + "name": { + "type": "string", + "description": "The name of the field in Swimlane." + } + } + } + } + } + } + }, + "secrets_properties_swimlane": { + "title": "Connector secrets properties for a Swimlane connector", + "description": "Defines secrets for connectors when type is `.swimlane`.", + "type": "object", + "properties": { + "apiToken": { + "description": "Swimlane API authentication token.", + "type": "string" + } + } + }, + "create_connector_request_swimlane": { + "title": "Create Swimlane connector request", + "description": "The Swimlane connector uses the Swimlane REST API to create Swimlane records.", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_swimlane" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".swimlane" + ], + "example": ".swimlane" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_swimlane" + } + } + }, + "secrets_properties_teams": { + "title": "Connector secrets properties for a Microsoft Teams connector", + "description": "Defines secrets for connectors when type is `.teams`.", + "type": "object", + "additionalProperties": true + }, + "create_connector_request_teams": { + "title": "Create Microsoft Teams connector request", + "description": "The Microsoft Teams connector uses Incoming Webhooks.", + "type": "object", + "required": [ + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".teams" + ], + "example": ".teams" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_teams" + } + } + }, + "config_properties_tines": { + "title": "Connector request properties for a Tines connector", + "description": "Defines properties for connectors when type is `.tines`.", + "type": "object", + "additionalProperties": true + }, + "secrets_properties_tines": { + "title": "Connector secrets properties for a Tines connector", + "description": "Defines secrets for connectors when type is `.tines`.", + "type": "object", + "additionalProperties": true + }, + "create_connector_request_tines": { + "title": "Create Tines connector request", + "description": "The Tines connector uses Tines Webhook actions to send events via POST request.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_tines" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".tines" + ], + "example": ".tines" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_tines" + } + } + }, + "config_properties_webhook": { + "title": "Connector request properties for a Webhook connector", + "description": "Defines properties for connectors when type is `.webhook`.", + "type": "object", + "additionalProperties": true + }, + "secrets_properties_webhook": { + "title": "Connector secrets properties for a Webhook connector", + "description": "Defines secrets for connectors when type is `.webhook`.", + "type": "object", + "additionalProperties": true + }, + "create_connector_request_webhook": { + "title": "Create Webhook connector request", + "description": "The Webhook connector uses axios to send a POST or PUT request to a web service.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_webhook" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".webhook" + ], + "example": ".webhook" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_webhook" + } + } + }, + "config_properties_xmatters": { + "title": "Connector request properties for a xMatters connector", + "description": "Defines properties for connectors when type is `.xmatters`.", + "type": "object", + "additionalProperties": true + }, + "secrets_properties_xmatters": { + "title": "Connector secrets properties for an xMatters connector", + "description": "Defines secrets for connectors when type is `.xmatters`.", + "type": "object", + "additionalProperties": true + }, + "create_connector_request_xmatters": { + "title": "Create xMatters connector request", + "description": "The xMatters connector uses the xMatters Workflow for Elastic to send actionable alerts to on-call xMatters resources.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_xmatters" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".xmatters" + ], + "example": ".xmatters" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_xmatters" + } + } + }, + "is_deprecated": { + "type": "boolean", + "description": "Indicates whether the connector type is deprecated.", + "example": false + }, + "is_missing_secrets": { + "type": "boolean", + "description": "Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type.", + "example": false + }, + "is_preconfigured": { + "type": "boolean", + "description": "Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response.", + "example": false + }, + "connector_response_properties_cases_webhook": { + "title": "Connector request properties for a Webhook - Case Management connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_cases_webhook" + }, + "connector_type_id": { + "description": "The type of connector.", + "type": "string", + "enum": [ + ".cases-webhook" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_email": { + "title": "Connector response properties for an email connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_email" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".email" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_index": { + "title": "Connector response properties for an index connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_index" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".index" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_jira": { + "title": "Connector response properties for a Jira connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_jira" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".jira" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_opsgenie": { + "title": "Connector response properties for an Opsgenie connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_opsgenie" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".opsgenie" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_pagerduty": { + "title": "Connector response properties for a PagerDuty connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_pagerduty" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".pagerduty" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_resilient": { + "title": "Connector response properties for a IBM Resilient connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_resilient" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".resilient" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_serverlog": { + "title": "Connector response properties for a server log connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "type": "object", + "nullable": true + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".server-log" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_servicenow": { + "title": "Connector response properties for a ServiceNow ITSM connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_servicenow" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".servicenow" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_servicenow_itom": { + "title": "Connector response properties for a ServiceNow ITOM connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_servicenow_itom" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".servicenow-itom" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_servicenow_sir": { + "title": "Connector response properties for a ServiceNow SecOps connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_servicenow" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".servicenow-sir" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_slack": { + "title": "Connector response properties for a Slack connector", + "type": "object", + "required": [ + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".slack" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_swimlane": { + "title": "Connector response properties for a Swimlane connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_swimlane" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".swimlane" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_teams": { + "title": "Connector response properties for a Microsoft Teams connector", + "type": "object", + "required": [ + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".teams" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_tines": { + "title": "Connector response properties for a Tines connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_tines" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".tines" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_webhook": { + "title": "Connector response properties for a Webhook connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_webhook" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".webhook" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_xmatters": { + "title": "Connector response properties for an xMatters connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_xmatters" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".xmatters" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties": { + "title": "Connector response properties", + "description": "The properties vary depending on the connector type.", + "oneOf": [ + { + "$ref": "#/components/schemas/connector_response_properties_cases_webhook" + }, + { + "$ref": "#/components/schemas/connector_response_properties_email" + }, + { + "$ref": "#/components/schemas/connector_response_properties_index" + }, + { + "$ref": "#/components/schemas/connector_response_properties_jira" + }, + { + "$ref": "#/components/schemas/connector_response_properties_opsgenie" + }, + { + "$ref": "#/components/schemas/connector_response_properties_pagerduty" + }, + { + "$ref": "#/components/schemas/connector_response_properties_resilient" + }, + { + "$ref": "#/components/schemas/connector_response_properties_serverlog" + }, + { + "$ref": "#/components/schemas/connector_response_properties_servicenow" + }, + { + "$ref": "#/components/schemas/connector_response_properties_servicenow_itom" + }, + { + "$ref": "#/components/schemas/connector_response_properties_servicenow_sir" + }, + { + "$ref": "#/components/schemas/connector_response_properties_slack" + }, + { + "$ref": "#/components/schemas/connector_response_properties_swimlane" + }, + { + "$ref": "#/components/schemas/connector_response_properties_teams" + }, + { + "$ref": "#/components/schemas/connector_response_properties_tines" + }, + { + "$ref": "#/components/schemas/connector_response_properties_webhook" + }, + { + "$ref": "#/components/schemas/connector_response_properties_xmatters" + } + ], + "discriminator": { + "propertyName": "connector_type_id" + } + }, + "update_connector_request_cases_webhook": { + "title": "Update Webhook - Case Managment connector request", + "type": "object", + "required": [ + "config", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_cases_webhook" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_cases_webhook" + } + } + }, + "update_connector_request_index": { + "title": "Update index connector request", + "type": "object", + "required": [ + "config", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_index" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "update_connector_request_jira": { + "title": "Update Jira connector request", + "type": "object", + "required": [ + "config", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_jira" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_jira" + } + } + }, + "update_connector_request_opsgenie": { + "title": "Update Opsgenie connector request", + "type": "object", + "required": [ + "config", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_opsgenie" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_opsgenie" + } + } + }, + "update_connector_request_resilient": { + "title": "Update IBM Resilient connector request", + "type": "object", + "required": [ + "config", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_resilient" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_resilient" + } + } + }, + "update_connector_request_serverlog": { + "title": "Update server log connector request", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "update_connector_request_servicenow": { + "title": "Update ServiceNow ITSM connector or ServiceNow SecOps request", + "type": "object", + "required": [ + "config", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_servicenow" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_servicenow" + } + } + }, + "update_connector_request_servicenow_itom": { + "title": "Create ServiceNow ITOM connector request", + "type": "object", + "required": [ + "config", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_servicenow_itom" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_servicenow" + } + } + }, + "update_connector_request_swimlane": { + "title": "Update Swimlane connector request", + "type": "object", + "required": [ + "config", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_swimlane" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_swimlane" + } + } + }, + "connector_types": { + "title": "Connector types", + "type": "string", + "description": "The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`.", + "enum": [ + ".cases-webhook", + ".email", + ".index", + ".jira", + ".opsgenie", + ".pagerduty", + ".resilient", + ".servicenow", + ".servicenow-itom", + ".servicenow-sir", + ".server-log", + ".slack", + ".swimlane", + ".teams", + ".tines", + ".webhook", + ".xmatters" + ], + "example": ".server-log" + }, + "features": { + "type": "string", + "description": "The feature that uses the connector. Valid values are `alerting`, `cases`, `uptime`, and `siem`.\n", + "enum": [ + "alerting", + "cases", + "uptime", + "siem" + ] + }, + "run_connector_params_documents": { + "title": "Index connector parameters", + "description": "Test an action that indexes a document into Elasticsearch.", + "type": "object", + "required": [ + "documents" + ], + "properties": { + "documents": { + "type": "array", + "description": "The documents in JSON format for index connectors.", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "run_connector_params_level_message": { + "title": "Server log connector parameters", + "description": "Test an action that writes an entry to the Kibana server log.", + "type": "object", + "required": [ + "message" + ], + "properties": { + "level": { + "type": "string", + "description": "The log level of the message for server log connectors.", + "enum": [ + "debug", + "error", + "fatal", + "info", + "trace", + "warn" + ], + "default": "info" + }, + "message": { + "type": "string", + "description": "The message for server log connectors." + } + } + }, + "run_connector_subaction_addevent": { + "title": "The addEvent subaction", + "type": "object", + "required": [ + "subAction" + ], + "description": "The `addEvent` subaction for ServiceNow ITOM connectors.", + "properties": { + "subAction": { + "type": "string", + "description": "The action to test.", + "enum": [ + "addEvent" + ] + }, + "subActionParams": { + "type": "object", + "description": "The set of configuration properties for the action.", + "properties": { + "additional_info": { + "type": "string", + "description": "Additional information about the event." + }, + "description": { + "type": "string", + "description": "The details about the event." + }, + "event_class": { + "type": "string", + "description": "A specific instance of the source." + }, + "message_key": { + "type": "string", + "description": "All actions sharing this key are associated with the same ServiceNow alert. The default value is `:`." + }, + "metric_name": { + "type": "string", + "description": "The name of the metric." + }, + "node": { + "type": "string", + "description": "The host that the event was triggered for." + }, + "resource": { + "type": "string", + "description": "The name of the resource." + }, + "severity": { + "type": "string", + "description": "The severity of the event." + }, + "source": { + "type": "string", + "description": "The name of the event source type." + }, + "time_of_event": { + "type": "string", + "description": "The time of the event." + }, + "type": { + "type": "string", + "description": "The type of event." + } + } + } + } + }, + "run_connector_subaction_closealert": { + "title": "The closeAlert subaction", + "type": "object", + "required": [ + "subAction", + "subActionParams" + ], + "description": "The `closeAlert` subaction for Opsgenie connectors.", + "properties": { + "subAction": { + "type": "string", + "description": "The action to test.", + "enum": [ + "closeAlert" + ] + }, + "subActionParams": { + "type": "object", + "required": [ + "alias" + ], + "properties": { + "alias": { + "type": "string", + "description": "The unique identifier used for alert deduplication in Opsgenie. The alias must match the value used when creating the alert." + }, + "note": { + "type": "string", + "description": "Additional information for the alert." + }, + "source": { + "type": "string", + "description": "The display name for the source of the alert." + }, + "user": { + "type": "string", + "description": "The display name for the owner." + } + } + } + } + }, + "run_connector_subaction_createalert": { + "title": "The createAlert subaction", + "type": "object", + "required": [ + "subAction", + "subActionParams" + ], + "description": "The `createAlert` subaction for Opsgenie connectors.", + "properties": { + "subAction": { + "type": "string", + "description": "The action to test.", + "enum": [ + "createAlert" + ] + }, + "subActionParams": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "actions": { + "type": "array", + "description": "The custom actions available to the alert.", + "items": { + "type": "string" + } + }, + "alias": { + "type": "string", + "description": "The unique identifier used for alert deduplication in Opsgenie." + }, + "description": { + "type": "string", + "description": "A description that provides detailed information about the alert." + }, + "details": { + "type": "object", + "description": "The custom properties of the alert.", + "additionalProperties": true, + "example": { + "key1": "value1", + "key2": "value2" + } + }, + "entity": { + "type": "string", + "description": "The domain of the alert. For example, the application or server name." + }, + "message": { + "type": "string", + "description": "The alert message." + }, + "note": { + "type": "string", + "description": "Additional information for the alert." + }, + "priority": { + "type": "string", + "description": "The priority level for the alert.", + "enum": [ + "P1", + "P2", + "P3", + "P4", + "P5" + ] + }, + "responders": { + "type": "array", + "description": "The entities to receive notifications about the alert. If `type` is `user`, either `id` or `username` is required. If `type` is `team`, either `id` or `name` is required.\n", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The identifier for the entity." + }, + "name": { + "type": "string", + "description": "The name of the entity." + }, + "type": { + "type": "string", + "description": "The type of responders, in this case `escalation`.", + "enum": [ + "escalation", + "schedule", + "team", + "user" + ] + }, + "username": { + "type": "string", + "description": "A valid email address for the user." + } + } + } + }, + "source": { + "type": "string", + "description": "The display name for the source of the alert." + }, + "tags": { + "type": "array", + "description": "The tags for the alert.", + "items": { + "type": "string" + } + }, + "user": { + "type": "string", + "description": "The display name for the owner." + }, + "visibleTo": { + "type": "array", + "description": "The teams and users that the alert will be visible to without sending a notification. Only one of `id`, `name`, or `username` is required.", + "items": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "id": { + "type": "string", + "description": "The identifier for the entity." + }, + "name": { + "type": "string", + "description": "The name of the entity." + }, + "type": { + "type": "string", + "description": "Valid values are `team` and `user`.", + "enum": [ + "team", + "user" + ] + }, + "username": { + "type": "string", + "description": "The user name. This property is required only when the `type` is `user`." + } + } + } + } + } + } + } + }, + "run_connector_subaction_fieldsbyissuetype": { + "title": "The fieldsByIssueType subaction", + "type": "object", + "required": [ + "subAction", + "subActionParams" + ], + "description": "The `fieldsByIssueType` subaction for Jira connectors.", + "properties": { + "subAction": { + "type": "string", + "description": "The action to test.", + "enum": [ + "fieldsByIssueType" + ] + }, + "subActionParams": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "description": "The Jira issue type identifier.", + "example": 10024 + } + } + } + } + }, + "run_connector_subaction_getchoices": { + "title": "The getChoices subaction", + "type": "object", + "required": [ + "subAction", + "subActionParams" + ], + "description": "The `getChoices` subaction for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors.", + "properties": { + "subAction": { + "type": "string", + "description": "The action to test.", + "enum": [ + "getChoices" + ] + }, + "subActionParams": { + "type": "object", + "description": "The set of configuration properties for the action.", + "required": [ + "fields" + ], + "properties": { + "fields": { + "type": "array", + "description": "An array of fields.", + "items": { + "type": "string" + } + } + } + } + } + }, + "run_connector_subaction_getfields": { + "title": "The getFields subaction", + "type": "object", + "required": [ + "subAction" + ], + "description": "The `getFields` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors.", + "properties": { + "subAction": { + "type": "string", + "description": "The action to test.", + "enum": [ + "getFields" + ] + } + } + }, + "run_connector_subaction_getincident": { + "title": "The getIncident subaction", + "type": "object", + "description": "The `getIncident` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors.", + "required": [ + "subAction", + "subActionParams" + ], + "properties": { + "subAction": { + "type": "string", + "description": "The action to test.", + "enum": [ + "getIncident" + ] + }, + "subActionParams": { + "type": "object", + "required": [ + "externalId" + ], + "properties": { + "externalId": { + "type": "string", + "description": "The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier.", + "example": 71778 + } + } + } + } + }, + "run_connector_subaction_issue": { + "title": "The issue subaction", + "type": "object", + "required": [ + "subAction" + ], + "description": "The `issue` subaction for Jira connectors.", + "properties": { + "subAction": { + "type": "string", + "description": "The action to test.", + "enum": [ + "issue" + ] + }, + "subActionParams": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "description": "The Jira issue identifier.", + "example": 71778 + } + } + } + } + }, + "run_connector_subaction_issues": { + "title": "The issues subaction", + "type": "object", + "required": [ + "subAction", + "subActionParams" + ], + "description": "The `issues` subaction for Jira connectors.", + "properties": { + "subAction": { + "type": "string", + "description": "The action to test.", + "enum": [ + "issues" + ] + }, + "subActionParams": { + "type": "object", + "required": [ + "title" + ], + "properties": { + "title": { + "type": "string", + "description": "The title of the Jira issue." + } + } + } + } + }, + "run_connector_subaction_issuetypes": { + "title": "The issueTypes subaction", + "type": "object", + "required": [ + "subAction" + ], + "description": "The `issueTypes` subaction for Jira connectors.", + "properties": { + "subAction": { + "type": "string", + "description": "The action to test.", + "enum": [ + "issueTypes" + ] + } + } + }, + "run_connector_subaction_pushtoservice": { + "title": "The pushToService subaction", + "type": "object", + "required": [ + "subAction", + "subActionParams" + ], + "description": "The `pushToService` subaction for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors.", + "properties": { + "subAction": { + "type": "string", + "description": "The action to test.", + "enum": [ + "pushToService" + ] + }, + "subActionParams": { + "type": "object", + "description": "The set of configuration properties for the action.", + "properties": { + "comments": { + "type": "array", + "description": "Additional information that is sent to Jira, ServiceNow ITSM, ServiceNow SecOps, or Swimlane.", + "items": { + "type": "object", + "properties": { + "comment": { + "type": "string", + "description": "A comment related to the incident. For example, describe how to troubleshoot the issue." + }, + "commentId": { + "type": "integer", + "description": "A unique identifier for the comment." + } + } + } + }, + "incident": { + "type": "object", + "description": "Information necessary to create or update a Jira, ServiceNow ITSM, ServiveNow SecOps, or Swimlane incident.", + "properties": { + "alertId": { + "type": "string", + "description": "The alert identifier for Swimlane connectors." + }, + "caseId": { + "type": "string", + "description": "The case identifier for the incident for Swimlane connectors." + }, + "caseName": { + "type": "string", + "description": "The case name for the incident for Swimlane connectors." + }, + "category": { + "type": "string", + "description": "The category of the incident for ServiceNow ITSM and ServiceNow SecOps connectors." + }, + "correlation_display": { + "type": "string", + "description": "A descriptive label of the alert for correlation purposes for ServiceNow ITSM and ServiceNow SecOps connectors." + }, + "correlation_id": { + "type": "string", + "description": "The correlation identifier for the security incident for ServiceNow ITSM and ServiveNow SecOps connectors. Connectors using the same correlation ID are associated with the same ServiceNow incident. This value determines whether a new ServiceNow incident is created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the correlation ID value in ServiceNow. The maximum character length for this value is 100 characters. NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that ServiceNow creates a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, ServiceNow creates and continually updates a single incident record for the alert.\n" + }, + "description": { + "type": "string", + "description": "The description of the incident for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors." + }, + "dest_ip": { + "description": "A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident.\n", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "externalId": { + "type": "string", + "description": "The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. If present, the incident is updated. Otherwise, a new incident is created.\n" + }, + "impact": { + "type": "string", + "description": "The impact of the incident for ServiceNow ITSM connectors." + }, + "issueType": { + "type": "integer", + "description": "The type of incident for Jira connectors. For example, 10006. To obtain the list of valid values, set `subAction` to `issueTypes`." + }, + "labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The labels for the incident for Jira connectors. NOTE: Labels cannot contain spaces.\n" + }, + "malware_hash": { + "description": "A list of malware hashes related to the security incident for ServiceNow SecOps connectors. The hashes are added as observables to the security incident.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "malware_url": { + "type": "string", + "description": "A list of malware URLs related to the security incident for ServiceNow SecOps connectors. The URLs are added as observables to the security incident.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "parent": { + "type": "string", + "description": "The ID or key of the parent issue for Jira connectors. Applies only to `Sub-task` types of issues." + }, + "priority": { + "type": "string", + "description": "The priority of the incident in Jira and ServiceNow SecOps connectors." + }, + "ruleName": { + "type": "string", + "description": "The rule name for Swimlane connectors." + }, + "severity": { + "type": "string", + "description": "The severity of the incident for ServiceNow ITSM and Swimlane connectors." + }, + "short_description": { + "type": "string", + "description": "A short description of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. It is used for searching the contents of the knowledge base.\n" + }, + "source_ip": { + "description": "A list of source IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "subcategory": { + "type": "string", + "description": "The subcategory of the incident for ServiceNow ITSM and ServiceNow SecOps connectors." + }, + "summary": { + "type": "string", + "description": "A summary of the incident for Jira connectors." + }, + "title": { + "type": "string", + "description": "A title for the incident for Jira connectors. It is used for searching the contents of the knowledge base.\n" + }, + "urgency": { + "type": "string", + "description": "The urgency of the incident for ServiceNow ITSM connectors." + } + } + } + } + } + } + }, + "action_response_properties": { + "title": "Action response properties", + "description": "The properties vary depending on the action type.", + "type": "object", + "properties": { + "actionTypeId": { + "type": "string" + }, + "config": { + "type": "object" + }, + "id": { + "type": "string" + }, + "isDeprecated": { + "type": "boolean", + "description": "Indicates whether the action type is deprecated." + }, + "isMissingSecrets": { + "type": "boolean", + "description": "Indicates whether secrets are missing for the action." + }, + "isPreconfigured": { + "type": "boolean", + "description": "Indicates whether it is a preconfigured action." + }, + "name": { + "type": "string" + } + } + } + }, + "examples": { + "create_index_connector_request": { + "summary": "Create an index connector.", + "value": { + "name": "my-connector", + "connector_type_id": ".index", + "config": { + "index": "test-index" + } + } + }, + "create_index_connector_response": { + "summary": "A new index connector.", + "value": { + "id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad", + "connector_type_id": ".index", + "name": "my-connector", + "config": { + "index": "test-index", + "refresh": false, + "executionTimeField": null + }, + "is_preconfigured": false, + "is_deprecated": false, + "is_missing_secrets": false + } + }, + "get_connector_response": { + "summary": "A list of connector types", + "value": { + "id": "df770e30-8b8b-11ed-a780-3b746c987a81", + "name": "my_server_log_connector", + "config": {}, + "connector_type_id": ".server-log", + "is_preconfigured": false, + "is_deprecated": false, + "is_missing_secrets": false + } + }, + "update_index_connector_request": { + "summary": "Update an index connector.", + "value": { + "name": "updated-connector", + "config": { + "index": "updated-index" + } + } + }, + "get_connectors_response": { + "summary": "A list of connectors", + "value": [ + { + "id": "preconfigured-email-connector", + "name": "my-preconfigured-email-notification", + "connector_type_id": ".email", + "is_preconfigured": true, + "is_deprecated": false, + "referenced_by_count": 0 + }, + { + "id": "e07d0c80-8b8b-11ed-a780-3b746c987a81", + "name": "my-index-connector", + "config": { + "index": "test-index", + "refresh": false, + "executionTimeField": null + }, + "connector_type_id": ".index", + "is_preconfigured": false, + "is_deprecated": false, + "referenced_by_count": 2, + "is_missing_secrets": false + } + ] + }, + "get_connector_types_response": { + "summary": "A list of connector types", + "value": [ + { + "id": ".swimlane", + "name": "Swimlane", + "enabled": true, + "enabled_in_config": true, + "enabled_in_license": true, + "minimum_license_required": "gold", + "supported_feature_ids": [ + "alerting", + "cases", + "siem" + ] + }, + { + "id": ".index", + "name": "Index", + "enabled": true, + "enabled_in_config": true, + "enabled_in_license": true, + "minimum_license_required": "basic", + "supported_feature_ids": [ + "alerting", + "uptime", + "siem" + ] + }, + { + "id": ".server-log", + "name": "Server log", + "enabled": true, + "enabled_in_config": true, + "enabled_in_license": true, + "minimum_license_required": "basic", + "supported_feature_ids": [ + "alerting", + "uptime" + ] + } + ] + }, + "run_index_connector_request": { + "summary": "Run an index connector.", + "value": { + "params": { + "documents": [ + { + "id": "my_doc_id", + "name": "my_doc_name", + "message": "hello, world" + } + ] + } + } + }, + "run_jira_connector_request": { + "summary": "Run a Jira connector to retrieve the list of issue types.", + "value": { + "params": { + "subAction": "issueTypes" + } + } + }, + "run_server_log_connector_request": { + "summary": "Run a server log connector.", + "value": { + "params": { + "level": "warn", + "message": "Test warning message." + } + } + }, + "run_servicenow_itom_connector_request": { + "summary": "Run a ServiceNow ITOM connector to retrieve the list of choices.", + "value": { + "params": { + "subAction": "getChoices", + "subActionParams": { + "fields": [ + "severity", + "urgency" + ] + } + } + } + }, + "run_swimlane_connector_request": { + "summary": "Run a Swimlane connector to create an incident.", + "value": { + "params": { + "subAction": "pushToService", + "subActionParams": { + "comments": [ + { + "commentId": 1, + "comment": "A comment about the incident." + } + ], + "incident": { + "caseId": "1000", + "caseName": "Case name", + "description": "Description of the incident." + } + } + } + } + }, + "run_index_connector_response": { + "summary": "Response from running an index connector.", + "value": { + "connector_id": "fd38c600-96a5-11ed-bb79-353b74189cba", + "data": { + "errors": false, + "items": [ + { + "create": { + "_id": "4JtvwYUBrcyxt2NnfW3y", + "_index": "my-index", + "_primary_term": 1, + "_seq_no": 0, + "_shards": { + "failed": 0, + "successful": 1, + "total": 2 + }, + "_version": 1, + "result": "created", + "status": 201 + } + } + ], + "took": 135 + }, + "status": "ok" + } + }, + "run_jira_connector_response": { + "summary": "Response from retrieving the list of issue types for a Jira connector.", + "value": { + "connector_id": "b3aad810-edbe-11ec-82d1-11348ecbf4a6", + "data": [ + { + "id": 10024, + "name": "Improvement" + }, + { + "id": 10006, + "name": "Task" + }, + { + "id": 10007, + "name": "Sub-task" + }, + { + "id": 10025, + "name": "New Feature" + }, + { + "id": 10023, + "name": "Bug" + }, + { + "id": 10000, + "name": "Epic" + } + ], + "status": "ok" + } + }, + "run_server_log_connector_response": { + "summary": "Response from running a server log connector.", + "value": { + "connector_id": "7fc7b9a0-ecc9-11ec-8736-e7d63118c907", + "status": "ok" + } + }, + "run_servicenow_itom_connector_response": { + "summary": "Response from retrieving the list of choices for a ServiceNow ITOM connector.", + "value": { + "connector_id": "9d9be270-2fd2-11ed-b0e0-87533c532698", + "data": [ + { + "dependent_value": "", + "element": "severity", + "label": "Critical", + "value": 1 + }, + { + "dependent_value": "", + "element": "severity", + "label": "Major", + "value": 2 + }, + { + "dependent_value": "", + "element": "severity", + "label": "Minor", + "value": 3 + }, + { + "dependent_value": "", + "element": "severity", + "label": "Warning", + "value": 4 + }, + { + "dependent_value": "", + "element": "severity", + "label": "OK", + "value": 5 + }, + { + "dependent_value": "", + "element": "severity", + "label": "Clear", + "value": 0 + }, + { + "dependent_value": "", + "element": "urgency", + "label": "1 - High", + "value": 1 + }, + { + "dependent_value": "", + "element": "urgency", + "label": "2 - Medium", + "value": 2 + }, + { + "dependent_value": "", + "element": "urgency", + "label": "3 - Low", + "value": 3 + } + ], + "status": "ok" + } + }, + "run_swimlane_connector_response": { + "summary": "Response from creating a Swimlane incident.", + "value": { + "connector_id": "a4746470-2f94-11ed-b0e0-87533c532698", + "data": { + "id": "aKPmBHWzmdRQtx6Mx", + "title": "TEST-457", + "url": "https://elastic.swimlane.url.us/record/aNcL2xniGHGpa2AHb/aKPmBHWzmdRQtx6Mx", + "pushedDate": "2022-09-08T16:52:27.866Z", + "comments": [ + { + "commentId": 1, + "pushedDate": "2022-09-08T16:52:27.865Z" + } + ] + }, + "status": "ok" + } + } + }, + "responses": { + "401": { + "description": "Authorization information is missing or invalid.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Unauthorized response", + "properties": { + "error": { + "type": "string", + "example": "Unauthorized", + "enum": [ + "Unauthorized" + ] + }, + "message": { + "type": "string" + }, + "statusCode": { + "type": "integer", + "example": 401, + "enum": [ + 401 + ] + } + } + } + } + } + }, + "404": { + "description": "Object is not found.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Not found response", + "properties": { + "error": { + "type": "string", + "example": "Not Found", + "enum": [ + "Not Found" + ] + }, + "message": { + "type": "string", + "example": "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found" + }, + "statusCode": { + "type": "integer", + "example": 404, + "enum": [ + 404 + ] + } + } + } + } + } + }, + "200_actions": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/action_response_properties" + } + } + } + } + } + }, + "security": [ + { + "basicAuth": [] + }, + { + "apiKeyAuth": [] + } + ] +} \ No newline at end of file diff --git a/generated/kibanaactions/docs/NotFoundResponse.md b/generated/kibanaactions/docs/NotFoundResponse.md new file mode 100644 index 000000000..fdf5a82dc --- /dev/null +++ b/generated/kibanaactions/docs/NotFoundResponse.md @@ -0,0 +1,108 @@ +# NotFoundResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] +**StatusCode** | Pointer to **int32** | | [optional] + +## Methods + +### NewNotFoundResponse + +`func NewNotFoundResponse() *NotFoundResponse` + +NewNotFoundResponse instantiates a new NotFoundResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNotFoundResponseWithDefaults + +`func NewNotFoundResponseWithDefaults() *NotFoundResponse` + +NewNotFoundResponseWithDefaults instantiates a new NotFoundResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetError + +`func (o *NotFoundResponse) GetError() string` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *NotFoundResponse) GetErrorOk() (*string, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *NotFoundResponse) SetError(v string)` + +SetError sets Error field to given value. + +### HasError + +`func (o *NotFoundResponse) HasError() bool` + +HasError returns a boolean if a field has been set. + +### GetMessage + +`func (o *NotFoundResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *NotFoundResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *NotFoundResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *NotFoundResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetStatusCode + +`func (o *NotFoundResponse) GetStatusCode() int32` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *NotFoundResponse) GetStatusCodeOk() (*int32, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *NotFoundResponse) SetStatusCode(v int32)` + +SetStatusCode sets StatusCode field to given value. + +### HasStatusCode + +`func (o *NotFoundResponse) HasStatusCode() bool` + +HasStatusCode returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/docs/UnauthorizedResponse.md b/generated/kibanaactions/docs/UnauthorizedResponse.md new file mode 100644 index 000000000..13eaff5bf --- /dev/null +++ b/generated/kibanaactions/docs/UnauthorizedResponse.md @@ -0,0 +1,108 @@ +# UnauthorizedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] +**StatusCode** | Pointer to **int32** | | [optional] + +## Methods + +### NewUnauthorizedResponse + +`func NewUnauthorizedResponse() *UnauthorizedResponse` + +NewUnauthorizedResponse instantiates a new UnauthorizedResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUnauthorizedResponseWithDefaults + +`func NewUnauthorizedResponseWithDefaults() *UnauthorizedResponse` + +NewUnauthorizedResponseWithDefaults instantiates a new UnauthorizedResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetError + +`func (o *UnauthorizedResponse) GetError() string` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *UnauthorizedResponse) GetErrorOk() (*string, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *UnauthorizedResponse) SetError(v string)` + +SetError sets Error field to given value. + +### HasError + +`func (o *UnauthorizedResponse) HasError() bool` + +HasError returns a boolean if a field has been set. + +### GetMessage + +`func (o *UnauthorizedResponse) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *UnauthorizedResponse) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *UnauthorizedResponse) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *UnauthorizedResponse) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetStatusCode + +`func (o *UnauthorizedResponse) GetStatusCode() int32` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *UnauthorizedResponse) GetStatusCodeOk() (*int32, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *UnauthorizedResponse) SetStatusCode(v int32)` + +SetStatusCode sets StatusCode field to given value. + +### HasStatusCode + +`func (o *UnauthorizedResponse) HasStatusCode() bool` + +HasStatusCode returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/kibanaactions/model_connector_response_properties.go b/generated/kibanaactions/model_connector_response_properties.go index 6b174f9d4..6a218a330 100644 --- a/generated/kibanaactions/model_connector_response_properties.go +++ b/generated/kibanaactions/model_connector_response_properties.go @@ -158,254 +158,218 @@ func ConnectorResponsePropertiesXmattersAsConnectorResponseProperties(v *Connect // Unmarshal JSON data into one of the pointers in the struct func (dst *ConnectorResponseProperties) UnmarshalJSON(data []byte) error { var err error - match := 0 - // try to unmarshal data into ConnectorResponsePropertiesCasesWebhook - err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesCasesWebhook) - if err == nil { - jsonConnectorResponsePropertiesCasesWebhook, _ := json.Marshal(dst.ConnectorResponsePropertiesCasesWebhook) - if string(jsonConnectorResponsePropertiesCasesWebhook) == "{}" { // empty struct - dst.ConnectorResponsePropertiesCasesWebhook = nil + // use discriminator value to speed up the lookup + var jsonDict map[string]interface{} + err = newStrictDecoder(data).Decode(&jsonDict) + if err != nil { + return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") + } + + // check if the discriminator value is 'connector_response_properties_cases_webhook' + if jsonDict["connector_type_id"] == "connector_response_properties_cases_webhook" { + // try to unmarshal JSON data into ConnectorResponsePropertiesCasesWebhook + err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesCasesWebhook) + if err == nil { + return nil // data stored in dst.ConnectorResponsePropertiesCasesWebhook, return on the first match } else { - match++ + dst.ConnectorResponsePropertiesCasesWebhook = nil + return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesCasesWebhook: %s", err.Error()) } - } else { - dst.ConnectorResponsePropertiesCasesWebhook = nil } - // try to unmarshal data into ConnectorResponsePropertiesEmail - err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesEmail) - if err == nil { - jsonConnectorResponsePropertiesEmail, _ := json.Marshal(dst.ConnectorResponsePropertiesEmail) - if string(jsonConnectorResponsePropertiesEmail) == "{}" { // empty struct - dst.ConnectorResponsePropertiesEmail = nil + // check if the discriminator value is 'connector_response_properties_email' + if jsonDict["connector_type_id"] == "connector_response_properties_email" { + // try to unmarshal JSON data into ConnectorResponsePropertiesEmail + err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesEmail) + if err == nil { + return nil // data stored in dst.ConnectorResponsePropertiesEmail, return on the first match } else { - match++ + dst.ConnectorResponsePropertiesEmail = nil + return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesEmail: %s", err.Error()) } - } else { - dst.ConnectorResponsePropertiesEmail = nil } - // try to unmarshal data into ConnectorResponsePropertiesIndex - err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesIndex) - if err == nil { - jsonConnectorResponsePropertiesIndex, _ := json.Marshal(dst.ConnectorResponsePropertiesIndex) - if string(jsonConnectorResponsePropertiesIndex) == "{}" { // empty struct - dst.ConnectorResponsePropertiesIndex = nil + // check if the discriminator value is 'connector_response_properties_index' + if jsonDict["connector_type_id"] == "connector_response_properties_index" { + // try to unmarshal JSON data into ConnectorResponsePropertiesIndex + err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesIndex) + if err == nil { + return nil // data stored in dst.ConnectorResponsePropertiesIndex, return on the first match } else { - match++ + dst.ConnectorResponsePropertiesIndex = nil + return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesIndex: %s", err.Error()) } - } else { - dst.ConnectorResponsePropertiesIndex = nil } - // try to unmarshal data into ConnectorResponsePropertiesJira - err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesJira) - if err == nil { - jsonConnectorResponsePropertiesJira, _ := json.Marshal(dst.ConnectorResponsePropertiesJira) - if string(jsonConnectorResponsePropertiesJira) == "{}" { // empty struct - dst.ConnectorResponsePropertiesJira = nil + // check if the discriminator value is 'connector_response_properties_jira' + if jsonDict["connector_type_id"] == "connector_response_properties_jira" { + // try to unmarshal JSON data into ConnectorResponsePropertiesJira + err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesJira) + if err == nil { + return nil // data stored in dst.ConnectorResponsePropertiesJira, return on the first match } else { - match++ + dst.ConnectorResponsePropertiesJira = nil + return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesJira: %s", err.Error()) } - } else { - dst.ConnectorResponsePropertiesJira = nil } - // try to unmarshal data into ConnectorResponsePropertiesOpsgenie - err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesOpsgenie) - if err == nil { - jsonConnectorResponsePropertiesOpsgenie, _ := json.Marshal(dst.ConnectorResponsePropertiesOpsgenie) - if string(jsonConnectorResponsePropertiesOpsgenie) == "{}" { // empty struct - dst.ConnectorResponsePropertiesOpsgenie = nil + // check if the discriminator value is 'connector_response_properties_opsgenie' + if jsonDict["connector_type_id"] == "connector_response_properties_opsgenie" { + // try to unmarshal JSON data into ConnectorResponsePropertiesOpsgenie + err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesOpsgenie) + if err == nil { + return nil // data stored in dst.ConnectorResponsePropertiesOpsgenie, return on the first match } else { - match++ + dst.ConnectorResponsePropertiesOpsgenie = nil + return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesOpsgenie: %s", err.Error()) } - } else { - dst.ConnectorResponsePropertiesOpsgenie = nil } - // try to unmarshal data into ConnectorResponsePropertiesPagerduty - err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesPagerduty) - if err == nil { - jsonConnectorResponsePropertiesPagerduty, _ := json.Marshal(dst.ConnectorResponsePropertiesPagerduty) - if string(jsonConnectorResponsePropertiesPagerduty) == "{}" { // empty struct - dst.ConnectorResponsePropertiesPagerduty = nil + // check if the discriminator value is 'connector_response_properties_pagerduty' + if jsonDict["connector_type_id"] == "connector_response_properties_pagerduty" { + // try to unmarshal JSON data into ConnectorResponsePropertiesPagerduty + err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesPagerduty) + if err == nil { + return nil // data stored in dst.ConnectorResponsePropertiesPagerduty, return on the first match } else { - match++ + dst.ConnectorResponsePropertiesPagerduty = nil + return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesPagerduty: %s", err.Error()) } - } else { - dst.ConnectorResponsePropertiesPagerduty = nil } - // try to unmarshal data into ConnectorResponsePropertiesResilient - err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesResilient) - if err == nil { - jsonConnectorResponsePropertiesResilient, _ := json.Marshal(dst.ConnectorResponsePropertiesResilient) - if string(jsonConnectorResponsePropertiesResilient) == "{}" { // empty struct - dst.ConnectorResponsePropertiesResilient = nil + // check if the discriminator value is 'connector_response_properties_resilient' + if jsonDict["connector_type_id"] == "connector_response_properties_resilient" { + // try to unmarshal JSON data into ConnectorResponsePropertiesResilient + err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesResilient) + if err == nil { + return nil // data stored in dst.ConnectorResponsePropertiesResilient, return on the first match } else { - match++ + dst.ConnectorResponsePropertiesResilient = nil + return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesResilient: %s", err.Error()) } - } else { - dst.ConnectorResponsePropertiesResilient = nil } - // try to unmarshal data into ConnectorResponsePropertiesServerlog - err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesServerlog) - if err == nil { - jsonConnectorResponsePropertiesServerlog, _ := json.Marshal(dst.ConnectorResponsePropertiesServerlog) - if string(jsonConnectorResponsePropertiesServerlog) == "{}" { // empty struct - dst.ConnectorResponsePropertiesServerlog = nil + // check if the discriminator value is 'connector_response_properties_serverlog' + if jsonDict["connector_type_id"] == "connector_response_properties_serverlog" { + // try to unmarshal JSON data into ConnectorResponsePropertiesServerlog + err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesServerlog) + if err == nil { + return nil // data stored in dst.ConnectorResponsePropertiesServerlog, return on the first match } else { - match++ + dst.ConnectorResponsePropertiesServerlog = nil + return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesServerlog: %s", err.Error()) } - } else { - dst.ConnectorResponsePropertiesServerlog = nil } - // try to unmarshal data into ConnectorResponsePropertiesServicenow - err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesServicenow) - if err == nil { - jsonConnectorResponsePropertiesServicenow, _ := json.Marshal(dst.ConnectorResponsePropertiesServicenow) - if string(jsonConnectorResponsePropertiesServicenow) == "{}" { // empty struct - dst.ConnectorResponsePropertiesServicenow = nil + // check if the discriminator value is 'connector_response_properties_servicenow' + if jsonDict["connector_type_id"] == "connector_response_properties_servicenow" { + // try to unmarshal JSON data into ConnectorResponsePropertiesServicenow + err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesServicenow) + if err == nil { + return nil // data stored in dst.ConnectorResponsePropertiesServicenow, return on the first match } else { - match++ + dst.ConnectorResponsePropertiesServicenow = nil + return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesServicenow: %s", err.Error()) } - } else { - dst.ConnectorResponsePropertiesServicenow = nil } - // try to unmarshal data into ConnectorResponsePropertiesServicenowItom - err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesServicenowItom) - if err == nil { - jsonConnectorResponsePropertiesServicenowItom, _ := json.Marshal(dst.ConnectorResponsePropertiesServicenowItom) - if string(jsonConnectorResponsePropertiesServicenowItom) == "{}" { // empty struct - dst.ConnectorResponsePropertiesServicenowItom = nil + // check if the discriminator value is 'connector_response_properties_servicenow_itom' + if jsonDict["connector_type_id"] == "connector_response_properties_servicenow_itom" { + // try to unmarshal JSON data into ConnectorResponsePropertiesServicenowItom + err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesServicenowItom) + if err == nil { + return nil // data stored in dst.ConnectorResponsePropertiesServicenowItom, return on the first match } else { - match++ + dst.ConnectorResponsePropertiesServicenowItom = nil + return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesServicenowItom: %s", err.Error()) } - } else { - dst.ConnectorResponsePropertiesServicenowItom = nil } - // try to unmarshal data into ConnectorResponsePropertiesServicenowSir - err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesServicenowSir) - if err == nil { - jsonConnectorResponsePropertiesServicenowSir, _ := json.Marshal(dst.ConnectorResponsePropertiesServicenowSir) - if string(jsonConnectorResponsePropertiesServicenowSir) == "{}" { // empty struct - dst.ConnectorResponsePropertiesServicenowSir = nil + // check if the discriminator value is 'connector_response_properties_servicenow_sir' + if jsonDict["connector_type_id"] == "connector_response_properties_servicenow_sir" { + // try to unmarshal JSON data into ConnectorResponsePropertiesServicenowSir + err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesServicenowSir) + if err == nil { + return nil // data stored in dst.ConnectorResponsePropertiesServicenowSir, return on the first match } else { - match++ + dst.ConnectorResponsePropertiesServicenowSir = nil + return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesServicenowSir: %s", err.Error()) } - } else { - dst.ConnectorResponsePropertiesServicenowSir = nil } - // try to unmarshal data into ConnectorResponsePropertiesSlack - err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesSlack) - if err == nil { - jsonConnectorResponsePropertiesSlack, _ := json.Marshal(dst.ConnectorResponsePropertiesSlack) - if string(jsonConnectorResponsePropertiesSlack) == "{}" { // empty struct - dst.ConnectorResponsePropertiesSlack = nil + // check if the discriminator value is 'connector_response_properties_slack' + if jsonDict["connector_type_id"] == "connector_response_properties_slack" { + // try to unmarshal JSON data into ConnectorResponsePropertiesSlack + err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesSlack) + if err == nil { + return nil // data stored in dst.ConnectorResponsePropertiesSlack, return on the first match } else { - match++ + dst.ConnectorResponsePropertiesSlack = nil + return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesSlack: %s", err.Error()) } - } else { - dst.ConnectorResponsePropertiesSlack = nil } - // try to unmarshal data into ConnectorResponsePropertiesSwimlane - err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesSwimlane) - if err == nil { - jsonConnectorResponsePropertiesSwimlane, _ := json.Marshal(dst.ConnectorResponsePropertiesSwimlane) - if string(jsonConnectorResponsePropertiesSwimlane) == "{}" { // empty struct - dst.ConnectorResponsePropertiesSwimlane = nil + // check if the discriminator value is 'connector_response_properties_swimlane' + if jsonDict["connector_type_id"] == "connector_response_properties_swimlane" { + // try to unmarshal JSON data into ConnectorResponsePropertiesSwimlane + err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesSwimlane) + if err == nil { + return nil // data stored in dst.ConnectorResponsePropertiesSwimlane, return on the first match } else { - match++ + dst.ConnectorResponsePropertiesSwimlane = nil + return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesSwimlane: %s", err.Error()) } - } else { - dst.ConnectorResponsePropertiesSwimlane = nil } - // try to unmarshal data into ConnectorResponsePropertiesTeams - err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesTeams) - if err == nil { - jsonConnectorResponsePropertiesTeams, _ := json.Marshal(dst.ConnectorResponsePropertiesTeams) - if string(jsonConnectorResponsePropertiesTeams) == "{}" { // empty struct - dst.ConnectorResponsePropertiesTeams = nil + // check if the discriminator value is 'connector_response_properties_teams' + if jsonDict["connector_type_id"] == "connector_response_properties_teams" { + // try to unmarshal JSON data into ConnectorResponsePropertiesTeams + err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesTeams) + if err == nil { + return nil // data stored in dst.ConnectorResponsePropertiesTeams, return on the first match } else { - match++ + dst.ConnectorResponsePropertiesTeams = nil + return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesTeams: %s", err.Error()) } - } else { - dst.ConnectorResponsePropertiesTeams = nil } - // try to unmarshal data into ConnectorResponsePropertiesTines - err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesTines) - if err == nil { - jsonConnectorResponsePropertiesTines, _ := json.Marshal(dst.ConnectorResponsePropertiesTines) - if string(jsonConnectorResponsePropertiesTines) == "{}" { // empty struct - dst.ConnectorResponsePropertiesTines = nil + // check if the discriminator value is 'connector_response_properties_tines' + if jsonDict["connector_type_id"] == "connector_response_properties_tines" { + // try to unmarshal JSON data into ConnectorResponsePropertiesTines + err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesTines) + if err == nil { + return nil // data stored in dst.ConnectorResponsePropertiesTines, return on the first match } else { - match++ + dst.ConnectorResponsePropertiesTines = nil + return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesTines: %s", err.Error()) } - } else { - dst.ConnectorResponsePropertiesTines = nil } - // try to unmarshal data into ConnectorResponsePropertiesWebhook - err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesWebhook) - if err == nil { - jsonConnectorResponsePropertiesWebhook, _ := json.Marshal(dst.ConnectorResponsePropertiesWebhook) - if string(jsonConnectorResponsePropertiesWebhook) == "{}" { // empty struct - dst.ConnectorResponsePropertiesWebhook = nil + // check if the discriminator value is 'connector_response_properties_webhook' + if jsonDict["connector_type_id"] == "connector_response_properties_webhook" { + // try to unmarshal JSON data into ConnectorResponsePropertiesWebhook + err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesWebhook) + if err == nil { + return nil // data stored in dst.ConnectorResponsePropertiesWebhook, return on the first match } else { - match++ + dst.ConnectorResponsePropertiesWebhook = nil + return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesWebhook: %s", err.Error()) } - } else { - dst.ConnectorResponsePropertiesWebhook = nil } - // try to unmarshal data into ConnectorResponsePropertiesXmatters - err = newStrictDecoder(data).Decode(&dst.ConnectorResponsePropertiesXmatters) - if err == nil { - jsonConnectorResponsePropertiesXmatters, _ := json.Marshal(dst.ConnectorResponsePropertiesXmatters) - if string(jsonConnectorResponsePropertiesXmatters) == "{}" { // empty struct - dst.ConnectorResponsePropertiesXmatters = nil + // check if the discriminator value is 'connector_response_properties_xmatters' + if jsonDict["connector_type_id"] == "connector_response_properties_xmatters" { + // try to unmarshal JSON data into ConnectorResponsePropertiesXmatters + err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesXmatters) + if err == nil { + return nil // data stored in dst.ConnectorResponsePropertiesXmatters, return on the first match } else { - match++ + dst.ConnectorResponsePropertiesXmatters = nil + return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesXmatters: %s", err.Error()) } - } else { - dst.ConnectorResponsePropertiesXmatters = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.ConnectorResponsePropertiesCasesWebhook = nil - dst.ConnectorResponsePropertiesEmail = nil - dst.ConnectorResponsePropertiesIndex = nil - dst.ConnectorResponsePropertiesJira = nil - dst.ConnectorResponsePropertiesOpsgenie = nil - dst.ConnectorResponsePropertiesPagerduty = nil - dst.ConnectorResponsePropertiesResilient = nil - dst.ConnectorResponsePropertiesServerlog = nil - dst.ConnectorResponsePropertiesServicenow = nil - dst.ConnectorResponsePropertiesServicenowItom = nil - dst.ConnectorResponsePropertiesServicenowSir = nil - dst.ConnectorResponsePropertiesSlack = nil - dst.ConnectorResponsePropertiesSwimlane = nil - dst.ConnectorResponsePropertiesTeams = nil - dst.ConnectorResponsePropertiesTines = nil - dst.ConnectorResponsePropertiesWebhook = nil - dst.ConnectorResponsePropertiesXmatters = nil - - return fmt.Errorf("data matches more than one schema in oneOf(ConnectorResponseProperties)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(ConnectorResponseProperties)") } + + return nil } // Marshal data from the first non-nil pointers in the struct to JSON diff --git a/generated/kibanaactions/model_create_connector_request_body_properties.go b/generated/kibanaactions/model_create_connector_request_body_properties.go index 14a27e592..21ff32d88 100644 --- a/generated/kibanaactions/model_create_connector_request_body_properties.go +++ b/generated/kibanaactions/model_create_connector_request_body_properties.go @@ -158,254 +158,218 @@ func CreateConnectorRequestXmattersAsCreateConnectorRequestBodyProperties(v *Cre // Unmarshal JSON data into one of the pointers in the struct func (dst *CreateConnectorRequestBodyProperties) UnmarshalJSON(data []byte) error { var err error - match := 0 - // try to unmarshal data into CreateConnectorRequestCasesWebhook - err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestCasesWebhook) - if err == nil { - jsonCreateConnectorRequestCasesWebhook, _ := json.Marshal(dst.CreateConnectorRequestCasesWebhook) - if string(jsonCreateConnectorRequestCasesWebhook) == "{}" { // empty struct - dst.CreateConnectorRequestCasesWebhook = nil + // use discriminator value to speed up the lookup + var jsonDict map[string]interface{} + err = newStrictDecoder(data).Decode(&jsonDict) + if err != nil { + return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") + } + + // check if the discriminator value is 'create_connector_request_cases_webhook' + if jsonDict["connector_type_id"] == "create_connector_request_cases_webhook" { + // try to unmarshal JSON data into CreateConnectorRequestCasesWebhook + err = json.Unmarshal(data, &dst.CreateConnectorRequestCasesWebhook) + if err == nil { + return nil // data stored in dst.CreateConnectorRequestCasesWebhook, return on the first match } else { - match++ + dst.CreateConnectorRequestCasesWebhook = nil + return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestCasesWebhook: %s", err.Error()) } - } else { - dst.CreateConnectorRequestCasesWebhook = nil } - // try to unmarshal data into CreateConnectorRequestEmail - err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestEmail) - if err == nil { - jsonCreateConnectorRequestEmail, _ := json.Marshal(dst.CreateConnectorRequestEmail) - if string(jsonCreateConnectorRequestEmail) == "{}" { // empty struct - dst.CreateConnectorRequestEmail = nil + // check if the discriminator value is 'create_connector_request_email' + if jsonDict["connector_type_id"] == "create_connector_request_email" { + // try to unmarshal JSON data into CreateConnectorRequestEmail + err = json.Unmarshal(data, &dst.CreateConnectorRequestEmail) + if err == nil { + return nil // data stored in dst.CreateConnectorRequestEmail, return on the first match } else { - match++ + dst.CreateConnectorRequestEmail = nil + return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestEmail: %s", err.Error()) } - } else { - dst.CreateConnectorRequestEmail = nil } - // try to unmarshal data into CreateConnectorRequestIndex - err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestIndex) - if err == nil { - jsonCreateConnectorRequestIndex, _ := json.Marshal(dst.CreateConnectorRequestIndex) - if string(jsonCreateConnectorRequestIndex) == "{}" { // empty struct - dst.CreateConnectorRequestIndex = nil + // check if the discriminator value is 'create_connector_request_index' + if jsonDict["connector_type_id"] == "create_connector_request_index" { + // try to unmarshal JSON data into CreateConnectorRequestIndex + err = json.Unmarshal(data, &dst.CreateConnectorRequestIndex) + if err == nil { + return nil // data stored in dst.CreateConnectorRequestIndex, return on the first match } else { - match++ + dst.CreateConnectorRequestIndex = nil + return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestIndex: %s", err.Error()) } - } else { - dst.CreateConnectorRequestIndex = nil } - // try to unmarshal data into CreateConnectorRequestJira - err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestJira) - if err == nil { - jsonCreateConnectorRequestJira, _ := json.Marshal(dst.CreateConnectorRequestJira) - if string(jsonCreateConnectorRequestJira) == "{}" { // empty struct - dst.CreateConnectorRequestJira = nil + // check if the discriminator value is 'create_connector_request_jira' + if jsonDict["connector_type_id"] == "create_connector_request_jira" { + // try to unmarshal JSON data into CreateConnectorRequestJira + err = json.Unmarshal(data, &dst.CreateConnectorRequestJira) + if err == nil { + return nil // data stored in dst.CreateConnectorRequestJira, return on the first match } else { - match++ + dst.CreateConnectorRequestJira = nil + return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestJira: %s", err.Error()) } - } else { - dst.CreateConnectorRequestJira = nil } - // try to unmarshal data into CreateConnectorRequestOpsgenie - err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestOpsgenie) - if err == nil { - jsonCreateConnectorRequestOpsgenie, _ := json.Marshal(dst.CreateConnectorRequestOpsgenie) - if string(jsonCreateConnectorRequestOpsgenie) == "{}" { // empty struct - dst.CreateConnectorRequestOpsgenie = nil + // check if the discriminator value is 'create_connector_request_opsgenie' + if jsonDict["connector_type_id"] == "create_connector_request_opsgenie" { + // try to unmarshal JSON data into CreateConnectorRequestOpsgenie + err = json.Unmarshal(data, &dst.CreateConnectorRequestOpsgenie) + if err == nil { + return nil // data stored in dst.CreateConnectorRequestOpsgenie, return on the first match } else { - match++ + dst.CreateConnectorRequestOpsgenie = nil + return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestOpsgenie: %s", err.Error()) } - } else { - dst.CreateConnectorRequestOpsgenie = nil } - // try to unmarshal data into CreateConnectorRequestPagerduty - err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestPagerduty) - if err == nil { - jsonCreateConnectorRequestPagerduty, _ := json.Marshal(dst.CreateConnectorRequestPagerduty) - if string(jsonCreateConnectorRequestPagerduty) == "{}" { // empty struct - dst.CreateConnectorRequestPagerduty = nil + // check if the discriminator value is 'create_connector_request_pagerduty' + if jsonDict["connector_type_id"] == "create_connector_request_pagerduty" { + // try to unmarshal JSON data into CreateConnectorRequestPagerduty + err = json.Unmarshal(data, &dst.CreateConnectorRequestPagerduty) + if err == nil { + return nil // data stored in dst.CreateConnectorRequestPagerduty, return on the first match } else { - match++ + dst.CreateConnectorRequestPagerduty = nil + return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestPagerduty: %s", err.Error()) } - } else { - dst.CreateConnectorRequestPagerduty = nil } - // try to unmarshal data into CreateConnectorRequestResilient - err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestResilient) - if err == nil { - jsonCreateConnectorRequestResilient, _ := json.Marshal(dst.CreateConnectorRequestResilient) - if string(jsonCreateConnectorRequestResilient) == "{}" { // empty struct - dst.CreateConnectorRequestResilient = nil + // check if the discriminator value is 'create_connector_request_resilient' + if jsonDict["connector_type_id"] == "create_connector_request_resilient" { + // try to unmarshal JSON data into CreateConnectorRequestResilient + err = json.Unmarshal(data, &dst.CreateConnectorRequestResilient) + if err == nil { + return nil // data stored in dst.CreateConnectorRequestResilient, return on the first match } else { - match++ + dst.CreateConnectorRequestResilient = nil + return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestResilient: %s", err.Error()) } - } else { - dst.CreateConnectorRequestResilient = nil } - // try to unmarshal data into CreateConnectorRequestServerlog - err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestServerlog) - if err == nil { - jsonCreateConnectorRequestServerlog, _ := json.Marshal(dst.CreateConnectorRequestServerlog) - if string(jsonCreateConnectorRequestServerlog) == "{}" { // empty struct - dst.CreateConnectorRequestServerlog = nil + // check if the discriminator value is 'create_connector_request_serverlog' + if jsonDict["connector_type_id"] == "create_connector_request_serverlog" { + // try to unmarshal JSON data into CreateConnectorRequestServerlog + err = json.Unmarshal(data, &dst.CreateConnectorRequestServerlog) + if err == nil { + return nil // data stored in dst.CreateConnectorRequestServerlog, return on the first match } else { - match++ + dst.CreateConnectorRequestServerlog = nil + return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestServerlog: %s", err.Error()) } - } else { - dst.CreateConnectorRequestServerlog = nil } - // try to unmarshal data into CreateConnectorRequestServicenow - err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestServicenow) - if err == nil { - jsonCreateConnectorRequestServicenow, _ := json.Marshal(dst.CreateConnectorRequestServicenow) - if string(jsonCreateConnectorRequestServicenow) == "{}" { // empty struct - dst.CreateConnectorRequestServicenow = nil + // check if the discriminator value is 'create_connector_request_servicenow' + if jsonDict["connector_type_id"] == "create_connector_request_servicenow" { + // try to unmarshal JSON data into CreateConnectorRequestServicenow + err = json.Unmarshal(data, &dst.CreateConnectorRequestServicenow) + if err == nil { + return nil // data stored in dst.CreateConnectorRequestServicenow, return on the first match } else { - match++ + dst.CreateConnectorRequestServicenow = nil + return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestServicenow: %s", err.Error()) } - } else { - dst.CreateConnectorRequestServicenow = nil } - // try to unmarshal data into CreateConnectorRequestServicenowItom - err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestServicenowItom) - if err == nil { - jsonCreateConnectorRequestServicenowItom, _ := json.Marshal(dst.CreateConnectorRequestServicenowItom) - if string(jsonCreateConnectorRequestServicenowItom) == "{}" { // empty struct - dst.CreateConnectorRequestServicenowItom = nil + // check if the discriminator value is 'create_connector_request_servicenow_itom' + if jsonDict["connector_type_id"] == "create_connector_request_servicenow_itom" { + // try to unmarshal JSON data into CreateConnectorRequestServicenowItom + err = json.Unmarshal(data, &dst.CreateConnectorRequestServicenowItom) + if err == nil { + return nil // data stored in dst.CreateConnectorRequestServicenowItom, return on the first match } else { - match++ + dst.CreateConnectorRequestServicenowItom = nil + return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestServicenowItom: %s", err.Error()) } - } else { - dst.CreateConnectorRequestServicenowItom = nil } - // try to unmarshal data into CreateConnectorRequestServicenowSir - err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestServicenowSir) - if err == nil { - jsonCreateConnectorRequestServicenowSir, _ := json.Marshal(dst.CreateConnectorRequestServicenowSir) - if string(jsonCreateConnectorRequestServicenowSir) == "{}" { // empty struct - dst.CreateConnectorRequestServicenowSir = nil + // check if the discriminator value is 'create_connector_request_servicenow_sir' + if jsonDict["connector_type_id"] == "create_connector_request_servicenow_sir" { + // try to unmarshal JSON data into CreateConnectorRequestServicenowSir + err = json.Unmarshal(data, &dst.CreateConnectorRequestServicenowSir) + if err == nil { + return nil // data stored in dst.CreateConnectorRequestServicenowSir, return on the first match } else { - match++ + dst.CreateConnectorRequestServicenowSir = nil + return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestServicenowSir: %s", err.Error()) } - } else { - dst.CreateConnectorRequestServicenowSir = nil } - // try to unmarshal data into CreateConnectorRequestSlack - err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestSlack) - if err == nil { - jsonCreateConnectorRequestSlack, _ := json.Marshal(dst.CreateConnectorRequestSlack) - if string(jsonCreateConnectorRequestSlack) == "{}" { // empty struct - dst.CreateConnectorRequestSlack = nil + // check if the discriminator value is 'create_connector_request_slack' + if jsonDict["connector_type_id"] == "create_connector_request_slack" { + // try to unmarshal JSON data into CreateConnectorRequestSlack + err = json.Unmarshal(data, &dst.CreateConnectorRequestSlack) + if err == nil { + return nil // data stored in dst.CreateConnectorRequestSlack, return on the first match } else { - match++ + dst.CreateConnectorRequestSlack = nil + return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestSlack: %s", err.Error()) } - } else { - dst.CreateConnectorRequestSlack = nil } - // try to unmarshal data into CreateConnectorRequestSwimlane - err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestSwimlane) - if err == nil { - jsonCreateConnectorRequestSwimlane, _ := json.Marshal(dst.CreateConnectorRequestSwimlane) - if string(jsonCreateConnectorRequestSwimlane) == "{}" { // empty struct - dst.CreateConnectorRequestSwimlane = nil + // check if the discriminator value is 'create_connector_request_swimlane' + if jsonDict["connector_type_id"] == "create_connector_request_swimlane" { + // try to unmarshal JSON data into CreateConnectorRequestSwimlane + err = json.Unmarshal(data, &dst.CreateConnectorRequestSwimlane) + if err == nil { + return nil // data stored in dst.CreateConnectorRequestSwimlane, return on the first match } else { - match++ + dst.CreateConnectorRequestSwimlane = nil + return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestSwimlane: %s", err.Error()) } - } else { - dst.CreateConnectorRequestSwimlane = nil } - // try to unmarshal data into CreateConnectorRequestTeams - err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestTeams) - if err == nil { - jsonCreateConnectorRequestTeams, _ := json.Marshal(dst.CreateConnectorRequestTeams) - if string(jsonCreateConnectorRequestTeams) == "{}" { // empty struct - dst.CreateConnectorRequestTeams = nil + // check if the discriminator value is 'create_connector_request_teams' + if jsonDict["connector_type_id"] == "create_connector_request_teams" { + // try to unmarshal JSON data into CreateConnectorRequestTeams + err = json.Unmarshal(data, &dst.CreateConnectorRequestTeams) + if err == nil { + return nil // data stored in dst.CreateConnectorRequestTeams, return on the first match } else { - match++ + dst.CreateConnectorRequestTeams = nil + return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestTeams: %s", err.Error()) } - } else { - dst.CreateConnectorRequestTeams = nil } - // try to unmarshal data into CreateConnectorRequestTines - err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestTines) - if err == nil { - jsonCreateConnectorRequestTines, _ := json.Marshal(dst.CreateConnectorRequestTines) - if string(jsonCreateConnectorRequestTines) == "{}" { // empty struct - dst.CreateConnectorRequestTines = nil + // check if the discriminator value is 'create_connector_request_tines' + if jsonDict["connector_type_id"] == "create_connector_request_tines" { + // try to unmarshal JSON data into CreateConnectorRequestTines + err = json.Unmarshal(data, &dst.CreateConnectorRequestTines) + if err == nil { + return nil // data stored in dst.CreateConnectorRequestTines, return on the first match } else { - match++ + dst.CreateConnectorRequestTines = nil + return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestTines: %s", err.Error()) } - } else { - dst.CreateConnectorRequestTines = nil } - // try to unmarshal data into CreateConnectorRequestWebhook - err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestWebhook) - if err == nil { - jsonCreateConnectorRequestWebhook, _ := json.Marshal(dst.CreateConnectorRequestWebhook) - if string(jsonCreateConnectorRequestWebhook) == "{}" { // empty struct - dst.CreateConnectorRequestWebhook = nil + // check if the discriminator value is 'create_connector_request_webhook' + if jsonDict["connector_type_id"] == "create_connector_request_webhook" { + // try to unmarshal JSON data into CreateConnectorRequestWebhook + err = json.Unmarshal(data, &dst.CreateConnectorRequestWebhook) + if err == nil { + return nil // data stored in dst.CreateConnectorRequestWebhook, return on the first match } else { - match++ + dst.CreateConnectorRequestWebhook = nil + return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestWebhook: %s", err.Error()) } - } else { - dst.CreateConnectorRequestWebhook = nil } - // try to unmarshal data into CreateConnectorRequestXmatters - err = newStrictDecoder(data).Decode(&dst.CreateConnectorRequestXmatters) - if err == nil { - jsonCreateConnectorRequestXmatters, _ := json.Marshal(dst.CreateConnectorRequestXmatters) - if string(jsonCreateConnectorRequestXmatters) == "{}" { // empty struct - dst.CreateConnectorRequestXmatters = nil + // check if the discriminator value is 'create_connector_request_xmatters' + if jsonDict["connector_type_id"] == "create_connector_request_xmatters" { + // try to unmarshal JSON data into CreateConnectorRequestXmatters + err = json.Unmarshal(data, &dst.CreateConnectorRequestXmatters) + if err == nil { + return nil // data stored in dst.CreateConnectorRequestXmatters, return on the first match } else { - match++ + dst.CreateConnectorRequestXmatters = nil + return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestXmatters: %s", err.Error()) } - } else { - dst.CreateConnectorRequestXmatters = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.CreateConnectorRequestCasesWebhook = nil - dst.CreateConnectorRequestEmail = nil - dst.CreateConnectorRequestIndex = nil - dst.CreateConnectorRequestJira = nil - dst.CreateConnectorRequestOpsgenie = nil - dst.CreateConnectorRequestPagerduty = nil - dst.CreateConnectorRequestResilient = nil - dst.CreateConnectorRequestServerlog = nil - dst.CreateConnectorRequestServicenow = nil - dst.CreateConnectorRequestServicenowItom = nil - dst.CreateConnectorRequestServicenowSir = nil - dst.CreateConnectorRequestSlack = nil - dst.CreateConnectorRequestSwimlane = nil - dst.CreateConnectorRequestTeams = nil - dst.CreateConnectorRequestTines = nil - dst.CreateConnectorRequestWebhook = nil - dst.CreateConnectorRequestXmatters = nil - - return fmt.Errorf("data matches more than one schema in oneOf(CreateConnectorRequestBodyProperties)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(CreateConnectorRequestBodyProperties)") } + + return nil } // Marshal data from the first non-nil pointers in the struct to JSON diff --git a/generated/kibanaactions/model_not_found_response.go b/generated/kibanaactions/model_not_found_response.go new file mode 100644 index 000000000..f617d7b74 --- /dev/null +++ b/generated/kibanaactions/model_not_found_response.go @@ -0,0 +1,196 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the NotFoundResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NotFoundResponse{} + +// NotFoundResponse struct for NotFoundResponse +type NotFoundResponse struct { + Error *string `json:"error,omitempty"` + Message *string `json:"message,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty"` +} + +// NewNotFoundResponse instantiates a new NotFoundResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNotFoundResponse() *NotFoundResponse { + this := NotFoundResponse{} + return &this +} + +// NewNotFoundResponseWithDefaults instantiates a new NotFoundResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNotFoundResponseWithDefaults() *NotFoundResponse { + this := NotFoundResponse{} + return &this +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *NotFoundResponse) GetError() string { + if o == nil || IsNil(o.Error) { + var ret string + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NotFoundResponse) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *NotFoundResponse) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *NotFoundResponse) SetError(v string) { + o.Error = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *NotFoundResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NotFoundResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *NotFoundResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *NotFoundResponse) SetMessage(v string) { + o.Message = &v +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *NotFoundResponse) GetStatusCode() int32 { + if o == nil || IsNil(o.StatusCode) { + var ret int32 + return ret + } + return *o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NotFoundResponse) GetStatusCodeOk() (*int32, bool) { + if o == nil || IsNil(o.StatusCode) { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *NotFoundResponse) HasStatusCode() bool { + if o != nil && !IsNil(o.StatusCode) { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. +func (o *NotFoundResponse) SetStatusCode(v int32) { + o.StatusCode = &v +} + +func (o NotFoundResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NotFoundResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.StatusCode) { + toSerialize["statusCode"] = o.StatusCode + } + return toSerialize, nil +} + +type NullableNotFoundResponse struct { + value *NotFoundResponse + isSet bool +} + +func (v NullableNotFoundResponse) Get() *NotFoundResponse { + return v.value +} + +func (v *NullableNotFoundResponse) Set(val *NotFoundResponse) { + v.value = val + v.isSet = true +} + +func (v NullableNotFoundResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableNotFoundResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNotFoundResponse(val *NotFoundResponse) *NullableNotFoundResponse { + return &NullableNotFoundResponse{value: val, isSet: true} +} + +func (v NullableNotFoundResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNotFoundResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_run_connector_200_response_data.go b/generated/kibanaactions/model_run_connector_200_response_data.go index 78537551f..f807fe5e9 100644 --- a/generated/kibanaactions/model_run_connector_200_response_data.go +++ b/generated/kibanaactions/model_run_connector_200_response_data.go @@ -18,7 +18,7 @@ import ( // RunConnector200ResponseData - struct for RunConnector200ResponseData type RunConnector200ResponseData struct { ArrayOfMapmapOfStringinterface *[]map[string]interface{} - MapmapOfStringinterface *map[string]interface{} + MapmapOfStringinterface *map[string]interface{} } // []map[string]interface{}AsRunConnector200ResponseData is a convenience function that returns []map[string]interface{} wrapped in RunConnector200ResponseData @@ -35,15 +35,16 @@ func MapmapOfStringinterfaceAsRunConnector200ResponseData(v *map[string]interfac } } + // Unmarshal JSON data into one of the pointers in the struct func (dst *RunConnector200ResponseData) UnmarshalJSON(data []byte) error { var err error match := 0 // try to unmarshal data into ArrayOfMapmapOfStringinterface{} - err = newStrictDecoder(data).Decode(&dst.ArrayOfMapmapOfStringinterface) + err = json.Unmarshal(data, &dst.ArrayOfMapmapOfStringinterface) if err == nil { - jsonArrayOfMapmapOfStringinterface, _ := json.Marshal(dst.ArrayOfMapmapOfStringinterface) - if string(jsonArrayOfMapmapOfStringinterface) == "{}" { // empty struct + jsonmapstringinterface, _ := json.Marshal(dst.ArrayOfMapmapOfStringinterface) + if string(jsonmapstringinterface) == "{}" { // empty struct dst.ArrayOfMapmapOfStringinterface = nil } else { match++ @@ -53,10 +54,10 @@ func (dst *RunConnector200ResponseData) UnmarshalJSON(data []byte) error { } // try to unmarshal data into MapmapOfStringinterface{} - err = newStrictDecoder(data).Decode(&dst.MapmapOfStringinterface) + err = json.Unmarshal(data, &dst.MapmapOfStringinterface) if err == nil { - jsonMapmapOfStringinterface, _ := json.Marshal(dst.MapmapOfStringinterface) - if string(jsonMapmapOfStringinterface) == "{}" { // empty struct + jsonmapstringinterface, _ := json.Marshal(dst.MapmapOfStringinterface) + if string(jsonmapstringinterface) == "{}" { // empty struct dst.MapmapOfStringinterface = nil } else { match++ @@ -92,7 +93,7 @@ func (src RunConnector200ResponseData) MarshalJSON() ([]byte, error) { } // Get the actual instance -func (obj *RunConnector200ResponseData) GetActualInstance() interface{} { +func (obj *RunConnector200ResponseData) GetActualInstance() (interface{}) { if obj == nil { return nil } @@ -143,3 +144,5 @@ func (v *NullableRunConnector200ResponseData) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/generated/kibanaactions/model_run_connector_request_body_properties_params.go b/generated/kibanaactions/model_run_connector_request_body_properties_params.go index 5b1470ddf..b1ebe85da 100644 --- a/generated/kibanaactions/model_run_connector_request_body_properties_params.go +++ b/generated/kibanaactions/model_run_connector_request_body_properties_params.go @@ -48,7 +48,7 @@ func (dst *RunConnectorRequestBodyPropertiesParams) UnmarshalJSON(data []byte) e var err error match := 0 // try to unmarshal data into RunConnectorParamsDocuments - err = newStrictDecoder(data).Decode(&dst.RunConnectorParamsDocuments) + err = json.Unmarshal(data, &dst.RunConnectorParamsDocuments) if err == nil { jsonRunConnectorParamsDocuments, _ := json.Marshal(dst.RunConnectorParamsDocuments) if string(jsonRunConnectorParamsDocuments) == "{}" { // empty struct @@ -61,7 +61,7 @@ func (dst *RunConnectorRequestBodyPropertiesParams) UnmarshalJSON(data []byte) e } // try to unmarshal data into RunConnectorParamsLevelMessage - err = newStrictDecoder(data).Decode(&dst.RunConnectorParamsLevelMessage) + err = json.Unmarshal(data, &dst.RunConnectorParamsLevelMessage) if err == nil { jsonRunConnectorParamsLevelMessage, _ := json.Marshal(dst.RunConnectorParamsLevelMessage) if string(jsonRunConnectorParamsLevelMessage) == "{}" { // empty struct @@ -74,7 +74,7 @@ func (dst *RunConnectorRequestBodyPropertiesParams) UnmarshalJSON(data []byte) e } // try to unmarshal data into SubactionParameters - err = newStrictDecoder(data).Decode(&dst.SubactionParameters) + err = json.Unmarshal(data, &dst.SubactionParameters) if err == nil { jsonSubactionParameters, _ := json.Marshal(dst.SubactionParameters) if string(jsonSubactionParameters) == "{}" { // empty struct diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go index 0d23ee0c3..7d21abba7 100644 --- a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go +++ b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go @@ -15,10 +15,10 @@ import ( "fmt" ) -// RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp - A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. +// RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp - A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. type RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp struct { ArrayOfString *[]string - String *string + String *string } // []stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp is a convenience function that returns []string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp @@ -35,15 +35,16 @@ func StringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp(v * } } + // Unmarshal JSON data into one of the pointers in the struct func (dst *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) UnmarshalJSON(data []byte) error { var err error match := 0 // try to unmarshal data into ArrayOfString - err = newStrictDecoder(data).Decode(&dst.ArrayOfString) + err = json.Unmarshal(data, &dst.ArrayOfString) if err == nil { - jsonArrayOfString, _ := json.Marshal(dst.ArrayOfString) - if string(jsonArrayOfString) == "{}" { // empty struct + jsonstring, _ := json.Marshal(dst.ArrayOfString) + if string(jsonstring) == "{}" { // empty struct dst.ArrayOfString = nil } else { match++ @@ -53,10 +54,10 @@ func (dst *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) Unma } // try to unmarshal data into String - err = newStrictDecoder(data).Decode(&dst.String) + err = json.Unmarshal(data, &dst.String) if err == nil { - jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct + jsonstring, _ := json.Marshal(dst.String) + if string(jsonstring) == "{}" { // empty struct dst.String = nil } else { match++ @@ -92,7 +93,7 @@ func (src RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) Marsh } // Get the actual instance -func (obj *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) GetActualInstance() interface{} { +func (obj *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) GetActualInstance() (interface{}) { if obj == nil { return nil } @@ -143,3 +144,5 @@ func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go index 7d9466ab7..dbb0e47f0 100644 --- a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go +++ b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go @@ -18,7 +18,7 @@ import ( // RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash - A list of malware hashes related to the security incident for ServiceNow SecOps connectors. The hashes are added as observables to the security incident. type RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash struct { ArrayOfString *[]string - String *string + String *string } // []stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash is a convenience function that returns []string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash @@ -35,15 +35,16 @@ func StringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHas } } + // Unmarshal JSON data into one of the pointers in the struct func (dst *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) UnmarshalJSON(data []byte) error { var err error match := 0 // try to unmarshal data into ArrayOfString - err = newStrictDecoder(data).Decode(&dst.ArrayOfString) + err = json.Unmarshal(data, &dst.ArrayOfString) if err == nil { - jsonArrayOfString, _ := json.Marshal(dst.ArrayOfString) - if string(jsonArrayOfString) == "{}" { // empty struct + jsonstring, _ := json.Marshal(dst.ArrayOfString) + if string(jsonstring) == "{}" { // empty struct dst.ArrayOfString = nil } else { match++ @@ -53,10 +54,10 @@ func (dst *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) } // try to unmarshal data into String - err = newStrictDecoder(data).Decode(&dst.String) + err = json.Unmarshal(data, &dst.String) if err == nil { - jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct + jsonstring, _ := json.Marshal(dst.String) + if string(jsonstring) == "{}" { // empty struct dst.String = nil } else { match++ @@ -92,7 +93,7 @@ func (src RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) } // Get the actual instance -func (obj *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) GetActualInstance() interface{} { +func (obj *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) GetActualInstance() (interface{}) { if obj == nil { return nil } @@ -143,3 +144,5 @@ func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwar v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go index bbd2894b2..39d411b4b 100644 --- a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go +++ b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go @@ -18,7 +18,7 @@ import ( // RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl - A list of malware URLs related to the security incident for ServiceNow SecOps connectors. The URLs are added as observables to the security incident. type RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl struct { ArrayOfString *[]string - String *string + String *string } // []stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl is a convenience function that returns []string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl @@ -35,15 +35,16 @@ func StringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl } } + // Unmarshal JSON data into one of the pointers in the struct func (dst *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) UnmarshalJSON(data []byte) error { var err error match := 0 // try to unmarshal data into ArrayOfString - err = newStrictDecoder(data).Decode(&dst.ArrayOfString) + err = json.Unmarshal(data, &dst.ArrayOfString) if err == nil { - jsonArrayOfString, _ := json.Marshal(dst.ArrayOfString) - if string(jsonArrayOfString) == "{}" { // empty struct + jsonstring, _ := json.Marshal(dst.ArrayOfString) + if string(jsonstring) == "{}" { // empty struct dst.ArrayOfString = nil } else { match++ @@ -53,10 +54,10 @@ func (dst *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) } // try to unmarshal data into String - err = newStrictDecoder(data).Decode(&dst.String) + err = json.Unmarshal(data, &dst.String) if err == nil { - jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct + jsonstring, _ := json.Marshal(dst.String) + if string(jsonstring) == "{}" { // empty struct dst.String = nil } else { match++ @@ -92,7 +93,7 @@ func (src RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) M } // Get the actual instance -func (obj *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) GetActualInstance() interface{} { +func (obj *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) GetActualInstance() (interface{}) { if obj == nil { return nil } @@ -143,3 +144,5 @@ func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwar v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go index 2799e237b..23223dc07 100644 --- a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go +++ b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go @@ -18,7 +18,7 @@ import ( // RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp - A list of source IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. type RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp struct { ArrayOfString *[]string - String *string + String *string } // []stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp is a convenience function that returns []string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp @@ -35,15 +35,16 @@ func StringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp(v } } + // Unmarshal JSON data into one of the pointers in the struct func (dst *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) UnmarshalJSON(data []byte) error { var err error match := 0 // try to unmarshal data into ArrayOfString - err = newStrictDecoder(data).Decode(&dst.ArrayOfString) + err = json.Unmarshal(data, &dst.ArrayOfString) if err == nil { - jsonArrayOfString, _ := json.Marshal(dst.ArrayOfString) - if string(jsonArrayOfString) == "{}" { // empty struct + jsonstring, _ := json.Marshal(dst.ArrayOfString) + if string(jsonstring) == "{}" { // empty struct dst.ArrayOfString = nil } else { match++ @@ -53,10 +54,10 @@ func (dst *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) Un } // try to unmarshal data into String - err = newStrictDecoder(data).Decode(&dst.String) + err = json.Unmarshal(data, &dst.String) if err == nil { - jsonString, _ := json.Marshal(dst.String) - if string(jsonString) == "{}" { // empty struct + jsonstring, _ := json.Marshal(dst.String) + if string(jsonstring) == "{}" { // empty struct dst.String = nil } else { match++ @@ -92,7 +93,7 @@ func (src RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) Mar } // Get the actual instance -func (obj *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) GetActualInstance() interface{} { +func (obj *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) GetActualInstance() (interface{}) { if obj == nil { return nil } @@ -143,3 +144,5 @@ func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSource v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/generated/kibanaactions/model_subaction_parameters.go b/generated/kibanaactions/model_subaction_parameters.go index a75275500..5072c6159 100644 --- a/generated/kibanaactions/model_subaction_parameters.go +++ b/generated/kibanaactions/model_subaction_parameters.go @@ -110,170 +110,146 @@ func RunConnectorSubactionPushtoserviceAsSubactionParameters(v *RunConnectorSuba // Unmarshal JSON data into one of the pointers in the struct func (dst *SubactionParameters) UnmarshalJSON(data []byte) error { var err error - match := 0 - // try to unmarshal data into RunConnectorSubactionAddevent - err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionAddevent) - if err == nil { - jsonRunConnectorSubactionAddevent, _ := json.Marshal(dst.RunConnectorSubactionAddevent) - if string(jsonRunConnectorSubactionAddevent) == "{}" { // empty struct - dst.RunConnectorSubactionAddevent = nil + // use discriminator value to speed up the lookup + var jsonDict map[string]interface{} + err = newStrictDecoder(data).Decode(&jsonDict) + if err != nil { + return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") + } + + // check if the discriminator value is 'run_connector_subaction_addevent' + if jsonDict["subAction"] == "run_connector_subaction_addevent" { + // try to unmarshal JSON data into RunConnectorSubactionAddevent + err = json.Unmarshal(data, &dst.RunConnectorSubactionAddevent) + if err == nil { + return nil // data stored in dst.RunConnectorSubactionAddevent, return on the first match } else { - match++ + dst.RunConnectorSubactionAddevent = nil + return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionAddevent: %s", err.Error()) } - } else { - dst.RunConnectorSubactionAddevent = nil } - // try to unmarshal data into RunConnectorSubactionClosealert - err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionClosealert) - if err == nil { - jsonRunConnectorSubactionClosealert, _ := json.Marshal(dst.RunConnectorSubactionClosealert) - if string(jsonRunConnectorSubactionClosealert) == "{}" { // empty struct - dst.RunConnectorSubactionClosealert = nil + // check if the discriminator value is 'run_connector_subaction_closealert' + if jsonDict["subAction"] == "run_connector_subaction_closealert" { + // try to unmarshal JSON data into RunConnectorSubactionClosealert + err = json.Unmarshal(data, &dst.RunConnectorSubactionClosealert) + if err == nil { + return nil // data stored in dst.RunConnectorSubactionClosealert, return on the first match } else { - match++ + dst.RunConnectorSubactionClosealert = nil + return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionClosealert: %s", err.Error()) } - } else { - dst.RunConnectorSubactionClosealert = nil } - // try to unmarshal data into RunConnectorSubactionCreatealert - err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionCreatealert) - if err == nil { - jsonRunConnectorSubactionCreatealert, _ := json.Marshal(dst.RunConnectorSubactionCreatealert) - if string(jsonRunConnectorSubactionCreatealert) == "{}" { // empty struct - dst.RunConnectorSubactionCreatealert = nil + // check if the discriminator value is 'run_connector_subaction_createalert' + if jsonDict["subAction"] == "run_connector_subaction_createalert" { + // try to unmarshal JSON data into RunConnectorSubactionCreatealert + err = json.Unmarshal(data, &dst.RunConnectorSubactionCreatealert) + if err == nil { + return nil // data stored in dst.RunConnectorSubactionCreatealert, return on the first match } else { - match++ + dst.RunConnectorSubactionCreatealert = nil + return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionCreatealert: %s", err.Error()) } - } else { - dst.RunConnectorSubactionCreatealert = nil } - // try to unmarshal data into RunConnectorSubactionFieldsbyissuetype - err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionFieldsbyissuetype) - if err == nil { - jsonRunConnectorSubactionFieldsbyissuetype, _ := json.Marshal(dst.RunConnectorSubactionFieldsbyissuetype) - if string(jsonRunConnectorSubactionFieldsbyissuetype) == "{}" { // empty struct - dst.RunConnectorSubactionFieldsbyissuetype = nil + // check if the discriminator value is 'run_connector_subaction_fieldsbyissuetype' + if jsonDict["subAction"] == "run_connector_subaction_fieldsbyissuetype" { + // try to unmarshal JSON data into RunConnectorSubactionFieldsbyissuetype + err = json.Unmarshal(data, &dst.RunConnectorSubactionFieldsbyissuetype) + if err == nil { + return nil // data stored in dst.RunConnectorSubactionFieldsbyissuetype, return on the first match } else { - match++ + dst.RunConnectorSubactionFieldsbyissuetype = nil + return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionFieldsbyissuetype: %s", err.Error()) } - } else { - dst.RunConnectorSubactionFieldsbyissuetype = nil } - // try to unmarshal data into RunConnectorSubactionGetchoices - err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionGetchoices) - if err == nil { - jsonRunConnectorSubactionGetchoices, _ := json.Marshal(dst.RunConnectorSubactionGetchoices) - if string(jsonRunConnectorSubactionGetchoices) == "{}" { // empty struct - dst.RunConnectorSubactionGetchoices = nil + // check if the discriminator value is 'run_connector_subaction_getchoices' + if jsonDict["subAction"] == "run_connector_subaction_getchoices" { + // try to unmarshal JSON data into RunConnectorSubactionGetchoices + err = json.Unmarshal(data, &dst.RunConnectorSubactionGetchoices) + if err == nil { + return nil // data stored in dst.RunConnectorSubactionGetchoices, return on the first match } else { - match++ + dst.RunConnectorSubactionGetchoices = nil + return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionGetchoices: %s", err.Error()) } - } else { - dst.RunConnectorSubactionGetchoices = nil } - // try to unmarshal data into RunConnectorSubactionGetfields - err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionGetfields) - if err == nil { - jsonRunConnectorSubactionGetfields, _ := json.Marshal(dst.RunConnectorSubactionGetfields) - if string(jsonRunConnectorSubactionGetfields) == "{}" { // empty struct - dst.RunConnectorSubactionGetfields = nil + // check if the discriminator value is 'run_connector_subaction_getfields' + if jsonDict["subAction"] == "run_connector_subaction_getfields" { + // try to unmarshal JSON data into RunConnectorSubactionGetfields + err = json.Unmarshal(data, &dst.RunConnectorSubactionGetfields) + if err == nil { + return nil // data stored in dst.RunConnectorSubactionGetfields, return on the first match } else { - match++ + dst.RunConnectorSubactionGetfields = nil + return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionGetfields: %s", err.Error()) } - } else { - dst.RunConnectorSubactionGetfields = nil } - // try to unmarshal data into RunConnectorSubactionGetincident - err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionGetincident) - if err == nil { - jsonRunConnectorSubactionGetincident, _ := json.Marshal(dst.RunConnectorSubactionGetincident) - if string(jsonRunConnectorSubactionGetincident) == "{}" { // empty struct - dst.RunConnectorSubactionGetincident = nil + // check if the discriminator value is 'run_connector_subaction_getincident' + if jsonDict["subAction"] == "run_connector_subaction_getincident" { + // try to unmarshal JSON data into RunConnectorSubactionGetincident + err = json.Unmarshal(data, &dst.RunConnectorSubactionGetincident) + if err == nil { + return nil // data stored in dst.RunConnectorSubactionGetincident, return on the first match } else { - match++ + dst.RunConnectorSubactionGetincident = nil + return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionGetincident: %s", err.Error()) } - } else { - dst.RunConnectorSubactionGetincident = nil } - // try to unmarshal data into RunConnectorSubactionIssue - err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionIssue) - if err == nil { - jsonRunConnectorSubactionIssue, _ := json.Marshal(dst.RunConnectorSubactionIssue) - if string(jsonRunConnectorSubactionIssue) == "{}" { // empty struct - dst.RunConnectorSubactionIssue = nil + // check if the discriminator value is 'run_connector_subaction_issue' + if jsonDict["subAction"] == "run_connector_subaction_issue" { + // try to unmarshal JSON data into RunConnectorSubactionIssue + err = json.Unmarshal(data, &dst.RunConnectorSubactionIssue) + if err == nil { + return nil // data stored in dst.RunConnectorSubactionIssue, return on the first match } else { - match++ + dst.RunConnectorSubactionIssue = nil + return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionIssue: %s", err.Error()) } - } else { - dst.RunConnectorSubactionIssue = nil } - // try to unmarshal data into RunConnectorSubactionIssues - err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionIssues) - if err == nil { - jsonRunConnectorSubactionIssues, _ := json.Marshal(dst.RunConnectorSubactionIssues) - if string(jsonRunConnectorSubactionIssues) == "{}" { // empty struct - dst.RunConnectorSubactionIssues = nil + // check if the discriminator value is 'run_connector_subaction_issues' + if jsonDict["subAction"] == "run_connector_subaction_issues" { + // try to unmarshal JSON data into RunConnectorSubactionIssues + err = json.Unmarshal(data, &dst.RunConnectorSubactionIssues) + if err == nil { + return nil // data stored in dst.RunConnectorSubactionIssues, return on the first match } else { - match++ + dst.RunConnectorSubactionIssues = nil + return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionIssues: %s", err.Error()) } - } else { - dst.RunConnectorSubactionIssues = nil } - // try to unmarshal data into RunConnectorSubactionIssuetypes - err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionIssuetypes) - if err == nil { - jsonRunConnectorSubactionIssuetypes, _ := json.Marshal(dst.RunConnectorSubactionIssuetypes) - if string(jsonRunConnectorSubactionIssuetypes) == "{}" { // empty struct - dst.RunConnectorSubactionIssuetypes = nil + // check if the discriminator value is 'run_connector_subaction_issuetypes' + if jsonDict["subAction"] == "run_connector_subaction_issuetypes" { + // try to unmarshal JSON data into RunConnectorSubactionIssuetypes + err = json.Unmarshal(data, &dst.RunConnectorSubactionIssuetypes) + if err == nil { + return nil // data stored in dst.RunConnectorSubactionIssuetypes, return on the first match } else { - match++ + dst.RunConnectorSubactionIssuetypes = nil + return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionIssuetypes: %s", err.Error()) } - } else { - dst.RunConnectorSubactionIssuetypes = nil } - // try to unmarshal data into RunConnectorSubactionPushtoservice - err = newStrictDecoder(data).Decode(&dst.RunConnectorSubactionPushtoservice) - if err == nil { - jsonRunConnectorSubactionPushtoservice, _ := json.Marshal(dst.RunConnectorSubactionPushtoservice) - if string(jsonRunConnectorSubactionPushtoservice) == "{}" { // empty struct - dst.RunConnectorSubactionPushtoservice = nil + // check if the discriminator value is 'run_connector_subaction_pushtoservice' + if jsonDict["subAction"] == "run_connector_subaction_pushtoservice" { + // try to unmarshal JSON data into RunConnectorSubactionPushtoservice + err = json.Unmarshal(data, &dst.RunConnectorSubactionPushtoservice) + if err == nil { + return nil // data stored in dst.RunConnectorSubactionPushtoservice, return on the first match } else { - match++ + dst.RunConnectorSubactionPushtoservice = nil + return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionPushtoservice: %s", err.Error()) } - } else { - dst.RunConnectorSubactionPushtoservice = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.RunConnectorSubactionAddevent = nil - dst.RunConnectorSubactionClosealert = nil - dst.RunConnectorSubactionCreatealert = nil - dst.RunConnectorSubactionFieldsbyissuetype = nil - dst.RunConnectorSubactionGetchoices = nil - dst.RunConnectorSubactionGetfields = nil - dst.RunConnectorSubactionGetincident = nil - dst.RunConnectorSubactionIssue = nil - dst.RunConnectorSubactionIssues = nil - dst.RunConnectorSubactionIssuetypes = nil - dst.RunConnectorSubactionPushtoservice = nil - - return fmt.Errorf("data matches more than one schema in oneOf(SubactionParameters)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(SubactionParameters)") } + + return nil } // Marshal data from the first non-nil pointers in the struct to JSON diff --git a/generated/kibanaactions/model_unauthorized_response.go b/generated/kibanaactions/model_unauthorized_response.go new file mode 100644 index 000000000..98368a427 --- /dev/null +++ b/generated/kibanaactions/model_unauthorized_response.go @@ -0,0 +1,196 @@ +/* +Connectors + +OpenAPI schema for Connectors endpoints + +API version: 0.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kibanaactions + +import ( + "encoding/json" +) + +// checks if the UnauthorizedResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UnauthorizedResponse{} + +// UnauthorizedResponse struct for UnauthorizedResponse +type UnauthorizedResponse struct { + Error *string `json:"error,omitempty"` + Message *string `json:"message,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty"` +} + +// NewUnauthorizedResponse instantiates a new UnauthorizedResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUnauthorizedResponse() *UnauthorizedResponse { + this := UnauthorizedResponse{} + return &this +} + +// NewUnauthorizedResponseWithDefaults instantiates a new UnauthorizedResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUnauthorizedResponseWithDefaults() *UnauthorizedResponse { + this := UnauthorizedResponse{} + return &this +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *UnauthorizedResponse) GetError() string { + if o == nil || IsNil(o.Error) { + var ret string + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnauthorizedResponse) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *UnauthorizedResponse) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *UnauthorizedResponse) SetError(v string) { + o.Error = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *UnauthorizedResponse) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnauthorizedResponse) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *UnauthorizedResponse) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *UnauthorizedResponse) SetMessage(v string) { + o.Message = &v +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *UnauthorizedResponse) GetStatusCode() int32 { + if o == nil || IsNil(o.StatusCode) { + var ret int32 + return ret + } + return *o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnauthorizedResponse) GetStatusCodeOk() (*int32, bool) { + if o == nil || IsNil(o.StatusCode) { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *UnauthorizedResponse) HasStatusCode() bool { + if o != nil && !IsNil(o.StatusCode) { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. +func (o *UnauthorizedResponse) SetStatusCode(v int32) { + o.StatusCode = &v +} + +func (o UnauthorizedResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UnauthorizedResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.StatusCode) { + toSerialize["statusCode"] = o.StatusCode + } + return toSerialize, nil +} + +type NullableUnauthorizedResponse struct { + value *UnauthorizedResponse + isSet bool +} + +func (v NullableUnauthorizedResponse) Get() *UnauthorizedResponse { + return v.value +} + +func (v *NullableUnauthorizedResponse) Set(val *UnauthorizedResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUnauthorizedResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUnauthorizedResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUnauthorizedResponse(val *UnauthorizedResponse) *NullableUnauthorizedResponse { + return &NullableUnauthorizedResponse{value: val, isSet: true} +} + +func (v NullableUnauthorizedResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUnauthorizedResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/kibanaactions/model_update_connector_request_body_properties.go b/generated/kibanaactions/model_update_connector_request_body_properties.go index c5acc356d..4705e0c53 100644 --- a/generated/kibanaactions/model_update_connector_request_body_properties.go +++ b/generated/kibanaactions/model_update_connector_request_body_properties.go @@ -96,7 +96,7 @@ func (dst *UpdateConnectorRequestBodyProperties) UnmarshalJSON(data []byte) erro var err error match := 0 // try to unmarshal data into UpdateConnectorRequestCasesWebhook - err = newStrictDecoder(data).Decode(&dst.UpdateConnectorRequestCasesWebhook) + err = json.Unmarshal(data, &dst.UpdateConnectorRequestCasesWebhook) if err == nil { jsonUpdateConnectorRequestCasesWebhook, _ := json.Marshal(dst.UpdateConnectorRequestCasesWebhook) if string(jsonUpdateConnectorRequestCasesWebhook) == "{}" { // empty struct @@ -109,7 +109,7 @@ func (dst *UpdateConnectorRequestBodyProperties) UnmarshalJSON(data []byte) erro } // try to unmarshal data into UpdateConnectorRequestIndex - err = newStrictDecoder(data).Decode(&dst.UpdateConnectorRequestIndex) + err = json.Unmarshal(data, &dst.UpdateConnectorRequestIndex) if err == nil { jsonUpdateConnectorRequestIndex, _ := json.Marshal(dst.UpdateConnectorRequestIndex) if string(jsonUpdateConnectorRequestIndex) == "{}" { // empty struct @@ -122,7 +122,7 @@ func (dst *UpdateConnectorRequestBodyProperties) UnmarshalJSON(data []byte) erro } // try to unmarshal data into UpdateConnectorRequestJira - err = newStrictDecoder(data).Decode(&dst.UpdateConnectorRequestJira) + err = json.Unmarshal(data, &dst.UpdateConnectorRequestJira) if err == nil { jsonUpdateConnectorRequestJira, _ := json.Marshal(dst.UpdateConnectorRequestJira) if string(jsonUpdateConnectorRequestJira) == "{}" { // empty struct @@ -135,7 +135,7 @@ func (dst *UpdateConnectorRequestBodyProperties) UnmarshalJSON(data []byte) erro } // try to unmarshal data into UpdateConnectorRequestOpsgenie - err = newStrictDecoder(data).Decode(&dst.UpdateConnectorRequestOpsgenie) + err = json.Unmarshal(data, &dst.UpdateConnectorRequestOpsgenie) if err == nil { jsonUpdateConnectorRequestOpsgenie, _ := json.Marshal(dst.UpdateConnectorRequestOpsgenie) if string(jsonUpdateConnectorRequestOpsgenie) == "{}" { // empty struct @@ -148,7 +148,7 @@ func (dst *UpdateConnectorRequestBodyProperties) UnmarshalJSON(data []byte) erro } // try to unmarshal data into UpdateConnectorRequestResilient - err = newStrictDecoder(data).Decode(&dst.UpdateConnectorRequestResilient) + err = json.Unmarshal(data, &dst.UpdateConnectorRequestResilient) if err == nil { jsonUpdateConnectorRequestResilient, _ := json.Marshal(dst.UpdateConnectorRequestResilient) if string(jsonUpdateConnectorRequestResilient) == "{}" { // empty struct @@ -161,7 +161,7 @@ func (dst *UpdateConnectorRequestBodyProperties) UnmarshalJSON(data []byte) erro } // try to unmarshal data into UpdateConnectorRequestServerlog - err = newStrictDecoder(data).Decode(&dst.UpdateConnectorRequestServerlog) + err = json.Unmarshal(data, &dst.UpdateConnectorRequestServerlog) if err == nil { jsonUpdateConnectorRequestServerlog, _ := json.Marshal(dst.UpdateConnectorRequestServerlog) if string(jsonUpdateConnectorRequestServerlog) == "{}" { // empty struct @@ -174,7 +174,7 @@ func (dst *UpdateConnectorRequestBodyProperties) UnmarshalJSON(data []byte) erro } // try to unmarshal data into UpdateConnectorRequestServicenow - err = newStrictDecoder(data).Decode(&dst.UpdateConnectorRequestServicenow) + err = json.Unmarshal(data, &dst.UpdateConnectorRequestServicenow) if err == nil { jsonUpdateConnectorRequestServicenow, _ := json.Marshal(dst.UpdateConnectorRequestServicenow) if string(jsonUpdateConnectorRequestServicenow) == "{}" { // empty struct @@ -187,7 +187,7 @@ func (dst *UpdateConnectorRequestBodyProperties) UnmarshalJSON(data []byte) erro } // try to unmarshal data into UpdateConnectorRequestServicenowItom - err = newStrictDecoder(data).Decode(&dst.UpdateConnectorRequestServicenowItom) + err = json.Unmarshal(data, &dst.UpdateConnectorRequestServicenowItom) if err == nil { jsonUpdateConnectorRequestServicenowItom, _ := json.Marshal(dst.UpdateConnectorRequestServicenowItom) if string(jsonUpdateConnectorRequestServicenowItom) == "{}" { // empty struct @@ -200,7 +200,7 @@ func (dst *UpdateConnectorRequestBodyProperties) UnmarshalJSON(data []byte) erro } // try to unmarshal data into UpdateConnectorRequestSwimlane - err = newStrictDecoder(data).Decode(&dst.UpdateConnectorRequestSwimlane) + err = json.Unmarshal(data, &dst.UpdateConnectorRequestSwimlane) if err == nil { jsonUpdateConnectorRequestSwimlane, _ := json.Marshal(dst.UpdateConnectorRequestSwimlane) if string(jsonUpdateConnectorRequestSwimlane) == "{}" { // empty struct From f948faa2e2dd3769a2be63a3a92b3677d386a7f8 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Wed, 19 Apr 2023 13:31:59 +0200 Subject: [PATCH 06/59] Using swagger-codegen for kibana actions connectors The generated code still has some drawbacks: - ModelMap structure is missing (it's defined manually) - OneOf generates a golang struct with promoted fields where each field represent one of the options. The generated client cannot properly encode such structs. --- Makefile | 23 +- .../kibanaactions/.openapi-generator/FILES | 248 - .../kibanaactions/.openapi-generator/VERSION | 1 - ...nerator-ignore => .swagger-codegen-ignore} | 6 +- .../kibanaactions/.swagger-codegen/VERSION | 1 + generated/kibanaactions/README.md | 142 +- .../api/{openapi.yaml => swagger.yaml} | 3446 ++++++------- generated/kibanaactions/api_connectors.go | 2549 ++++----- generated/kibanaactions/bundled.json | 4540 ----------------- generated/kibanaactions/client.go | 356 +- generated/kibanaactions/configuration.go | 278 +- .../docs/ActionResponseProperties.md | 211 +- .../docs/AlertIdentifierMapping.md | 110 +- .../kibanaactions/docs/CaseCommentMapping.md | 110 +- .../docs/CaseDescriptionMapping.md | 110 +- .../docs/CaseIdentifierMapping.md | 110 +- .../kibanaactions/docs/CaseNameMapping.md | 110 +- .../docs/ConfigPropertiesCasesWebhook.md | 387 +- .../docs/ConfigPropertiesIndex.md | 108 +- .../docs/ConfigPropertiesJira.md | 66 +- .../docs/ConfigPropertiesOpsgenie.md | 44 +- .../docs/ConfigPropertiesResilient.md | 66 +- .../docs/ConfigPropertiesServicenow.md | 179 +- .../docs/ConfigPropertiesServicenowItom.md | 152 +- .../docs/ConfigPropertiesSwimlane.md | 115 +- ...MappingsPropertiesForASwimlaneConnector.md | 211 +- .../docs/ConnectorResponseProperties.md | 174 - ...ConnectorResponsePropertiesCasesWebhook.md | 181 +- .../docs/ConnectorResponsePropertiesEmail.md | 181 +- .../docs/ConnectorResponsePropertiesIndex.md | 181 +- .../docs/ConnectorResponsePropertiesJira.md | 181 +- .../ConnectorResponsePropertiesOpsgenie.md | 181 +- .../ConnectorResponsePropertiesPagerduty.md | 181 +- .../ConnectorResponsePropertiesResilient.md | 181 +- .../ConnectorResponsePropertiesServerlog.md | 191 +- .../ConnectorResponsePropertiesServicenow.md | 181 +- ...nnectorResponsePropertiesServicenowItom.md | 181 +- ...onnectorResponsePropertiesServicenowSir.md | 181 +- .../docs/ConnectorResponsePropertiesSlack.md | 159 +- .../ConnectorResponsePropertiesSwimlane.md | 181 +- .../docs/ConnectorResponsePropertiesTeams.md | 159 +- .../docs/ConnectorResponsePropertiesTines.md | 181 +- .../ConnectorResponsePropertiesWebhook.md | 181 +- .../ConnectorResponsePropertiesXmatters.md | 181 +- .../kibanaactions/docs/ConnectorTypes.md | 41 +- generated/kibanaactions/docs/ConnectorsApi.md | 967 +--- .../CreateConnectorRequestBodyProperties.md | 106 - .../CreateConnectorRequestCasesWebhook.md | 115 +- .../docs/CreateConnectorRequestEmail.md | 110 +- .../docs/CreateConnectorRequestIndex.md | 88 +- .../docs/CreateConnectorRequestJira.md | 110 +- .../docs/CreateConnectorRequestOpsgenie.md | 110 +- .../docs/CreateConnectorRequestPagerduty.md | 110 +- .../docs/CreateConnectorRequestResilient.md | 110 +- .../docs/CreateConnectorRequestServerlog.md | 66 +- .../docs/CreateConnectorRequestServicenow.md | 110 +- .../CreateConnectorRequestServicenowItom.md | 110 +- .../CreateConnectorRequestServicenowSir.md | 110 +- .../docs/CreateConnectorRequestSlack.md | 88 +- .../docs/CreateConnectorRequestSwimlane.md | 110 +- .../docs/CreateConnectorRequestTeams.md | 88 +- .../docs/CreateConnectorRequestTines.md | 110 +- .../docs/CreateConnectorRequestWebhook.md | 110 +- .../docs/CreateConnectorRequestXmatters.md | 110 +- generated/kibanaactions/docs/Features.md | 15 +- .../docs/GetConnector404Response.md | 108 - ...nnectorTypesResponseBodyPropertiesInner.md | 212 - .../GetConnectorsResponseBodyProperties.md | 216 +- .../kibanaactions/docs/InlineResponse200.md | 15 + .../kibanaactions/docs/InlineResponse2001.md | 11 + .../kibanaactions/docs/InlineResponse2002.md | 14 + .../kibanaactions/docs/InlineResponse2003.md | 11 + .../kibanaactions/docs/InlineResponse400.md | 11 + .../kibanaactions/docs/InlineResponse404.md | 11 + .../LegacyCreateConnectorRequestProperties.md | 130 +- ...nnectorTypesResponseBodyPropertiesInner.md | 186 - .../docs/LegacyRunConnector200Response.md | 108 - ...LegacyRunConnectorRequestBodyProperties.md | 44 +- ...acyUpdateConnectorRequestBodyProperties.md | 103 +- .../kibanaactions/docs/Model401Response.md | 108 - .../kibanaactions/docs/Model404Response.md | 108 - .../kibanaactions/docs/NotFoundResponse.md | 103 +- ...RunConnectorRequestBodyPropertiesParams.md | 8 + .../docs/OneOfinlineResponse2001Data.md | 8 + .../docs/OneOfinlineResponse2003Data.md | 8 + ...htoserviceSubActionParamsIncidentDestIp.md | 8 + ...rviceSubActionParamsIncidentMalwareHash.md | 8 + ...erviceSubActionParamsIncidentMalwareUrl.md | 8 + ...oserviceSubActionParamsIncidentSourceIp.md | 8 + .../kibanaactions/docs/RuleNameMapping.md | 110 +- .../docs/RunConnector200Response.md | 98 - .../docs/RunConnector200ResponseData.md | 30 - .../docs/RunConnectorParamsDocuments.md | 44 +- .../docs/RunConnectorParamsLevelMessage.md | 71 +- .../docs/RunConnectorRequestBodyProperties.md | 44 +- ...RunConnectorRequestBodyPropertiesParams.md | 98 - .../docs/RunConnectorSubactionAddevent.md | 71 +- ...nnectorSubactionAddeventSubActionParams.md | 319 +- .../docs/RunConnectorSubactionClosealert.md | 66 +- ...ectorSubactionClosealertSubActionParams.md | 125 +- .../docs/RunConnectorSubactionCreatealert.md | 66 +- ...ctorSubactionCreatealertSubActionParams.md | 368 +- ...ionCreatealertSubActionParamsResponders.md | 12 + ...eatealertSubActionParamsRespondersInner.md | 134 - ...tionCreatealertSubActionParamsVisibleTo.md | 12 + ...reatealertSubActionParamsVisibleToInner.md | 129 - .../RunConnectorSubactionFieldsbyissuetype.md | 66 +- ...bactionFieldsbyissuetypeSubActionParams.md | 44 +- .../docs/RunConnectorSubactionGetchoices.md | 66 +- ...ectorSubactionGetchoicesSubActionParams.md | 44 +- .../docs/RunConnectorSubactionGetfields.md | 44 +- .../docs/RunConnectorSubactionGetincident.md | 66 +- ...ctorSubactionGetincidentSubActionParams.md | 44 +- .../docs/RunConnectorSubactionIssue.md | 71 +- ...nConnectorSubactionIssueSubActionParams.md | 44 +- .../docs/RunConnectorSubactionIssues.md | 66 +- ...ConnectorSubactionIssuesSubActionParams.md | 44 +- .../docs/RunConnectorSubactionIssuetypes.md | 44 +- .../RunConnectorSubactionPushtoservice.md | 66 +- ...orSubactionPushtoserviceSubActionParams.md | 76 +- ...ionPushtoserviceSubActionParamsComments.md | 10 + ...shtoserviceSubActionParamsCommentsInner.md | 82 - ...ionPushtoserviceSubActionParamsIncident.md | 670 +-- ...htoserviceSubActionParamsIncidentDestIp.md | 30 - ...rviceSubActionParamsIncidentMalwareHash.md | 30 - ...erviceSubActionParamsIncidentMalwareUrl.md | 30 - ...oserviceSubActionParamsIncidentSourceIp.md | 30 - .../docs/SecretsPropertiesCasesWebhook.md | 76 +- .../docs/SecretsPropertiesJira.md | 66 +- .../docs/SecretsPropertiesOpsgenie.md | 44 +- .../docs/SecretsPropertiesResilient.md | 66 +- .../docs/SecretsPropertiesServicenow.md | 157 +- .../docs/SecretsPropertiesSwimlane.md | 49 +- .../kibanaactions/docs/SeverityMapping.md | 110 +- .../kibanaactions/docs/SubactionParameters.md | 72 - .../docs/UnauthorizedResponse.md | 103 +- .../docs/UpdateConnector400Response.md | 108 - .../UpdateConnectorRequestBodyProperties.md | 85 - .../UpdateConnectorRequestCasesWebhook.md | 93 +- .../docs/UpdateConnectorRequestIndex.md | 66 +- .../docs/UpdateConnectorRequestJira.md | 88 +- .../docs/UpdateConnectorRequestOpsgenie.md | 88 +- .../docs/UpdateConnectorRequestResilient.md | 88 +- .../docs/UpdateConnectorRequestServerlog.md | 44 +- .../docs/UpdateConnectorRequestServicenow.md | 88 +- .../UpdateConnectorRequestServicenowItom.md | 88 +- .../docs/UpdateConnectorRequestSwimlane.md | 88 +- generated/kibanaactions/git_push.sh | 23 +- generated/kibanaactions/model_401_response.go | 196 - generated/kibanaactions/model_404_response.go | 196 - .../model_action_response_properties.go | 350 +- .../model_alert_identifier_mapping.go | 195 +- .../model_case_comment_mapping.go | 195 +- .../model_case_description_mapping.go | 195 +- .../model_case_identifier_mapping.go | 195 +- .../kibanaactions/model_case_name_mapping.go | 195 +- .../model_config_properties_cases_webhook.go | 574 +-- .../model_config_properties_index.go | 206 +- .../model_config_properties_jira.go | 143 +- .../model_config_properties_opsgenie.go | 117 +- .../model_config_properties_resilient.go | 143 +- .../model_config_properties_servicenow.go | 310 +- ...model_config_properties_servicenow_itom.go | 269 +- .../model_config_properties_swimlane.go | 204 +- ...ngs_properties_for_a_swimlane_connector.go | 336 +- .../model_connector_response_properties.go | 579 +-- ...ector_response_properties_cases_webhook.go | 294 +- ...del_connector_response_properties_email.go | 295 +- ...del_connector_response_properties_index.go | 294 +- ...odel_connector_response_properties_jira.go | 294 +- ..._connector_response_properties_opsgenie.go | 294 +- ...connector_response_properties_pagerduty.go | 295 +- ...connector_response_properties_resilient.go | 294 +- ...connector_response_properties_serverlog.go | 298 +- ...onnector_response_properties_servicenow.go | 294 +- ...tor_response_properties_servicenow_itom.go | 294 +- ...ctor_response_properties_servicenow_sir.go | 294 +- ...del_connector_response_properties_slack.go | 266 +- ..._connector_response_properties_swimlane.go | 294 +- ...del_connector_response_properties_teams.go | 266 +- ...del_connector_response_properties_tines.go | 295 +- ...l_connector_response_properties_webhook.go | 295 +- ..._connector_response_properties_xmatters.go | 295 +- .../kibanaactions/model_connector_types.go | 157 +- ...reate_connector_request_body_properties.go | 579 +-- ..._create_connector_request_cases_webhook.go | 206 +- .../model_create_connector_request_email.go | 203 +- .../model_create_connector_request_index.go | 171 +- .../model_create_connector_request_jira.go | 201 +- ...model_create_connector_request_opsgenie.go | 201 +- ...odel_create_connector_request_pagerduty.go | 203 +- ...odel_create_connector_request_resilient.go | 201 +- ...odel_create_connector_request_serverlog.go | 143 +- ...del_create_connector_request_servicenow.go | 201 +- ...reate_connector_request_servicenow_itom.go | 201 +- ...create_connector_request_servicenow_sir.go | 201 +- .../model_create_connector_request_slack.go | 174 +- ...model_create_connector_request_swimlane.go | 201 +- .../model_create_connector_request_teams.go | 174 +- .../model_create_connector_request_tines.go | 203 +- .../model_create_connector_request_webhook.go | 203 +- ...model_create_connector_request_xmatters.go | 203 +- generated/kibanaactions/model_features.go | 118 +- .../model_get_connector_404_response.go | 196 - ...or_types_response_body_properties_inner.go | 346 -- ...get_connectors_response_body_properties.go | 335 +- .../model_inline_response_200.go | 25 + .../model_inline_response_200_1.go | 17 + .../model_inline_response_200_2.go | 24 + .../model_inline_response_200_3.go | 16 + .../model_inline_response_400.go | 15 + .../model_inline_response_404.go | 15 + ...acy_create_connector_request_properties.go | 238 +- ...or_types_response_body_properties_inner.go | 310 -- ...model_legacy_run_connector_200_response.go | 197 - ...y_run_connector_request_body_properties.go | 119 +- ...pdate_connector_request_body_properties.go | 202 +- generated/kibanaactions/model_map.go | 3 + .../kibanaactions/model_not_found_response.go | 201 +- ...onnector_request_body_properties_params.go | 14 + .../model_one_ofinline_response_200_1_data.go | 12 + .../model_one_ofinline_response_200_3_data.go | 12 + ...vice_sub_action_params_incident_dest_ip.go | 12 + ...sub_action_params_incident_malware_hash.go | 12 + ..._sub_action_params_incident_malware_url.go | 12 + ...ce_sub_action_params_incident_source_ip.go | 12 + .../kibanaactions/model_rule_name_mapping.go | 195 +- .../model_run_connector_200_response.go | 180 - .../model_run_connector_200_response_data.go | 148 - .../model_run_connector_params_documents.go | 119 +- ...odel_run_connector_params_level_message.go | 158 +- ...l_run_connector_request_body_properties.go | 119 +- ...onnector_request_body_properties_params.go | 175 - .../model_run_connector_subaction_addevent.go | 152 +- ...or_subaction_addevent_sub_action_params.go | 498 +- ...odel_run_connector_subaction_closealert.go | 147 +- ..._subaction_closealert_sub_action_params.go | 227 +- ...del_run_connector_subaction_createalert.go | 147 +- ...subaction_createalert_sub_action_params.go | 556 +- ...reatealert_sub_action_params_responders.go | 20 + ...lert_sub_action_params_responders_inner.go | 236 - ...reatealert_sub_action_params_visible_to.go | 20 + ...lert_sub_action_params_visible_to_inner.go | 227 - ...n_connector_subaction_fieldsbyissuetype.go | 147 +- ...ion_fieldsbyissuetype_sub_action_params.go | 116 +- ...odel_run_connector_subaction_getchoices.go | 147 +- ..._subaction_getchoices_sub_action_params.go | 117 +- ...model_run_connector_subaction_getfields.go | 117 +- ...del_run_connector_subaction_getincident.go | 147 +- ...subaction_getincident_sub_action_params.go | 116 +- .../model_run_connector_subaction_issue.go | 152 +- ...ector_subaction_issue_sub_action_params.go | 116 +- .../model_run_connector_subaction_issues.go | 147 +- ...ctor_subaction_issues_sub_action_params.go | 116 +- ...odel_run_connector_subaction_issuetypes.go | 117 +- ...l_run_connector_subaction_pushtoservice.go | 147 +- ...baction_pushtoservice_sub_action_params.go | 165 +- ...ushtoservice_sub_action_params_comments.go | 16 + ...ervice_sub_action_params_comments_inner.go | 162 - ...ushtoservice_sub_action_params_incident.go | 983 +--- ...vice_sub_action_params_incident_dest_ip.go | 148 - ...sub_action_params_incident_malware_hash.go | 148 - ..._sub_action_params_incident_malware_url.go | 148 - ...ce_sub_action_params_incident_source_ip.go | 148 - .../model_secrets_properties_cases_webhook.go | 164 +- .../model_secrets_properties_jira.go | 143 +- .../model_secrets_properties_opsgenie.go | 117 +- .../model_secrets_properties_resilient.go | 143 +- .../model_secrets_properties_servicenow.go | 276 +- .../model_secrets_properties_swimlane.go | 128 +- .../kibanaactions/model_severity_mapping.go | 195 +- .../model_subaction_parameters.go | 391 -- .../model_unauthorized_response.go | 201 +- .../model_update_connector_400_response.go | 196 - ...pdate_connector_request_body_properties.go | 367 +- ..._update_connector_request_cases_webhook.go | 179 +- .../model_update_connector_request_index.go | 144 +- .../model_update_connector_request_jira.go | 174 +- ...model_update_connector_request_opsgenie.go | 174 +- ...odel_update_connector_request_resilient.go | 174 +- ...odel_update_connector_request_serverlog.go | 116 +- ...del_update_connector_request_servicenow.go | 174 +- ...pdate_connector_request_servicenow_itom.go | 174 +- ...model_update_connector_request_swimlane.go | 174 +- generated/kibanaactions/response.go | 21 +- generated/kibanaactions/utils.go | 347 -- go.mod | 27 +- go.sum | 43 + internal/clients/api_client.go | 24 +- internal/clients/kibana/action_connector.go | 1285 +++-- internal/kibana/action_connector.go | 17 +- internal/kibana/action_connector_test.go | 6 +- 292 files changed, 5563 insertions(+), 49492 deletions(-) delete mode 100644 generated/kibanaactions/.openapi-generator/FILES delete mode 100644 generated/kibanaactions/.openapi-generator/VERSION rename generated/kibanaactions/{.openapi-generator-ignore => .swagger-codegen-ignore} (78%) create mode 100644 generated/kibanaactions/.swagger-codegen/VERSION rename generated/kibanaactions/api/{openapi.yaml => swagger.yaml} (81%) delete mode 100644 generated/kibanaactions/bundled.json delete mode 100644 generated/kibanaactions/docs/GetConnector404Response.md delete mode 100644 generated/kibanaactions/docs/GetConnectorTypesResponseBodyPropertiesInner.md create mode 100644 generated/kibanaactions/docs/InlineResponse200.md create mode 100644 generated/kibanaactions/docs/InlineResponse2001.md create mode 100644 generated/kibanaactions/docs/InlineResponse2002.md create mode 100644 generated/kibanaactions/docs/InlineResponse2003.md create mode 100644 generated/kibanaactions/docs/InlineResponse400.md create mode 100644 generated/kibanaactions/docs/InlineResponse404.md delete mode 100644 generated/kibanaactions/docs/LegacyGetConnectorTypesResponseBodyPropertiesInner.md delete mode 100644 generated/kibanaactions/docs/LegacyRunConnector200Response.md delete mode 100644 generated/kibanaactions/docs/Model401Response.md delete mode 100644 generated/kibanaactions/docs/Model404Response.md create mode 100644 generated/kibanaactions/docs/OneOfRunConnectorRequestBodyPropertiesParams.md create mode 100644 generated/kibanaactions/docs/OneOfinlineResponse2001Data.md create mode 100644 generated/kibanaactions/docs/OneOfinlineResponse2003Data.md create mode 100644 generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md create mode 100644 generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md create mode 100644 generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md create mode 100644 generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md delete mode 100644 generated/kibanaactions/docs/RunConnector200Response.md delete mode 100644 generated/kibanaactions/docs/RunConnector200ResponseData.md delete mode 100644 generated/kibanaactions/docs/RunConnectorRequestBodyPropertiesParams.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsResponders.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsRespondersInner.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsVisibleTo.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsVisibleToInner.md create mode 100644 generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsComments.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md delete mode 100644 generated/kibanaactions/docs/SubactionParameters.md delete mode 100644 generated/kibanaactions/docs/UpdateConnector400Response.md delete mode 100644 generated/kibanaactions/model_401_response.go delete mode 100644 generated/kibanaactions/model_404_response.go delete mode 100644 generated/kibanaactions/model_get_connector_404_response.go delete mode 100644 generated/kibanaactions/model_get_connector_types_response_body_properties_inner.go create mode 100644 generated/kibanaactions/model_inline_response_200.go create mode 100644 generated/kibanaactions/model_inline_response_200_1.go create mode 100644 generated/kibanaactions/model_inline_response_200_2.go create mode 100644 generated/kibanaactions/model_inline_response_200_3.go create mode 100644 generated/kibanaactions/model_inline_response_400.go create mode 100644 generated/kibanaactions/model_inline_response_404.go delete mode 100644 generated/kibanaactions/model_legacy_get_connector_types_response_body_properties_inner.go delete mode 100644 generated/kibanaactions/model_legacy_run_connector_200_response.go create mode 100644 generated/kibanaactions/model_map.go create mode 100644 generated/kibanaactions/model_one_of_run_connector_request_body_properties_params.go create mode 100644 generated/kibanaactions/model_one_ofinline_response_200_1_data.go create mode 100644 generated/kibanaactions/model_one_ofinline_response_200_3_data.go create mode 100644 generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go create mode 100644 generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go create mode 100644 generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go create mode 100644 generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go delete mode 100644 generated/kibanaactions/model_run_connector_200_response.go delete mode 100644 generated/kibanaactions/model_run_connector_200_response_data.go delete mode 100644 generated/kibanaactions/model_run_connector_request_body_properties_params.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_responders.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_responders_inner.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_visible_to.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_visible_to_inner.go create mode 100644 generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_comments.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_comments_inner.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go delete mode 100644 generated/kibanaactions/model_subaction_parameters.go delete mode 100644 generated/kibanaactions/model_update_connector_400_response.go delete mode 100644 generated/kibanaactions/utils.go diff --git a/Makefile b/Makefile index a998ce32b..d13679130 100644 --- a/Makefile +++ b/Makefile @@ -257,7 +257,9 @@ generate-alerting-client: ## generate Kibana alerting client @ rm -rf generated/alerting/go.mod generated/alerting/go.sum generated/alerting/test @ go fmt ./generated/alerting/... -.PHONY: generate-kibana-actions +## -i https://raw.githubusercontent.com/elastic/kibana/$(SWAGGER_VERSION)/x-pack/plugins/actions/docs/openapi/bundled.json \ + +.PHONY: generate-kibana-actions-client generate-kibana-actions-client: ## generate Kibana actions client @ docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \ -i https://raw.githubusercontent.com/elastic/kibana/$(SWAGGER_VERSION)/x-pack/plugins/actions/docs/openapi/bundled.json \ @@ -272,3 +274,22 @@ generate-kibana-actions-client: ## generate Kibana actions client --additional-properties=useOneOfDiscriminatorLookup=true @ rm -rf generated/kibanaactions/go.mod generated/kibanaactions/go.sum generated/kibanaactions/test @ go fmt ./generated/kibanaactions/... + +.PHONY: generate-kibana-actions-client2 +generate-kibana-actions-client2: ## generate Kibana actions client + @ docker run --rm -v "${PWD}:/local" --platform linux/amd64 swaggerapi/swagger-codegen-cli-v3 generate \ + -i https://raw.githubusercontent.com/elastic/kibana/$(SWAGGER_VERSION)/x-pack/plugins/actions/docs/openapi/bundled.json \ + -l go \ + -p packageName=kibanaactions \ + -o /local/generated/kibanaactions + +.PHONY: generate-kibana-actions-client3 +generate-kibana-actions-client3: ## generate Kibana actions client + @ swagger-codegen generate \ + -i https://raw.githubusercontent.com/elastic/kibana/$(SWAGGER_VERSION)/x-pack/plugins/actions/docs/openapi/bundled.json \ + -l go \ + -o ./generated/kibanaactions \ + --additional-properties=useOneOfDiscriminatorLookup=true \ + --additional-properties=generateInterfaces=true \ + --additional-properties=GoSubmodule=true \ + --additional-properties=packageName=kibanaactions \ No newline at end of file diff --git a/generated/kibanaactions/.openapi-generator/FILES b/generated/kibanaactions/.openapi-generator/FILES deleted file mode 100644 index c61a90409..000000000 --- a/generated/kibanaactions/.openapi-generator/FILES +++ /dev/null @@ -1,248 +0,0 @@ -.gitignore -.travis.yml -README.md -api/openapi.yaml -api_connectors.go -client.go -configuration.go -docs/ActionResponseProperties.md -docs/AlertIdentifierMapping.md -docs/CaseCommentMapping.md -docs/CaseDescriptionMapping.md -docs/CaseIdentifierMapping.md -docs/CaseNameMapping.md -docs/ConfigPropertiesCasesWebhook.md -docs/ConfigPropertiesIndex.md -docs/ConfigPropertiesJira.md -docs/ConfigPropertiesOpsgenie.md -docs/ConfigPropertiesResilient.md -docs/ConfigPropertiesServicenow.md -docs/ConfigPropertiesServicenowItom.md -docs/ConfigPropertiesSwimlane.md -docs/ConnectorMappingsPropertiesForASwimlaneConnector.md -docs/ConnectorResponseProperties.md -docs/ConnectorResponsePropertiesCasesWebhook.md -docs/ConnectorResponsePropertiesEmail.md -docs/ConnectorResponsePropertiesIndex.md -docs/ConnectorResponsePropertiesJira.md -docs/ConnectorResponsePropertiesOpsgenie.md -docs/ConnectorResponsePropertiesPagerduty.md -docs/ConnectorResponsePropertiesResilient.md -docs/ConnectorResponsePropertiesServerlog.md -docs/ConnectorResponsePropertiesServicenow.md -docs/ConnectorResponsePropertiesServicenowItom.md -docs/ConnectorResponsePropertiesServicenowSir.md -docs/ConnectorResponsePropertiesSlack.md -docs/ConnectorResponsePropertiesSwimlane.md -docs/ConnectorResponsePropertiesTeams.md -docs/ConnectorResponsePropertiesTines.md -docs/ConnectorResponsePropertiesWebhook.md -docs/ConnectorResponsePropertiesXmatters.md -docs/ConnectorTypes.md -docs/ConnectorsApi.md -docs/CreateConnectorRequestBodyProperties.md -docs/CreateConnectorRequestCasesWebhook.md -docs/CreateConnectorRequestEmail.md -docs/CreateConnectorRequestIndex.md -docs/CreateConnectorRequestJira.md -docs/CreateConnectorRequestOpsgenie.md -docs/CreateConnectorRequestPagerduty.md -docs/CreateConnectorRequestResilient.md -docs/CreateConnectorRequestServerlog.md -docs/CreateConnectorRequestServicenow.md -docs/CreateConnectorRequestServicenowItom.md -docs/CreateConnectorRequestServicenowSir.md -docs/CreateConnectorRequestSlack.md -docs/CreateConnectorRequestSwimlane.md -docs/CreateConnectorRequestTeams.md -docs/CreateConnectorRequestTines.md -docs/CreateConnectorRequestWebhook.md -docs/CreateConnectorRequestXmatters.md -docs/Features.md -docs/GetConnector404Response.md -docs/GetConnectorTypesResponseBodyPropertiesInner.md -docs/GetConnectorsResponseBodyProperties.md -docs/LegacyCreateConnectorRequestProperties.md -docs/LegacyGetConnectorTypesResponseBodyPropertiesInner.md -docs/LegacyRunConnector200Response.md -docs/LegacyRunConnectorRequestBodyProperties.md -docs/LegacyUpdateConnectorRequestBodyProperties.md -docs/NotFoundResponse.md -docs/RuleNameMapping.md -docs/RunConnector200Response.md -docs/RunConnector200ResponseData.md -docs/RunConnectorParamsDocuments.md -docs/RunConnectorParamsLevelMessage.md -docs/RunConnectorRequestBodyProperties.md -docs/RunConnectorRequestBodyPropertiesParams.md -docs/RunConnectorSubactionAddevent.md -docs/RunConnectorSubactionAddeventSubActionParams.md -docs/RunConnectorSubactionClosealert.md -docs/RunConnectorSubactionClosealertSubActionParams.md -docs/RunConnectorSubactionCreatealert.md -docs/RunConnectorSubactionCreatealertSubActionParams.md -docs/RunConnectorSubactionCreatealertSubActionParamsRespondersInner.md -docs/RunConnectorSubactionCreatealertSubActionParamsVisibleToInner.md -docs/RunConnectorSubactionFieldsbyissuetype.md -docs/RunConnectorSubactionFieldsbyissuetypeSubActionParams.md -docs/RunConnectorSubactionGetchoices.md -docs/RunConnectorSubactionGetchoicesSubActionParams.md -docs/RunConnectorSubactionGetfields.md -docs/RunConnectorSubactionGetincident.md -docs/RunConnectorSubactionGetincidentSubActionParams.md -docs/RunConnectorSubactionIssue.md -docs/RunConnectorSubactionIssueSubActionParams.md -docs/RunConnectorSubactionIssues.md -docs/RunConnectorSubactionIssuesSubActionParams.md -docs/RunConnectorSubactionIssuetypes.md -docs/RunConnectorSubactionPushtoservice.md -docs/RunConnectorSubactionPushtoserviceSubActionParams.md -docs/RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner.md -docs/RunConnectorSubactionPushtoserviceSubActionParamsIncident.md -docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md -docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md -docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md -docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md -docs/SecretsPropertiesCasesWebhook.md -docs/SecretsPropertiesJira.md -docs/SecretsPropertiesOpsgenie.md -docs/SecretsPropertiesResilient.md -docs/SecretsPropertiesServicenow.md -docs/SecretsPropertiesSwimlane.md -docs/SeverityMapping.md -docs/SubactionParameters.md -docs/UnauthorizedResponse.md -docs/UpdateConnector400Response.md -docs/UpdateConnectorRequestBodyProperties.md -docs/UpdateConnectorRequestCasesWebhook.md -docs/UpdateConnectorRequestIndex.md -docs/UpdateConnectorRequestJira.md -docs/UpdateConnectorRequestOpsgenie.md -docs/UpdateConnectorRequestResilient.md -docs/UpdateConnectorRequestServerlog.md -docs/UpdateConnectorRequestServicenow.md -docs/UpdateConnectorRequestServicenowItom.md -docs/UpdateConnectorRequestSwimlane.md -git_push.sh -go.mod -go.sum -model_action_response_properties.go -model_alert_identifier_mapping.go -model_case_comment_mapping.go -model_case_description_mapping.go -model_case_identifier_mapping.go -model_case_name_mapping.go -model_config_properties_cases_webhook.go -model_config_properties_index.go -model_config_properties_jira.go -model_config_properties_opsgenie.go -model_config_properties_resilient.go -model_config_properties_servicenow.go -model_config_properties_servicenow_itom.go -model_config_properties_swimlane.go -model_connector_mappings_properties_for_a_swimlane_connector.go -model_connector_response_properties.go -model_connector_response_properties_cases_webhook.go -model_connector_response_properties_email.go -model_connector_response_properties_index.go -model_connector_response_properties_jira.go -model_connector_response_properties_opsgenie.go -model_connector_response_properties_pagerduty.go -model_connector_response_properties_resilient.go -model_connector_response_properties_serverlog.go -model_connector_response_properties_servicenow.go -model_connector_response_properties_servicenow_itom.go -model_connector_response_properties_servicenow_sir.go -model_connector_response_properties_slack.go -model_connector_response_properties_swimlane.go -model_connector_response_properties_teams.go -model_connector_response_properties_tines.go -model_connector_response_properties_webhook.go -model_connector_response_properties_xmatters.go -model_connector_types.go -model_create_connector_request_body_properties.go -model_create_connector_request_cases_webhook.go -model_create_connector_request_email.go -model_create_connector_request_index.go -model_create_connector_request_jira.go -model_create_connector_request_opsgenie.go -model_create_connector_request_pagerduty.go -model_create_connector_request_resilient.go -model_create_connector_request_serverlog.go -model_create_connector_request_servicenow.go -model_create_connector_request_servicenow_itom.go -model_create_connector_request_servicenow_sir.go -model_create_connector_request_slack.go -model_create_connector_request_swimlane.go -model_create_connector_request_teams.go -model_create_connector_request_tines.go -model_create_connector_request_webhook.go -model_create_connector_request_xmatters.go -model_features.go -model_get_connector_404_response.go -model_get_connector_types_response_body_properties_inner.go -model_get_connectors_response_body_properties.go -model_legacy_create_connector_request_properties.go -model_legacy_get_connector_types_response_body_properties_inner.go -model_legacy_run_connector_200_response.go -model_legacy_run_connector_request_body_properties.go -model_legacy_update_connector_request_body_properties.go -model_not_found_response.go -model_rule_name_mapping.go -model_run_connector_200_response.go -model_run_connector_200_response_data.go -model_run_connector_params_documents.go -model_run_connector_params_level_message.go -model_run_connector_request_body_properties.go -model_run_connector_request_body_properties_params.go -model_run_connector_subaction_addevent.go -model_run_connector_subaction_addevent_sub_action_params.go -model_run_connector_subaction_closealert.go -model_run_connector_subaction_closealert_sub_action_params.go -model_run_connector_subaction_createalert.go -model_run_connector_subaction_createalert_sub_action_params.go -model_run_connector_subaction_createalert_sub_action_params_responders_inner.go -model_run_connector_subaction_createalert_sub_action_params_visible_to_inner.go -model_run_connector_subaction_fieldsbyissuetype.go -model_run_connector_subaction_fieldsbyissuetype_sub_action_params.go -model_run_connector_subaction_getchoices.go -model_run_connector_subaction_getchoices_sub_action_params.go -model_run_connector_subaction_getfields.go -model_run_connector_subaction_getincident.go -model_run_connector_subaction_getincident_sub_action_params.go -model_run_connector_subaction_issue.go -model_run_connector_subaction_issue_sub_action_params.go -model_run_connector_subaction_issues.go -model_run_connector_subaction_issues_sub_action_params.go -model_run_connector_subaction_issuetypes.go -model_run_connector_subaction_pushtoservice.go -model_run_connector_subaction_pushtoservice_sub_action_params.go -model_run_connector_subaction_pushtoservice_sub_action_params_comments_inner.go -model_run_connector_subaction_pushtoservice_sub_action_params_incident.go -model_run_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go -model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go -model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go -model_run_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go -model_secrets_properties_cases_webhook.go -model_secrets_properties_jira.go -model_secrets_properties_opsgenie.go -model_secrets_properties_resilient.go -model_secrets_properties_servicenow.go -model_secrets_properties_swimlane.go -model_severity_mapping.go -model_subaction_parameters.go -model_unauthorized_response.go -model_update_connector_400_response.go -model_update_connector_request_body_properties.go -model_update_connector_request_cases_webhook.go -model_update_connector_request_index.go -model_update_connector_request_jira.go -model_update_connector_request_opsgenie.go -model_update_connector_request_resilient.go -model_update_connector_request_serverlog.go -model_update_connector_request_servicenow.go -model_update_connector_request_servicenow_itom.go -model_update_connector_request_swimlane.go -response.go -test/api_connectors_test.go -utils.go diff --git a/generated/kibanaactions/.openapi-generator/VERSION b/generated/kibanaactions/.openapi-generator/VERSION deleted file mode 100644 index 7f4d792ec..000000000 --- a/generated/kibanaactions/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.5.0-SNAPSHOT \ No newline at end of file diff --git a/generated/kibanaactions/.openapi-generator-ignore b/generated/kibanaactions/.swagger-codegen-ignore similarity index 78% rename from generated/kibanaactions/.openapi-generator-ignore rename to generated/kibanaactions/.swagger-codegen-ignore index 7484ee590..c5fa491b4 100644 --- a/generated/kibanaactions/.openapi-generator-ignore +++ b/generated/kibanaactions/.swagger-codegen-ignore @@ -1,11 +1,11 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): diff --git a/generated/kibanaactions/.swagger-codegen/VERSION b/generated/kibanaactions/.swagger-codegen/VERSION new file mode 100644 index 000000000..34ec317ad --- /dev/null +++ b/generated/kibanaactions/.swagger-codegen/VERSION @@ -0,0 +1 @@ +3.0.42 \ No newline at end of file diff --git a/generated/kibanaactions/README.md b/generated/kibanaactions/README.md index dc27fdb55..167cbb353 100644 --- a/generated/kibanaactions/README.md +++ b/generated/kibanaactions/README.md @@ -3,72 +3,16 @@ OpenAPI schema for Connectors endpoints ## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. +This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. - API version: 0.1 - Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen +- Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen ## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - Put the package under your project folder and add the following in import: - ```golang -import kibanaactions "github.com/elastic/terraform-provider-elasticstack/kibanaactions" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` - -## Configuration of Server URL - -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. - -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), kibanaactions.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), kibanaactions.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation - -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. - -```golang -ctx := context.WithValue(context.Background(), kibanaactions.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), kibanaactions.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) +import "./kibanaactions" ``` ## Documentation for API Endpoints @@ -92,7 +36,6 @@ Class | Method | HTTP request | Description *ConnectorsApi* | [**RunConnector**](docs/ConnectorsApi.md#runconnector) | **Post** /s/{spaceId}/api/actions/connector/{connectorId}/_execute | Runs a connector. *ConnectorsApi* | [**UpdateConnector**](docs/ConnectorsApi.md#updateconnector) | **Put** /s/{spaceId}/api/actions/connector/{connectorId} | Updates the attributes for a connector. - ## Documentation For Models - [ActionResponseProperties](docs/ActionResponseProperties.md) @@ -148,30 +91,36 @@ Class | Method | HTTP request | Description - [CreateConnectorRequestWebhook](docs/CreateConnectorRequestWebhook.md) - [CreateConnectorRequestXmatters](docs/CreateConnectorRequestXmatters.md) - [Features](docs/Features.md) - - [GetConnector404Response](docs/GetConnector404Response.md) - - [GetConnectorTypesResponseBodyPropertiesInner](docs/GetConnectorTypesResponseBodyPropertiesInner.md) - [GetConnectorsResponseBodyProperties](docs/GetConnectorsResponseBodyProperties.md) + - [InlineResponse200](docs/InlineResponse200.md) + - [InlineResponse2001](docs/InlineResponse2001.md) + - [InlineResponse2002](docs/InlineResponse2002.md) + - [InlineResponse2003](docs/InlineResponse2003.md) + - [InlineResponse400](docs/InlineResponse400.md) + - [InlineResponse404](docs/InlineResponse404.md) - [LegacyCreateConnectorRequestProperties](docs/LegacyCreateConnectorRequestProperties.md) - - [LegacyGetConnectorTypesResponseBodyPropertiesInner](docs/LegacyGetConnectorTypesResponseBodyPropertiesInner.md) - - [LegacyRunConnector200Response](docs/LegacyRunConnector200Response.md) - [LegacyRunConnectorRequestBodyProperties](docs/LegacyRunConnectorRequestBodyProperties.md) - [LegacyUpdateConnectorRequestBodyProperties](docs/LegacyUpdateConnectorRequestBodyProperties.md) - [NotFoundResponse](docs/NotFoundResponse.md) + - [OneOfRunConnectorRequestBodyPropertiesParams](docs/OneOfRunConnectorRequestBodyPropertiesParams.md) + - [OneOfinlineResponse2001Data](docs/OneOfinlineResponse2001Data.md) + - [OneOfinlineResponse2003Data](docs/OneOfinlineResponse2003Data.md) + - [OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp](docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md) + - [OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash](docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md) + - [OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl](docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md) + - [OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp](docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md) - [RuleNameMapping](docs/RuleNameMapping.md) - - [RunConnector200Response](docs/RunConnector200Response.md) - - [RunConnector200ResponseData](docs/RunConnector200ResponseData.md) - [RunConnectorParamsDocuments](docs/RunConnectorParamsDocuments.md) - [RunConnectorParamsLevelMessage](docs/RunConnectorParamsLevelMessage.md) - [RunConnectorRequestBodyProperties](docs/RunConnectorRequestBodyProperties.md) - - [RunConnectorRequestBodyPropertiesParams](docs/RunConnectorRequestBodyPropertiesParams.md) - [RunConnectorSubactionAddevent](docs/RunConnectorSubactionAddevent.md) - [RunConnectorSubactionAddeventSubActionParams](docs/RunConnectorSubactionAddeventSubActionParams.md) - [RunConnectorSubactionClosealert](docs/RunConnectorSubactionClosealert.md) - [RunConnectorSubactionClosealertSubActionParams](docs/RunConnectorSubactionClosealertSubActionParams.md) - [RunConnectorSubactionCreatealert](docs/RunConnectorSubactionCreatealert.md) - [RunConnectorSubactionCreatealertSubActionParams](docs/RunConnectorSubactionCreatealertSubActionParams.md) - - [RunConnectorSubactionCreatealertSubActionParamsRespondersInner](docs/RunConnectorSubactionCreatealertSubActionParamsRespondersInner.md) - - [RunConnectorSubactionCreatealertSubActionParamsVisibleToInner](docs/RunConnectorSubactionCreatealertSubActionParamsVisibleToInner.md) + - [RunConnectorSubactionCreatealertSubActionParamsResponders](docs/RunConnectorSubactionCreatealertSubActionParamsResponders.md) + - [RunConnectorSubactionCreatealertSubActionParamsVisibleTo](docs/RunConnectorSubactionCreatealertSubActionParamsVisibleTo.md) - [RunConnectorSubactionFieldsbyissuetype](docs/RunConnectorSubactionFieldsbyissuetype.md) - [RunConnectorSubactionFieldsbyissuetypeSubActionParams](docs/RunConnectorSubactionFieldsbyissuetypeSubActionParams.md) - [RunConnectorSubactionGetchoices](docs/RunConnectorSubactionGetchoices.md) @@ -186,12 +135,8 @@ Class | Method | HTTP request | Description - [RunConnectorSubactionIssuetypes](docs/RunConnectorSubactionIssuetypes.md) - [RunConnectorSubactionPushtoservice](docs/RunConnectorSubactionPushtoservice.md) - [RunConnectorSubactionPushtoserviceSubActionParams](docs/RunConnectorSubactionPushtoserviceSubActionParams.md) - - [RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner](docs/RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner.md) + - [RunConnectorSubactionPushtoserviceSubActionParamsComments](docs/RunConnectorSubactionPushtoserviceSubActionParamsComments.md) - [RunConnectorSubactionPushtoserviceSubActionParamsIncident](docs/RunConnectorSubactionPushtoserviceSubActionParamsIncident.md) - - [RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp](docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md) - - [RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash](docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md) - - [RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl](docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md) - - [RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp](docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md) - [SecretsPropertiesCasesWebhook](docs/SecretsPropertiesCasesWebhook.md) - [SecretsPropertiesJira](docs/SecretsPropertiesJira.md) - [SecretsPropertiesOpsgenie](docs/SecretsPropertiesOpsgenie.md) @@ -199,9 +144,7 @@ Class | Method | HTTP request | Description - [SecretsPropertiesServicenow](docs/SecretsPropertiesServicenow.md) - [SecretsPropertiesSwimlane](docs/SecretsPropertiesSwimlane.md) - [SeverityMapping](docs/SeverityMapping.md) - - [SubactionParameters](docs/SubactionParameters.md) - [UnauthorizedResponse](docs/UnauthorizedResponse.md) - - [UpdateConnector400Response](docs/UpdateConnector400Response.md) - [UpdateConnectorRequestBodyProperties](docs/UpdateConnectorRequestBodyProperties.md) - [UpdateConnectorRequestCasesWebhook](docs/UpdateConnectorRequestCasesWebhook.md) - [UpdateConnectorRequestIndex](docs/UpdateConnectorRequestIndex.md) @@ -213,52 +156,31 @@ Class | Method | HTTP request | Description - [UpdateConnectorRequestServicenowItom](docs/UpdateConnectorRequestServicenowItom.md) - [UpdateConnectorRequestSwimlane](docs/UpdateConnectorRequestSwimlane.md) - ## Documentation For Authorization +## apiKeyAuth +- **Type**: API key - -### basicAuth - +Example +```golang +auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{ + Key: "APIKEY", + Prefix: "Bearer", // Omit if not necessary. +}) +r, err := client.Service.Operation(auth, args) +``` +## basicAuth - **Type**: HTTP basic authentication Example - ```golang auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", + UserName: "username", + Password: "password", }) r, err := client.Service.Operation(auth, args) ``` - -### apiKeyAuth - -- **Type**: API key -- **API key parameter name**: ApiKey -- **Location**: HTTP header - -Note, each API key must be added to a map of `map[string]APIKey` where the key is: ApiKey and passed in as the auth context for each request. - - -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - ## Author - diff --git a/generated/kibanaactions/api/openapi.yaml b/generated/kibanaactions/api/swagger.yaml similarity index 81% rename from generated/kibanaactions/api/openapi.yaml rename to generated/kibanaactions/api/swagger.yaml index c90dd35cc..b68420a2c 100644 --- a/generated/kibanaactions/api/openapi.yaml +++ b/generated/kibanaactions/api/swagger.yaml @@ -1,1940 +1,1617 @@ openapi: 3.0.1 info: + title: Connectors + description: OpenAPI schema for Connectors endpoints contact: name: Connectors Team - description: OpenAPI schema for Connectors endpoints license: name: Elastic License 2.0 url: https://www.elastic.co/licensing/elastic-license - title: Connectors version: "0.1" servers: -- description: local - url: http://localhost:5601 +- url: http://localhost:5601 + description: local security: - basicAuth: [] - apiKeyAuth: [] tags: -- description: Connector APIs enable you to create and manage connectors. - name: connectors +- name: connectors + description: Connector APIs enable you to create and manage connectors. paths: /s/{spaceId}/api/actions/connector: post: + tags: + - connectors + summary: Creates a connector. description: | You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. operationId: createConnector parameters: - - description: Cross-site request forgery protection - explode: false + - name: kbn-xsrf in: header - name: kbn-xsrf + description: Cross-site request forgery protection required: true - schema: - type: string style: simple - - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." explode: false + schema: + type: string + - name: spaceId in: path - name: spaceId + description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." required: true + style: simple + explode: false schema: - example: default type: string - style: simple + example: default requestBody: content: application/json: + schema: + $ref: '#/components/schemas/Create connector request body properties' examples: createIndexConnectorRequest: $ref: '#/components/examples/create_index_connector_request' - value: null - schema: - $ref: '#/components/schemas/Create_connector_request_body_properties' required: true responses: "200": + description: Indicates a successful call. content: application/json: + schema: + $ref: '#/components/schemas/connector_response_properties' examples: createIndexConnectorResponse: $ref: '#/components/examples/create_index_connector_response' - value: null - schema: - $ref: '#/components/schemas/connector_response_properties' - description: Indicates a successful call. "401": + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Unauthorized_response' - description: Authorization information is missing or invalid. + $ref: '#/components/schemas/Unauthorized response' servers: - url: https://localhost:5601 - summary: Creates a connector. - tags: - - connectors servers: - url: https://localhost:5601 /s/{spaceId}/api/actions/connector/{connectorId}: - delete: + get: + tags: + - connectors + summary: Retrieves a connector by ID. description: | - You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be recovered. - operationId: deleteConnector + You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + operationId: getConnector parameters: - - description: Cross-site request forgery protection - explode: false - in: header - name: kbn-xsrf + - name: connectorId + in: path + description: An identifier for the connector. required: true - schema: - type: string style: simple - - description: An identifier for the connector. explode: false - in: path - name: connectorId - required: true schema: - example: df770e30-8b8b-11ed-a780-3b746c987a81 type: string - style: simple - - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - explode: false + example: df770e30-8b8b-11ed-a780-3b746c987a81 + - name: spaceId in: path - name: spaceId + description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." required: true + style: simple + explode: false schema: - example: default type: string - style: simple + example: default responses: - "204": + "200": description: Indicates a successful call. - "401": content: application/json: schema: - $ref: '#/components/schemas/Unauthorized_response' + $ref: '#/components/schemas/connector_response_properties' + examples: + getConnectorResponse: + $ref: '#/components/examples/get_connector_response' + "401": description: Authorization information is missing or invalid. - "404": content: application/json: schema: - $ref: '#/components/schemas/getConnector_404_response' + $ref: '#/components/schemas/Unauthorized response' + "404": description: Object is not found. + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_404' servers: - url: https://localhost:5601 - summary: Deletes a connector. + put: tags: - connectors - get: + summary: Updates the attributes for a connector. description: | - You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - operationId: getConnector + You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + operationId: updateConnector parameters: - - description: An identifier for the connector. - explode: false - in: path - name: connectorId + - name: kbn-xsrf + in: header + description: Cross-site request forgery protection required: true + style: simple + explode: false schema: - example: df770e30-8b8b-11ed-a780-3b746c987a81 type: string + - name: connectorId + in: path + description: An identifier for the connector. + required: true style: simple - - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." explode: false + schema: + type: string + example: df770e30-8b8b-11ed-a780-3b746c987a81 + - name: spaceId in: path - name: spaceId + description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." required: true + style: simple + explode: false schema: - example: default type: string - style: simple + example: default + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Update connector request body properties' + examples: + updateIndexConnectorRequest: + $ref: '#/components/examples/update_index_connector_request' + required: true responses: "200": + description: Indicates a successful call. content: application/json: - examples: - getConnectorResponse: - $ref: '#/components/examples/get_connector_response' - value: null schema: $ref: '#/components/schemas/connector_response_properties' - description: Indicates a successful call. - "401": + "400": + description: Indicates a bad request. content: application/json: schema: - $ref: '#/components/schemas/Unauthorized_response' + $ref: '#/components/schemas/inline_response_400' + "401": description: Authorization information is missing or invalid. - "404": content: application/json: schema: - $ref: '#/components/schemas/getConnector_404_response' + $ref: '#/components/schemas/Unauthorized response' + "404": description: Object is not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Not found response' servers: - url: https://localhost:5601 - summary: Retrieves a connector by ID. + delete: tags: - connectors - put: + summary: Deletes a connector. description: | - You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - operationId: updateConnector + You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be recovered. + operationId: deleteConnector parameters: - - description: Cross-site request forgery protection - explode: false + - name: kbn-xsrf in: header - name: kbn-xsrf + description: Cross-site request forgery protection required: true - schema: - type: string style: simple - - description: An identifier for the connector. explode: false - in: path - name: connectorId - required: true schema: - example: df770e30-8b8b-11ed-a780-3b746c987a81 type: string + - name: connectorId + in: path + description: An identifier for the connector. + required: true style: simple - - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." explode: false + schema: + type: string + example: df770e30-8b8b-11ed-a780-3b746c987a81 + - name: spaceId in: path - name: spaceId + description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." required: true + style: simple + explode: false schema: - example: default type: string - style: simple - requestBody: - content: - application/json: - examples: - updateIndexConnectorRequest: - $ref: '#/components/examples/update_index_connector_request' - value: null - schema: - $ref: '#/components/schemas/Update_connector_request_body_properties' - required: true + example: default responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/connector_response_properties' + "204": description: Indicates a successful call. - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/updateConnector_400_response' - description: Indicates a bad request. "401": + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Unauthorized_response' - description: Authorization information is missing or invalid. + $ref: '#/components/schemas/Unauthorized response' "404": + description: Object is not found. content: application/json: schema: - $ref: '#/components/schemas/Not_found_response' - description: Object is not found. + $ref: '#/components/schemas/inline_response_404' servers: - url: https://localhost:5601 - summary: Updates the attributes for a connector. - tags: - - connectors servers: - url: https://localhost:5601 /s/{spaceId}/api/actions/connectors: get: + tags: + - connectors + summary: Retrieves all connectors. description: | You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. operationId: getConnectors parameters: - - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - explode: false + - name: spaceId in: path - name: spaceId + description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." required: true + style: simple + explode: false schema: - example: default type: string - style: simple + example: default responses: "200": + description: Indicates a successful call. content: application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Get connectors response body properties' + x-content-type: application/json examples: getConnectorsResponse: $ref: '#/components/examples/get_connectors_response' - value: null - schema: - items: - $ref: '#/components/schemas/Get_connectors_response_body_properties' - type: array - description: Indicates a successful call. "401": + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Unauthorized_response' - description: Authorization information is missing or invalid. + $ref: '#/components/schemas/Unauthorized response' servers: - url: https://localhost:5601 - summary: Retrieves all connectors. - tags: - - connectors servers: - url: https://localhost:5601 /s/{spaceId}/api/actions/connector_types: get: + tags: + - connectors + summary: Retrieves a list of all connector types. description: | You do not need any Kibana feature privileges to run this API. operationId: getConnectorTypes parameters: - - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - explode: false + - name: spaceId in: path - name: spaceId + description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." required: true + style: simple + explode: false schema: - example: default type: string - style: simple - - description: A filter to limit the retrieved connector types to those that - support a specific feature (such as alerting or cases). - explode: true + example: default + - name: feature_id in: query - name: feature_id + description: A filter to limit the retrieved connector types to those that + support a specific feature (such as alerting or cases). required: false + style: form + explode: true schema: $ref: '#/components/schemas/features' - style: form responses: "200": + description: Indicates a successful call. content: application/json: - examples: - getConnectorTypesResponse: - $ref: '#/components/examples/get_connector_types_response' - value: null schema: - description: The properties vary for each connector type. - items: - $ref: '#/components/schemas/Get_connector_types_response_body_properties_inner' title: Get connector types response body properties type: array - description: Indicates a successful call. + description: The properties vary for each connector type. + items: + $ref: '#/components/schemas/inline_response_200' + x-content-type: application/json + examples: + getConnectorTypesResponse: + $ref: '#/components/examples/get_connector_types_response' "401": + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Unauthorized_response' - description: Authorization information is missing or invalid. + $ref: '#/components/schemas/Unauthorized response' servers: - url: https://localhost:5601 - summary: Retrieves a list of all connector types. - tags: - - connectors servers: - url: https://localhost:5601 /s/{spaceId}/api/actions/connector/{connectorId}/_execute: post: + tags: + - connectors + summary: Runs a connector. description: | You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. If you use an index connector, you must also have `all`, `create`, `index`, or `write` indices privileges. operationId: runConnector parameters: - - description: Cross-site request forgery protection - explode: false + - name: kbn-xsrf in: header - name: kbn-xsrf + description: Cross-site request forgery protection required: true - schema: - type: string style: simple - - description: An identifier for the connector. explode: false - in: path - name: connectorId - required: true schema: - example: df770e30-8b8b-11ed-a780-3b746c987a81 type: string + - name: connectorId + in: path + description: An identifier for the connector. + required: true style: simple - - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." explode: false + schema: + type: string + example: df770e30-8b8b-11ed-a780-3b746c987a81 + - name: spaceId in: path - name: spaceId + description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." required: true + style: simple + explode: false schema: - example: default type: string - style: simple + example: default requestBody: content: application/json: + schema: + $ref: '#/components/schemas/Run connector request body properties' examples: runIndexConnectorRequest: $ref: '#/components/examples/run_index_connector_request' - value: null runJiraConnectorRequest: $ref: '#/components/examples/run_jira_connector_request' - value: null runServerLogConnectorRequest: $ref: '#/components/examples/run_server_log_connector_request' - value: null runServiceNowITOMConnectorRequest: $ref: '#/components/examples/run_servicenow_itom_connector_request' - value: null runSwimlaneConnectorRequest: $ref: '#/components/examples/run_swimlane_connector_request' - value: null - schema: - $ref: '#/components/schemas/Run_connector_request_body_properties' required: true responses: "200": + description: Indicates a successful call. content: application/json: + schema: + $ref: '#/components/schemas/inline_response_200_1' examples: runIndexConnectorResponse: $ref: '#/components/examples/run_index_connector_response' - value: null runJiraConnectorResponse: $ref: '#/components/examples/run_jira_connector_response' - value: null runServerLogConnectorResponse: $ref: '#/components/examples/run_server_log_connector_response' - value: null runServiceNowITOMConnectorResponse: $ref: '#/components/examples/run_servicenow_itom_connector_response' - value: null runSwimlaneConnectorResponse: $ref: '#/components/examples/run_swimlane_connector_response' - value: null - schema: - $ref: '#/components/schemas/runConnector_200_response' - description: Indicates a successful call. "401": + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Unauthorized_response' - description: Authorization information is missing or invalid. + $ref: '#/components/schemas/Unauthorized response' servers: - url: https://localhost:5601 - summary: Runs a connector. - tags: - - connectors servers: - url: https://localhost:5601 /s/{spaceId}/api/actions/action/{actionId}: - delete: - deprecated: true - description: | - Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, it cannot be recovered. - operationId: legacyDeleteConnector + get: + tags: + - connectors + summary: Retrieves a connector by ID. + description: Deprecated in 7.13.0. Use the get connector API instead. + operationId: legacyGetConnector parameters: - - description: Cross-site request forgery protection - explode: false - in: header - name: kbn-xsrf + - name: actionId + in: path + description: An identifier for the action. required: true - schema: - type: string style: simple - - description: An identifier for the action. explode: false - in: path - name: actionId - required: true schema: - example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad type: string - style: simple - - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - explode: false + example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad + - name: spaceId in: path - name: spaceId + description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." required: true + style: simple + explode: false schema: - example: default type: string - style: simple + example: default responses: - "204": + "200": description: Indicates a successful call. - "401": content: application/json: schema: - $ref: '#/components/schemas/Unauthorized_response' + $ref: '#/components/schemas/action_response_properties' + "401": description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized response' + deprecated: true servers: - url: https://localhost:5601 - summary: Deletes a connector. + put: tags: - connectors - get: - deprecated: true - description: Deprecated in 7.13.0. Use the get connector API instead. - operationId: legacyGetConnector + summary: Updates the attributes for a connector. + description: Deprecated in 7.13.0. Use the update connector API instead. + operationId: legacyUpdateConnector parameters: - - description: An identifier for the action. - explode: false - in: path - name: actionId + - name: kbn-xsrf + in: header + description: Cross-site request forgery protection required: true + style: simple + explode: false schema: - example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad type: string + - name: actionId + in: path + description: An identifier for the action. + required: true style: simple - - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." explode: false + schema: + type: string + example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad + - name: spaceId in: path - name: spaceId + description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." required: true + style: simple + explode: false schema: - example: default type: string - style: simple + example: default + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Legacy update connector request body properties' + required: true responses: "200": + description: Indicates a successful call. content: application/json: schema: $ref: '#/components/schemas/action_response_properties' - description: Indicates a successful call. - "401": + "404": + description: Object is not found. content: application/json: schema: - $ref: '#/components/schemas/Unauthorized_response' - description: Authorization information is missing or invalid. + $ref: '#/components/schemas/Not found response' + deprecated: true servers: - url: https://localhost:5601 - summary: Retrieves a connector by ID. + delete: tags: - connectors - put: - deprecated: true - description: Deprecated in 7.13.0. Use the update connector API instead. - operationId: legacyUpdateConnector + summary: Deletes a connector. + description: | + Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, it cannot be recovered. + operationId: legacyDeleteConnector parameters: - - description: Cross-site request forgery protection - explode: false + - name: kbn-xsrf in: header - name: kbn-xsrf + description: Cross-site request forgery protection required: true - schema: - type: string style: simple - - description: An identifier for the action. explode: false - in: path - name: actionId - required: true schema: - example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad type: string + - name: actionId + in: path + description: An identifier for the action. + required: true style: simple - - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." explode: false + schema: + type: string + example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad + - name: spaceId in: path - name: spaceId + description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." required: true + style: simple + explode: false schema: - example: default type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Legacy_update_connector_request_body_properties' - required: true + example: default responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/action_response_properties' + "204": description: Indicates a successful call. - "404": + "401": + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Not_found_response' - description: Object is not found. + $ref: '#/components/schemas/Unauthorized response' + deprecated: true servers: - url: https://localhost:5601 - summary: Updates the attributes for a connector. - tags: - - connectors servers: - url: https://localhost:5601 /s/{spaceId}/api/actions: get: - deprecated: true + tags: + - connectors + summary: Retrieves all connectors. description: Deprecated in 7.13.0. Use the get all connectors API instead. operationId: legacyGetConnectors parameters: - - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - explode: false + - name: spaceId in: path - name: spaceId + description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." required: true + style: simple + explode: false schema: - example: default type: string - style: simple + example: default responses: "200": + description: Indicates a successful call. content: application/json: schema: + type: array items: $ref: '#/components/schemas/action_response_properties' - type: array - description: Indicates a successful call. + x-content-type: application/json "401": + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Unauthorized_response' - description: Authorization information is missing or invalid. + $ref: '#/components/schemas/Unauthorized response' + deprecated: true servers: - url: https://localhost:5601 - summary: Retrieves all connectors. + post: tags: - connectors - post: - deprecated: true + summary: Creates a connector. description: Deprecated in 7.13.0. Use the create connector API instead. operationId: legacyCreateConnector parameters: - - description: Cross-site request forgery protection - explode: false + - name: kbn-xsrf in: header - name: kbn-xsrf + description: Cross-site request forgery protection required: true - schema: - type: string style: simple - - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." explode: false + schema: + type: string + - name: spaceId in: path - name: spaceId + description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." required: true + style: simple + explode: false schema: - example: default type: string - style: simple + example: default requestBody: content: application/json: schema: - $ref: '#/components/schemas/Legacy_create_connector_request_properties' + $ref: '#/components/schemas/Legacy create connector request properties' required: true responses: "200": + description: Indicates a successful call. content: application/json: schema: $ref: '#/components/schemas/action_response_properties' - description: Indicates a successful call. "401": + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Unauthorized_response' - description: Authorization information is missing or invalid. + $ref: '#/components/schemas/Unauthorized response' + deprecated: true servers: - url: https://localhost:5601 - summary: Creates a connector. - tags: - - connectors servers: - url: https://localhost:5601 /s/{spaceId}/api/actions/list_action_types: get: - deprecated: true + tags: + - connectors + summary: Retrieves a list of all connector types. description: Deprecated in 7.13.0. Use the get all connector types API instead. operationId: legacyGetConnectorTypes parameters: - - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - explode: false + - name: spaceId in: path - name: spaceId + description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." required: true + style: simple + explode: false schema: - example: default type: string - style: simple + example: default responses: "200": + description: Indicates a successful call. content: application/json: schema: - description: The properties vary for each connector type. - items: - $ref: '#/components/schemas/Legacy_get_connector_types_response_body_properties_inner' title: Legacy get connector types response body properties type: array - description: Indicates a successful call. + description: The properties vary for each connector type. + items: + $ref: '#/components/schemas/inline_response_200_2' + x-content-type: application/json "401": + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Unauthorized_response' - description: Authorization information is missing or invalid. + $ref: '#/components/schemas/Unauthorized response' + deprecated: true servers: - url: https://localhost:5601 - summary: Retrieves a list of all connector types. - tags: - - connectors servers: - url: https://localhost:5601 /s/{spaceId}/api/actions/action/{actionId}/_execute: post: - deprecated: true + tags: + - connectors + summary: Runs a connector. description: Deprecated in 7.13.0. Use the run connector API instead. operationId: legacyRunConnector parameters: - - description: Cross-site request forgery protection - explode: false + - name: kbn-xsrf in: header - name: kbn-xsrf + description: Cross-site request forgery protection required: true - schema: - type: string style: simple - - description: An identifier for the action. explode: false - in: path - name: actionId - required: true schema: - example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad type: string + - name: actionId + in: path + description: An identifier for the action. + required: true style: simple - - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." explode: false + schema: + type: string + example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad + - name: spaceId in: path - name: spaceId + description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." required: true + style: simple + explode: false schema: - example: default type: string - style: simple + example: default requestBody: content: application/json: schema: - $ref: '#/components/schemas/Legacy_run_connector_request_body_properties' + $ref: '#/components/schemas/Legacy run connector request body properties' required: true responses: "200": + description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/legacyRunConnector_200_response' - description: Indicates a successful call. + $ref: '#/components/schemas/inline_response_200_3' "401": + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Unauthorized_response' - description: Authorization information is missing or invalid. + $ref: '#/components/schemas/Unauthorized response' + deprecated: true servers: - url: https://localhost:5601 - summary: Runs a connector. - tags: - - connectors servers: - url: https://localhost:5601 components: - examples: - create_index_connector_request: - summary: Create an index connector. - value: - name: my-connector - connector_type_id: .index - config: - index: test-index - create_index_connector_response: - summary: A new index connector. - value: - id: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad - connector_type_id: .index - name: my-connector - config: - index: test-index - refresh: false - executionTimeField: null - is_preconfigured: false - is_deprecated: false - is_missing_secrets: false - get_connector_response: - summary: A list of connector types - value: - id: df770e30-8b8b-11ed-a780-3b746c987a81 - name: my_server_log_connector - config: {} - connector_type_id: .server-log - is_preconfigured: false - is_deprecated: false - is_missing_secrets: false - update_index_connector_request: - summary: Update an index connector. - value: - name: updated-connector - config: - index: updated-index - get_connectors_response: - summary: A list of connectors - value: - - id: preconfigured-email-connector - name: my-preconfigured-email-notification - connector_type_id: .email - is_preconfigured: true - is_deprecated: false - referenced_by_count: 0 - - id: e07d0c80-8b8b-11ed-a780-3b746c987a81 - name: my-index-connector - config: - index: test-index - refresh: false - executionTimeField: null - connector_type_id: .index - is_preconfigured: false - is_deprecated: false - referenced_by_count: 2 - is_missing_secrets: false - get_connector_types_response: - summary: A list of connector types - value: - - id: .swimlane - name: Swimlane - enabled: true - enabled_in_config: true - enabled_in_license: true - minimum_license_required: gold - supported_feature_ids: - - alerting - - cases - - siem - - id: .index - name: Index - enabled: true - enabled_in_config: true - enabled_in_license: true - minimum_license_required: basic - supported_feature_ids: - - alerting - - uptime - - siem - - id: .server-log - name: Server log - enabled: true - enabled_in_config: true - enabled_in_license: true - minimum_license_required: basic - supported_feature_ids: - - alerting - - uptime - run_index_connector_request: - summary: Run an index connector. - value: - params: - documents: - - id: my_doc_id - name: my_doc_name - message: "hello, world" - run_jira_connector_request: - summary: Run a Jira connector to retrieve the list of issue types. - value: - params: - subAction: issueTypes - run_server_log_connector_request: - summary: Run a server log connector. - value: - params: - level: warn - message: Test warning message. - run_servicenow_itom_connector_request: - summary: Run a ServiceNow ITOM connector to retrieve the list of choices. - value: - params: - subAction: getChoices - subActionParams: - fields: - - severity - - urgency - run_swimlane_connector_request: - summary: Run a Swimlane connector to create an incident. - value: - params: - subAction: pushToService - subActionParams: - comments: - - commentId: 1 - comment: A comment about the incident. - incident: - caseId: "1000" - caseName: Case name - description: Description of the incident. - run_index_connector_response: - summary: Response from running an index connector. - value: - connector_id: fd38c600-96a5-11ed-bb79-353b74189cba - data: - errors: false - items: - - create: - _id: 4JtvwYUBrcyxt2NnfW3y - _index: my-index - _primary_term: 1 - _seq_no: 0 - _shards: - failed: 0 - successful: 1 - total: 2 - _version: 1 - result: created - status: 201 - took: 135 - status: ok - run_jira_connector_response: - summary: Response from retrieving the list of issue types for a Jira connector. - value: - connector_id: b3aad810-edbe-11ec-82d1-11348ecbf4a6 - data: - - id: 10024 - name: Improvement - - id: 10006 - name: Task - - id: 10007 - name: Sub-task - - id: 10025 - name: New Feature - - id: 10023 - name: Bug - - id: 10000 - name: Epic - status: ok - run_server_log_connector_response: - summary: Response from running a server log connector. - value: - connector_id: 7fc7b9a0-ecc9-11ec-8736-e7d63118c907 - status: ok - run_servicenow_itom_connector_response: - summary: Response from retrieving the list of choices for a ServiceNow ITOM - connector. - value: - connector_id: 9d9be270-2fd2-11ed-b0e0-87533c532698 - data: - - dependent_value: "" - element: severity - label: Critical - value: 1 - - dependent_value: "" - element: severity - label: Major - value: 2 - - dependent_value: "" - element: severity - label: Minor - value: 3 - - dependent_value: "" - element: severity - label: Warning - value: 4 - - dependent_value: "" - element: severity - label: OK - value: 5 - - dependent_value: "" - element: severity - label: Clear - value: 0 - - dependent_value: "" - element: urgency - label: 1 - High - value: 1 - - dependent_value: "" - element: urgency - label: 2 - Medium - value: 2 - - dependent_value: "" - element: urgency - label: 3 - Low - value: 3 - status: ok - run_swimlane_connector_response: - summary: Response from creating a Swimlane incident. - value: - connector_id: a4746470-2f94-11ed-b0e0-87533c532698 - data: - id: aKPmBHWzmdRQtx6Mx - title: TEST-457 - url: https://elastic.swimlane.url.us/record/aNcL2xniGHGpa2AHb/aKPmBHWzmdRQtx6Mx - pushedDate: 2022-09-08T16:52:27.866Z - comments: - - commentId: 1 - pushedDate: 2022-09-08T16:52:27.865Z - status: ok - parameters: - kbn_xsrf: - description: Cross-site request forgery protection - explode: false - in: header - name: kbn-xsrf - required: true - schema: - type: string - style: simple - space_id: - description: "An identifier for the space. If `/s/` and the identifier are omitted\ - \ from the path, the default space is used." - explode: false - in: path - name: spaceId - required: true - schema: - example: default - type: string - style: simple - connector_id: - description: An identifier for the connector. - explode: false - in: path - name: connectorId - required: true - schema: - example: df770e30-8b8b-11ed-a780-3b746c987a81 - type: string - style: simple - action_id: - description: An identifier for the action. - explode: false - in: path - name: actionId - required: true - schema: - example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad - type: string - style: simple - responses: - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/Unauthorized_response' - description: Authorization information is missing or invalid. - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/Not_found_response' - description: Object is not found. - "200_actions": - content: - application/json: - schema: - $ref: '#/components/schemas/action_response_properties' - description: Indicates a successful call. schemas: config_properties_cases_webhook: - description: Defines properties for connectors when type is `.cases-webhook`. + title: Connector request properties for Webhook - Case Management connector + required: + - createIncidentJson + - createIncidentResponseKey + - createIncidentUrl + - getIncidentResponseExternalTitleKey + - getIncidentUrl + - updateIncidentJson + - updateIncidentUrl + - viewIncidentUrl + type: object properties: createCommentJson: + type: string description: | A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. example: "{\"body\":{\"[object Object]\":null}}" - type: string createCommentMethod: - default: put + type: string description: | The REST API HTTP request method to create a case comment in the third-party system. Valid values are `patch`, `post`, and `put`. + default: put enum: - patch - post - put - type: string createCommentUrl: + type: string description: | The REST API URL to create a case comment by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts setting`, add the hostname to the allowed hosts. example: "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}/comment" - type: string createIncidentJson: + type: string description: | A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. example: "{\"fields\":{\"summary\":{\"[object Object]\":null},\"description\"\ :{\"[object Object]\":null},\"labels\":{\"[object Object]\":null}}}" - type: string createIncidentMethod: - default: post + type: string description: | The REST API HTTP request method to create a case in the third-party system. Valid values are `patch`, `post`, and `put`. + default: post enum: - patch - post - put - type: string createIncidentResponseKey: + type: string description: The JSON key in the create case response that contains the external case ID. - type: string createIncidentUrl: + type: string description: | The REST API URL to create a case in the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. - type: string getIncidentResponseExternalTitleKey: + type: string description: The JSON key in get case response that contains the external case title. - type: string getIncidentUrl: + type: string description: | The REST API URL to get the case by ID from the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. You can use a variable to add the external system ID to the URL. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. example: "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}" - type: string hasAuth: - default: true + type: boolean description: "If true, a username and password for login type authentication\ \ must be provided." - type: boolean + default: true headers: + type: string description: | A set of key-value pairs sent as headers with the request URLs for the create case, update case, get case, and create comment methods. - type: string updateIncidentJson: + type: string description: | The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. example: "{\"fields\":{\"summary\":{\"[object Object]\":null},\"description\"\ :{\"[object Object]\":null},\"labels\":{\"[object Object]\":null}}}" - type: string updateIncidentMethod: - default: put + type: string description: | The REST API HTTP request method to update the case in the third-party system. Valid values are `patch`, `post`, and `put`. + default: put enum: - patch - post - put - type: string updateIncidentUrl: + type: string description: | The REST API URL to update the case by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. example: "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.ID}}}" - type: string viewIncidentUrl: + type: string description: | The URL to view the case in the external system. You can use variables to add the external system ID or external system title to the URL. example: "https://testing-jira.atlassian.net/browse/{{{external.system.title}}}" - type: string - required: - - createIncidentJson - - createIncidentResponseKey - - createIncidentUrl - - getIncidentResponseExternalTitleKey - - getIncidentUrl - - updateIncidentJson - - updateIncidentUrl - - viewIncidentUrl - title: Connector request properties for Webhook - Case Management connector - type: object + description: Defines properties for connectors when type is `.cases-webhook`. secrets_properties_cases_webhook: + title: Connector secrets properties for Webhook - Case Management connector + type: object properties: password: + type: string description: "The password for HTTP basic authentication. If `hasAuth` is\ \ set to `true`, this property is required." - type: string user: + type: string description: "The username for HTTP basic authentication. If `hasAuth` is\ \ set to `true`, this property is required." - type: string - title: Connector secrets properties for Webhook - Case Management connector - type: object create_connector_request_cases_webhook: - description: | - The Webhook - Case Management connector uses axios to send POST, PUT, and GET requests to a case management RESTful API web service. + title: Create Webhook - Case Managment connector request + required: + - config + - connector_type_id + - name + type: object properties: config: $ref: '#/components/schemas/config_properties_cases_webhook' connector_type_id: + type: string description: The type of connector. + example: .cases-webhook enum: - .cases-webhook - example: .cases-webhook - type: string name: + type: string description: The display name for the connector. example: my-connector - type: string secrets: $ref: '#/components/schemas/secrets_properties_cases_webhook' - required: - - config - - connector_type_id - - name - title: Create Webhook - Case Managment connector request - type: object + description: | + The Webhook - Case Management connector uses axios to send POST, PUT, and GET requests to a case management RESTful API web service. config_properties_email: - additionalProperties: true - description: Defines properties for connectors when type is `.email`. title: Connector request properties for an email connector type: object - secrets_properties_email: additionalProperties: true - description: Defines secrets for connectors when type is `.email`. + description: Defines properties for connectors when type is `.email`. + x-schema-name: config_properties_email + secrets_properties_email: title: Connector secrets properties for an email connector type: object + additionalProperties: true + description: Defines secrets for connectors when type is `.email`. + x-schema-name: secrets_properties_email create_connector_request_email: - description: | - The email connector uses the SMTP protocol to send mail messages, using an integration of Nodemailer. An exception is Microsoft Exchange, which uses HTTP protocol for sending emails, Send mail. Email message text is sent as both plain text and html text. + title: Create email connector request + required: + - config + - connector_type_id + - name + - secrets + type: object properties: config: - additionalProperties: true - description: Defines properties for connectors when type is `.email`. - title: Connector request properties for an email connector - type: object + $ref: '#/components/schemas/config_properties_email' connector_type_id: + type: string description: The type of connector. + example: .email enum: - .email - example: .email - type: string name: + type: string description: The display name for the connector. example: my-connector - type: string secrets: - additionalProperties: true - description: Defines secrets for connectors when type is `.email`. - title: Connector secrets properties for an email connector - type: object + $ref: '#/components/schemas/secrets_properties_email' + description: | + The email connector uses the SMTP protocol to send mail messages, using an integration of Nodemailer. An exception is Microsoft Exchange, which uses HTTP protocol for sending emails, Send mail. Email message text is sent as both plain text and html text. + config_properties_index: + title: Connector request properties for an index connector required: - - config - - connector_type_id - - name - - secrets - title: Create email connector request + - index type: object - config_properties_index: - description: Defines properties for connectors when type is `.index`. properties: executionTimeField: + type: string description: Specifies a field that will contain the time the alert condition was detected. nullable: true - type: string index: - description: The Elasticsearch index to be written to. type: string + description: The Elasticsearch index to be written to. refresh: - default: false + type: boolean description: | The refresh policy for the write request, which affects when changes are made visible to search. Refer to the refresh setting for Elasticsearch document APIs. - type: boolean + default: false + description: Defines properties for connectors when type is `.index`. + create_connector_request_index: + title: Create index connector request required: - - index - title: Connector request properties for an index connector + - config + - connector_type_id + - name type: object - create_connector_request_index: - description: The index connector indexes a document into Elasticsearch. properties: config: $ref: '#/components/schemas/config_properties_index' connector_type_id: + type: string description: The type of connector. + example: .index enum: - .index - example: .index - type: string name: + type: string description: The display name for the connector. example: my-connector - type: string + description: The index connector indexes a document into Elasticsearch. + config_properties_jira: + title: Connector request properties for a Jira connector required: - - config - - connector_type_id - - name - title: Create index connector request + - apiUrl + - projectKey type: object - config_properties_jira: - description: Defines properties for connectors when type is `.jira`. properties: apiUrl: - description: The Jira instance URL. type: string + description: The Jira instance URL. projectKey: - description: The Jira project key. type: string + description: The Jira project key. + description: Defines properties for connectors when type is `.jira`. + secrets_properties_jira: + title: Connector secrets properties for a Jira connector required: - - apiUrl - - projectKey - title: Connector request properties for a Jira connector + - apiToken + - email type: object - secrets_properties_jira: - description: Defines secrets for connectors when type is `.jira`. properties: apiToken: - description: The Jira API authentication token for HTTP basic authentication. type: string + description: The Jira API authentication token for HTTP basic authentication. email: - description: The account email for HTTP Basic authentication. type: string + description: The account email for HTTP Basic authentication. + description: Defines secrets for connectors when type is `.jira`. + create_connector_request_jira: + title: Create Jira connector request required: - - apiToken - - email - title: Connector secrets properties for a Jira connector + - config + - connector_type_id + - name + - secrets type: object - create_connector_request_jira: - description: The Jira connector uses the REST API v2 to create Jira issues. properties: config: $ref: '#/components/schemas/config_properties_jira' connector_type_id: + type: string description: The type of connector. + example: .jira enum: - .jira - example: .jira - type: string name: + type: string description: The display name for the connector. example: my-connector - type: string secrets: $ref: '#/components/schemas/secrets_properties_jira' + description: The Jira connector uses the REST API v2 to create Jira issues. + config_properties_opsgenie: + title: Connector request properties for an Opsgenie connector required: - - config - - connector_type_id - - name - - secrets - title: Create Jira connector request + - apiUrl type: object - config_properties_opsgenie: - description: Defines properties for connectors when type is `.opsgenie`. properties: apiUrl: + type: string description: | The Opsgenie URL. For example, `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. - type: string + description: Defines properties for connectors when type is `.opsgenie`. + secrets_properties_opsgenie: + title: Connector secrets properties for an Opsgenie connector required: - - apiUrl - title: Connector request properties for an Opsgenie connector + - apiKey type: object - secrets_properties_opsgenie: - description: Defines secrets for connectors when type is `.opsgenie`. properties: apiKey: - description: The Opsgenie API authentication key for HTTP Basic authentication. type: string + description: The Opsgenie API authentication key for HTTP Basic authentication. + description: Defines secrets for connectors when type is `.opsgenie`. + create_connector_request_opsgenie: + title: Create Opsgenie connector request required: - - apiKey - title: Connector secrets properties for an Opsgenie connector + - config + - connector_type_id + - name + - secrets type: object - create_connector_request_opsgenie: - description: The Opsgenie connector uses the Opsgenie alert API. properties: config: $ref: '#/components/schemas/config_properties_opsgenie' connector_type_id: + type: string description: The type of connector. + example: .opsgenie enum: - .opsgenie - example: .opsgenie - type: string name: + type: string description: The display name for the connector. example: my-connector - type: string secrets: $ref: '#/components/schemas/secrets_properties_opsgenie' - required: - - config - - connector_type_id - - name - - secrets - title: Create Opsgenie connector request - type: object + description: The Opsgenie connector uses the Opsgenie alert API. config_properties_pagerduty: - additionalProperties: true - description: Defines properties for connectors when type is `.pagerduty`. title: Connector request properties for a PagerDuty connector type: object - secrets_properties_pagerduty: additionalProperties: true - description: Defines secrets for connectors when type is `.pagerduty`. + description: Defines properties for connectors when type is `.pagerduty`. + x-schema-name: config_properties_pagerduty + secrets_properties_pagerduty: title: Connector secrets properties for a PagerDuty connector type: object + additionalProperties: true + description: Defines secrets for connectors when type is `.pagerduty`. + x-schema-name: secrets_properties_pagerduty create_connector_request_pagerduty: - description: | - The PagerDuty connector uses the v2 Events API to trigger, acknowledge, and resolve PagerDuty alerts. + title: Create PagerDuty connector request + required: + - config + - connector_type_id + - name + - secrets + type: object properties: config: - additionalProperties: true - description: Defines properties for connectors when type is `.pagerduty`. - title: Connector request properties for a PagerDuty connector - type: object + $ref: '#/components/schemas/config_properties_pagerduty' connector_type_id: + type: string description: The type of connector. + example: .pagerduty enum: - .pagerduty - example: .pagerduty - type: string name: + type: string description: The display name for the connector. example: my-connector - type: string secrets: - additionalProperties: true - description: Defines secrets for connectors when type is `.pagerduty`. - title: Connector secrets properties for a PagerDuty connector - type: object + $ref: '#/components/schemas/secrets_properties_pagerduty' + description: | + The PagerDuty connector uses the v2 Events API to trigger, acknowledge, and resolve PagerDuty alerts. + config_properties_resilient: + title: Connector request properties for a IBM Resilient connector required: - - config - - connector_type_id - - name - - secrets - title: Create PagerDuty connector request + - apiUrl + - orgId type: object - config_properties_resilient: - description: Defines properties for connectors when type is `.resilient`. properties: apiUrl: - description: The IBM Resilient instance URL. type: string + description: The IBM Resilient instance URL. orgId: - description: The IBM Resilient organization ID. type: string + description: The IBM Resilient organization ID. + description: Defines properties for connectors when type is `.resilient`. + secrets_properties_resilient: + title: Connector secrets properties for IBM Resilient connector required: - - apiUrl - - orgId - title: Connector request properties for a IBM Resilient connector + - apiKeyId + - apiKeySecret type: object - secrets_properties_resilient: - description: Defines secrets for connectors when type is `.resilient`. properties: apiKeyId: - description: The authentication key ID for HTTP Basic authentication. type: string + description: The authentication key ID for HTTP Basic authentication. apiKeySecret: - description: The authentication key secret for HTTP Basic authentication. type: string + description: The authentication key secret for HTTP Basic authentication. + description: Defines secrets for connectors when type is `.resilient`. + create_connector_request_resilient: + title: Create IBM Resilient connector request required: - - apiKeyId - - apiKeySecret - title: Connector secrets properties for IBM Resilient connector + - config + - connector_type_id + - name + - secrets type: object - create_connector_request_resilient: - description: The IBM Resilient connector uses the RESILIENT REST v2 to create - IBM Resilient incidents. properties: config: $ref: '#/components/schemas/config_properties_resilient' connector_type_id: + type: string description: The type of connector. + example: .resilient enum: - .resilient - example: .resilient - type: string name: + type: string description: The display name for the connector. example: my-connector - type: string secrets: $ref: '#/components/schemas/secrets_properties_resilient' + description: The IBM Resilient connector uses the RESILIENT REST v2 to create + IBM Resilient incidents. + create_connector_request_serverlog: + title: Create server log connector request required: - - config - connector_type_id - name - - secrets - title: Create IBM Resilient connector request type: object - create_connector_request_serverlog: - description: This connector writes an entry to the Kibana server log. properties: connector_type_id: + type: string description: The type of connector. + example: .server-log enum: - .server-log - example: .server-log - type: string name: + type: string description: The display name for the connector. example: my-connector - type: string + description: This connector writes an entry to the Kibana server log. + config_properties_servicenow: + title: Connector request properties for a ServiceNow ITSM connector required: - - connector_type_id - - name - title: Create server log connector request + - apiUrl type: object - config_properties_servicenow: - description: Defines properties for connectors when type is `.servicenow`. properties: apiUrl: - description: The ServiceNow instance URL. type: string + description: The ServiceNow instance URL. clientId: + type: string description: | The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. - type: string isOAuth: - default: false + type: boolean description: | The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). - type: boolean + default: false jwtKeyId: + type: string description: | The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. - type: string userIdentifierValue: + type: string description: | The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. - type: string usesTableApi: - default: true + type: boolean description: | Determines whether the connector uses the Table API or the Import Set API. This property is supported only for ServiceNow ITSM and ServiceNow SecOps connectors. NOTE: If this property is set to `false`, the Elastic application should be installed in ServiceNow. - type: boolean - required: - - apiUrl - title: Connector request properties for a ServiceNow ITSM connector - type: object + default: true + description: Defines properties for connectors when type is `.servicenow`. secrets_properties_servicenow: - description: "Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`,\ - \ or `.servicenow-itom`." + title: "Connector secrets properties for ServiceNow ITOM, ServiceNow ITSM, and\ + \ ServiceNow SecOps connectors" + type: object properties: clientSecret: + type: string description: The client secret assigned to your OAuth application. This property is required when `isOAuth` is `true`. - type: string password: + type: string description: The password for HTTP basic authentication. This property is required when `isOAuth` is `false`. - type: string privateKey: + type: string description: The RSA private key that you created for use in ServiceNow. This property is required when `isOAuth` is `true`. - type: string privateKeyPassword: + type: string description: The password for the RSA private key. This property is required when `isOAuth` is `true` and you set a password on your private key. - type: string username: + type: string description: The username for HTTP basic authentication. This property is required when `isOAuth` is `false`. - type: string - title: "Connector secrets properties for ServiceNow ITOM, ServiceNow ITSM, and\ - \ ServiceNow SecOps connectors" - type: object + description: "Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`,\ + \ or `.servicenow-itom`." create_connector_request_servicenow: - description: | - The ServiceNow ITSM connector uses the import set API to create ServiceNow incidents. You can use the connector for rule actions and cases. + title: Create ServiceNow ITSM connector request + required: + - config + - connector_type_id + - name + - secrets + type: object properties: config: $ref: '#/components/schemas/config_properties_servicenow' connector_type_id: + type: string description: The type of connector. + example: .servicenow enum: - .servicenow - example: .servicenow - type: string name: + type: string description: The display name for the connector. example: my-connector - type: string secrets: $ref: '#/components/schemas/secrets_properties_servicenow' + description: | + The ServiceNow ITSM connector uses the import set API to create ServiceNow incidents. You can use the connector for rule actions and cases. + config_properties_servicenow_itom: + title: Connector request properties for a ServiceNow ITSM connector required: - - config - - connector_type_id - - name - - secrets - title: Create ServiceNow ITSM connector request + - apiUrl type: object - config_properties_servicenow_itom: - description: Defines properties for connectors when type is `.servicenow`. properties: apiUrl: - description: The ServiceNow instance URL. type: string + description: The ServiceNow instance URL. clientId: + type: string description: | The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. - type: string isOAuth: - default: false + type: boolean description: | The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). - type: boolean + default: false jwtKeyId: + type: string description: | The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. - type: string userIdentifierValue: + type: string description: | The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. - type: string + description: Defines properties for connectors when type is `.servicenow`. + create_connector_request_servicenow_itom: + title: Create ServiceNow ITOM connector request required: - - apiUrl - title: Connector request properties for a ServiceNow ITSM connector + - config + - connector_type_id + - name + - secrets type: object - create_connector_request_servicenow_itom: - description: | - The ServiceNow ITOM connector uses the event API to create ServiceNow events. You can use the connector for rule actions. properties: config: $ref: '#/components/schemas/config_properties_servicenow_itom' connector_type_id: + type: string description: The type of connector. + example: .servicenow-itom enum: - .servicenow-itom - example: .servicenow-itom - type: string name: + type: string description: The display name for the connector. example: my-connector - type: string secrets: $ref: '#/components/schemas/secrets_properties_servicenow' + description: | + The ServiceNow ITOM connector uses the event API to create ServiceNow events. You can use the connector for rule actions. + create_connector_request_servicenow_sir: + title: Create ServiceNow SecOps connector request required: - config - connector_type_id - name - secrets - title: Create ServiceNow ITOM connector request type: object - create_connector_request_servicenow_sir: - description: | - The ServiceNow SecOps connector uses the import set API to create ServiceNow security incidents. You can use the connector for rule actions and cases. properties: config: $ref: '#/components/schemas/config_properties_servicenow' connector_type_id: + type: string description: The type of connector. + example: .servicenow-sir enum: - .servicenow-sir - example: .servicenow-sir - type: string name: + type: string description: The display name for the connector. example: my-connector - type: string secrets: $ref: '#/components/schemas/secrets_properties_servicenow' + description: | + The ServiceNow SecOps connector uses the import set API to create ServiceNow security incidents. You can use the connector for rule actions and cases. + secrets_properties_slack: + title: Connector secrets properties for a Slack connector + type: object + additionalProperties: true + description: Defines secrets for connectors when type is `.slack`. + x-schema-name: secrets_properties_slack + create_connector_request_slack: + title: Create Slack connector request required: - - config - connector_type_id - name - secrets - title: Create ServiceNow SecOps connector request - type: object - secrets_properties_slack: - additionalProperties: true - description: Defines secrets for connectors when type is `.slack`. - title: Connector secrets properties for a Slack connector type: object - create_connector_request_slack: - description: The Slack connector uses Slack Incoming Webhooks. properties: connector_type_id: + type: string description: The type of connector. + example: .slack enum: - .slack - example: .slack - type: string name: + type: string description: The display name for the connector. example: my-connector - type: string secrets: - additionalProperties: true - description: Defines secrets for connectors when type is `.slack`. - title: Connector secrets properties for a Slack connector - type: object + $ref: '#/components/schemas/secrets_properties_slack' + description: The Slack connector uses Slack Incoming Webhooks. + config_properties_swimlane: + title: Connector request properties for a Swimlane connector required: - - connector_type_id - - name - - secrets - title: Create Slack connector request + - apiUrl + - appId + - connectorType type: object - config_properties_swimlane: - description: Defines properties for connectors when type is `.swimlane`. properties: apiUrl: - description: The Swimlane instance URL. type: string + description: The Swimlane instance URL. appId: - description: The Swimlane application ID. type: string + description: The Swimlane application ID. connectorType: + type: string description: "The type of connector. Valid values are `all`, `alerts`, and\ \ `cases`." enum: - all - alerts - cases - type: string mappings: - $ref: '#/components/schemas/Connector_mappings_properties_for_a_Swimlane_connector' - required: - - apiUrl - - appId - - connectorType - title: Connector request properties for a Swimlane connector - type: object + $ref: '#/components/schemas/Connector mappings properties for a Swimlane + connector' + description: Defines properties for connectors when type is `.swimlane`. secrets_properties_swimlane: - description: Defines secrets for connectors when type is `.swimlane`. + title: Connector secrets properties for a Swimlane connector + type: object properties: apiToken: - description: Swimlane API authentication token. type: string - title: Connector secrets properties for a Swimlane connector - type: object + description: Swimlane API authentication token. + description: Defines secrets for connectors when type is `.swimlane`. create_connector_request_swimlane: - description: The Swimlane connector uses the Swimlane REST API to create Swimlane - records. + title: Create Swimlane connector request + required: + - config + - connector_type_id + - name + - secrets + type: object properties: config: $ref: '#/components/schemas/config_properties_swimlane' connector_type_id: + type: string description: The type of connector. + example: .swimlane enum: - .swimlane - example: .swimlane - type: string name: + type: string description: The display name for the connector. example: my-connector - type: string secrets: $ref: '#/components/schemas/secrets_properties_swimlane' + description: The Swimlane connector uses the Swimlane REST API to create Swimlane + records. + secrets_properties_teams: + title: Connector secrets properties for a Microsoft Teams connector + type: object + additionalProperties: true + description: Defines secrets for connectors when type is `.teams`. + x-schema-name: secrets_properties_teams + create_connector_request_teams: + title: Create Microsoft Teams connector request required: - - config - connector_type_id - name - secrets - title: Create Swimlane connector request - type: object - secrets_properties_teams: - additionalProperties: true - description: Defines secrets for connectors when type is `.teams`. - title: Connector secrets properties for a Microsoft Teams connector type: object - create_connector_request_teams: - description: The Microsoft Teams connector uses Incoming Webhooks. properties: connector_type_id: + type: string description: The type of connector. + example: .teams enum: - .teams - example: .teams - type: string name: + type: string description: The display name for the connector. example: my-connector - type: string secrets: - additionalProperties: true - description: Defines secrets for connectors when type is `.teams`. - title: Connector secrets properties for a Microsoft Teams connector - type: object - required: - - connector_type_id - - name - - secrets - title: Create Microsoft Teams connector request - type: object + $ref: '#/components/schemas/secrets_properties_teams' + description: The Microsoft Teams connector uses Incoming Webhooks. config_properties_tines: - additionalProperties: true - description: Defines properties for connectors when type is `.tines`. title: Connector request properties for a Tines connector type: object - secrets_properties_tines: additionalProperties: true - description: Defines secrets for connectors when type is `.tines`. + description: Defines properties for connectors when type is `.tines`. + x-schema-name: config_properties_tines + secrets_properties_tines: title: Connector secrets properties for a Tines connector type: object + additionalProperties: true + description: Defines secrets for connectors when type is `.tines`. + x-schema-name: secrets_properties_tines create_connector_request_tines: - description: | - The Tines connector uses Tines Webhook actions to send events via POST request. + title: Create Tines connector request + required: + - config + - connector_type_id + - name + - secrets + type: object properties: config: - additionalProperties: true - description: Defines properties for connectors when type is `.tines`. - title: Connector request properties for a Tines connector - type: object + $ref: '#/components/schemas/config_properties_tines' connector_type_id: + type: string description: The type of connector. + example: .tines enum: - .tines - example: .tines - type: string name: + type: string description: The display name for the connector. example: my-connector - type: string secrets: - additionalProperties: true - description: Defines secrets for connectors when type is `.tines`. - title: Connector secrets properties for a Tines connector - type: object - required: - - config - - connector_type_id - - name - - secrets - title: Create Tines connector request - type: object + $ref: '#/components/schemas/secrets_properties_tines' + description: | + The Tines connector uses Tines Webhook actions to send events via POST request. config_properties_webhook: - additionalProperties: true - description: Defines properties for connectors when type is `.webhook`. title: Connector request properties for a Webhook connector type: object - secrets_properties_webhook: additionalProperties: true - description: Defines secrets for connectors when type is `.webhook`. + description: Defines properties for connectors when type is `.webhook`. + x-schema-name: config_properties_webhook + secrets_properties_webhook: title: Connector secrets properties for a Webhook connector type: object + additionalProperties: true + description: Defines secrets for connectors when type is `.webhook`. + x-schema-name: secrets_properties_webhook create_connector_request_webhook: - description: | - The Webhook connector uses axios to send a POST or PUT request to a web service. + title: Create Webhook connector request + required: + - config + - connector_type_id + - name + - secrets + type: object properties: config: - additionalProperties: true - description: Defines properties for connectors when type is `.webhook`. - title: Connector request properties for a Webhook connector - type: object + $ref: '#/components/schemas/config_properties_webhook' connector_type_id: + type: string description: The type of connector. + example: .webhook enum: - .webhook - example: .webhook - type: string name: + type: string description: The display name for the connector. example: my-connector - type: string secrets: - additionalProperties: true - description: Defines secrets for connectors when type is `.webhook`. - title: Connector secrets properties for a Webhook connector - type: object - required: - - config - - connector_type_id - - name - - secrets - title: Create Webhook connector request - type: object + $ref: '#/components/schemas/secrets_properties_webhook' + description: | + The Webhook connector uses axios to send a POST or PUT request to a web service. config_properties_xmatters: - additionalProperties: true - description: Defines properties for connectors when type is `.xmatters`. title: Connector request properties for a xMatters connector type: object - secrets_properties_xmatters: additionalProperties: true - description: Defines secrets for connectors when type is `.xmatters`. + description: Defines properties for connectors when type is `.xmatters`. + x-schema-name: config_properties_xmatters + secrets_properties_xmatters: title: Connector secrets properties for an xMatters connector type: object + additionalProperties: true + description: Defines secrets for connectors when type is `.xmatters`. + x-schema-name: secrets_properties_xmatters create_connector_request_xmatters: - description: | - The xMatters connector uses the xMatters Workflow for Elastic to send actionable alerts to on-call xMatters resources. + title: Create xMatters connector request + required: + - config + - connector_type_id + - name + - secrets + type: object properties: config: - additionalProperties: true - description: Defines properties for connectors when type is `.xmatters`. - title: Connector request properties for a xMatters connector - type: object + $ref: '#/components/schemas/config_properties_xmatters' connector_type_id: + type: string description: The type of connector. + example: .xmatters enum: - .xmatters - example: .xmatters - type: string name: + type: string description: The display name for the connector. example: my-connector - type: string secrets: - additionalProperties: true - description: Defines secrets for connectors when type is `.xmatters`. - title: Connector secrets properties for an xMatters connector - type: object - required: - - config - - connector_type_id - - name - - secrets - title: Create xMatters connector request - type: object + $ref: '#/components/schemas/secrets_properties_xmatters' + description: | + The xMatters connector uses the xMatters Workflow for Elastic to send actionable alerts to on-call xMatters resources. is_deprecated: + type: boolean description: Indicates whether the connector type is deprecated. example: false - type: boolean is_missing_secrets: + type: boolean description: Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. example: false - type: boolean is_preconfigured: + type: boolean description: "Indicates whether it is a preconfigured connector. If true, the\ \ `config` and `is_missing_secrets` properties are omitted from the response." example: false - type: boolean connector_response_properties_cases_webhook: + title: Connector request properties for a Webhook - Case Management connector + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + type: object properties: config: $ref: '#/components/schemas/config_properties_cases_webhook' connector_type_id: + type: string description: The type of connector. enum: - .cases-webhook - type: string id: - description: The identifier for the connector. type: string + description: The identifier for the connector. is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean + $ref: '#/components/schemas/is_deprecated' is_missing_secrets: - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean + $ref: '#/components/schemas/is_missing_secrets' is_preconfigured: - description: "Indicates whether it is a preconfigured connector. If true,\ - \ the `config` and `is_missing_secrets` properties are omitted from the\ - \ response." - example: false - type: boolean + $ref: '#/components/schemas/is_preconfigured' name: - description: The display name for the connector. type: string + description: The display name for the connector. + connector_response_properties_email: + title: Connector response properties for an email connector required: - config - connector_type_id @@ -1942,41 +1619,29 @@ components: - is_deprecated - is_preconfigured - name - title: Connector request properties for a Webhook - Case Management connector type: object - connector_response_properties_email: properties: config: - additionalProperties: true - description: Defines properties for connectors when type is `.email`. - title: Connector request properties for an email connector - type: object + $ref: '#/components/schemas/config_properties_email' connector_type_id: + type: string description: The type of connector. enum: - .email - type: string id: - description: The identifier for the connector. type: string + description: The identifier for the connector. is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean + $ref: '#/components/schemas/is_deprecated' is_missing_secrets: - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean + $ref: '#/components/schemas/is_missing_secrets' is_preconfigured: - description: "Indicates whether it is a preconfigured connector. If true,\ - \ the `config` and `is_missing_secrets` properties are omitted from the\ - \ response." - example: false - type: boolean + $ref: '#/components/schemas/is_preconfigured' name: - description: The display name for the connector. type: string + description: The display name for the connector. + connector_response_properties_index: + title: Connector response properties for an index connector required: - config - connector_type_id @@ -1984,38 +1649,29 @@ components: - is_deprecated - is_preconfigured - name - title: Connector response properties for an email connector type: object - connector_response_properties_index: properties: config: $ref: '#/components/schemas/config_properties_index' connector_type_id: + type: string description: The type of connector. enum: - .index - type: string id: - description: The identifier for the connector. type: string + description: The identifier for the connector. is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean + $ref: '#/components/schemas/is_deprecated' is_missing_secrets: - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean + $ref: '#/components/schemas/is_missing_secrets' is_preconfigured: - description: "Indicates whether it is a preconfigured connector. If true,\ - \ the `config` and `is_missing_secrets` properties are omitted from the\ - \ response." - example: false - type: boolean + $ref: '#/components/schemas/is_preconfigured' name: - description: The display name for the connector. type: string + description: The display name for the connector. + connector_response_properties_jira: + title: Connector response properties for a Jira connector required: - config - connector_type_id @@ -2023,38 +1679,29 @@ components: - is_deprecated - is_preconfigured - name - title: Connector response properties for an index connector type: object - connector_response_properties_jira: properties: config: $ref: '#/components/schemas/config_properties_jira' connector_type_id: + type: string description: The type of connector. enum: - .jira - type: string id: - description: The identifier for the connector. type: string + description: The identifier for the connector. is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean + $ref: '#/components/schemas/is_deprecated' is_missing_secrets: - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean + $ref: '#/components/schemas/is_missing_secrets' is_preconfigured: - description: "Indicates whether it is a preconfigured connector. If true,\ - \ the `config` and `is_missing_secrets` properties are omitted from the\ - \ response." - example: false - type: boolean + $ref: '#/components/schemas/is_preconfigured' name: - description: The display name for the connector. type: string + description: The display name for the connector. + connector_response_properties_opsgenie: + title: Connector response properties for an Opsgenie connector required: - config - connector_type_id @@ -2062,38 +1709,29 @@ components: - is_deprecated - is_preconfigured - name - title: Connector response properties for a Jira connector type: object - connector_response_properties_opsgenie: properties: config: $ref: '#/components/schemas/config_properties_opsgenie' connector_type_id: + type: string description: The type of connector. enum: - .opsgenie - type: string id: - description: The identifier for the connector. type: string + description: The identifier for the connector. is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean + $ref: '#/components/schemas/is_deprecated' is_missing_secrets: - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean + $ref: '#/components/schemas/is_missing_secrets' is_preconfigured: - description: "Indicates whether it is a preconfigured connector. If true,\ - \ the `config` and `is_missing_secrets` properties are omitted from the\ - \ response." - example: false - type: boolean + $ref: '#/components/schemas/is_preconfigured' name: - description: The display name for the connector. type: string + description: The display name for the connector. + connector_response_properties_pagerduty: + title: Connector response properties for a PagerDuty connector required: - config - connector_type_id @@ -2101,41 +1739,29 @@ components: - is_deprecated - is_preconfigured - name - title: Connector response properties for an Opsgenie connector type: object - connector_response_properties_pagerduty: properties: config: - additionalProperties: true - description: Defines properties for connectors when type is `.pagerduty`. - title: Connector request properties for a PagerDuty connector - type: object + $ref: '#/components/schemas/config_properties_pagerduty' connector_type_id: + type: string description: The type of connector. enum: - .pagerduty - type: string id: - description: The identifier for the connector. type: string + description: The identifier for the connector. is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean + $ref: '#/components/schemas/is_deprecated' is_missing_secrets: - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean + $ref: '#/components/schemas/is_missing_secrets' is_preconfigured: - description: "Indicates whether it is a preconfigured connector. If true,\ - \ the `config` and `is_missing_secrets` properties are omitted from the\ - \ response." - example: false - type: boolean + $ref: '#/components/schemas/is_preconfigured' name: - description: The display name for the connector. type: string + description: The display name for the connector. + connector_response_properties_resilient: + title: Connector response properties for a IBM Resilient connector required: - config - connector_type_id @@ -2143,38 +1769,29 @@ components: - is_deprecated - is_preconfigured - name - title: Connector response properties for a PagerDuty connector type: object - connector_response_properties_resilient: properties: config: $ref: '#/components/schemas/config_properties_resilient' connector_type_id: + type: string description: The type of connector. enum: - .resilient - type: string id: - description: The identifier for the connector. type: string + description: The identifier for the connector. is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean + $ref: '#/components/schemas/is_deprecated' is_missing_secrets: - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean + $ref: '#/components/schemas/is_missing_secrets' is_preconfigured: - description: "Indicates whether it is a preconfigured connector. If true,\ - \ the `config` and `is_missing_secrets` properties are omitted from the\ - \ response." - example: false - type: boolean + $ref: '#/components/schemas/is_preconfigured' name: - description: The display name for the connector. type: string + description: The display name for the connector. + connector_response_properties_serverlog: + title: Connector response properties for a server log connector required: - config - connector_type_id @@ -2182,39 +1799,30 @@ components: - is_deprecated - is_preconfigured - name - title: Connector response properties for a IBM Resilient connector type: object - connector_response_properties_serverlog: properties: config: - nullable: true type: object + nullable: true connector_type_id: + type: string description: The type of connector. enum: - .server-log - type: string id: - description: The identifier for the connector. type: string + description: The identifier for the connector. is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean + $ref: '#/components/schemas/is_deprecated' is_missing_secrets: - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean + $ref: '#/components/schemas/is_missing_secrets' is_preconfigured: - description: "Indicates whether it is a preconfigured connector. If true,\ - \ the `config` and `is_missing_secrets` properties are omitted from the\ - \ response." - example: false - type: boolean + $ref: '#/components/schemas/is_preconfigured' name: - description: The display name for the connector. type: string + description: The display name for the connector. + connector_response_properties_servicenow: + title: Connector response properties for a ServiceNow ITSM connector required: - config - connector_type_id @@ -2222,38 +1830,29 @@ components: - is_deprecated - is_preconfigured - name - title: Connector response properties for a server log connector type: object - connector_response_properties_servicenow: properties: config: $ref: '#/components/schemas/config_properties_servicenow' connector_type_id: + type: string description: The type of connector. enum: - .servicenow - type: string id: - description: The identifier for the connector. type: string + description: The identifier for the connector. is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean + $ref: '#/components/schemas/is_deprecated' is_missing_secrets: - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean + $ref: '#/components/schemas/is_missing_secrets' is_preconfigured: - description: "Indicates whether it is a preconfigured connector. If true,\ - \ the `config` and `is_missing_secrets` properties are omitted from the\ - \ response." - example: false - type: boolean + $ref: '#/components/schemas/is_preconfigured' name: - description: The display name for the connector. type: string + description: The display name for the connector. + connector_response_properties_servicenow_itom: + title: Connector response properties for a ServiceNow ITOM connector required: - config - connector_type_id @@ -2261,38 +1860,29 @@ components: - is_deprecated - is_preconfigured - name - title: Connector response properties for a ServiceNow ITSM connector type: object - connector_response_properties_servicenow_itom: properties: config: $ref: '#/components/schemas/config_properties_servicenow_itom' connector_type_id: + type: string description: The type of connector. enum: - .servicenow-itom - type: string id: - description: The identifier for the connector. type: string + description: The identifier for the connector. is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean + $ref: '#/components/schemas/is_deprecated' is_missing_secrets: - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean + $ref: '#/components/schemas/is_missing_secrets' is_preconfigured: - description: "Indicates whether it is a preconfigured connector. If true,\ - \ the `config` and `is_missing_secrets` properties are omitted from the\ - \ response." - example: false - type: boolean + $ref: '#/components/schemas/is_preconfigured' name: - description: The display name for the connector. type: string + description: The display name for the connector. + connector_response_properties_servicenow_sir: + title: Connector response properties for a ServiceNow SecOps connector required: - config - connector_type_id @@ -2300,191 +1890,143 @@ components: - is_deprecated - is_preconfigured - name - title: Connector response properties for a ServiceNow ITOM connector type: object - connector_response_properties_servicenow_sir: properties: config: $ref: '#/components/schemas/config_properties_servicenow' connector_type_id: + type: string description: The type of connector. enum: - .servicenow-sir - type: string id: - description: The identifier for the connector. type: string + description: The identifier for the connector. is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean + $ref: '#/components/schemas/is_deprecated' is_missing_secrets: - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean + $ref: '#/components/schemas/is_missing_secrets' is_preconfigured: - description: "Indicates whether it is a preconfigured connector. If true,\ - \ the `config` and `is_missing_secrets` properties are omitted from the\ - \ response." - example: false - type: boolean + $ref: '#/components/schemas/is_preconfigured' name: - description: The display name for the connector. type: string + description: The display name for the connector. + connector_response_properties_slack: + title: Connector response properties for a Slack connector required: - - config - connector_type_id - id - is_deprecated - is_preconfigured - name - title: Connector response properties for a ServiceNow SecOps connector type: object - connector_response_properties_slack: properties: connector_type_id: + type: string description: The type of connector. enum: - .slack - type: string id: - description: The identifier for the connector. type: string + description: The identifier for the connector. is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean + $ref: '#/components/schemas/is_deprecated' is_missing_secrets: - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean + $ref: '#/components/schemas/is_missing_secrets' is_preconfigured: - description: "Indicates whether it is a preconfigured connector. If true,\ - \ the `config` and `is_missing_secrets` properties are omitted from the\ - \ response." - example: false - type: boolean + $ref: '#/components/schemas/is_preconfigured' name: - description: The display name for the connector. type: string + description: The display name for the connector. + connector_response_properties_swimlane: + title: Connector response properties for a Swimlane connector required: + - config - connector_type_id - id - is_deprecated - is_preconfigured - name - title: Connector response properties for a Slack connector type: object - connector_response_properties_swimlane: properties: config: $ref: '#/components/schemas/config_properties_swimlane' connector_type_id: + type: string description: The type of connector. enum: - .swimlane - type: string id: - description: The identifier for the connector. type: string + description: The identifier for the connector. is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean + $ref: '#/components/schemas/is_deprecated' is_missing_secrets: - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean + $ref: '#/components/schemas/is_missing_secrets' is_preconfigured: - description: "Indicates whether it is a preconfigured connector. If true,\ - \ the `config` and `is_missing_secrets` properties are omitted from the\ - \ response." - example: false - type: boolean + $ref: '#/components/schemas/is_preconfigured' name: - description: The display name for the connector. type: string + description: The display name for the connector. + connector_response_properties_teams: + title: Connector response properties for a Microsoft Teams connector required: - - config - connector_type_id - id - is_deprecated - is_preconfigured - name - title: Connector response properties for a Swimlane connector type: object - connector_response_properties_teams: properties: connector_type_id: + type: string description: The type of connector. enum: - .teams - type: string id: - description: The identifier for the connector. type: string + description: The identifier for the connector. is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean + $ref: '#/components/schemas/is_deprecated' is_missing_secrets: - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean + $ref: '#/components/schemas/is_missing_secrets' is_preconfigured: - description: "Indicates whether it is a preconfigured connector. If true,\ - \ the `config` and `is_missing_secrets` properties are omitted from the\ - \ response." - example: false - type: boolean + $ref: '#/components/schemas/is_preconfigured' name: - description: The display name for the connector. type: string + description: The display name for the connector. + connector_response_properties_tines: + title: Connector response properties for a Tines connector required: + - config - connector_type_id - id - is_deprecated - is_preconfigured - name - title: Connector response properties for a Microsoft Teams connector type: object - connector_response_properties_tines: properties: config: - additionalProperties: true - description: Defines properties for connectors when type is `.tines`. - title: Connector request properties for a Tines connector - type: object + $ref: '#/components/schemas/config_properties_tines' connector_type_id: + type: string description: The type of connector. enum: - .tines - type: string id: - description: The identifier for the connector. type: string + description: The identifier for the connector. is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean + $ref: '#/components/schemas/is_deprecated' is_missing_secrets: - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean + $ref: '#/components/schemas/is_missing_secrets' is_preconfigured: - description: "Indicates whether it is a preconfigured connector. If true,\ - \ the `config` and `is_missing_secrets` properties are omitted from the\ - \ response." - example: false - type: boolean + $ref: '#/components/schemas/is_preconfigured' name: - description: The display name for the connector. type: string + description: The display name for the connector. + connector_response_properties_webhook: + title: Connector response properties for a Webhook connector required: - config - connector_type_id @@ -2492,41 +2034,29 @@ components: - is_deprecated - is_preconfigured - name - title: Connector response properties for a Tines connector type: object - connector_response_properties_webhook: properties: config: - additionalProperties: true - description: Defines properties for connectors when type is `.webhook`. - title: Connector request properties for a Webhook connector - type: object + $ref: '#/components/schemas/config_properties_webhook' connector_type_id: + type: string description: The type of connector. enum: - .webhook - type: string id: - description: The identifier for the connector. type: string + description: The identifier for the connector. is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean + $ref: '#/components/schemas/is_deprecated' is_missing_secrets: - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean + $ref: '#/components/schemas/is_missing_secrets' is_preconfigured: - description: "Indicates whether it is a preconfigured connector. If true,\ - \ the `config` and `is_missing_secrets` properties are omitted from the\ - \ response." - example: false - type: boolean + $ref: '#/components/schemas/is_preconfigured' name: - description: The display name for the connector. type: string + description: The display name for the connector. + connector_response_properties_xmatters: + title: Connector response properties for an xMatters connector required: - config - connector_type_id @@ -2534,54 +2064,32 @@ components: - is_deprecated - is_preconfigured - name - title: Connector response properties for a Webhook connector type: object - connector_response_properties_xmatters: properties: config: - additionalProperties: true - description: Defines properties for connectors when type is `.xmatters`. - title: Connector request properties for a xMatters connector - type: object + $ref: '#/components/schemas/config_properties_xmatters' connector_type_id: + type: string description: The type of connector. enum: - .xmatters - type: string id: - description: The identifier for the connector. type: string + description: The identifier for the connector. is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean + $ref: '#/components/schemas/is_deprecated' is_missing_secrets: - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean + $ref: '#/components/schemas/is_missing_secrets' is_preconfigured: - description: "Indicates whether it is a preconfigured connector. If true,\ - \ the `config` and `is_missing_secrets` properties are omitted from the\ - \ response." - example: false - type: boolean + $ref: '#/components/schemas/is_preconfigured' name: - description: The display name for the connector. type: string - required: - - config - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - title: Connector response properties for an xMatters connector - type: object + description: The display name for the connector. connector_response_properties: + title: Connector response properties description: The properties vary depending on the connector type. discriminator: - propertyName: connector_type_id + propertyName: ConnectorTypeId oneOf: - $ref: '#/components/schemas/connector_response_properties_cases_webhook' - $ref: '#/components/schemas/connector_response_properties_email' @@ -2600,137 +2108,139 @@ components: - $ref: '#/components/schemas/connector_response_properties_tines' - $ref: '#/components/schemas/connector_response_properties_webhook' - $ref: '#/components/schemas/connector_response_properties_xmatters' - title: Connector response properties update_connector_request_cases_webhook: + title: Update Webhook - Case Managment connector request + required: + - config + - name + type: object properties: config: $ref: '#/components/schemas/config_properties_cases_webhook' name: + type: string description: The display name for the connector. example: my-connector - type: string secrets: $ref: '#/components/schemas/secrets_properties_cases_webhook' + update_connector_request_index: + title: Update index connector request required: - config - name - title: Update Webhook - Case Managment connector request type: object - update_connector_request_index: properties: config: $ref: '#/components/schemas/config_properties_index' name: - description: The display name for the connector. type: string + description: The display name for the connector. + update_connector_request_jira: + title: Update Jira connector request required: - config - name - title: Update index connector request + - secrets type: object - update_connector_request_jira: properties: config: $ref: '#/components/schemas/config_properties_jira' name: - description: The display name for the connector. type: string + description: The display name for the connector. secrets: $ref: '#/components/schemas/secrets_properties_jira' + update_connector_request_opsgenie: + title: Update Opsgenie connector request required: - config - name - secrets - title: Update Jira connector request type: object - update_connector_request_opsgenie: properties: config: $ref: '#/components/schemas/config_properties_opsgenie' name: - description: The display name for the connector. type: string + description: The display name for the connector. secrets: $ref: '#/components/schemas/secrets_properties_opsgenie' + update_connector_request_resilient: + title: Update IBM Resilient connector request required: - config - name - secrets - title: Update Opsgenie connector request type: object - update_connector_request_resilient: properties: config: $ref: '#/components/schemas/config_properties_resilient' name: - description: The display name for the connector. type: string + description: The display name for the connector. secrets: $ref: '#/components/schemas/secrets_properties_resilient' + update_connector_request_serverlog: + title: Update server log connector request required: - - config - name - - secrets - title: Update IBM Resilient connector request type: object - update_connector_request_serverlog: properties: name: - description: The display name for the connector. type: string + description: The display name for the connector. + update_connector_request_servicenow: + title: Update ServiceNow ITSM connector or ServiceNow SecOps request required: + - config - name - title: Update server log connector request + - secrets type: object - update_connector_request_servicenow: properties: config: $ref: '#/components/schemas/config_properties_servicenow' name: - description: The display name for the connector. type: string + description: The display name for the connector. secrets: $ref: '#/components/schemas/secrets_properties_servicenow' + update_connector_request_servicenow_itom: + title: Create ServiceNow ITOM connector request required: - config - name - secrets - title: Update ServiceNow ITSM connector or ServiceNow SecOps request type: object - update_connector_request_servicenow_itom: properties: config: $ref: '#/components/schemas/config_properties_servicenow_itom' name: - description: The display name for the connector. type: string + description: The display name for the connector. secrets: $ref: '#/components/schemas/secrets_properties_servicenow' + update_connector_request_swimlane: + title: Update Swimlane connector request required: - config - name - secrets - title: Create ServiceNow ITOM connector request type: object - update_connector_request_swimlane: properties: config: $ref: '#/components/schemas/config_properties_swimlane' name: + type: string description: The display name for the connector. example: my-connector - type: string secrets: $ref: '#/components/schemas/secrets_properties_swimlane' - required: - - config - - name - - secrets - title: Update Swimlane connector request - type: object connector_types: + title: Connector types + type: string description: "The type of connector. For example, `.email`, `.index`, `.jira`,\ \ `.opsgenie`, or `.server-log`." + example: .server-log enum: - .cases-webhook - .email @@ -2749,10 +2259,8 @@ components: - .tines - .webhook - .xmatters - example: .server-log - title: Connector types - type: string features: + type: string description: | The feature that uses the connector. Valid values are `alerting`, `cases`, `uptime`, and `siem`. enum: @@ -2760,26 +2268,29 @@ components: - cases - uptime - siem - type: string run_connector_params_documents: - description: Test an action that indexes a document into Elasticsearch. + title: Index connector parameters + required: + - documents + type: object properties: documents: + type: array description: The documents in JSON format for index connectors. items: - additionalProperties: true type: object - type: array + additionalProperties: true + description: Test an action that indexes a document into Elasticsearch. + run_connector_params_level_message: + title: Server log connector parameters required: - - documents - title: Index connector parameters + - message type: object - run_connector_params_level_message: - description: Test an action that writes an entry to the Kibana server log. properties: level: - default: info + type: string description: The log level of the message for server log connectors. + default: info enum: - debug - error @@ -2787,185 +2298,174 @@ components: - info - trace - warn - type: string message: - description: The message for server log connectors. type: string + description: The message for server log connectors. + description: Test an action that writes an entry to the Kibana server log. + run_connector_subaction_addevent: + title: The addEvent subaction required: - - message - title: Server log connector parameters + - subAction type: object - run_connector_subaction_addevent: - description: The `addEvent` subaction for ServiceNow ITOM connectors. properties: subAction: + type: string description: The action to test. enum: - addEvent - type: string subActionParams: $ref: '#/components/schemas/run_connector_subaction_addevent_subActionParams' + description: The `addEvent` subaction for ServiceNow ITOM connectors. + run_connector_subaction_closealert: + title: The closeAlert subaction required: - subAction - title: The addEvent subaction + - subActionParams type: object - run_connector_subaction_closealert: - description: The `closeAlert` subaction for Opsgenie connectors. properties: subAction: + type: string description: The action to test. enum: - closeAlert - type: string subActionParams: $ref: '#/components/schemas/run_connector_subaction_closealert_subActionParams' + description: The `closeAlert` subaction for Opsgenie connectors. + run_connector_subaction_createalert: + title: The createAlert subaction required: - subAction - subActionParams - title: The closeAlert subaction type: object - run_connector_subaction_createalert: - description: The `createAlert` subaction for Opsgenie connectors. properties: subAction: + type: string description: The action to test. enum: - createAlert - type: string subActionParams: $ref: '#/components/schemas/run_connector_subaction_createalert_subActionParams' + description: The `createAlert` subaction for Opsgenie connectors. + run_connector_subaction_fieldsbyissuetype: + title: The fieldsByIssueType subaction required: - subAction - subActionParams - title: The createAlert subaction type: object - run_connector_subaction_fieldsbyissuetype: - description: The `fieldsByIssueType` subaction for Jira connectors. properties: subAction: + type: string description: The action to test. enum: - fieldsByIssueType - type: string subActionParams: $ref: '#/components/schemas/run_connector_subaction_fieldsbyissuetype_subActionParams' + description: The `fieldsByIssueType` subaction for Jira connectors. + run_connector_subaction_getchoices: + title: The getChoices subaction required: - subAction - subActionParams - title: The fieldsByIssueType subaction type: object - run_connector_subaction_getchoices: - description: "The `getChoices` subaction for ServiceNow ITOM, ServiceNow ITSM,\ - \ and ServiceNow SecOps connectors." properties: subAction: + type: string description: The action to test. enum: - getChoices - type: string subActionParams: $ref: '#/components/schemas/run_connector_subaction_getchoices_subActionParams' + description: "The `getChoices` subaction for ServiceNow ITOM, ServiceNow ITSM,\ + \ and ServiceNow SecOps connectors." + run_connector_subaction_getfields: + title: The getFields subaction required: - subAction - - subActionParams - title: The getChoices subaction type: object - run_connector_subaction_getfields: - description: "The `getFields` subaction for Jira, ServiceNow ITSM, and ServiceNow\ - \ SecOps connectors." properties: subAction: + type: string description: The action to test. enum: - getFields - type: string + description: "The `getFields` subaction for Jira, ServiceNow ITSM, and ServiceNow\ + \ SecOps connectors." + run_connector_subaction_getincident: + title: The getIncident subaction required: - subAction - title: The getFields subaction + - subActionParams type: object - run_connector_subaction_getincident: - description: "The `getIncident` subaction for Jira, ServiceNow ITSM, and ServiceNow\ - \ SecOps connectors." properties: subAction: + type: string description: The action to test. enum: - getIncident - type: string subActionParams: $ref: '#/components/schemas/run_connector_subaction_getincident_subActionParams' + description: "The `getIncident` subaction for Jira, ServiceNow ITSM, and ServiceNow\ + \ SecOps connectors." + run_connector_subaction_issue: + title: The issue subaction required: - subAction - - subActionParams - title: The getIncident subaction type: object - run_connector_subaction_issue: - description: The `issue` subaction for Jira connectors. properties: subAction: + type: string description: The action to test. enum: - issue - type: string subActionParams: $ref: '#/components/schemas/run_connector_subaction_issue_subActionParams' + description: The `issue` subaction for Jira connectors. + run_connector_subaction_issues: + title: The issues subaction required: - subAction - title: The issue subaction + - subActionParams type: object - run_connector_subaction_issues: - description: The `issues` subaction for Jira connectors. properties: subAction: + type: string description: The action to test. enum: - issues - type: string subActionParams: $ref: '#/components/schemas/run_connector_subaction_issues_subActionParams' + description: The `issues` subaction for Jira connectors. + run_connector_subaction_issuetypes: + title: The issueTypes subaction required: - subAction - - subActionParams - title: The issues subaction type: object - run_connector_subaction_issuetypes: - description: The `issueTypes` subaction for Jira connectors. properties: subAction: + type: string description: The action to test. enum: - issueTypes - type: string + description: The `issueTypes` subaction for Jira connectors. + run_connector_subaction_pushtoservice: + title: The pushToService subaction required: - subAction - title: The issueTypes subaction + - subActionParams type: object - run_connector_subaction_pushtoservice: - description: "The `pushToService` subaction for Jira, ServiceNow ITSM, ServiceNow\ - \ SecOps, and Swimlane connectors." properties: subAction: + type: string description: The action to test. enum: - pushToService - type: string subActionParams: $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams' - required: - - subAction - - subActionParams - title: The pushToService subaction - type: object + description: "The `pushToService` subaction for Jira, ServiceNow ITSM, ServiceNow\ + \ SecOps, and Swimlane connectors." action_response_properties: - description: The properties vary depending on the action type. - example: - isPreconfigured: true - isDeprecated: true - actionTypeId: actionTypeId - name: name - id: id - config: "{}" - isMissingSecrets: true + title: Action response properties + type: object properties: actionTypeId: type: string @@ -2974,22 +2474,30 @@ components: id: type: string isDeprecated: - description: Indicates whether the action type is deprecated. type: boolean + description: Indicates whether the action type is deprecated. isMissingSecrets: - description: Indicates whether secrets are missing for the action. type: boolean + description: Indicates whether secrets are missing for the action. isPreconfigured: - description: Indicates whether it is a preconfigured action. type: boolean + description: Indicates whether it is a preconfigured action. name: type: string - title: Action response properties - type: object - Create_connector_request_body_properties: + description: The properties vary depending on the action type. + example: + isPreconfigured: true + isDeprecated: true + actionTypeId: actionTypeId + name: name + id: id + config: {} + isMissingSecrets: true + Create connector request body properties: + title: Create connector request body properties description: The properties vary depending on the connector type. discriminator: - propertyName: connector_type_id + propertyName: ConnectorTypeId oneOf: - $ref: '#/components/schemas/create_connector_request_cases_webhook' - $ref: '#/components/schemas/create_connector_request_email' @@ -3008,37 +2516,37 @@ components: - $ref: '#/components/schemas/create_connector_request_tines' - $ref: '#/components/schemas/create_connector_request_webhook' - $ref: '#/components/schemas/create_connector_request_xmatters' - title: Create connector request body properties - Unauthorized_response: + Unauthorized response: + title: Unauthorized response + type: object properties: error: + type: string + example: Unauthorized enum: - Unauthorized - example: Unauthorized - type: string message: type: string statusCode: + type: integer + example: 401 enum: - 401 - example: 401 - type: integer - title: Unauthorized response + inline_response_404: type: object - getConnector_404_response: properties: error: - example: Not Found type: string + example: Not Found message: + type: string example: "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not\ \ found" - type: string statusCode: - example: 404 type: integer - type: object - Update_connector_request_body_properties: + example: 404 + Update connector request body properties: + title: Update connector request body properties description: The properties vary depending on the connector type. oneOf: - $ref: '#/components/schemas/update_connector_request_cases_webhook' @@ -3050,134 +2558,114 @@ components: - $ref: '#/components/schemas/update_connector_request_servicenow' - $ref: '#/components/schemas/update_connector_request_servicenow_itom' - $ref: '#/components/schemas/update_connector_request_swimlane' - title: Update connector request body properties - updateConnector_400_response: + inline_response_400: + type: object properties: error: - example: Bad Request type: string + example: Bad Request message: + type: string example: "error validating action type config: [index]: expected value of\ \ type [string] but got [undefined]" - type: string statusCode: - example: 400 type: integer + example: 400 + Not found response: + title: Not found response type: object - Not_found_response: properties: error: + type: string + example: Not Found enum: - Not Found - example: Not Found - type: string message: + type: string example: "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not\ \ found" - type: string statusCode: + type: integer + example: 404 enum: - 404 - example: 404 - type: integer - title: Not found response + Get connectors response body properties: + title: Get connectors response body properties + required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + - referenced_by_count type: object - Get_connectors_response_body_properties: - description: The properties vary for each connector type. - example: - is_missing_secrets: false - is_deprecated: false - is_preconfigured: false - name: my-connector - referenced_by_count: 2 - id: b0766e10-d190-11ec-b04c-776c77d14fca - config: - key: "" - connector_type_id: .server-log properties: connector_type_id: $ref: '#/components/schemas/connector_types' config: + type: object additionalProperties: true description: The configuration for the connector. Configuration properties vary depending on the connector type. nullable: true - type: object id: + type: string description: The identifier for the connector. example: b0766e10-d190-11ec-b04c-776c77d14fca - type: string is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean + $ref: '#/components/schemas/is_deprecated' is_missing_secrets: - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean + $ref: '#/components/schemas/is_missing_secrets' is_preconfigured: - description: "Indicates whether it is a preconfigured connector. If true,\ - \ the `config` and `is_missing_secrets` properties are omitted from the\ - \ response." - example: false - type: boolean + $ref: '#/components/schemas/is_preconfigured' name: + type: string description: The display name for the connector. example: my-connector - type: string referenced_by_count: - default: 0 + type: integer description: "Indicates the number of saved objects that reference the connector.\ \ If `is_preconfigured` is true, this value is not calculated." example: 2 - type: integer - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - - referenced_by_count - title: Get connectors response body properties - type: object - Get_connector_types_response_body_properties_inner: + default: 0 + description: The properties vary for each connector type. example: - supported_feature_ids: - - alerting - - uptime - - siem - name: Index - enabled_in_license: true - id: .server-log - enabled_in_config: true - minimum_license_required: basic - enabled: true + is_missing_secrets: false + is_deprecated: false + is_preconfigured: false + name: my-connector + referenced_by_count: 2 + id: b0766e10-d190-11ec-b04c-776c77d14fca + config: "" + connector_type_id: .server-log + inline_response_200: + type: object properties: enabled: + type: boolean description: Indicates whether the connector type is enabled in Kibana. example: true - type: boolean enabled_in_config: + type: boolean description: Indicates whether the connector type is enabled in the Kibana `.yml` file. example: true - type: boolean enabled_in_license: + type: boolean description: Indicates whether the connector is enabled in the license. example: true - type: boolean id: $ref: '#/components/schemas/connector_types' minimum_license_required: + type: string description: The license that is required to use the connector type. example: basic - type: string name: + type: string description: The name of the connector type. example: Index - type: string supported_feature_ids: + type: array description: The Kibana features that are supported by the connector type. example: - alerting @@ -3185,460 +2673,474 @@ components: - siem items: $ref: '#/components/schemas/features' - type: array + example: + supported_feature_ids: + - alerting + - uptime + - siem + name: Index + enabled_in_license: true + id: .server-log + enabled_in_config: true + minimum_license_required: basic + enabled: true + Run connector request body properties: + title: Run connector request body properties + required: + - params type: object - Subaction_parameters: - description: Test an action that involves a subaction. - discriminator: - propertyName: subAction - oneOf: - - $ref: '#/components/schemas/run_connector_subaction_addevent' - - $ref: '#/components/schemas/run_connector_subaction_closealert' - - $ref: '#/components/schemas/run_connector_subaction_createalert' - - $ref: '#/components/schemas/run_connector_subaction_fieldsbyissuetype' - - $ref: '#/components/schemas/run_connector_subaction_getchoices' - - $ref: '#/components/schemas/run_connector_subaction_getfields' - - $ref: '#/components/schemas/run_connector_subaction_getincident' - - $ref: '#/components/schemas/run_connector_subaction_issue' - - $ref: '#/components/schemas/run_connector_subaction_issues' - - $ref: '#/components/schemas/run_connector_subaction_issuetypes' - - $ref: '#/components/schemas/run_connector_subaction_pushtoservice' - title: Subaction parameters - Run_connector_request_body_properties_params: - oneOf: - - $ref: '#/components/schemas/run_connector_params_documents' - - $ref: '#/components/schemas/run_connector_params_level_message' - - $ref: '#/components/schemas/Subaction_parameters' - Run_connector_request_body_properties: - description: The properties vary depending on the connector type. properties: params: - $ref: '#/components/schemas/Run_connector_request_body_properties_params' + oneOf: + - $ref: '#/components/schemas/run_connector_params_documents' + - $ref: '#/components/schemas/run_connector_params_level_message' + - title: Subaction parameters + description: Test an action that involves a subaction. + discriminator: + propertyName: subAction + oneOf: + - $ref: '#/components/schemas/run_connector_subaction_addevent' + - $ref: '#/components/schemas/run_connector_subaction_closealert' + - $ref: '#/components/schemas/run_connector_subaction_createalert' + - $ref: '#/components/schemas/run_connector_subaction_fieldsbyissuetype' + - $ref: '#/components/schemas/run_connector_subaction_getchoices' + - $ref: '#/components/schemas/run_connector_subaction_getfields' + - $ref: '#/components/schemas/run_connector_subaction_getincident' + - $ref: '#/components/schemas/run_connector_subaction_issue' + - $ref: '#/components/schemas/run_connector_subaction_issues' + - $ref: '#/components/schemas/run_connector_subaction_issuetypes' + - $ref: '#/components/schemas/run_connector_subaction_pushtoservice' + description: The properties vary depending on the connector type. + inline_response_200_1: required: - - params - title: Run connector request body properties + - connector_id + - status type: object - runConnector_200_response_data: - oneOf: - - additionalProperties: true - description: Information returned from the action. - type: object - - description: An array of information returned from the action. - items: - type: object - type: array - runConnector_200_response: - example: - data: null - connector_id: connector_id - status: error properties: connector_id: - description: The identifier for the connector. type: string + description: The identifier for the connector. data: - $ref: '#/components/schemas/runConnector_200_response_data' + oneOf: + - type: object + additionalProperties: true + description: Information returned from the action. + - type: array + description: An array of information returned from the action. + items: + type: object status: + type: string description: The status of the action. enum: - error - ok - type: string - required: - - connector_id - - status + example: + data: "" + connector_id: connector_id + status: error + Legacy update connector request body properties: + title: Legacy update connector request body properties type: object - Legacy_update_connector_request_body_properties: - description: The properties vary depending on the connector type. properties: config: + type: object description: The new connector configuration. Configuration properties vary depending on the connector type. - type: object name: - description: The new name for the connector. type: string + description: The new name for the connector. secrets: + type: object description: The updated secrets configuration for the connector. Secrets properties vary depending on the connector type. - type: object - title: Legacy update connector request body properties + description: The properties vary depending on the connector type. + Legacy create connector request properties: + title: Legacy create connector request properties type: object - Legacy_create_connector_request_properties: properties: actionTypeId: - description: The connector type identifier. type: string + description: The connector type identifier. config: + type: object description: The configuration for the connector. Configuration properties vary depending on the connector type. - type: object name: - description: The display name for the connector. type: string + description: The display name for the connector. secrets: + type: object description: | The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. NOTE: Remember these values. You must provide them each time you update the connector. - type: object - title: Legacy create connector request properties + inline_response_200_2: type: object - Legacy_get_connector_types_response_body_properties_inner: - example: - enabledInConfig: true - name: name - enabledInLicense: true - id: id - minimumLicenseRequired: minimumLicenseRequired - enabled: true properties: enabled: - description: Indicates whether the connector type is enabled in Kibana. type: boolean + description: Indicates whether the connector type is enabled in Kibana. enabledInConfig: + type: boolean description: Indicates whether the connector type is enabled in the Kibana `.yml` file. - type: boolean enabledInLicense: + type: boolean description: Indicates whether the connector is enabled in the license. example: true - type: boolean id: - description: The unique identifier for the connector type. type: string + description: The unique identifier for the connector type. minimumLicenseRequired: - description: The license that is required to use the connector type. type: string + description: The license that is required to use the connector type. name: - description: The name of the connector type. type: string + description: The name of the connector type. + example: + enabledInConfig: true + name: name + enabledInLicense: true + id: id + minimumLicenseRequired: minimumLicenseRequired + enabled: true + Legacy run connector request body properties: + title: Legacy run connector request body properties + required: + - params type: object - Legacy_run_connector_request_body_properties: - description: The properties vary depending on the connector type. properties: params: + type: object description: The parameters of the connector. Parameter properties vary depending on the connector type. - type: object - required: - - params - title: Legacy run connector request body properties + description: The properties vary depending on the connector type. + inline_response_200_3: type: object - legacyRunConnector_200_response: - example: - data: null - actionId: actionId - status: status properties: actionId: type: string data: - $ref: '#/components/schemas/runConnector_200_response_data' + oneOf: + - type: object + additionalProperties: true + description: Information returned from the action. + - type: array + description: An array of information returned from the action. + items: + type: object status: - description: The status of the action. type: string + description: The status of the action. + example: + data: "" + actionId: actionId + status: status + Alert identifier mapping: + title: Alert identifier mapping + required: + - fieldType + - id + - key + - name type: object - Alert_identifier_mapping: - description: Mapping for the alert ID. properties: fieldType: - description: The type of field in Swimlane. type: string + description: The type of field in Swimlane. id: - description: The identifier for the field in Swimlane. type: string + description: The identifier for the field in Swimlane. key: - description: The key for the field in Swimlane. type: string + description: The key for the field in Swimlane. name: - description: The name of the field in Swimlane. type: string + description: The name of the field in Swimlane. + description: Mapping for the alert ID. + Case identifier mapping: + title: Case identifier mapping required: - fieldType - id - key - name - title: Alert identifier mapping type: object - Case_identifier_mapping: - description: Mapping for the case ID. properties: fieldType: - description: The type of field in Swimlane. type: string + description: The type of field in Swimlane. id: - description: The identifier for the field in Swimlane. type: string + description: The identifier for the field in Swimlane. key: - description: The key for the field in Swimlane. type: string + description: The key for the field in Swimlane. name: - description: The name of the field in Swimlane. type: string + description: The name of the field in Swimlane. + description: Mapping for the case ID. + Case name mapping: + title: Case name mapping required: - fieldType - id - key - name - title: Case identifier mapping type: object - Case_name_mapping: - description: Mapping for the case name. properties: fieldType: - description: The type of field in Swimlane. type: string + description: The type of field in Swimlane. id: - description: The identifier for the field in Swimlane. type: string + description: The identifier for the field in Swimlane. key: - description: The key for the field in Swimlane. type: string + description: The key for the field in Swimlane. name: - description: The name of the field in Swimlane. type: string + description: The name of the field in Swimlane. + description: Mapping for the case name. + Case comment mapping: + title: Case comment mapping required: - fieldType - id - key - name - title: Case name mapping type: object - Case_comment_mapping: - description: Mapping for the case comments. properties: fieldType: - description: The type of field in Swimlane. type: string + description: The type of field in Swimlane. id: - description: The identifier for the field in Swimlane. type: string + description: The identifier for the field in Swimlane. key: - description: The key for the field in Swimlane. type: string + description: The key for the field in Swimlane. name: - description: The name of the field in Swimlane. type: string + description: The name of the field in Swimlane. + description: Mapping for the case comments. + Case description mapping: + title: Case description mapping required: - fieldType - id - key - name - title: Case comment mapping type: object - Case_description_mapping: - description: Mapping for the case description. properties: fieldType: - description: The type of field in Swimlane. type: string + description: The type of field in Swimlane. id: - description: The identifier for the field in Swimlane. type: string + description: The identifier for the field in Swimlane. key: - description: The key for the field in Swimlane. type: string + description: The key for the field in Swimlane. name: - description: The name of the field in Swimlane. type: string + description: The name of the field in Swimlane. + description: Mapping for the case description. + Rule name mapping: + title: Rule name mapping required: - fieldType - id - key - name - title: Case description mapping type: object - Rule_name_mapping: - description: Mapping for the name of the alert's rule. properties: fieldType: - description: The type of field in Swimlane. type: string + description: The type of field in Swimlane. id: - description: The identifier for the field in Swimlane. type: string + description: The identifier for the field in Swimlane. key: - description: The key for the field in Swimlane. type: string + description: The key for the field in Swimlane. name: - description: The name of the field in Swimlane. type: string + description: The name of the field in Swimlane. + description: Mapping for the name of the alert's rule. + Severity mapping: + title: Severity mapping required: - fieldType - id - key - name - title: Rule name mapping type: object - Severity_mapping: - description: Mapping for the severity. properties: fieldType: - description: The type of field in Swimlane. type: string + description: The type of field in Swimlane. id: - description: The identifier for the field in Swimlane. type: string + description: The identifier for the field in Swimlane. key: - description: The key for the field in Swimlane. type: string + description: The key for the field in Swimlane. name: - description: The name of the field in Swimlane. type: string - required: - - fieldType - - id - - key - - name - title: Severity mapping + description: The name of the field in Swimlane. + description: Mapping for the severity. + Connector mappings properties for a Swimlane connector: + title: Connector mappings properties for a Swimlane connector type: object - Connector_mappings_properties_for_a_Swimlane_connector: - description: The field mapping. properties: alertIdConfig: - $ref: '#/components/schemas/Alert_identifier_mapping' + $ref: '#/components/schemas/Alert identifier mapping' caseIdConfig: - $ref: '#/components/schemas/Case_identifier_mapping' + $ref: '#/components/schemas/Case identifier mapping' caseNameConfig: - $ref: '#/components/schemas/Case_name_mapping' + $ref: '#/components/schemas/Case name mapping' commentsConfig: - $ref: '#/components/schemas/Case_comment_mapping' + $ref: '#/components/schemas/Case comment mapping' descriptionConfig: - $ref: '#/components/schemas/Case_description_mapping' + $ref: '#/components/schemas/Case description mapping' ruleNameConfig: - $ref: '#/components/schemas/Rule_name_mapping' + $ref: '#/components/schemas/Rule name mapping' severityConfig: - $ref: '#/components/schemas/Severity_mapping' - title: Connector mappings properties for a Swimlane connector - type: object + $ref: '#/components/schemas/Severity mapping' + description: The field mapping. run_connector_subaction_addevent_subActionParams: - description: The set of configuration properties for the action. + type: object properties: additional_info: - description: Additional information about the event. type: string + description: Additional information about the event. description: - description: The details about the event. type: string + description: The details about the event. event_class: - description: A specific instance of the source. type: string + description: A specific instance of the source. message_key: + type: string description: All actions sharing this key are associated with the same ServiceNow alert. The default value is `:`. - type: string metric_name: - description: The name of the metric. type: string + description: The name of the metric. node: - description: The host that the event was triggered for. type: string + description: The host that the event was triggered for. resource: - description: The name of the resource. type: string + description: The name of the resource. severity: - description: The severity of the event. type: string + description: The severity of the event. source: - description: The name of the event source type. type: string + description: The name of the event source type. time_of_event: - description: The time of the event. type: string + description: The time of the event. type: - description: The type of event. type: string - type: object + description: The type of event. + description: The set of configuration properties for the action. run_connector_subaction_closealert_subActionParams: + required: + - alias + type: object properties: alias: + type: string description: The unique identifier used for alert deduplication in Opsgenie. The alias must match the value used when creating the alert. - type: string note: - description: Additional information for the alert. type: string + description: Additional information for the alert. source: - description: The display name for the source of the alert. type: string + description: The display name for the source of the alert. user: - description: The display name for the owner. type: string - required: - - alias + description: The display name for the owner. + run_connector_subaction_createalert_subActionParams_responders: type: object - run_connector_subaction_createalert_subActionParams_responders_inner: properties: id: - description: The identifier for the entity. type: string + description: The identifier for the entity. name: - description: The name of the entity. type: string + description: The name of the entity. type: + type: string description: "The type of responders, in this case `escalation`." enum: - escalation - schedule - team - user - type: string username: - description: A valid email address for the user. type: string + description: A valid email address for the user. + run_connector_subaction_createalert_subActionParams_visibleTo: + required: + - type type: object - run_connector_subaction_createalert_subActionParams_visibleTo_inner: properties: id: - description: The identifier for the entity. type: string + description: The identifier for the entity. name: - description: The name of the entity. type: string + description: The name of the entity. type: + type: string description: Valid values are `team` and `user`. enum: - team - user - type: string username: + type: string description: The user name. This property is required only when the `type` is `user`. - type: string + run_connector_subaction_createalert_subActionParams: required: - - type + - message type: object - run_connector_subaction_createalert_subActionParams: properties: actions: + type: array description: The custom actions available to the alert. items: type: string - type: array alias: - description: The unique identifier used for alert deduplication in Opsgenie. type: string + description: The unique identifier used for alert deduplication in Opsgenie. description: + type: string description: A description that provides detailed information about the alert. - type: string details: + type: object additionalProperties: true description: The custom properties of the alert. example: key1: value1 key2: value2 - type: object entity: + type: string description: "The domain of the alert. For example, the application or server\ \ name." - type: string message: - description: The alert message. type: string + description: The alert message. note: - description: Additional information for the alert. type: string + description: Additional information for the alert. priority: + type: string description: The priority level for the alert. enum: - P1 @@ -3646,228 +3148,508 @@ components: - P3 - P4 - P5 - type: string responders: + type: array description: | The entities to receive notifications about the alert. If `type` is `user`, either `id` or `username` is required. If `type` is `team`, either `id` or `name` is required. items: - $ref: '#/components/schemas/run_connector_subaction_createalert_subActionParams_responders_inner' - type: array + $ref: '#/components/schemas/run_connector_subaction_createalert_subActionParams_responders' source: - description: The display name for the source of the alert. type: string + description: The display name for the source of the alert. tags: + type: array description: The tags for the alert. items: type: string - type: array user: - description: The display name for the owner. type: string + description: The display name for the owner. visibleTo: + type: array description: "The teams and users that the alert will be visible to without\ \ sending a notification. Only one of `id`, `name`, or `username` is required." items: - $ref: '#/components/schemas/run_connector_subaction_createalert_subActionParams_visibleTo_inner' - type: array + $ref: '#/components/schemas/run_connector_subaction_createalert_subActionParams_visibleTo' + run_connector_subaction_fieldsbyissuetype_subActionParams: required: - - message + - id type: object - run_connector_subaction_fieldsbyissuetype_subActionParams: properties: id: + type: string description: The Jira issue type identifier. example: "10024" - type: string + run_connector_subaction_getchoices_subActionParams: required: - - id + - fields type: object - run_connector_subaction_getchoices_subActionParams: - description: The set of configuration properties for the action. properties: fields: + type: array description: An array of fields. items: type: string - type: array + description: The set of configuration properties for the action. + run_connector_subaction_getincident_subActionParams: required: - - fields + - externalId type: object - run_connector_subaction_getincident_subActionParams: properties: externalId: + type: string description: "The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier." example: "71778" - type: string + run_connector_subaction_issue_subActionParams: required: - - externalId + - id type: object - run_connector_subaction_issue_subActionParams: properties: id: + type: string description: The Jira issue identifier. example: "71778" - type: string + run_connector_subaction_issues_subActionParams: required: - - id + - title type: object - run_connector_subaction_issues_subActionParams: properties: title: - description: The title of the Jira issue. type: string - required: - - title + description: The title of the Jira issue. + run_connector_subaction_pushtoservice_subActionParams_comments: type: object - run_connector_subaction_pushtoservice_subActionParams_comments_inner: properties: comment: + type: string description: "A comment related to the incident. For example, describe how\ \ to troubleshoot the issue." - type: string commentId: - description: A unique identifier for the comment. type: integer - type: object - run_connector_subaction_pushtoservice_subActionParams_incident_dest_ip: - description: | - A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. - oneOf: - - type: string - - items: - type: string - type: array - run_connector_subaction_pushtoservice_subActionParams_incident_malware_hash: - description: A list of malware hashes related to the security incident for ServiceNow - SecOps connectors. The hashes are added as observables to the security incident. - oneOf: - - type: string - - items: - type: string - type: array - run_connector_subaction_pushtoservice_subActionParams_incident_malware_url: - description: A list of malware URLs related to the security incident for ServiceNow - SecOps connectors. The URLs are added as observables to the security incident. - oneOf: - - type: string - - items: - type: string - type: array - type: string - run_connector_subaction_pushtoservice_subActionParams_incident_source_ip: - description: A list of source IP addresses related to the security incident - for ServiceNow SecOps connectors. The IPs are added as observables to the - security incident. - oneOf: - - type: string - - items: - type: string - type: array + description: A unique identifier for the comment. run_connector_subaction_pushtoservice_subActionParams_incident: - description: "Information necessary to create or update a Jira, ServiceNow ITSM,\ - \ ServiveNow SecOps, or Swimlane incident." + type: object properties: alertId: - description: The alert identifier for Swimlane connectors. type: string + description: The alert identifier for Swimlane connectors. caseId: - description: The case identifier for the incident for Swimlane connectors. type: string + description: The case identifier for the incident for Swimlane connectors. caseName: - description: The case name for the incident for Swimlane connectors. type: string + description: The case name for the incident for Swimlane connectors. category: + type: string description: The category of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. - type: string correlation_display: + type: string description: A descriptive label of the alert for correlation purposes for ServiceNow ITSM and ServiceNow SecOps connectors. - type: string correlation_id: + type: string description: | The correlation identifier for the security incident for ServiceNow ITSM and ServiveNow SecOps connectors. Connectors using the same correlation ID are associated with the same ServiceNow incident. This value determines whether a new ServiceNow incident is created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the correlation ID value in ServiceNow. The maximum character length for this value is 100 characters. NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that ServiceNow creates a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, ServiceNow creates and continually updates a single incident record for the alert. - type: string description: + type: string description: "The description of the incident for Jira, ServiceNow ITSM,\ \ ServiceNow SecOps, and Swimlane connectors." - type: string dest_ip: - $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams_incident_dest_ip' + description: | + A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. + oneOf: + - type: string + - type: array + items: + type: string externalId: + type: string description: | The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. If present, the incident is updated. Otherwise, a new incident is created. - type: string impact: - description: The impact of the incident for ServiceNow ITSM connectors. type: string + description: The impact of the incident for ServiceNow ITSM connectors. issueType: + type: integer description: "The type of incident for Jira connectors. For example, 10006.\ \ To obtain the list of valid values, set `subAction` to `issueTypes`." - type: integer labels: + type: array description: | The labels for the incident for Jira connectors. NOTE: Labels cannot contain spaces. items: type: string - type: array malware_hash: - $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams_incident_malware_hash' + description: A list of malware hashes related to the security incident for + ServiceNow SecOps connectors. The hashes are added as observables to the + security incident. + oneOf: + - type: string + - type: array + items: + type: string malware_url: - $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams_incident_malware_url' + type: string + description: A list of malware URLs related to the security incident for + ServiceNow SecOps connectors. The URLs are added as observables to the + security incident. + oneOf: + - type: string + - type: array + items: + type: string parent: + type: string description: The ID or key of the parent issue for Jira connectors. Applies only to `Sub-task` types of issues. - type: string priority: + type: string description: The priority of the incident in Jira and ServiceNow SecOps connectors. - type: string ruleName: - description: The rule name for Swimlane connectors. type: string + description: The rule name for Swimlane connectors. severity: + type: string description: The severity of the incident for ServiceNow ITSM and Swimlane connectors. - type: string short_description: + type: string description: | A short description of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. It is used for searching the contents of the knowledge base. - type: string source_ip: - $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams_incident_source_ip' + description: A list of source IP addresses related to the security incident + for ServiceNow SecOps connectors. The IPs are added as observables to + the security incident. + oneOf: + - type: string + - type: array + items: + type: string subcategory: + type: string description: The subcategory of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. - type: string summary: - description: A summary of the incident for Jira connectors. type: string + description: A summary of the incident for Jira connectors. title: + type: string description: | A title for the incident for Jira connectors. It is used for searching the contents of the knowledge base. - type: string urgency: - description: The urgency of the incident for ServiceNow ITSM connectors. type: string - type: object + description: The urgency of the incident for ServiceNow ITSM connectors. + description: "Information necessary to create or update a Jira, ServiceNow ITSM,\ + \ ServiveNow SecOps, or Swimlane incident." run_connector_subaction_pushtoservice_subActionParams: - description: The set of configuration properties for the action. + type: object properties: comments: + type: array description: "Additional information that is sent to Jira, ServiceNow ITSM,\ \ ServiceNow SecOps, or Swimlane." items: - $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams_comments_inner' - type: array - incident: - $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams_incident' - type: object + $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams_comments' + incident: + $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams_incident' + description: The set of configuration properties for the action. + responses: + "401": + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthorized response' + "404": + description: Object is not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Not found response' + "200_actions": + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/action_response_properties' + parameters: + kbn_xsrf: + name: kbn-xsrf + in: header + description: Cross-site request forgery protection + required: true + style: simple + explode: false + schema: + type: string + space_id: + name: spaceId + in: path + description: "An identifier for the space. If `/s/` and the identifier are omitted\ + \ from the path, the default space is used." + required: true + style: simple + explode: false + schema: + type: string + example: default + connector_id: + name: connectorId + in: path + description: An identifier for the connector. + required: true + style: simple + explode: false + schema: + type: string + example: df770e30-8b8b-11ed-a780-3b746c987a81 + action_id: + name: actionId + in: path + description: An identifier for the action. + required: true + style: simple + explode: false + schema: + type: string + example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad + examples: + create_index_connector_request: + summary: Create an index connector. + value: + name: my-connector + connector_type_id: .index + config: + index: test-index + create_index_connector_response: + summary: A new index connector. + value: + id: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad + connector_type_id: .index + name: my-connector + config: + index: test-index + refresh: false + executionTimeField: null + is_preconfigured: false + is_deprecated: false + is_missing_secrets: false + get_connector_response: + summary: A list of connector types + value: + id: df770e30-8b8b-11ed-a780-3b746c987a81 + name: my_server_log_connector + config: {} + connector_type_id: .server-log + is_preconfigured: false + is_deprecated: false + is_missing_secrets: false + update_index_connector_request: + summary: Update an index connector. + value: + name: updated-connector + config: + index: updated-index + get_connectors_response: + summary: A list of connectors + value: + - id: preconfigured-email-connector + name: my-preconfigured-email-notification + connector_type_id: .email + is_preconfigured: true + is_deprecated: false + referenced_by_count: 0 + - id: e07d0c80-8b8b-11ed-a780-3b746c987a81 + name: my-index-connector + config: + index: test-index + refresh: false + executionTimeField: null + connector_type_id: .index + is_preconfigured: false + is_deprecated: false + referenced_by_count: 2 + is_missing_secrets: false + get_connector_types_response: + summary: A list of connector types + value: + - id: .swimlane + name: Swimlane + enabled: true + enabled_in_config: true + enabled_in_license: true + minimum_license_required: gold + supported_feature_ids: + - alerting + - cases + - siem + - id: .index + name: Index + enabled: true + enabled_in_config: true + enabled_in_license: true + minimum_license_required: basic + supported_feature_ids: + - alerting + - uptime + - siem + - id: .server-log + name: Server log + enabled: true + enabled_in_config: true + enabled_in_license: true + minimum_license_required: basic + supported_feature_ids: + - alerting + - uptime + run_index_connector_request: + summary: Run an index connector. + value: + params: + documents: + - id: my_doc_id + name: my_doc_name + message: "hello, world" + run_jira_connector_request: + summary: Run a Jira connector to retrieve the list of issue types. + value: + params: + subAction: issueTypes + run_server_log_connector_request: + summary: Run a server log connector. + value: + params: + level: warn + message: Test warning message. + run_servicenow_itom_connector_request: + summary: Run a ServiceNow ITOM connector to retrieve the list of choices. + value: + params: + subAction: getChoices + subActionParams: + fields: + - severity + - urgency + run_swimlane_connector_request: + summary: Run a Swimlane connector to create an incident. + value: + params: + subAction: pushToService + subActionParams: + comments: + - commentId: 1 + comment: A comment about the incident. + incident: + caseId: "1000" + caseName: Case name + description: Description of the incident. + run_index_connector_response: + summary: Response from running an index connector. + value: + connector_id: fd38c600-96a5-11ed-bb79-353b74189cba + data: + errors: false + items: + - create: + _id: 4JtvwYUBrcyxt2NnfW3y + _index: my-index + _primary_term: 1 + _seq_no: 0 + _shards: + failed: 0 + successful: 1 + total: 2 + _version: 1 + result: created + status: 201 + took: 135 + status: ok + run_jira_connector_response: + summary: Response from retrieving the list of issue types for a Jira connector. + value: + connector_id: b3aad810-edbe-11ec-82d1-11348ecbf4a6 + data: + - id: 10024 + name: Improvement + - id: 10006 + name: Task + - id: 10007 + name: Sub-task + - id: 10025 + name: New Feature + - id: 10023 + name: Bug + - id: 10000 + name: Epic + status: ok + run_server_log_connector_response: + summary: Response from running a server log connector. + value: + connector_id: 7fc7b9a0-ecc9-11ec-8736-e7d63118c907 + status: ok + run_servicenow_itom_connector_response: + summary: Response from retrieving the list of choices for a ServiceNow ITOM + connector. + value: + connector_id: 9d9be270-2fd2-11ed-b0e0-87533c532698 + data: + - dependent_value: "" + element: severity + label: Critical + value: 1 + - dependent_value: "" + element: severity + label: Major + value: 2 + - dependent_value: "" + element: severity + label: Minor + value: 3 + - dependent_value: "" + element: severity + label: Warning + value: 4 + - dependent_value: "" + element: severity + label: OK + value: 5 + - dependent_value: "" + element: severity + label: Clear + value: 0 + - dependent_value: "" + element: urgency + label: 1 - High + value: 1 + - dependent_value: "" + element: urgency + label: 2 - Medium + value: 2 + - dependent_value: "" + element: urgency + label: 3 - Low + value: 3 + status: ok + run_swimlane_connector_response: + summary: Response from creating a Swimlane incident. + value: + connector_id: a4746470-2f94-11ed-b0e0-87533c532698 + data: + id: aKPmBHWzmdRQtx6Mx + title: TEST-457 + url: https://elastic.swimlane.url.us/record/aNcL2xniGHGpa2AHb/aKPmBHWzmdRQtx6Mx + pushedDate: 2022-09-08T16:52:27.866Z + comments: + - commentId: 1 + pushedDate: 2022-09-08T16:52:27.865Z + status: ok securitySchemes: basicAuth: - scheme: basic type: http + scheme: basic apiKeyAuth: - in: header - name: ApiKey type: apiKey + name: ApiKey + in: header diff --git a/generated/kibanaactions/api_connectors.go b/generated/kibanaactions/api_connectors.go index f16fc3b87..91c9f9ba2 100644 --- a/generated/kibanaactions/api_connectors.go +++ b/generated/kibanaactions/api_connectors.go @@ -1,2306 +1,1623 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions import ( - "bytes" "context" - "io" + "fmt" + "github.com/antihax/optional" + "io/ioutil" "net/http" "net/url" "strings" ) -type ConnectorsApi interface { - - /* - CreateConnector Creates a connector. - - You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiCreateConnectorRequest - */ - CreateConnector(ctx context.Context, spaceId string) ApiCreateConnectorRequest - - // CreateConnectorExecute executes the request - // @return ConnectorResponseProperties - CreateConnectorExecute(r ApiCreateConnectorRequest) (*ConnectorResponseProperties, *http.Response, error) - - /* - DeleteConnector Deletes a connector. - - You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be recovered. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param connectorId An identifier for the connector. - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiDeleteConnectorRequest - */ - DeleteConnector(ctx context.Context, connectorId string, spaceId string) ApiDeleteConnectorRequest - - // DeleteConnectorExecute executes the request - DeleteConnectorExecute(r ApiDeleteConnectorRequest) (*http.Response, error) - - /* - GetConnector Retrieves a connector by ID. - - You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param connectorId An identifier for the connector. - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiGetConnectorRequest - */ - GetConnector(ctx context.Context, connectorId string, spaceId string) ApiGetConnectorRequest - - // GetConnectorExecute executes the request - // @return ConnectorResponseProperties - GetConnectorExecute(r ApiGetConnectorRequest) (*ConnectorResponseProperties, *http.Response, error) - - /* - GetConnectorTypes Retrieves a list of all connector types. - - You do not need any Kibana feature privileges to run this API. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiGetConnectorTypesRequest - */ - GetConnectorTypes(ctx context.Context, spaceId string) ApiGetConnectorTypesRequest - - // GetConnectorTypesExecute executes the request - // @return []GetConnectorTypesResponseBodyPropertiesInner - GetConnectorTypesExecute(r ApiGetConnectorTypesRequest) ([]GetConnectorTypesResponseBodyPropertiesInner, *http.Response, error) - - /* - GetConnectors Retrieves all connectors. - - You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiGetConnectorsRequest - */ - GetConnectors(ctx context.Context, spaceId string) ApiGetConnectorsRequest - - // GetConnectorsExecute executes the request - // @return []GetConnectorsResponseBodyProperties - GetConnectorsExecute(r ApiGetConnectorsRequest) ([]GetConnectorsResponseBodyProperties, *http.Response, error) - - /* - LegacyCreateConnector Creates a connector. - - Deprecated in 7.13.0. Use the create connector API instead. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiLegacyCreateConnectorRequest - - Deprecated - */ - LegacyCreateConnector(ctx context.Context, spaceId string) ApiLegacyCreateConnectorRequest - - // LegacyCreateConnectorExecute executes the request - // @return ActionResponseProperties - // Deprecated - LegacyCreateConnectorExecute(r ApiLegacyCreateConnectorRequest) (*ActionResponseProperties, *http.Response, error) - - /* - LegacyDeleteConnector Deletes a connector. - - Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, it cannot be recovered. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param actionId An identifier for the action. - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiLegacyDeleteConnectorRequest - - Deprecated - */ - LegacyDeleteConnector(ctx context.Context, actionId string, spaceId string) ApiLegacyDeleteConnectorRequest - - // LegacyDeleteConnectorExecute executes the request - // Deprecated - LegacyDeleteConnectorExecute(r ApiLegacyDeleteConnectorRequest) (*http.Response, error) - - /* - LegacyGetConnector Retrieves a connector by ID. - - Deprecated in 7.13.0. Use the get connector API instead. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param actionId An identifier for the action. - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiLegacyGetConnectorRequest - - Deprecated - */ - LegacyGetConnector(ctx context.Context, actionId string, spaceId string) ApiLegacyGetConnectorRequest - - // LegacyGetConnectorExecute executes the request - // @return ActionResponseProperties - // Deprecated - LegacyGetConnectorExecute(r ApiLegacyGetConnectorRequest) (*ActionResponseProperties, *http.Response, error) - - /* - LegacyGetConnectorTypes Retrieves a list of all connector types. - - Deprecated in 7.13.0. Use the get all connector types API instead. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiLegacyGetConnectorTypesRequest - - Deprecated - */ - LegacyGetConnectorTypes(ctx context.Context, spaceId string) ApiLegacyGetConnectorTypesRequest - - // LegacyGetConnectorTypesExecute executes the request - // @return []LegacyGetConnectorTypesResponseBodyPropertiesInner - // Deprecated - LegacyGetConnectorTypesExecute(r ApiLegacyGetConnectorTypesRequest) ([]LegacyGetConnectorTypesResponseBodyPropertiesInner, *http.Response, error) - - /* - LegacyGetConnectors Retrieves all connectors. - - Deprecated in 7.13.0. Use the get all connectors API instead. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiLegacyGetConnectorsRequest - - Deprecated - */ - LegacyGetConnectors(ctx context.Context, spaceId string) ApiLegacyGetConnectorsRequest - - // LegacyGetConnectorsExecute executes the request - // @return []ActionResponseProperties - // Deprecated - LegacyGetConnectorsExecute(r ApiLegacyGetConnectorsRequest) ([]ActionResponseProperties, *http.Response, error) - - /* - LegacyRunConnector Runs a connector. - - Deprecated in 7.13.0. Use the run connector API instead. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param actionId An identifier for the action. - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiLegacyRunConnectorRequest - - Deprecated - */ - LegacyRunConnector(ctx context.Context, actionId string, spaceId string) ApiLegacyRunConnectorRequest - - // LegacyRunConnectorExecute executes the request - // @return LegacyRunConnector200Response - // Deprecated - LegacyRunConnectorExecute(r ApiLegacyRunConnectorRequest) (*LegacyRunConnector200Response, *http.Response, error) - - /* - LegacyUpdateConnector Updates the attributes for a connector. - - Deprecated in 7.13.0. Use the update connector API instead. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param actionId An identifier for the action. - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiLegacyUpdateConnectorRequest - - Deprecated - */ - LegacyUpdateConnector(ctx context.Context, actionId string, spaceId string) ApiLegacyUpdateConnectorRequest - - // LegacyUpdateConnectorExecute executes the request - // @return ActionResponseProperties - // Deprecated - LegacyUpdateConnectorExecute(r ApiLegacyUpdateConnectorRequest) (*ActionResponseProperties, *http.Response, error) - - /* - RunConnector Runs a connector. - - You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. If you use an index connector, you must also have `all`, `create`, `index`, or `write` indices privileges. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param connectorId An identifier for the connector. - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiRunConnectorRequest - */ - RunConnector(ctx context.Context, connectorId string, spaceId string) ApiRunConnectorRequest - - // RunConnectorExecute executes the request - // @return RunConnector200Response - RunConnectorExecute(r ApiRunConnectorRequest) (*RunConnector200Response, *http.Response, error) - - /* - UpdateConnector Updates the attributes for a connector. - - You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param connectorId An identifier for the connector. - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiUpdateConnectorRequest - */ - UpdateConnector(ctx context.Context, connectorId string, spaceId string) ApiUpdateConnectorRequest - - // UpdateConnectorExecute executes the request - // @return ConnectorResponseProperties - UpdateConnectorExecute(r ApiUpdateConnectorRequest) (*ConnectorResponseProperties, *http.Response, error) -} +// Linger please +var ( + _ context.Context +) -// ConnectorsApiService ConnectorsApi service type ConnectorsApiService service -type ApiCreateConnectorRequest struct { - ctx context.Context - ApiService ConnectorsApi - kbnXsrf *string - spaceId string - createConnectorRequestBodyProperties *CreateConnectorRequestBodyProperties -} - -// Cross-site request forgery protection -func (r ApiCreateConnectorRequest) KbnXsrf(kbnXsrf string) ApiCreateConnectorRequest { - r.kbnXsrf = &kbnXsrf - return r -} - -func (r ApiCreateConnectorRequest) CreateConnectorRequestBodyProperties(createConnectorRequestBodyProperties CreateConnectorRequestBodyProperties) ApiCreateConnectorRequest { - r.createConnectorRequestBodyProperties = &createConnectorRequestBodyProperties - return r -} - -func (r ApiCreateConnectorRequest) Execute() (*ConnectorResponseProperties, *http.Response, error) { - return r.ApiService.CreateConnectorExecute(r) -} - /* -CreateConnector Creates a connector. - -You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiCreateConnectorRequest +ConnectorsApiService Creates a connector. +You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param body + - @param kbnXsrf Cross-site request forgery protection + - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + +@return ConnectorResponseProperties */ -func (a *ConnectorsApiService) CreateConnector(ctx context.Context, spaceId string) ApiCreateConnectorRequest { - return ApiCreateConnectorRequest{ - ApiService: a, - ctx: ctx, - spaceId: spaceId, - } -} - -// Execute executes the request -// -// @return ConnectorResponseProperties -func (a *ConnectorsApiService) CreateConnectorExecute(r ApiCreateConnectorRequest) (*ConnectorResponseProperties, *http.Response, error) { +func (a *ConnectorsApiService) CreateConnector(ctx context.Context, body CreateConnectorRequestBodyProperties, kbnXsrf string, spaceId string) (ConnectorResponseProperties, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost + localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ConnectorResponseProperties + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ConnectorResponseProperties ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.CreateConnector") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/s/{spaceId}/api/actions/connector" - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/connector" + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.kbnXsrf == nil { - return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") - } - if r.createConnectorRequestBodyProperties == nil { - return localVarReturnValue, nil, reportError("createConnectorRequestBodyProperties is required and must be specified") - } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHttpHeaderAccepts := []string{"application/json"} // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + localVarHeaderParams["kbn-xsrf"] = parameterToString(kbnXsrf, "") // body params - localVarPostBody = r.createConnectorRequestBodyProperties - if r.ctx != nil { + localVarPostBody = &body + if ctx != nil { // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["ApiKey"] = key + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key } + localVarHeaderParams["ApiKey"] = key + } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err } - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarReturnValue, localVarHttpResponse, err } - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ body: localVarBody, - error: localVarHTTPResponse.Status, + error: localVarHttpResponse.Status, } - if localVarHTTPResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if localVarHttpResponse.StatusCode == 200 { + var v ConnectorResponseProperties + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), + if localVarHttpResponse.StatusCode == 401 { + var v UnauthorizedResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteConnectorRequest struct { - ctx context.Context - ApiService ConnectorsApi - kbnXsrf *string - connectorId string - spaceId string -} - -// Cross-site request forgery protection -func (r ApiDeleteConnectorRequest) KbnXsrf(kbnXsrf string) ApiDeleteConnectorRequest { - r.kbnXsrf = &kbnXsrf - return r -} - -func (r ApiDeleteConnectorRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteConnectorExecute(r) + return localVarReturnValue, localVarHttpResponse, nil } /* -DeleteConnector Deletes a connector. - -You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be recovered. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param connectorId An identifier for the connector. - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiDeleteConnectorRequest +ConnectorsApiService Deletes a connector. +You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be recovered. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param kbnXsrf Cross-site request forgery protection + - @param connectorId An identifier for the connector. + - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. */ -func (a *ConnectorsApiService) DeleteConnector(ctx context.Context, connectorId string, spaceId string) ApiDeleteConnectorRequest { - return ApiDeleteConnectorRequest{ - ApiService: a, - ctx: ctx, - connectorId: connectorId, - spaceId: spaceId, - } -} - -// Execute executes the request -func (a *ConnectorsApiService) DeleteConnectorExecute(r ApiDeleteConnectorRequest) (*http.Response, error) { +func (a *ConnectorsApiService) DeleteConnector(ctx context.Context, kbnXsrf string, connectorId string, spaceId string) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete + localVarHttpMethod = strings.ToUpper("Delete") localVarPostBody interface{} - formFiles []formFile + localVarFileName string + localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.DeleteConnector") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/s/{spaceId}/api/actions/connector/{connectorId}" - localVarPath = strings.Replace(localVarPath, "{"+"connectorId"+"}", url.PathEscape(parameterValueToString(r.connectorId, "connectorId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/connector/{connectorId}" + localVarPath = strings.Replace(localVarPath, "{"+"connectorId"+"}", fmt.Sprintf("%v", connectorId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.kbnXsrf == nil { - return nil, reportError("kbnXsrf is required and must be specified") - } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHttpContentTypes := []string{} // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHttpHeaderAccepts := []string{"application/json"} // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") - if r.ctx != nil { + localVarHeaderParams["kbn-xsrf"] = parameterToString(kbnXsrf, "") + if ctx != nil { // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["ApiKey"] = key + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key } + localVarHeaderParams["ApiKey"] = key + } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err } - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() if err != nil { - return localVarHTTPResponse, err + return localVarHttpResponse, err } - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ body: localVarBody, - error: localVarHTTPResponse.Status, + error: localVarHttpResponse.Status, } - if localVarHTTPResponse.StatusCode == 401 { + if localVarHttpResponse.StatusCode == 401 { var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarHTTPResponse, newErr + return localVarHttpResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v - return localVarHTTPResponse, newErr + return localVarHttpResponse, newErr } - if localVarHTTPResponse.StatusCode == 404 { - var v GetConnector404Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if localVarHttpResponse.StatusCode == 404 { + var v InlineResponse404 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarHTTPResponse, newErr + return localVarHttpResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v + return localVarHttpResponse, newErr } - return localVarHTTPResponse, newErr + return localVarHttpResponse, newErr } - return localVarHTTPResponse, nil -} - -type ApiGetConnectorRequest struct { - ctx context.Context - ApiService ConnectorsApi - connectorId string - spaceId string -} - -func (r ApiGetConnectorRequest) Execute() (*ConnectorResponseProperties, *http.Response, error) { - return r.ApiService.GetConnectorExecute(r) + return localVarHttpResponse, nil } /* -GetConnector Retrieves a connector by ID. +ConnectorsApiService Retrieves a connector by ID. +You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param connectorId An identifier for the connector. + - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. -You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param connectorId An identifier for the connector. - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiGetConnectorRequest +@return ConnectorResponseProperties */ -func (a *ConnectorsApiService) GetConnector(ctx context.Context, connectorId string, spaceId string) ApiGetConnectorRequest { - return ApiGetConnectorRequest{ - ApiService: a, - ctx: ctx, - connectorId: connectorId, - spaceId: spaceId, - } -} - -// Execute executes the request -// -// @return ConnectorResponseProperties -func (a *ConnectorsApiService) GetConnectorExecute(r ApiGetConnectorRequest) (*ConnectorResponseProperties, *http.Response, error) { +func (a *ConnectorsApiService) GetConnector(ctx context.Context, connectorId string, spaceId string) (ConnectorResponseProperties, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet + localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ConnectorResponseProperties + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ConnectorResponseProperties ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.GetConnector") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/s/{spaceId}/api/actions/connector/{connectorId}" - localVarPath = strings.Replace(localVarPath, "{"+"connectorId"+"}", url.PathEscape(parameterValueToString(r.connectorId, "connectorId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/connector/{connectorId}" + localVarPath = strings.Replace(localVarPath, "{"+"connectorId"+"}", fmt.Sprintf("%v", connectorId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHttpContentTypes := []string{} // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHttpHeaderAccepts := []string{"application/json"} // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - if r.ctx != nil { + if ctx != nil { // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["ApiKey"] = key + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key } + localVarHeaderParams["ApiKey"] = key + } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err } - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } } - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ body: localVarBody, - error: localVarHTTPResponse.Status, + error: localVarHttpResponse.Status, } - if localVarHTTPResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if localVarHttpResponse.StatusCode == 200 { + var v ConnectorResponseProperties + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - if localVarHTTPResponse.StatusCode == 404 { - var v GetConnector404Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if localVarHttpResponse.StatusCode == 401 { + var v UnauthorizedResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), + if localVarHttpResponse.StatusCode == 404 { + var v InlineResponse404 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetConnectorTypesRequest struct { - ctx context.Context - ApiService ConnectorsApi - spaceId string - featureId *Features -} - -// A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases). -func (r ApiGetConnectorTypesRequest) FeatureId(featureId Features) ApiGetConnectorTypesRequest { - r.featureId = &featureId - return r -} - -func (r ApiGetConnectorTypesRequest) Execute() ([]GetConnectorTypesResponseBodyPropertiesInner, *http.Response, error) { - return r.ApiService.GetConnectorTypesExecute(r) + return localVarReturnValue, localVarHttpResponse, nil } /* -GetConnectorTypes Retrieves a list of all connector types. - +ConnectorsApiService Retrieves a list of all connector types. You do not need any Kibana feature privileges to run this API. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiGetConnectorTypesRequest + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + * @param optional nil or *ConnectorsApiGetConnectorTypesOpts - Optional Parameters: + * @param "FeatureId" (optional.Interface of Features) - A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases). +@return []InlineResponse200 */ -func (a *ConnectorsApiService) GetConnectorTypes(ctx context.Context, spaceId string) ApiGetConnectorTypesRequest { - return ApiGetConnectorTypesRequest{ - ApiService: a, - ctx: ctx, - spaceId: spaceId, - } + +type ConnectorsApiGetConnectorTypesOpts struct { + FeatureId optional.Interface } -// Execute executes the request -// -// @return []GetConnectorTypesResponseBodyPropertiesInner -func (a *ConnectorsApiService) GetConnectorTypesExecute(r ApiGetConnectorTypesRequest) ([]GetConnectorTypesResponseBodyPropertiesInner, *http.Response, error) { +func (a *ConnectorsApiService) GetConnectorTypes(ctx context.Context, spaceId string, localVarOptionals *ConnectorsApiGetConnectorTypesOpts) ([]InlineResponse200, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet + localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []GetConnectorTypesResponseBodyPropertiesInner + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []InlineResponse200 ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.GetConnectorTypes") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/s/{spaceId}/api/actions/connector_types" - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/connector_types" + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.featureId != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "feature_id", r.featureId, "") + if localVarOptionals != nil && localVarOptionals.FeatureId.IsSet() { + localVarQueryParams.Add("feature_id", parameterToString(localVarOptionals.FeatureId.Value(), "")) } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHttpContentTypes := []string{} // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHttpHeaderAccepts := []string{"application/json"} // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - if r.ctx != nil { + if ctx != nil { // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["ApiKey"] = key + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key } + localVarHeaderParams["ApiKey"] = key + } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err } - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarReturnValue, localVarHttpResponse, err } - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ body: localVarBody, - error: localVarHTTPResponse.Status, + error: localVarHttpResponse.Status, } - if localVarHTTPResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if localVarHttpResponse.StatusCode == 200 { + var v []InlineResponse200 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), + if localVarHttpResponse.StatusCode == 401 { + var v UnauthorizedResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetConnectorsRequest struct { - ctx context.Context - ApiService ConnectorsApi - spaceId string -} - -func (r ApiGetConnectorsRequest) Execute() ([]GetConnectorsResponseBodyProperties, *http.Response, error) { - return r.ApiService.GetConnectorsExecute(r) + return localVarReturnValue, localVarHttpResponse, nil } /* -GetConnectors Retrieves all connectors. +ConnectorsApiService Retrieves all connectors. +You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. -You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiGetConnectorsRequest +@return []GetConnectorsResponseBodyProperties */ -func (a *ConnectorsApiService) GetConnectors(ctx context.Context, spaceId string) ApiGetConnectorsRequest { - return ApiGetConnectorsRequest{ - ApiService: a, - ctx: ctx, - spaceId: spaceId, - } -} - -// Execute executes the request -// -// @return []GetConnectorsResponseBodyProperties -func (a *ConnectorsApiService) GetConnectorsExecute(r ApiGetConnectorsRequest) ([]GetConnectorsResponseBodyProperties, *http.Response, error) { +func (a *ConnectorsApiService) GetConnectors(ctx context.Context, spaceId string) ([]GetConnectorsResponseBodyProperties, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet + localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} - formFiles []formFile + localVarFileName string + localVarFileBytes []byte localVarReturnValue []GetConnectorsResponseBodyProperties ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.GetConnectors") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/s/{spaceId}/api/actions/connectors" - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/connectors" + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHttpContentTypes := []string{} // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHttpHeaderAccepts := []string{"application/json"} // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - if r.ctx != nil { + if ctx != nil { // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["ApiKey"] = key + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key } + localVarHeaderParams["ApiKey"] = key + } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err } - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarReturnValue, localVarHttpResponse, err } - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ body: localVarBody, - error: localVarHTTPResponse.Status, + error: localVarHttpResponse.Status, } - if localVarHTTPResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if localVarHttpResponse.StatusCode == 200 { + var v []GetConnectorsResponseBodyProperties + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), + if localVarHttpResponse.StatusCode == 401 { + var v UnauthorizedResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiLegacyCreateConnectorRequest struct { - ctx context.Context - ApiService ConnectorsApi - kbnXsrf *string - spaceId string - legacyCreateConnectorRequestProperties *LegacyCreateConnectorRequestProperties -} - -// Cross-site request forgery protection -func (r ApiLegacyCreateConnectorRequest) KbnXsrf(kbnXsrf string) ApiLegacyCreateConnectorRequest { - r.kbnXsrf = &kbnXsrf - return r -} - -func (r ApiLegacyCreateConnectorRequest) LegacyCreateConnectorRequestProperties(legacyCreateConnectorRequestProperties LegacyCreateConnectorRequestProperties) ApiLegacyCreateConnectorRequest { - r.legacyCreateConnectorRequestProperties = &legacyCreateConnectorRequestProperties - return r -} - -func (r ApiLegacyCreateConnectorRequest) Execute() (*ActionResponseProperties, *http.Response, error) { - return r.ApiService.LegacyCreateConnectorExecute(r) + return localVarReturnValue, localVarHttpResponse, nil } /* -LegacyCreateConnector Creates a connector. - +ConnectorsApiService Creates a connector. Deprecated in 7.13.0. Use the create connector API instead. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param body + - @param kbnXsrf Cross-site request forgery protection + - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiLegacyCreateConnectorRequest - -Deprecated +@return ActionResponseProperties */ -func (a *ConnectorsApiService) LegacyCreateConnector(ctx context.Context, spaceId string) ApiLegacyCreateConnectorRequest { - return ApiLegacyCreateConnectorRequest{ - ApiService: a, - ctx: ctx, - spaceId: spaceId, - } -} - -// Execute executes the request -// -// @return ActionResponseProperties -// -// Deprecated -func (a *ConnectorsApiService) LegacyCreateConnectorExecute(r ApiLegacyCreateConnectorRequest) (*ActionResponseProperties, *http.Response, error) { +func (a *ConnectorsApiService) LegacyCreateConnector(ctx context.Context, body LegacyCreateConnectorRequestProperties, kbnXsrf string, spaceId string) (ActionResponseProperties, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost + localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ActionResponseProperties + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ActionResponseProperties ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.LegacyCreateConnector") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/s/{spaceId}/api/actions" - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions" + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.kbnXsrf == nil { - return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") - } - if r.legacyCreateConnectorRequestProperties == nil { - return localVarReturnValue, nil, reportError("legacyCreateConnectorRequestProperties is required and must be specified") - } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHttpHeaderAccepts := []string{"application/json"} // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + localVarHeaderParams["kbn-xsrf"] = parameterToString(kbnXsrf, "") // body params - localVarPostBody = r.legacyCreateConnectorRequestProperties - if r.ctx != nil { + localVarPostBody = &body + if ctx != nil { // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["ApiKey"] = key + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key } + localVarHeaderParams["ApiKey"] = key + } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err } - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarReturnValue, localVarHttpResponse, err } - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ body: localVarBody, - error: localVarHTTPResponse.Status, + error: localVarHttpResponse.Status, } - if localVarHTTPResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if localVarHttpResponse.StatusCode == 200 { + var v ActionResponseProperties + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), + if localVarHttpResponse.StatusCode == 401 { + var v UnauthorizedResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiLegacyDeleteConnectorRequest struct { - ctx context.Context - ApiService ConnectorsApi - kbnXsrf *string - actionId string - spaceId string -} - -// Cross-site request forgery protection -func (r ApiLegacyDeleteConnectorRequest) KbnXsrf(kbnXsrf string) ApiLegacyDeleteConnectorRequest { - r.kbnXsrf = &kbnXsrf - return r -} - -func (r ApiLegacyDeleteConnectorRequest) Execute() (*http.Response, error) { - return r.ApiService.LegacyDeleteConnectorExecute(r) + return localVarReturnValue, localVarHttpResponse, nil } /* -LegacyDeleteConnector Deletes a connector. - +ConnectorsApiService Deletes a connector. Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, it cannot be recovered. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param actionId An identifier for the action. - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiLegacyDeleteConnectorRequest - -Deprecated + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param kbnXsrf Cross-site request forgery protection + - @param actionId An identifier for the action. + - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. */ -func (a *ConnectorsApiService) LegacyDeleteConnector(ctx context.Context, actionId string, spaceId string) ApiLegacyDeleteConnectorRequest { - return ApiLegacyDeleteConnectorRequest{ - ApiService: a, - ctx: ctx, - actionId: actionId, - spaceId: spaceId, - } -} - -// Execute executes the request -// Deprecated -func (a *ConnectorsApiService) LegacyDeleteConnectorExecute(r ApiLegacyDeleteConnectorRequest) (*http.Response, error) { +func (a *ConnectorsApiService) LegacyDeleteConnector(ctx context.Context, kbnXsrf string, actionId string, spaceId string) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodDelete + localVarHttpMethod = strings.ToUpper("Delete") localVarPostBody interface{} - formFiles []formFile + localVarFileName string + localVarFileBytes []byte ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.LegacyDeleteConnector") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/s/{spaceId}/api/actions/action/{actionId}" - localVarPath = strings.Replace(localVarPath, "{"+"actionId"+"}", url.PathEscape(parameterValueToString(r.actionId, "actionId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/action/{actionId}" + localVarPath = strings.Replace(localVarPath, "{"+"actionId"+"}", fmt.Sprintf("%v", actionId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.kbnXsrf == nil { - return nil, reportError("kbnXsrf is required and must be specified") - } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHttpContentTypes := []string{} // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHttpHeaderAccepts := []string{"application/json"} // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") - if r.ctx != nil { + localVarHeaderParams["kbn-xsrf"] = parameterToString(kbnXsrf, "") + if ctx != nil { // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["ApiKey"] = key + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key } + localVarHeaderParams["ApiKey"] = key + } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err } - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() if err != nil { - return localVarHTTPResponse, err + return localVarHttpResponse, err } - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ body: localVarBody, - error: localVarHTTPResponse.Status, + error: localVarHttpResponse.Status, } - if localVarHTTPResponse.StatusCode == 401 { + if localVarHttpResponse.StatusCode == 401 { var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarHTTPResponse, newErr + return localVarHttpResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v + return localVarHttpResponse, newErr } - return localVarHTTPResponse, newErr + return localVarHttpResponse, newErr } - return localVarHTTPResponse, nil -} - -type ApiLegacyGetConnectorRequest struct { - ctx context.Context - ApiService ConnectorsApi - actionId string - spaceId string -} - -func (r ApiLegacyGetConnectorRequest) Execute() (*ActionResponseProperties, *http.Response, error) { - return r.ApiService.LegacyGetConnectorExecute(r) + return localVarHttpResponse, nil } /* -LegacyGetConnector Retrieves a connector by ID. - +ConnectorsApiService Retrieves a connector by ID. Deprecated in 7.13.0. Use the get connector API instead. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param actionId An identifier for the action. + - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param actionId An identifier for the action. - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiLegacyGetConnectorRequest - -Deprecated +@return ActionResponseProperties */ -func (a *ConnectorsApiService) LegacyGetConnector(ctx context.Context, actionId string, spaceId string) ApiLegacyGetConnectorRequest { - return ApiLegacyGetConnectorRequest{ - ApiService: a, - ctx: ctx, - actionId: actionId, - spaceId: spaceId, - } -} - -// Execute executes the request -// -// @return ActionResponseProperties -// -// Deprecated -func (a *ConnectorsApiService) LegacyGetConnectorExecute(r ApiLegacyGetConnectorRequest) (*ActionResponseProperties, *http.Response, error) { +func (a *ConnectorsApiService) LegacyGetConnector(ctx context.Context, actionId string, spaceId string) (ActionResponseProperties, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet + localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ActionResponseProperties + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ActionResponseProperties ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.LegacyGetConnector") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/s/{spaceId}/api/actions/action/{actionId}" - localVarPath = strings.Replace(localVarPath, "{"+"actionId"+"}", url.PathEscape(parameterValueToString(r.actionId, "actionId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/action/{actionId}" + localVarPath = strings.Replace(localVarPath, "{"+"actionId"+"}", fmt.Sprintf("%v", actionId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHttpContentTypes := []string{} // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHttpHeaderAccepts := []string{"application/json"} // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - if r.ctx != nil { + if ctx != nil { // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["ApiKey"] = key + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key } + localVarHeaderParams["ApiKey"] = key + } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err } - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarReturnValue, localVarHttpResponse, err } - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ body: localVarBody, - error: localVarHTTPResponse.Status, + error: localVarHttpResponse.Status, } - if localVarHTTPResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if localVarHttpResponse.StatusCode == 200 { + var v ActionResponseProperties + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), + if localVarHttpResponse.StatusCode == 401 { + var v UnauthorizedResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiLegacyGetConnectorTypesRequest struct { - ctx context.Context - ApiService ConnectorsApi - spaceId string -} - -func (r ApiLegacyGetConnectorTypesRequest) Execute() ([]LegacyGetConnectorTypesResponseBodyPropertiesInner, *http.Response, error) { - return r.ApiService.LegacyGetConnectorTypesExecute(r) + return localVarReturnValue, localVarHttpResponse, nil } /* -LegacyGetConnectorTypes Retrieves a list of all connector types. - +ConnectorsApiService Retrieves a list of all connector types. Deprecated in 7.13.0. Use the get all connector types API instead. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiLegacyGetConnectorTypesRequest - -Deprecated +@return []InlineResponse2002 */ -func (a *ConnectorsApiService) LegacyGetConnectorTypes(ctx context.Context, spaceId string) ApiLegacyGetConnectorTypesRequest { - return ApiLegacyGetConnectorTypesRequest{ - ApiService: a, - ctx: ctx, - spaceId: spaceId, - } -} - -// Execute executes the request -// -// @return []LegacyGetConnectorTypesResponseBodyPropertiesInner -// -// Deprecated -func (a *ConnectorsApiService) LegacyGetConnectorTypesExecute(r ApiLegacyGetConnectorTypesRequest) ([]LegacyGetConnectorTypesResponseBodyPropertiesInner, *http.Response, error) { +func (a *ConnectorsApiService) LegacyGetConnectorTypes(ctx context.Context, spaceId string) ([]InlineResponse2002, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet + localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []LegacyGetConnectorTypesResponseBodyPropertiesInner + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []InlineResponse2002 ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.LegacyGetConnectorTypes") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/s/{spaceId}/api/actions/list_action_types" - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/list_action_types" + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHttpContentTypes := []string{} // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHttpHeaderAccepts := []string{"application/json"} // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - if r.ctx != nil { + if ctx != nil { // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["ApiKey"] = key + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key } + localVarHeaderParams["ApiKey"] = key + } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err } - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarReturnValue, localVarHttpResponse, err } - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ body: localVarBody, - error: localVarHTTPResponse.Status, + error: localVarHttpResponse.Status, } - if localVarHTTPResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if localVarHttpResponse.StatusCode == 200 { + var v []InlineResponse2002 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), + if localVarHttpResponse.StatusCode == 401 { + var v UnauthorizedResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiLegacyGetConnectorsRequest struct { - ctx context.Context - ApiService ConnectorsApi - spaceId string -} - -func (r ApiLegacyGetConnectorsRequest) Execute() ([]ActionResponseProperties, *http.Response, error) { - return r.ApiService.LegacyGetConnectorsExecute(r) + return localVarReturnValue, localVarHttpResponse, nil } /* -LegacyGetConnectors Retrieves all connectors. - +ConnectorsApiService Retrieves all connectors. Deprecated in 7.13.0. Use the get all connectors API instead. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiLegacyGetConnectorsRequest - -Deprecated +@return []ActionResponseProperties */ -func (a *ConnectorsApiService) LegacyGetConnectors(ctx context.Context, spaceId string) ApiLegacyGetConnectorsRequest { - return ApiLegacyGetConnectorsRequest{ - ApiService: a, - ctx: ctx, - spaceId: spaceId, - } -} - -// Execute executes the request -// -// @return []ActionResponseProperties -// -// Deprecated -func (a *ConnectorsApiService) LegacyGetConnectorsExecute(r ApiLegacyGetConnectorsRequest) ([]ActionResponseProperties, *http.Response, error) { +func (a *ConnectorsApiService) LegacyGetConnectors(ctx context.Context, spaceId string) ([]ActionResponseProperties, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodGet + localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} - formFiles []formFile + localVarFileName string + localVarFileBytes []byte localVarReturnValue []ActionResponseProperties ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.LegacyGetConnectors") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/s/{spaceId}/api/actions" - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions" + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHttpContentTypes := []string{} // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHttpHeaderAccepts := []string{"application/json"} // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - if r.ctx != nil { + if ctx != nil { // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["ApiKey"] = key + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key } + localVarHeaderParams["ApiKey"] = key + } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err } - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } } - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ body: localVarBody, - error: localVarHTTPResponse.Status, + error: localVarHttpResponse.Status, } - if localVarHTTPResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if localVarHttpResponse.StatusCode == 200 { + var v []ActionResponseProperties + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), + if localVarHttpResponse.StatusCode == 401 { + var v UnauthorizedResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiLegacyRunConnectorRequest struct { - ctx context.Context - ApiService ConnectorsApi - kbnXsrf *string - actionId string - spaceId string - legacyRunConnectorRequestBodyProperties *LegacyRunConnectorRequestBodyProperties -} - -// Cross-site request forgery protection -func (r ApiLegacyRunConnectorRequest) KbnXsrf(kbnXsrf string) ApiLegacyRunConnectorRequest { - r.kbnXsrf = &kbnXsrf - return r -} - -func (r ApiLegacyRunConnectorRequest) LegacyRunConnectorRequestBodyProperties(legacyRunConnectorRequestBodyProperties LegacyRunConnectorRequestBodyProperties) ApiLegacyRunConnectorRequest { - r.legacyRunConnectorRequestBodyProperties = &legacyRunConnectorRequestBodyProperties - return r -} - -func (r ApiLegacyRunConnectorRequest) Execute() (*LegacyRunConnector200Response, *http.Response, error) { - return r.ApiService.LegacyRunConnectorExecute(r) + return localVarReturnValue, localVarHttpResponse, nil } /* -LegacyRunConnector Runs a connector. - +ConnectorsApiService Runs a connector. Deprecated in 7.13.0. Use the run connector API instead. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param body + - @param kbnXsrf Cross-site request forgery protection + - @param actionId An identifier for the action. + - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param actionId An identifier for the action. - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiLegacyRunConnectorRequest - -Deprecated +@return InlineResponse2003 */ -func (a *ConnectorsApiService) LegacyRunConnector(ctx context.Context, actionId string, spaceId string) ApiLegacyRunConnectorRequest { - return ApiLegacyRunConnectorRequest{ - ApiService: a, - ctx: ctx, - actionId: actionId, - spaceId: spaceId, - } -} - -// Execute executes the request -// -// @return LegacyRunConnector200Response -// -// Deprecated -func (a *ConnectorsApiService) LegacyRunConnectorExecute(r ApiLegacyRunConnectorRequest) (*LegacyRunConnector200Response, *http.Response, error) { +func (a *ConnectorsApiService) LegacyRunConnector(ctx context.Context, body LegacyRunConnectorRequestBodyProperties, kbnXsrf string, actionId string, spaceId string) (InlineResponse2003, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost + localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *LegacyRunConnector200Response + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2003 ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.LegacyRunConnector") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/s/{spaceId}/api/actions/action/{actionId}/_execute" - localVarPath = strings.Replace(localVarPath, "{"+"actionId"+"}", url.PathEscape(parameterValueToString(r.actionId, "actionId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/action/{actionId}/_execute" + localVarPath = strings.Replace(localVarPath, "{"+"actionId"+"}", fmt.Sprintf("%v", actionId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.kbnXsrf == nil { - return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") - } - if r.legacyRunConnectorRequestBodyProperties == nil { - return localVarReturnValue, nil, reportError("legacyRunConnectorRequestBodyProperties is required and must be specified") - } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHttpHeaderAccepts := []string{"application/json"} // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + localVarHeaderParams["kbn-xsrf"] = parameterToString(kbnXsrf, "") // body params - localVarPostBody = r.legacyRunConnectorRequestBodyProperties - if r.ctx != nil { + localVarPostBody = &body + if ctx != nil { // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["ApiKey"] = key + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key } + localVarHeaderParams["ApiKey"] = key + } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err } - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } } - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ body: localVarBody, - error: localVarHTTPResponse.Status, + error: localVarHttpResponse.Status, } - if localVarHTTPResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse2003 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), + if localVarHttpResponse.StatusCode == 401 { + var v UnauthorizedResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiLegacyUpdateConnectorRequest struct { - ctx context.Context - ApiService ConnectorsApi - kbnXsrf *string - actionId string - spaceId string - legacyUpdateConnectorRequestBodyProperties *LegacyUpdateConnectorRequestBodyProperties -} - -// Cross-site request forgery protection -func (r ApiLegacyUpdateConnectorRequest) KbnXsrf(kbnXsrf string) ApiLegacyUpdateConnectorRequest { - r.kbnXsrf = &kbnXsrf - return r -} - -func (r ApiLegacyUpdateConnectorRequest) LegacyUpdateConnectorRequestBodyProperties(legacyUpdateConnectorRequestBodyProperties LegacyUpdateConnectorRequestBodyProperties) ApiLegacyUpdateConnectorRequest { - r.legacyUpdateConnectorRequestBodyProperties = &legacyUpdateConnectorRequestBodyProperties - return r -} - -func (r ApiLegacyUpdateConnectorRequest) Execute() (*ActionResponseProperties, *http.Response, error) { - return r.ApiService.LegacyUpdateConnectorExecute(r) + return localVarReturnValue, localVarHttpResponse, nil } /* -LegacyUpdateConnector Updates the attributes for a connector. - +ConnectorsApiService Updates the attributes for a connector. Deprecated in 7.13.0. Use the update connector API instead. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param body + - @param kbnXsrf Cross-site request forgery protection + - @param actionId An identifier for the action. + - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param actionId An identifier for the action. - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiLegacyUpdateConnectorRequest - -Deprecated +@return ActionResponseProperties */ -func (a *ConnectorsApiService) LegacyUpdateConnector(ctx context.Context, actionId string, spaceId string) ApiLegacyUpdateConnectorRequest { - return ApiLegacyUpdateConnectorRequest{ - ApiService: a, - ctx: ctx, - actionId: actionId, - spaceId: spaceId, - } -} - -// Execute executes the request -// -// @return ActionResponseProperties -// -// Deprecated -func (a *ConnectorsApiService) LegacyUpdateConnectorExecute(r ApiLegacyUpdateConnectorRequest) (*ActionResponseProperties, *http.Response, error) { +func (a *ConnectorsApiService) LegacyUpdateConnector(ctx context.Context, body LegacyUpdateConnectorRequestBodyProperties, kbnXsrf string, actionId string, spaceId string) (ActionResponseProperties, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPut + localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ActionResponseProperties + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ActionResponseProperties ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.LegacyUpdateConnector") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/s/{spaceId}/api/actions/action/{actionId}" - localVarPath = strings.Replace(localVarPath, "{"+"actionId"+"}", url.PathEscape(parameterValueToString(r.actionId, "actionId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/action/{actionId}" + localVarPath = strings.Replace(localVarPath, "{"+"actionId"+"}", fmt.Sprintf("%v", actionId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.kbnXsrf == nil { - return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") - } - if r.legacyUpdateConnectorRequestBodyProperties == nil { - return localVarReturnValue, nil, reportError("legacyUpdateConnectorRequestBodyProperties is required and must be specified") - } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHttpHeaderAccepts := []string{"application/json"} // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + localVarHeaderParams["kbn-xsrf"] = parameterToString(kbnXsrf, "") // body params - localVarPostBody = r.legacyUpdateConnectorRequestBodyProperties - if r.ctx != nil { + localVarPostBody = &body + if ctx != nil { // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["ApiKey"] = key + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key } + localVarHeaderParams["ApiKey"] = key + } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err } - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } } - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ body: localVarBody, - error: localVarHTTPResponse.Status, + error: localVarHttpResponse.Status, } - if localVarHTTPResponse.StatusCode == 404 { - var v NotFoundResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if localVarHttpResponse.StatusCode == 200 { + var v ActionResponseProperties + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), + if localVarHttpResponse.StatusCode == 404 { + var v NotFoundResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRunConnectorRequest struct { - ctx context.Context - ApiService ConnectorsApi - kbnXsrf *string - connectorId string - spaceId string - runConnectorRequestBodyProperties *RunConnectorRequestBodyProperties -} - -// Cross-site request forgery protection -func (r ApiRunConnectorRequest) KbnXsrf(kbnXsrf string) ApiRunConnectorRequest { - r.kbnXsrf = &kbnXsrf - return r -} - -func (r ApiRunConnectorRequest) RunConnectorRequestBodyProperties(runConnectorRequestBodyProperties RunConnectorRequestBodyProperties) ApiRunConnectorRequest { - r.runConnectorRequestBodyProperties = &runConnectorRequestBodyProperties - return r -} - -func (r ApiRunConnectorRequest) Execute() (*RunConnector200Response, *http.Response, error) { - return r.ApiService.RunConnectorExecute(r) + return localVarReturnValue, localVarHttpResponse, nil } /* -RunConnector Runs a connector. - -You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. If you use an index connector, you must also have `all`, `create`, `index`, or `write` indices privileges. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param connectorId An identifier for the connector. - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiRunConnectorRequest +ConnectorsApiService Runs a connector. +You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. If you use an index connector, you must also have `all`, `create`, `index`, or `write` indices privileges. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param body + - @param kbnXsrf Cross-site request forgery protection + - @param connectorId An identifier for the connector. + - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + +@return InlineResponse2001 */ -func (a *ConnectorsApiService) RunConnector(ctx context.Context, connectorId string, spaceId string) ApiRunConnectorRequest { - return ApiRunConnectorRequest{ - ApiService: a, - ctx: ctx, - connectorId: connectorId, - spaceId: spaceId, - } -} - -// Execute executes the request -// -// @return RunConnector200Response -func (a *ConnectorsApiService) RunConnectorExecute(r ApiRunConnectorRequest) (*RunConnector200Response, *http.Response, error) { +func (a *ConnectorsApiService) RunConnector(ctx context.Context, body RunConnectorRequestBodyProperties, kbnXsrf string, connectorId string, spaceId string) (InlineResponse2001, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost + localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RunConnector200Response + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2001 ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.RunConnector") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/s/{spaceId}/api/actions/connector/{connectorId}/_execute" - localVarPath = strings.Replace(localVarPath, "{"+"connectorId"+"}", url.PathEscape(parameterValueToString(r.connectorId, "connectorId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/connector/{connectorId}/_execute" + localVarPath = strings.Replace(localVarPath, "{"+"connectorId"+"}", fmt.Sprintf("%v", connectorId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.kbnXsrf == nil { - return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") - } - if r.runConnectorRequestBodyProperties == nil { - return localVarReturnValue, nil, reportError("runConnectorRequestBodyProperties is required and must be specified") - } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHttpHeaderAccepts := []string{"application/json"} // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + localVarHeaderParams["kbn-xsrf"] = parameterToString(kbnXsrf, "") // body params - localVarPostBody = r.runConnectorRequestBodyProperties - if r.ctx != nil { + localVarPostBody = &body + if ctx != nil { // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["ApiKey"] = key + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key } + localVarHeaderParams["ApiKey"] = key + } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err } - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } } - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ body: localVarBody, - error: localVarHTTPResponse.Status, + error: localVarHttpResponse.Status, } - if localVarHTTPResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse2001 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), + if localVarHttpResponse.StatusCode == 401 { + var v UnauthorizedResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateConnectorRequest struct { - ctx context.Context - ApiService ConnectorsApi - kbnXsrf *string - connectorId string - spaceId string - updateConnectorRequestBodyProperties *UpdateConnectorRequestBodyProperties -} - -// Cross-site request forgery protection -func (r ApiUpdateConnectorRequest) KbnXsrf(kbnXsrf string) ApiUpdateConnectorRequest { - r.kbnXsrf = &kbnXsrf - return r -} - -func (r ApiUpdateConnectorRequest) UpdateConnectorRequestBodyProperties(updateConnectorRequestBodyProperties UpdateConnectorRequestBodyProperties) ApiUpdateConnectorRequest { - r.updateConnectorRequestBodyProperties = &updateConnectorRequestBodyProperties - return r -} - -func (r ApiUpdateConnectorRequest) Execute() (*ConnectorResponseProperties, *http.Response, error) { - return r.ApiService.UpdateConnectorExecute(r) + return localVarReturnValue, localVarHttpResponse, nil } /* -UpdateConnector Updates the attributes for a connector. - -You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param connectorId An identifier for the connector. - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiUpdateConnectorRequest +ConnectorsApiService Updates the attributes for a connector. +You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param body + - @param kbnXsrf Cross-site request forgery protection + - @param connectorId An identifier for the connector. + - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + +@return ConnectorResponseProperties */ -func (a *ConnectorsApiService) UpdateConnector(ctx context.Context, connectorId string, spaceId string) ApiUpdateConnectorRequest { - return ApiUpdateConnectorRequest{ - ApiService: a, - ctx: ctx, - connectorId: connectorId, - spaceId: spaceId, - } -} - -// Execute executes the request -// -// @return ConnectorResponseProperties -func (a *ConnectorsApiService) UpdateConnectorExecute(r ApiUpdateConnectorRequest) (*ConnectorResponseProperties, *http.Response, error) { +func (a *ConnectorsApiService) UpdateConnector(ctx context.Context, body UpdateConnectorRequestBodyProperties, kbnXsrf string, connectorId string, spaceId string) (ConnectorResponseProperties, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPut + localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ConnectorResponseProperties + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ConnectorResponseProperties ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsApiService.UpdateConnector") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/s/{spaceId}/api/actions/connector/{connectorId}" - localVarPath = strings.Replace(localVarPath, "{"+"connectorId"+"}", url.PathEscape(parameterValueToString(r.connectorId, "connectorId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/connector/{connectorId}" + localVarPath = strings.Replace(localVarPath, "{"+"connectorId"+"}", fmt.Sprintf("%v", connectorId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.kbnXsrf == nil { - return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") - } - if r.updateConnectorRequestBodyProperties == nil { - return localVarReturnValue, nil, reportError("updateConnectorRequestBodyProperties is required and must be specified") - } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHttpHeaderAccepts := []string{"application/json"} // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + localVarHeaderParams["kbn-xsrf"] = parameterToString(kbnXsrf, "") // body params - localVarPostBody = r.updateConnectorRequestBodyProperties - if r.ctx != nil { + localVarPostBody = &body + if ctx != nil { // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["ApiKey"] = key + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key } + localVarHeaderParams["ApiKey"] = key + } } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err } - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } } - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ body: localVarBody, - error: localVarHTTPResponse.Status, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v ConnectorResponseProperties + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - if localVarHTTPResponse.StatusCode == 400 { - var v UpdateConnector400Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if localVarHttpResponse.StatusCode == 400 { + var v InlineResponse400 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - if localVarHTTPResponse.StatusCode == 401 { + if localVarHttpResponse.StatusCode == 401 { var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - if localVarHTTPResponse.StatusCode == 404 { + if localVarHttpResponse.StatusCode == 404 { var v NotFoundResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHttpResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil + return localVarReturnValue, localVarHttpResponse, nil } diff --git a/generated/kibanaactions/bundled.json b/generated/kibanaactions/bundled.json deleted file mode 100644 index aa9cdcd3d..000000000 --- a/generated/kibanaactions/bundled.json +++ /dev/null @@ -1,4540 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "Connectors", - "description": "OpenAPI schema for Connectors endpoints", - "version": "0.1", - "contact": { - "name": "Connectors Team" - }, - "license": { - "name": "Elastic License 2.0", - "url": "https://www.elastic.co/licensing/elastic-license" - } - }, - "tags": [ - { - "name": "connectors", - "description": "Connector APIs enable you to create and manage connectors." - } - ], - "servers": [ - { - "url": "http://localhost:5601", - "description": "local" - } - ], - "paths": { - "/s/{spaceId}/api/actions/connector": { - "post": { - "summary": "Creates a connector.", - "operationId": "createConnector", - "description": "You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", - "tags": [ - "connectors" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "title": "Create connector request body properties", - "description": "The properties vary depending on the connector type.", - "oneOf": [ - { - "$ref": "#/components/schemas/create_connector_request_cases_webhook" - }, - { - "$ref": "#/components/schemas/create_connector_request_email" - }, - { - "$ref": "#/components/schemas/create_connector_request_index" - }, - { - "$ref": "#/components/schemas/create_connector_request_jira" - }, - { - "$ref": "#/components/schemas/create_connector_request_opsgenie" - }, - { - "$ref": "#/components/schemas/create_connector_request_pagerduty" - }, - { - "$ref": "#/components/schemas/create_connector_request_resilient" - }, - { - "$ref": "#/components/schemas/create_connector_request_serverlog" - }, - { - "$ref": "#/components/schemas/create_connector_request_servicenow" - }, - { - "$ref": "#/components/schemas/create_connector_request_servicenow_itom" - }, - { - "$ref": "#/components/schemas/create_connector_request_servicenow_sir" - }, - { - "$ref": "#/components/schemas/create_connector_request_slack" - }, - { - "$ref": "#/components/schemas/create_connector_request_swimlane" - }, - { - "$ref": "#/components/schemas/create_connector_request_teams" - }, - { - "$ref": "#/components/schemas/create_connector_request_tines" - }, - { - "$ref": "#/components/schemas/create_connector_request_webhook" - }, - { - "$ref": "#/components/schemas/create_connector_request_xmatters" - } - ], - "discriminator": { - "propertyName": "connector_type_id" - } - }, - "examples": { - "createIndexConnectorRequest": { - "$ref": "#/components/examples/create_index_connector_request" - } - } - } - } - }, - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/connector_response_properties" - }, - "examples": { - "createIndexConnectorResponse": { - "$ref": "#/components/examples/create_index_connector_response" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "/s/{spaceId}/api/actions/connector/{connectorId}": { - "get": { - "summary": "Retrieves a connector by ID.", - "operationId": "getConnector", - "description": "You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", - "tags": [ - "connectors" - ], - "parameters": [ - { - "$ref": "#/components/parameters/connector_id" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/connector_response_properties" - }, - "examples": { - "getConnectorResponse": { - "$ref": "#/components/examples/get_connector_response" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "404": { - "description": "Object is not found.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "string", - "example": "Not Found" - }, - "message": { - "type": "string", - "example": "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found" - }, - "statusCode": { - "type": "integer", - "example": 404 - } - } - } - } - } - } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "delete": { - "summary": "Deletes a connector.", - "operationId": "deleteConnector", - "description": "You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be recovered.\n", - "tags": [ - "connectors" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/connector_id" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "responses": { - "204": { - "description": "Indicates a successful call." - }, - "401": { - "$ref": "#/components/responses/401" - }, - "404": { - "description": "Object is not found.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "string", - "example": "Not Found" - }, - "message": { - "type": "string", - "example": "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found" - }, - "statusCode": { - "type": "integer", - "example": 404 - } - } - } - } - } - } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "put": { - "summary": "Updates the attributes for a connector.", - "operationId": "updateConnector", - "description": "You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", - "tags": [ - "connectors" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/connector_id" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "title": "Update connector request body properties", - "description": "The properties vary depending on the connector type.", - "oneOf": [ - { - "$ref": "#/components/schemas/update_connector_request_cases_webhook" - }, - { - "$ref": "#/components/schemas/update_connector_request_index" - }, - { - "$ref": "#/components/schemas/update_connector_request_jira" - }, - { - "$ref": "#/components/schemas/update_connector_request_opsgenie" - }, - { - "$ref": "#/components/schemas/update_connector_request_resilient" - }, - { - "$ref": "#/components/schemas/update_connector_request_serverlog" - }, - { - "$ref": "#/components/schemas/update_connector_request_servicenow" - }, - { - "$ref": "#/components/schemas/update_connector_request_servicenow_itom" - }, - { - "$ref": "#/components/schemas/update_connector_request_swimlane" - } - ] - }, - "examples": { - "updateIndexConnectorRequest": { - "$ref": "#/components/examples/update_index_connector_request" - } - } - } - } - }, - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/connector_response_properties" - } - } - } - }, - "400": { - "description": "Indicates a bad request.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "string", - "example": "Bad Request" - }, - "message": { - "type": "string", - "example": "error validating action type config: [index]: expected value of type [string] but got [undefined]" - }, - "statusCode": { - "type": "integer", - "example": 400 - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "/s/{spaceId}/api/actions/connectors": { - "get": { - "summary": "Retrieves all connectors.", - "operationId": "getConnectors", - "description": "You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", - "tags": [ - "connectors" - ], - "parameters": [ - { - "$ref": "#/components/parameters/space_id" - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "title": "Get connectors response body properties", - "description": "The properties vary for each connector type.", - "type": "object", - "required": [ - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name", - "referenced_by_count" - ], - "properties": { - "connector_type_id": { - "$ref": "#/components/schemas/connector_types" - }, - "config": { - "type": "object", - "description": "The configuration for the connector. Configuration properties vary depending on the connector type.", - "additionalProperties": true, - "nullable": true - }, - "id": { - "type": "string", - "description": "The identifier for the connector.", - "example": "b0766e10-d190-11ec-b04c-776c77d14fca" - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "referenced_by_count": { - "type": "integer", - "description": "Indicates the number of saved objects that reference the connector. If `is_preconfigured` is true, this value is not calculated.", - "example": 2, - "default": 0 - } - } - } - }, - "examples": { - "getConnectorsResponse": { - "$ref": "#/components/examples/get_connectors_response" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "/s/{spaceId}/api/actions/connector_types": { - "get": { - "summary": "Retrieves a list of all connector types.", - "operationId": "getConnectorTypes", - "description": "You do not need any Kibana feature privileges to run this API.\n", - "tags": [ - "connectors" - ], - "parameters": [ - { - "$ref": "#/components/parameters/space_id" - }, - { - "in": "query", - "name": "feature_id", - "description": "A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases).", - "schema": { - "$ref": "#/components/schemas/features" - } - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "title": "Get connector types response body properties", - "description": "The properties vary for each connector type.", - "type": "array", - "items": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Indicates whether the connector type is enabled in Kibana.", - "example": true - }, - "enabled_in_config": { - "type": "boolean", - "description": "Indicates whether the connector type is enabled in the Kibana `.yml` file.", - "example": true - }, - "enabled_in_license": { - "type": "boolean", - "description": "Indicates whether the connector is enabled in the license.", - "example": true - }, - "id": { - "$ref": "#/components/schemas/connector_types" - }, - "minimum_license_required": { - "type": "string", - "description": "The license that is required to use the connector type.", - "example": "basic" - }, - "name": { - "type": "string", - "description": "The name of the connector type.", - "example": "Index" - }, - "supported_feature_ids": { - "type": "array", - "description": "The Kibana features that are supported by the connector type.", - "items": { - "$ref": "#/components/schemas/features" - }, - "example": [ - "alerting", - "uptime", - "siem" - ] - } - } - } - }, - "examples": { - "getConnectorTypesResponse": { - "$ref": "#/components/examples/get_connector_types_response" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "/s/{spaceId}/api/actions/connector/{connectorId}/_execute": { - "post": { - "summary": "Runs a connector.", - "operationId": "runConnector", - "description": "You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. If you use an index connector, you must also have `all`, `create`, `index`, or `write` indices privileges.\n", - "tags": [ - "connectors" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/connector_id" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "title": "Run connector request body properties", - "description": "The properties vary depending on the connector type.", - "type": "object", - "required": [ - "params" - ], - "properties": { - "params": { - "oneOf": [ - { - "$ref": "#/components/schemas/run_connector_params_documents" - }, - { - "$ref": "#/components/schemas/run_connector_params_level_message" - }, - { - "title": "Subaction parameters", - "description": "Test an action that involves a subaction.", - "oneOf": [ - { - "$ref": "#/components/schemas/run_connector_subaction_addevent" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_closealert" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_createalert" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_fieldsbyissuetype" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_getchoices" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_getfields" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_getincident" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_issue" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_issues" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_issuetypes" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_pushtoservice" - } - ], - "discriminator": { - "propertyName": "subAction" - } - } - ] - } - } - }, - "examples": { - "runIndexConnectorRequest": { - "$ref": "#/components/examples/run_index_connector_request" - }, - "runJiraConnectorRequest": { - "$ref": "#/components/examples/run_jira_connector_request" - }, - "runServerLogConnectorRequest": { - "$ref": "#/components/examples/run_server_log_connector_request" - }, - "runServiceNowITOMConnectorRequest": { - "$ref": "#/components/examples/run_servicenow_itom_connector_request" - }, - "runSwimlaneConnectorRequest": { - "$ref": "#/components/examples/run_swimlane_connector_request" - } - } - } - } - }, - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "connector_id", - "status" - ], - "properties": { - "connector_id": { - "type": "string", - "description": "The identifier for the connector." - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "Information returned from the action.", - "additionalProperties": true - }, - { - "type": "array", - "description": "An array of information returned from the action.", - "items": { - "type": "object" - } - } - ] - }, - "status": { - "type": "string", - "description": "The status of the action.", - "enum": [ - "error", - "ok" - ] - } - } - }, - "examples": { - "runIndexConnectorResponse": { - "$ref": "#/components/examples/run_index_connector_response" - }, - "runJiraConnectorResponse": { - "$ref": "#/components/examples/run_jira_connector_response" - }, - "runServerLogConnectorResponse": { - "$ref": "#/components/examples/run_server_log_connector_response" - }, - "runServiceNowITOMConnectorResponse": { - "$ref": "#/components/examples/run_servicenow_itom_connector_response" - }, - "runSwimlaneConnectorResponse": { - "$ref": "#/components/examples/run_swimlane_connector_response" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "/s/{spaceId}/api/actions/action/{actionId}": { - "delete": { - "summary": "Deletes a connector.", - "operationId": "legacyDeleteConnector", - "deprecated": true, - "description": "Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, it cannot be recovered.\n", - "tags": [ - "connectors" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/action_id" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "responses": { - "204": { - "description": "Indicates a successful call." - }, - "401": { - "$ref": "#/components/responses/401" - } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "get": { - "summary": "Retrieves a connector by ID.", - "operationId": "legacyGetConnector", - "description": "Deprecated in 7.13.0. Use the get connector API instead.", - "deprecated": true, - "tags": [ - "connectors" - ], - "parameters": [ - { - "$ref": "#/components/parameters/action_id" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/200_actions" - }, - "401": { - "$ref": "#/components/responses/401" - } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "put": { - "summary": "Updates the attributes for a connector.", - "operationId": "legacyUpdateConnector", - "deprecated": true, - "description": "Deprecated in 7.13.0. Use the update connector API instead.", - "tags": [ - "connectors" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/action_id" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "title": "Legacy update connector request body properties", - "description": "The properties vary depending on the connector type.", - "type": "object", - "properties": { - "config": { - "type": "object", - "description": "The new connector configuration. Configuration properties vary depending on the connector type." - }, - "name": { - "type": "string", - "description": "The new name for the connector." - }, - "secrets": { - "type": "object", - "description": "The updated secrets configuration for the connector. Secrets properties vary depending on the connector type." - } - } - } - } - } - }, - "responses": { - "200": { - "$ref": "#/components/responses/200_actions" - }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "/s/{spaceId}/api/actions": { - "get": { - "summary": "Retrieves all connectors.", - "operationId": "legacyGetConnectors", - "deprecated": true, - "description": "Deprecated in 7.13.0. Use the get all connectors API instead.", - "tags": [ - "connectors" - ], - "parameters": [ - { - "$ref": "#/components/parameters/space_id" - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/action_response_properties" - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "post": { - "summary": "Creates a connector.", - "operationId": "legacyCreateConnector", - "deprecated": true, - "description": "Deprecated in 7.13.0. Use the create connector API instead.", - "tags": [ - "connectors" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "title": "Legacy create connector request properties", - "type": "object", - "properties": { - "actionTypeId": { - "type": "string", - "description": "The connector type identifier." - }, - "config": { - "type": "object", - "description": "The configuration for the connector. Configuration properties vary depending on the connector type." - }, - "name": { - "type": "string", - "description": "The display name for the connector." - }, - "secrets": { - "type": "object", - "description": "The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. NOTE: Remember these values. You must provide them each time you update the connector.\n" - } - } - } - } - } - }, - "responses": { - "200": { - "$ref": "#/components/responses/200_actions" - }, - "401": { - "$ref": "#/components/responses/401" - } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "/s/{spaceId}/api/actions/list_action_types": { - "get": { - "summary": "Retrieves a list of all connector types.", - "operationId": "legacyGetConnectorTypes", - "deprecated": true, - "description": "Deprecated in 7.13.0. Use the get all connector types API instead.", - "tags": [ - "connectors" - ], - "parameters": [ - { - "$ref": "#/components/parameters/space_id" - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "title": "Legacy get connector types response body properties", - "description": "The properties vary for each connector type.", - "type": "array", - "items": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "description": "Indicates whether the connector type is enabled in Kibana." - }, - "enabledInConfig": { - "type": "boolean", - "description": "Indicates whether the connector type is enabled in the Kibana `.yml` file." - }, - "enabledInLicense": { - "type": "boolean", - "description": "Indicates whether the connector is enabled in the license.", - "example": true - }, - "id": { - "type": "string", - "description": "The unique identifier for the connector type." - }, - "minimumLicenseRequired": { - "type": "string", - "description": "The license that is required to use the connector type." - }, - "name": { - "type": "string", - "description": "The name of the connector type." - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "/s/{spaceId}/api/actions/action/{actionId}/_execute": { - "post": { - "summary": "Runs a connector.", - "operationId": "legacyRunConnector", - "deprecated": true, - "description": "Deprecated in 7.13.0. Use the run connector API instead.", - "tags": [ - "connectors" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/action_id" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "title": "Legacy run connector request body properties", - "description": "The properties vary depending on the connector type.", - "type": "object", - "required": [ - "params" - ], - "properties": { - "params": { - "type": "object", - "description": "The parameters of the connector. Parameter properties vary depending on the connector type." - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "actionId": { - "type": "string" - }, - "data": { - "oneOf": [ - { - "type": "object", - "description": "Information returned from the action.", - "additionalProperties": true - }, - { - "type": "array", - "description": "An array of information returned from the action.", - "items": { - "type": "object" - } - } - ] - }, - "status": { - "type": "string", - "description": "The status of the action." - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] - } - }, - "components": { - "securitySchemes": { - "basicAuth": { - "type": "http", - "scheme": "basic" - }, - "apiKeyAuth": { - "type": "apiKey", - "in": "header", - "name": "ApiKey" - } - }, - "parameters": { - "kbn_xsrf": { - "schema": { - "type": "string" - }, - "in": "header", - "name": "kbn-xsrf", - "description": "Cross-site request forgery protection", - "required": true - }, - "space_id": { - "in": "path", - "name": "spaceId", - "description": "An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.", - "required": true, - "schema": { - "type": "string", - "example": "default" - } - }, - "connector_id": { - "in": "path", - "name": "connectorId", - "description": "An identifier for the connector.", - "required": true, - "schema": { - "type": "string", - "example": "df770e30-8b8b-11ed-a780-3b746c987a81" - } - }, - "action_id": { - "in": "path", - "name": "actionId", - "description": "An identifier for the action.", - "required": true, - "schema": { - "type": "string", - "example": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad" - } - } - }, - "schemas": { - "config_properties_cases_webhook": { - "title": "Connector request properties for Webhook - Case Management connector", - "required": [ - "createIncidentJson", - "createIncidentResponseKey", - "createIncidentUrl", - "getIncidentResponseExternalTitleKey", - "getIncidentUrl", - "updateIncidentJson", - "updateIncidentUrl", - "viewIncidentUrl" - ], - "description": "Defines properties for connectors when type is `.cases-webhook`.", - "type": "object", - "properties": { - "createCommentJson": { - "type": "string", - "description": "A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass.\n", - "example": { - "body": { - "[object Object]": null - } - } - }, - "createCommentMethod": { - "type": "string", - "description": "The REST API HTTP request method to create a case comment in the third-party system. Valid values are `patch`, `post`, and `put`.\n", - "default": "put", - "enum": [ - "patch", - "post", - "put" - ] - }, - "createCommentUrl": { - "type": "string", - "description": "The REST API URL to create a case comment by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts setting`, add the hostname to the allowed hosts.\n", - "example": "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}/comment" - }, - "createIncidentJson": { - "type": "string", - "description": "A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.\n", - "example": { - "fields": { - "summary": { - "[object Object]": null - }, - "description": { - "[object Object]": null - }, - "labels": { - "[object Object]": null - } - } - } - }, - "createIncidentMethod": { - "type": "string", - "description": "The REST API HTTP request method to create a case in the third-party system. Valid values are `patch`, `post`, and `put`.\n", - "enum": [ - "patch", - "post", - "put" - ], - "default": "post" - }, - "createIncidentResponseKey": { - "type": "string", - "description": "The JSON key in the create case response that contains the external case ID." - }, - "createIncidentUrl": { - "type": "string", - "description": "The REST API URL to create a case in the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n" - }, - "getIncidentResponseExternalTitleKey": { - "type": "string", - "description": "The JSON key in get case response that contains the external case title." - }, - "getIncidentUrl": { - "type": "string", - "description": "The REST API URL to get the case by ID from the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. You can use a variable to add the external system ID to the URL. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass.\n", - "example": "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}" - }, - "hasAuth": { - "type": "boolean", - "description": "If true, a username and password for login type authentication must be provided.", - "default": true - }, - "headers": { - "type": "string", - "description": "A set of key-value pairs sent as headers with the request URLs for the create case, update case, get case, and create comment methods.\n" - }, - "updateIncidentJson": { - "type": "string", - "description": "The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.\n", - "example": { - "fields": { - "summary": { - "[object Object]": null - }, - "description": { - "[object Object]": null - }, - "labels": { - "[object Object]": null - } - } - } - }, - "updateIncidentMethod": { - "type": "string", - "description": "The REST API HTTP request method to update the case in the third-party system. Valid values are `patch`, `post`, and `put`.\n", - "default": "put", - "enum": [ - "patch", - "post", - "put" - ] - }, - "updateIncidentUrl": { - "type": "string", - "description": "The REST API URL to update the case by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n", - "example": "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.ID}}}" - }, - "viewIncidentUrl": { - "type": "string", - "description": "The URL to view the case in the external system. You can use variables to add the external system ID or external system title to the URL.\n", - "example": "https://testing-jira.atlassian.net/browse/{{{external.system.title}}}" - } - } - }, - "secrets_properties_cases_webhook": { - "title": "Connector secrets properties for Webhook - Case Management connector", - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required." - }, - "user": { - "type": "string", - "description": "The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required." - } - } - }, - "create_connector_request_cases_webhook": { - "title": "Create Webhook - Case Managment connector request", - "description": "The Webhook - Case Management connector uses axios to send POST, PUT, and GET requests to a case management RESTful API web service.\n", - "type": "object", - "required": [ - "config", - "connector_type_id", - "name" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_cases_webhook" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".cases-webhook" - ], - "example": ".cases-webhook" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_cases_webhook" - } - } - }, - "config_properties_email": { - "title": "Connector request properties for an email connector", - "description": "Defines properties for connectors when type is `.email`.", - "type": "object", - "additionalProperties": true - }, - "secrets_properties_email": { - "title": "Connector secrets properties for an email connector", - "description": "Defines secrets for connectors when type is `.email`.", - "type": "object", - "additionalProperties": true - }, - "create_connector_request_email": { - "title": "Create email connector request", - "description": "The email connector uses the SMTP protocol to send mail messages, using an integration of Nodemailer. An exception is Microsoft Exchange, which uses HTTP protocol for sending emails, Send mail. Email message text is sent as both plain text and html text.\n", - "type": "object", - "required": [ - "config", - "connector_type_id", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_email" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".email" - ], - "example": ".email" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_email" - } - } - }, - "config_properties_index": { - "title": "Connector request properties for an index connector", - "required": [ - "index" - ], - "description": "Defines properties for connectors when type is `.index`.", - "type": "object", - "properties": { - "executionTimeField": { - "description": "Specifies a field that will contain the time the alert condition was detected.", - "default": null, - "type": "string", - "nullable": true - }, - "index": { - "description": "The Elasticsearch index to be written to.", - "type": "string" - }, - "refresh": { - "description": "The refresh policy for the write request, which affects when changes are made visible to search. Refer to the refresh setting for Elasticsearch document APIs.\n", - "default": false, - "type": "boolean" - } - } - }, - "create_connector_request_index": { - "title": "Create index connector request", - "description": "The index connector indexes a document into Elasticsearch.", - "type": "object", - "required": [ - "config", - "connector_type_id", - "name" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_index" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".index" - ], - "example": ".index" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - } - } - }, - "config_properties_jira": { - "title": "Connector request properties for a Jira connector", - "required": [ - "apiUrl", - "projectKey" - ], - "description": "Defines properties for connectors when type is `.jira`.", - "type": "object", - "properties": { - "apiUrl": { - "description": "The Jira instance URL.", - "type": "string" - }, - "projectKey": { - "description": "The Jira project key.", - "type": "string" - } - } - }, - "secrets_properties_jira": { - "title": "Connector secrets properties for a Jira connector", - "required": [ - "apiToken", - "email" - ], - "description": "Defines secrets for connectors when type is `.jira`.", - "type": "object", - "properties": { - "apiToken": { - "description": "The Jira API authentication token for HTTP basic authentication.", - "type": "string" - }, - "email": { - "description": "The account email for HTTP Basic authentication.", - "type": "string" - } - } - }, - "create_connector_request_jira": { - "title": "Create Jira connector request", - "description": "The Jira connector uses the REST API v2 to create Jira issues.", - "type": "object", - "required": [ - "config", - "connector_type_id", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_jira" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".jira" - ], - "example": ".jira" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_jira" - } - } - }, - "config_properties_opsgenie": { - "title": "Connector request properties for an Opsgenie connector", - "required": [ - "apiUrl" - ], - "description": "Defines properties for connectors when type is `.opsgenie`.", - "type": "object", - "properties": { - "apiUrl": { - "description": "The Opsgenie URL. For example, `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n", - "type": "string" - } - } - }, - "secrets_properties_opsgenie": { - "title": "Connector secrets properties for an Opsgenie connector", - "required": [ - "apiKey" - ], - "description": "Defines secrets for connectors when type is `.opsgenie`.", - "type": "object", - "properties": { - "apiKey": { - "description": "The Opsgenie API authentication key for HTTP Basic authentication.", - "type": "string" - } - } - }, - "create_connector_request_opsgenie": { - "title": "Create Opsgenie connector request", - "description": "The Opsgenie connector uses the Opsgenie alert API.", - "type": "object", - "required": [ - "config", - "connector_type_id", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_opsgenie" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".opsgenie" - ], - "example": ".opsgenie" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_opsgenie" - } - } - }, - "config_properties_pagerduty": { - "title": "Connector request properties for a PagerDuty connector", - "description": "Defines properties for connectors when type is `.pagerduty`.", - "type": "object", - "additionalProperties": true - }, - "secrets_properties_pagerduty": { - "title": "Connector secrets properties for a PagerDuty connector", - "description": "Defines secrets for connectors when type is `.pagerduty`.", - "type": "object", - "additionalProperties": true - }, - "create_connector_request_pagerduty": { - "title": "Create PagerDuty connector request", - "description": "The PagerDuty connector uses the v2 Events API to trigger, acknowledge, and resolve PagerDuty alerts.\n", - "type": "object", - "required": [ - "config", - "connector_type_id", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_pagerduty" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".pagerduty" - ], - "example": ".pagerduty" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_pagerduty" - } - } - }, - "config_properties_resilient": { - "title": "Connector request properties for a IBM Resilient connector", - "required": [ - "apiUrl", - "orgId" - ], - "description": "Defines properties for connectors when type is `.resilient`.", - "type": "object", - "properties": { - "apiUrl": { - "description": "The IBM Resilient instance URL.", - "type": "string" - }, - "orgId": { - "description": "The IBM Resilient organization ID.", - "type": "string" - } - } - }, - "secrets_properties_resilient": { - "title": "Connector secrets properties for IBM Resilient connector", - "required": [ - "apiKeyId", - "apiKeySecret" - ], - "description": "Defines secrets for connectors when type is `.resilient`.", - "type": "object", - "properties": { - "apiKeyId": { - "type": "string", - "description": "The authentication key ID for HTTP Basic authentication." - }, - "apiKeySecret": { - "type": "string", - "description": "The authentication key secret for HTTP Basic authentication." - } - } - }, - "create_connector_request_resilient": { - "title": "Create IBM Resilient connector request", - "description": "The IBM Resilient connector uses the RESILIENT REST v2 to create IBM Resilient incidents.", - "type": "object", - "required": [ - "config", - "connector_type_id", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_resilient" - }, - "connector_type_id": { - "description": "The type of connector.", - "type": "string", - "example": ".resilient", - "enum": [ - ".resilient" - ] - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_resilient" - } - } - }, - "create_connector_request_serverlog": { - "title": "Create server log connector request", - "description": "This connector writes an entry to the Kibana server log.", - "type": "object", - "required": [ - "connector_type_id", - "name" - ], - "properties": { - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".server-log" - ], - "example": ".server-log" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - } - } - }, - "config_properties_servicenow": { - "title": "Connector request properties for a ServiceNow ITSM connector", - "required": [ - "apiUrl" - ], - "description": "Defines properties for connectors when type is `.servicenow`.", - "type": "object", - "properties": { - "apiUrl": { - "type": "string", - "description": "The ServiceNow instance URL." - }, - "clientId": { - "description": "The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`.\n", - "type": "string" - }, - "isOAuth": { - "description": "The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth).\n", - "default": false, - "type": "boolean" - }, - "jwtKeyId": { - "description": "The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`.\n", - "type": "string" - }, - "userIdentifierValue": { - "description": "The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`.\n", - "type": "string" - }, - "usesTableApi": { - "description": "Determines whether the connector uses the Table API or the Import Set API. This property is supported only for ServiceNow ITSM and ServiceNow SecOps connectors. NOTE: If this property is set to `false`, the Elastic application should be installed in ServiceNow.\n", - "default": true, - "type": "boolean" - } - } - }, - "secrets_properties_servicenow": { - "title": "Connector secrets properties for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors", - "description": "Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `.servicenow-itom`.", - "type": "object", - "properties": { - "clientSecret": { - "type": "string", - "description": "The client secret assigned to your OAuth application. This property is required when `isOAuth` is `true`." - }, - "password": { - "type": "string", - "description": "The password for HTTP basic authentication. This property is required when `isOAuth` is `false`." - }, - "privateKey": { - "type": "string", - "description": "The RSA private key that you created for use in ServiceNow. This property is required when `isOAuth` is `true`." - }, - "privateKeyPassword": { - "type": "string", - "description": "The password for the RSA private key. This property is required when `isOAuth` is `true` and you set a password on your private key." - }, - "username": { - "type": "string", - "description": "The username for HTTP basic authentication. This property is required when `isOAuth` is `false`." - } - } - }, - "create_connector_request_servicenow": { - "title": "Create ServiceNow ITSM connector request", - "description": "The ServiceNow ITSM connector uses the import set API to create ServiceNow incidents. You can use the connector for rule actions and cases.\n", - "type": "object", - "required": [ - "config", - "connector_type_id", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_servicenow" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".servicenow" - ], - "example": ".servicenow" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_servicenow" - } - } - }, - "config_properties_servicenow_itom": { - "title": "Connector request properties for a ServiceNow ITSM connector", - "required": [ - "apiUrl" - ], - "description": "Defines properties for connectors when type is `.servicenow`.", - "type": "object", - "properties": { - "apiUrl": { - "type": "string", - "description": "The ServiceNow instance URL." - }, - "clientId": { - "description": "The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`.\n", - "type": "string" - }, - "isOAuth": { - "description": "The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth).\n", - "default": false, - "type": "boolean" - }, - "jwtKeyId": { - "description": "The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`.\n", - "type": "string" - }, - "userIdentifierValue": { - "description": "The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`.\n", - "type": "string" - } - } - }, - "create_connector_request_servicenow_itom": { - "title": "Create ServiceNow ITOM connector request", - "description": "The ServiceNow ITOM connector uses the event API to create ServiceNow events. You can use the connector for rule actions.\n", - "type": "object", - "required": [ - "config", - "connector_type_id", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_servicenow_itom" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".servicenow-itom" - ], - "example": ".servicenow-itom" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_servicenow" - } - } - }, - "create_connector_request_servicenow_sir": { - "title": "Create ServiceNow SecOps connector request", - "description": "The ServiceNow SecOps connector uses the import set API to create ServiceNow security incidents. You can use the connector for rule actions and cases.\n", - "type": "object", - "required": [ - "config", - "connector_type_id", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_servicenow" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".servicenow-sir" - ], - "example": ".servicenow-sir" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_servicenow" - } - } - }, - "secrets_properties_slack": { - "title": "Connector secrets properties for a Slack connector", - "description": "Defines secrets for connectors when type is `.slack`.", - "type": "object", - "additionalProperties": true - }, - "create_connector_request_slack": { - "title": "Create Slack connector request", - "description": "The Slack connector uses Slack Incoming Webhooks.", - "type": "object", - "required": [ - "connector_type_id", - "name", - "secrets" - ], - "properties": { - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".slack" - ], - "example": ".slack" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_slack" - } - } - }, - "config_properties_swimlane": { - "title": "Connector request properties for a Swimlane connector", - "required": [ - "apiUrl", - "appId", - "connectorType" - ], - "description": "Defines properties for connectors when type is `.swimlane`.", - "type": "object", - "properties": { - "apiUrl": { - "description": "The Swimlane instance URL.", - "type": "string" - }, - "appId": { - "description": "The Swimlane application ID.", - "type": "string" - }, - "connectorType": { - "description": "The type of connector. Valid values are `all`, `alerts`, and `cases`.", - "type": "string", - "enum": [ - "all", - "alerts", - "cases" - ] - }, - "mappings": { - "title": "Connector mappings properties for a Swimlane connector", - "description": "The field mapping.", - "type": "object", - "properties": { - "alertIdConfig": { - "title": "Alert identifier mapping", - "description": "Mapping for the alert ID.", - "type": "object", - "required": [ - "fieldType", - "id", - "key", - "name" - ], - "properties": { - "fieldType": { - "type": "string", - "description": "The type of field in Swimlane." - }, - "id": { - "type": "string", - "description": "The identifier for the field in Swimlane." - }, - "key": { - "type": "string", - "description": "The key for the field in Swimlane." - }, - "name": { - "type": "string", - "description": "The name of the field in Swimlane." - } - } - }, - "caseIdConfig": { - "title": "Case identifier mapping", - "description": "Mapping for the case ID.", - "type": "object", - "required": [ - "fieldType", - "id", - "key", - "name" - ], - "properties": { - "fieldType": { - "type": "string", - "description": "The type of field in Swimlane." - }, - "id": { - "type": "string", - "description": "The identifier for the field in Swimlane." - }, - "key": { - "type": "string", - "description": "The key for the field in Swimlane." - }, - "name": { - "type": "string", - "description": "The name of the field in Swimlane." - } - } - }, - "caseNameConfig": { - "title": "Case name mapping", - "description": "Mapping for the case name.", - "type": "object", - "required": [ - "fieldType", - "id", - "key", - "name" - ], - "properties": { - "fieldType": { - "type": "string", - "description": "The type of field in Swimlane." - }, - "id": { - "type": "string", - "description": "The identifier for the field in Swimlane." - }, - "key": { - "type": "string", - "description": "The key for the field in Swimlane." - }, - "name": { - "type": "string", - "description": "The name of the field in Swimlane." - } - } - }, - "commentsConfig": { - "title": "Case comment mapping", - "description": "Mapping for the case comments.", - "type": "object", - "required": [ - "fieldType", - "id", - "key", - "name" - ], - "properties": { - "fieldType": { - "type": "string", - "description": "The type of field in Swimlane." - }, - "id": { - "type": "string", - "description": "The identifier for the field in Swimlane." - }, - "key": { - "type": "string", - "description": "The key for the field in Swimlane." - }, - "name": { - "type": "string", - "description": "The name of the field in Swimlane." - } - } - }, - "descriptionConfig": { - "title": "Case description mapping", - "description": "Mapping for the case description.", - "type": "object", - "required": [ - "fieldType", - "id", - "key", - "name" - ], - "properties": { - "fieldType": { - "type": "string", - "description": "The type of field in Swimlane." - }, - "id": { - "type": "string", - "description": "The identifier for the field in Swimlane." - }, - "key": { - "type": "string", - "description": "The key for the field in Swimlane." - }, - "name": { - "type": "string", - "description": "The name of the field in Swimlane." - } - } - }, - "ruleNameConfig": { - "title": "Rule name mapping", - "description": "Mapping for the name of the alert's rule.", - "type": "object", - "required": [ - "fieldType", - "id", - "key", - "name" - ], - "properties": { - "fieldType": { - "type": "string", - "description": "The type of field in Swimlane." - }, - "id": { - "type": "string", - "description": "The identifier for the field in Swimlane." - }, - "key": { - "type": "string", - "description": "The key for the field in Swimlane." - }, - "name": { - "type": "string", - "description": "The name of the field in Swimlane." - } - } - }, - "severityConfig": { - "title": "Severity mapping", - "description": "Mapping for the severity.", - "type": "object", - "required": [ - "fieldType", - "id", - "key", - "name" - ], - "properties": { - "fieldType": { - "type": "string", - "description": "The type of field in Swimlane." - }, - "id": { - "type": "string", - "description": "The identifier for the field in Swimlane." - }, - "key": { - "type": "string", - "description": "The key for the field in Swimlane." - }, - "name": { - "type": "string", - "description": "The name of the field in Swimlane." - } - } - } - } - } - } - }, - "secrets_properties_swimlane": { - "title": "Connector secrets properties for a Swimlane connector", - "description": "Defines secrets for connectors when type is `.swimlane`.", - "type": "object", - "properties": { - "apiToken": { - "description": "Swimlane API authentication token.", - "type": "string" - } - } - }, - "create_connector_request_swimlane": { - "title": "Create Swimlane connector request", - "description": "The Swimlane connector uses the Swimlane REST API to create Swimlane records.", - "type": "object", - "required": [ - "config", - "connector_type_id", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_swimlane" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".swimlane" - ], - "example": ".swimlane" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_swimlane" - } - } - }, - "secrets_properties_teams": { - "title": "Connector secrets properties for a Microsoft Teams connector", - "description": "Defines secrets for connectors when type is `.teams`.", - "type": "object", - "additionalProperties": true - }, - "create_connector_request_teams": { - "title": "Create Microsoft Teams connector request", - "description": "The Microsoft Teams connector uses Incoming Webhooks.", - "type": "object", - "required": [ - "connector_type_id", - "name", - "secrets" - ], - "properties": { - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".teams" - ], - "example": ".teams" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_teams" - } - } - }, - "config_properties_tines": { - "title": "Connector request properties for a Tines connector", - "description": "Defines properties for connectors when type is `.tines`.", - "type": "object", - "additionalProperties": true - }, - "secrets_properties_tines": { - "title": "Connector secrets properties for a Tines connector", - "description": "Defines secrets for connectors when type is `.tines`.", - "type": "object", - "additionalProperties": true - }, - "create_connector_request_tines": { - "title": "Create Tines connector request", - "description": "The Tines connector uses Tines Webhook actions to send events via POST request.\n", - "type": "object", - "required": [ - "config", - "connector_type_id", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_tines" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".tines" - ], - "example": ".tines" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_tines" - } - } - }, - "config_properties_webhook": { - "title": "Connector request properties for a Webhook connector", - "description": "Defines properties for connectors when type is `.webhook`.", - "type": "object", - "additionalProperties": true - }, - "secrets_properties_webhook": { - "title": "Connector secrets properties for a Webhook connector", - "description": "Defines secrets for connectors when type is `.webhook`.", - "type": "object", - "additionalProperties": true - }, - "create_connector_request_webhook": { - "title": "Create Webhook connector request", - "description": "The Webhook connector uses axios to send a POST or PUT request to a web service.\n", - "type": "object", - "required": [ - "config", - "connector_type_id", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_webhook" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".webhook" - ], - "example": ".webhook" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_webhook" - } - } - }, - "config_properties_xmatters": { - "title": "Connector request properties for a xMatters connector", - "description": "Defines properties for connectors when type is `.xmatters`.", - "type": "object", - "additionalProperties": true - }, - "secrets_properties_xmatters": { - "title": "Connector secrets properties for an xMatters connector", - "description": "Defines secrets for connectors when type is `.xmatters`.", - "type": "object", - "additionalProperties": true - }, - "create_connector_request_xmatters": { - "title": "Create xMatters connector request", - "description": "The xMatters connector uses the xMatters Workflow for Elastic to send actionable alerts to on-call xMatters resources.\n", - "type": "object", - "required": [ - "config", - "connector_type_id", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_xmatters" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".xmatters" - ], - "example": ".xmatters" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_xmatters" - } - } - }, - "is_deprecated": { - "type": "boolean", - "description": "Indicates whether the connector type is deprecated.", - "example": false - }, - "is_missing_secrets": { - "type": "boolean", - "description": "Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type.", - "example": false - }, - "is_preconfigured": { - "type": "boolean", - "description": "Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response.", - "example": false - }, - "connector_response_properties_cases_webhook": { - "title": "Connector request properties for a Webhook - Case Management connector", - "type": "object", - "required": [ - "config", - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_cases_webhook" - }, - "connector_type_id": { - "description": "The type of connector.", - "type": "string", - "enum": [ - ".cases-webhook" - ] - }, - "id": { - "type": "string", - "description": "The identifier for the connector." - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "connector_response_properties_email": { - "title": "Connector response properties for an email connector", - "type": "object", - "required": [ - "config", - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_email" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".email" - ] - }, - "id": { - "type": "string", - "description": "The identifier for the connector." - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "connector_response_properties_index": { - "title": "Connector response properties for an index connector", - "type": "object", - "required": [ - "config", - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_index" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".index" - ] - }, - "id": { - "type": "string", - "description": "The identifier for the connector." - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "connector_response_properties_jira": { - "title": "Connector response properties for a Jira connector", - "type": "object", - "required": [ - "config", - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_jira" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".jira" - ] - }, - "id": { - "type": "string", - "description": "The identifier for the connector." - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "connector_response_properties_opsgenie": { - "title": "Connector response properties for an Opsgenie connector", - "type": "object", - "required": [ - "config", - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_opsgenie" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".opsgenie" - ] - }, - "id": { - "type": "string", - "description": "The identifier for the connector." - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "connector_response_properties_pagerduty": { - "title": "Connector response properties for a PagerDuty connector", - "type": "object", - "required": [ - "config", - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_pagerduty" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".pagerduty" - ] - }, - "id": { - "type": "string", - "description": "The identifier for the connector." - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "connector_response_properties_resilient": { - "title": "Connector response properties for a IBM Resilient connector", - "type": "object", - "required": [ - "config", - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_resilient" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".resilient" - ] - }, - "id": { - "type": "string", - "description": "The identifier for the connector." - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "connector_response_properties_serverlog": { - "title": "Connector response properties for a server log connector", - "type": "object", - "required": [ - "config", - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name" - ], - "properties": { - "config": { - "type": "object", - "nullable": true - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".server-log" - ] - }, - "id": { - "type": "string", - "description": "The identifier for the connector." - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "connector_response_properties_servicenow": { - "title": "Connector response properties for a ServiceNow ITSM connector", - "type": "object", - "required": [ - "config", - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_servicenow" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".servicenow" - ] - }, - "id": { - "type": "string", - "description": "The identifier for the connector." - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "connector_response_properties_servicenow_itom": { - "title": "Connector response properties for a ServiceNow ITOM connector", - "type": "object", - "required": [ - "config", - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_servicenow_itom" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".servicenow-itom" - ] - }, - "id": { - "type": "string", - "description": "The identifier for the connector." - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "connector_response_properties_servicenow_sir": { - "title": "Connector response properties for a ServiceNow SecOps connector", - "type": "object", - "required": [ - "config", - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_servicenow" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".servicenow-sir" - ] - }, - "id": { - "type": "string", - "description": "The identifier for the connector." - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "connector_response_properties_slack": { - "title": "Connector response properties for a Slack connector", - "type": "object", - "required": [ - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name" - ], - "properties": { - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".slack" - ] - }, - "id": { - "type": "string", - "description": "The identifier for the connector." - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "connector_response_properties_swimlane": { - "title": "Connector response properties for a Swimlane connector", - "type": "object", - "required": [ - "config", - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_swimlane" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".swimlane" - ] - }, - "id": { - "type": "string", - "description": "The identifier for the connector." - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "connector_response_properties_teams": { - "title": "Connector response properties for a Microsoft Teams connector", - "type": "object", - "required": [ - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name" - ], - "properties": { - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".teams" - ] - }, - "id": { - "type": "string", - "description": "The identifier for the connector." - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "connector_response_properties_tines": { - "title": "Connector response properties for a Tines connector", - "type": "object", - "required": [ - "config", - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_tines" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".tines" - ] - }, - "id": { - "type": "string", - "description": "The identifier for the connector." - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "connector_response_properties_webhook": { - "title": "Connector response properties for a Webhook connector", - "type": "object", - "required": [ - "config", - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_webhook" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".webhook" - ] - }, - "id": { - "type": "string", - "description": "The identifier for the connector." - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "connector_response_properties_xmatters": { - "title": "Connector response properties for an xMatters connector", - "type": "object", - "required": [ - "config", - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_xmatters" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".xmatters" - ] - }, - "id": { - "type": "string", - "description": "The identifier for the connector." - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "connector_response_properties": { - "title": "Connector response properties", - "description": "The properties vary depending on the connector type.", - "oneOf": [ - { - "$ref": "#/components/schemas/connector_response_properties_cases_webhook" - }, - { - "$ref": "#/components/schemas/connector_response_properties_email" - }, - { - "$ref": "#/components/schemas/connector_response_properties_index" - }, - { - "$ref": "#/components/schemas/connector_response_properties_jira" - }, - { - "$ref": "#/components/schemas/connector_response_properties_opsgenie" - }, - { - "$ref": "#/components/schemas/connector_response_properties_pagerduty" - }, - { - "$ref": "#/components/schemas/connector_response_properties_resilient" - }, - { - "$ref": "#/components/schemas/connector_response_properties_serverlog" - }, - { - "$ref": "#/components/schemas/connector_response_properties_servicenow" - }, - { - "$ref": "#/components/schemas/connector_response_properties_servicenow_itom" - }, - { - "$ref": "#/components/schemas/connector_response_properties_servicenow_sir" - }, - { - "$ref": "#/components/schemas/connector_response_properties_slack" - }, - { - "$ref": "#/components/schemas/connector_response_properties_swimlane" - }, - { - "$ref": "#/components/schemas/connector_response_properties_teams" - }, - { - "$ref": "#/components/schemas/connector_response_properties_tines" - }, - { - "$ref": "#/components/schemas/connector_response_properties_webhook" - }, - { - "$ref": "#/components/schemas/connector_response_properties_xmatters" - } - ], - "discriminator": { - "propertyName": "connector_type_id" - } - }, - "update_connector_request_cases_webhook": { - "title": "Update Webhook - Case Managment connector request", - "type": "object", - "required": [ - "config", - "name" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_cases_webhook" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_cases_webhook" - } - } - }, - "update_connector_request_index": { - "title": "Update index connector request", - "type": "object", - "required": [ - "config", - "name" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_index" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "update_connector_request_jira": { - "title": "Update Jira connector request", - "type": "object", - "required": [ - "config", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_jira" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_jira" - } - } - }, - "update_connector_request_opsgenie": { - "title": "Update Opsgenie connector request", - "type": "object", - "required": [ - "config", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_opsgenie" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_opsgenie" - } - } - }, - "update_connector_request_resilient": { - "title": "Update IBM Resilient connector request", - "type": "object", - "required": [ - "config", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_resilient" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_resilient" - } - } - }, - "update_connector_request_serverlog": { - "title": "Update server log connector request", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "description": "The display name for the connector." - } - } - }, - "update_connector_request_servicenow": { - "title": "Update ServiceNow ITSM connector or ServiceNow SecOps request", - "type": "object", - "required": [ - "config", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_servicenow" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_servicenow" - } - } - }, - "update_connector_request_servicenow_itom": { - "title": "Create ServiceNow ITOM connector request", - "type": "object", - "required": [ - "config", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_servicenow_itom" - }, - "name": { - "type": "string", - "description": "The display name for the connector." - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_servicenow" - } - } - }, - "update_connector_request_swimlane": { - "title": "Update Swimlane connector request", - "type": "object", - "required": [ - "config", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_swimlane" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_swimlane" - } - } - }, - "connector_types": { - "title": "Connector types", - "type": "string", - "description": "The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`.", - "enum": [ - ".cases-webhook", - ".email", - ".index", - ".jira", - ".opsgenie", - ".pagerduty", - ".resilient", - ".servicenow", - ".servicenow-itom", - ".servicenow-sir", - ".server-log", - ".slack", - ".swimlane", - ".teams", - ".tines", - ".webhook", - ".xmatters" - ], - "example": ".server-log" - }, - "features": { - "type": "string", - "description": "The feature that uses the connector. Valid values are `alerting`, `cases`, `uptime`, and `siem`.\n", - "enum": [ - "alerting", - "cases", - "uptime", - "siem" - ] - }, - "run_connector_params_documents": { - "title": "Index connector parameters", - "description": "Test an action that indexes a document into Elasticsearch.", - "type": "object", - "required": [ - "documents" - ], - "properties": { - "documents": { - "type": "array", - "description": "The documents in JSON format for index connectors.", - "items": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "run_connector_params_level_message": { - "title": "Server log connector parameters", - "description": "Test an action that writes an entry to the Kibana server log.", - "type": "object", - "required": [ - "message" - ], - "properties": { - "level": { - "type": "string", - "description": "The log level of the message for server log connectors.", - "enum": [ - "debug", - "error", - "fatal", - "info", - "trace", - "warn" - ], - "default": "info" - }, - "message": { - "type": "string", - "description": "The message for server log connectors." - } - } - }, - "run_connector_subaction_addevent": { - "title": "The addEvent subaction", - "type": "object", - "required": [ - "subAction" - ], - "description": "The `addEvent` subaction for ServiceNow ITOM connectors.", - "properties": { - "subAction": { - "type": "string", - "description": "The action to test.", - "enum": [ - "addEvent" - ] - }, - "subActionParams": { - "type": "object", - "description": "The set of configuration properties for the action.", - "properties": { - "additional_info": { - "type": "string", - "description": "Additional information about the event." - }, - "description": { - "type": "string", - "description": "The details about the event." - }, - "event_class": { - "type": "string", - "description": "A specific instance of the source." - }, - "message_key": { - "type": "string", - "description": "All actions sharing this key are associated with the same ServiceNow alert. The default value is `:`." - }, - "metric_name": { - "type": "string", - "description": "The name of the metric." - }, - "node": { - "type": "string", - "description": "The host that the event was triggered for." - }, - "resource": { - "type": "string", - "description": "The name of the resource." - }, - "severity": { - "type": "string", - "description": "The severity of the event." - }, - "source": { - "type": "string", - "description": "The name of the event source type." - }, - "time_of_event": { - "type": "string", - "description": "The time of the event." - }, - "type": { - "type": "string", - "description": "The type of event." - } - } - } - } - }, - "run_connector_subaction_closealert": { - "title": "The closeAlert subaction", - "type": "object", - "required": [ - "subAction", - "subActionParams" - ], - "description": "The `closeAlert` subaction for Opsgenie connectors.", - "properties": { - "subAction": { - "type": "string", - "description": "The action to test.", - "enum": [ - "closeAlert" - ] - }, - "subActionParams": { - "type": "object", - "required": [ - "alias" - ], - "properties": { - "alias": { - "type": "string", - "description": "The unique identifier used for alert deduplication in Opsgenie. The alias must match the value used when creating the alert." - }, - "note": { - "type": "string", - "description": "Additional information for the alert." - }, - "source": { - "type": "string", - "description": "The display name for the source of the alert." - }, - "user": { - "type": "string", - "description": "The display name for the owner." - } - } - } - } - }, - "run_connector_subaction_createalert": { - "title": "The createAlert subaction", - "type": "object", - "required": [ - "subAction", - "subActionParams" - ], - "description": "The `createAlert` subaction for Opsgenie connectors.", - "properties": { - "subAction": { - "type": "string", - "description": "The action to test.", - "enum": [ - "createAlert" - ] - }, - "subActionParams": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "actions": { - "type": "array", - "description": "The custom actions available to the alert.", - "items": { - "type": "string" - } - }, - "alias": { - "type": "string", - "description": "The unique identifier used for alert deduplication in Opsgenie." - }, - "description": { - "type": "string", - "description": "A description that provides detailed information about the alert." - }, - "details": { - "type": "object", - "description": "The custom properties of the alert.", - "additionalProperties": true, - "example": { - "key1": "value1", - "key2": "value2" - } - }, - "entity": { - "type": "string", - "description": "The domain of the alert. For example, the application or server name." - }, - "message": { - "type": "string", - "description": "The alert message." - }, - "note": { - "type": "string", - "description": "Additional information for the alert." - }, - "priority": { - "type": "string", - "description": "The priority level for the alert.", - "enum": [ - "P1", - "P2", - "P3", - "P4", - "P5" - ] - }, - "responders": { - "type": "array", - "description": "The entities to receive notifications about the alert. If `type` is `user`, either `id` or `username` is required. If `type` is `team`, either `id` or `name` is required.\n", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The identifier for the entity." - }, - "name": { - "type": "string", - "description": "The name of the entity." - }, - "type": { - "type": "string", - "description": "The type of responders, in this case `escalation`.", - "enum": [ - "escalation", - "schedule", - "team", - "user" - ] - }, - "username": { - "type": "string", - "description": "A valid email address for the user." - } - } - } - }, - "source": { - "type": "string", - "description": "The display name for the source of the alert." - }, - "tags": { - "type": "array", - "description": "The tags for the alert.", - "items": { - "type": "string" - } - }, - "user": { - "type": "string", - "description": "The display name for the owner." - }, - "visibleTo": { - "type": "array", - "description": "The teams and users that the alert will be visible to without sending a notification. Only one of `id`, `name`, or `username` is required.", - "items": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "id": { - "type": "string", - "description": "The identifier for the entity." - }, - "name": { - "type": "string", - "description": "The name of the entity." - }, - "type": { - "type": "string", - "description": "Valid values are `team` and `user`.", - "enum": [ - "team", - "user" - ] - }, - "username": { - "type": "string", - "description": "The user name. This property is required only when the `type` is `user`." - } - } - } - } - } - } - } - }, - "run_connector_subaction_fieldsbyissuetype": { - "title": "The fieldsByIssueType subaction", - "type": "object", - "required": [ - "subAction", - "subActionParams" - ], - "description": "The `fieldsByIssueType` subaction for Jira connectors.", - "properties": { - "subAction": { - "type": "string", - "description": "The action to test.", - "enum": [ - "fieldsByIssueType" - ] - }, - "subActionParams": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string", - "description": "The Jira issue type identifier.", - "example": 10024 - } - } - } - } - }, - "run_connector_subaction_getchoices": { - "title": "The getChoices subaction", - "type": "object", - "required": [ - "subAction", - "subActionParams" - ], - "description": "The `getChoices` subaction for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors.", - "properties": { - "subAction": { - "type": "string", - "description": "The action to test.", - "enum": [ - "getChoices" - ] - }, - "subActionParams": { - "type": "object", - "description": "The set of configuration properties for the action.", - "required": [ - "fields" - ], - "properties": { - "fields": { - "type": "array", - "description": "An array of fields.", - "items": { - "type": "string" - } - } - } - } - } - }, - "run_connector_subaction_getfields": { - "title": "The getFields subaction", - "type": "object", - "required": [ - "subAction" - ], - "description": "The `getFields` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors.", - "properties": { - "subAction": { - "type": "string", - "description": "The action to test.", - "enum": [ - "getFields" - ] - } - } - }, - "run_connector_subaction_getincident": { - "title": "The getIncident subaction", - "type": "object", - "description": "The `getIncident` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors.", - "required": [ - "subAction", - "subActionParams" - ], - "properties": { - "subAction": { - "type": "string", - "description": "The action to test.", - "enum": [ - "getIncident" - ] - }, - "subActionParams": { - "type": "object", - "required": [ - "externalId" - ], - "properties": { - "externalId": { - "type": "string", - "description": "The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier.", - "example": 71778 - } - } - } - } - }, - "run_connector_subaction_issue": { - "title": "The issue subaction", - "type": "object", - "required": [ - "subAction" - ], - "description": "The `issue` subaction for Jira connectors.", - "properties": { - "subAction": { - "type": "string", - "description": "The action to test.", - "enum": [ - "issue" - ] - }, - "subActionParams": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string", - "description": "The Jira issue identifier.", - "example": 71778 - } - } - } - } - }, - "run_connector_subaction_issues": { - "title": "The issues subaction", - "type": "object", - "required": [ - "subAction", - "subActionParams" - ], - "description": "The `issues` subaction for Jira connectors.", - "properties": { - "subAction": { - "type": "string", - "description": "The action to test.", - "enum": [ - "issues" - ] - }, - "subActionParams": { - "type": "object", - "required": [ - "title" - ], - "properties": { - "title": { - "type": "string", - "description": "The title of the Jira issue." - } - } - } - } - }, - "run_connector_subaction_issuetypes": { - "title": "The issueTypes subaction", - "type": "object", - "required": [ - "subAction" - ], - "description": "The `issueTypes` subaction for Jira connectors.", - "properties": { - "subAction": { - "type": "string", - "description": "The action to test.", - "enum": [ - "issueTypes" - ] - } - } - }, - "run_connector_subaction_pushtoservice": { - "title": "The pushToService subaction", - "type": "object", - "required": [ - "subAction", - "subActionParams" - ], - "description": "The `pushToService` subaction for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors.", - "properties": { - "subAction": { - "type": "string", - "description": "The action to test.", - "enum": [ - "pushToService" - ] - }, - "subActionParams": { - "type": "object", - "description": "The set of configuration properties for the action.", - "properties": { - "comments": { - "type": "array", - "description": "Additional information that is sent to Jira, ServiceNow ITSM, ServiceNow SecOps, or Swimlane.", - "items": { - "type": "object", - "properties": { - "comment": { - "type": "string", - "description": "A comment related to the incident. For example, describe how to troubleshoot the issue." - }, - "commentId": { - "type": "integer", - "description": "A unique identifier for the comment." - } - } - } - }, - "incident": { - "type": "object", - "description": "Information necessary to create or update a Jira, ServiceNow ITSM, ServiveNow SecOps, or Swimlane incident.", - "properties": { - "alertId": { - "type": "string", - "description": "The alert identifier for Swimlane connectors." - }, - "caseId": { - "type": "string", - "description": "The case identifier for the incident for Swimlane connectors." - }, - "caseName": { - "type": "string", - "description": "The case name for the incident for Swimlane connectors." - }, - "category": { - "type": "string", - "description": "The category of the incident for ServiceNow ITSM and ServiceNow SecOps connectors." - }, - "correlation_display": { - "type": "string", - "description": "A descriptive label of the alert for correlation purposes for ServiceNow ITSM and ServiceNow SecOps connectors." - }, - "correlation_id": { - "type": "string", - "description": "The correlation identifier for the security incident for ServiceNow ITSM and ServiveNow SecOps connectors. Connectors using the same correlation ID are associated with the same ServiceNow incident. This value determines whether a new ServiceNow incident is created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the correlation ID value in ServiceNow. The maximum character length for this value is 100 characters. NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that ServiceNow creates a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, ServiceNow creates and continually updates a single incident record for the alert.\n" - }, - "description": { - "type": "string", - "description": "The description of the incident for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors." - }, - "dest_ip": { - "description": "A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident.\n", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "externalId": { - "type": "string", - "description": "The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. If present, the incident is updated. Otherwise, a new incident is created.\n" - }, - "impact": { - "type": "string", - "description": "The impact of the incident for ServiceNow ITSM connectors." - }, - "issueType": { - "type": "integer", - "description": "The type of incident for Jira connectors. For example, 10006. To obtain the list of valid values, set `subAction` to `issueTypes`." - }, - "labels": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The labels for the incident for Jira connectors. NOTE: Labels cannot contain spaces.\n" - }, - "malware_hash": { - "description": "A list of malware hashes related to the security incident for ServiceNow SecOps connectors. The hashes are added as observables to the security incident.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "malware_url": { - "type": "string", - "description": "A list of malware URLs related to the security incident for ServiceNow SecOps connectors. The URLs are added as observables to the security incident.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "parent": { - "type": "string", - "description": "The ID or key of the parent issue for Jira connectors. Applies only to `Sub-task` types of issues." - }, - "priority": { - "type": "string", - "description": "The priority of the incident in Jira and ServiceNow SecOps connectors." - }, - "ruleName": { - "type": "string", - "description": "The rule name for Swimlane connectors." - }, - "severity": { - "type": "string", - "description": "The severity of the incident for ServiceNow ITSM and Swimlane connectors." - }, - "short_description": { - "type": "string", - "description": "A short description of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. It is used for searching the contents of the knowledge base.\n" - }, - "source_ip": { - "description": "A list of source IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "subcategory": { - "type": "string", - "description": "The subcategory of the incident for ServiceNow ITSM and ServiceNow SecOps connectors." - }, - "summary": { - "type": "string", - "description": "A summary of the incident for Jira connectors." - }, - "title": { - "type": "string", - "description": "A title for the incident for Jira connectors. It is used for searching the contents of the knowledge base.\n" - }, - "urgency": { - "type": "string", - "description": "The urgency of the incident for ServiceNow ITSM connectors." - } - } - } - } - } - } - }, - "action_response_properties": { - "title": "Action response properties", - "description": "The properties vary depending on the action type.", - "type": "object", - "properties": { - "actionTypeId": { - "type": "string" - }, - "config": { - "type": "object" - }, - "id": { - "type": "string" - }, - "isDeprecated": { - "type": "boolean", - "description": "Indicates whether the action type is deprecated." - }, - "isMissingSecrets": { - "type": "boolean", - "description": "Indicates whether secrets are missing for the action." - }, - "isPreconfigured": { - "type": "boolean", - "description": "Indicates whether it is a preconfigured action." - }, - "name": { - "type": "string" - } - } - } - }, - "examples": { - "create_index_connector_request": { - "summary": "Create an index connector.", - "value": { - "name": "my-connector", - "connector_type_id": ".index", - "config": { - "index": "test-index" - } - } - }, - "create_index_connector_response": { - "summary": "A new index connector.", - "value": { - "id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad", - "connector_type_id": ".index", - "name": "my-connector", - "config": { - "index": "test-index", - "refresh": false, - "executionTimeField": null - }, - "is_preconfigured": false, - "is_deprecated": false, - "is_missing_secrets": false - } - }, - "get_connector_response": { - "summary": "A list of connector types", - "value": { - "id": "df770e30-8b8b-11ed-a780-3b746c987a81", - "name": "my_server_log_connector", - "config": {}, - "connector_type_id": ".server-log", - "is_preconfigured": false, - "is_deprecated": false, - "is_missing_secrets": false - } - }, - "update_index_connector_request": { - "summary": "Update an index connector.", - "value": { - "name": "updated-connector", - "config": { - "index": "updated-index" - } - } - }, - "get_connectors_response": { - "summary": "A list of connectors", - "value": [ - { - "id": "preconfigured-email-connector", - "name": "my-preconfigured-email-notification", - "connector_type_id": ".email", - "is_preconfigured": true, - "is_deprecated": false, - "referenced_by_count": 0 - }, - { - "id": "e07d0c80-8b8b-11ed-a780-3b746c987a81", - "name": "my-index-connector", - "config": { - "index": "test-index", - "refresh": false, - "executionTimeField": null - }, - "connector_type_id": ".index", - "is_preconfigured": false, - "is_deprecated": false, - "referenced_by_count": 2, - "is_missing_secrets": false - } - ] - }, - "get_connector_types_response": { - "summary": "A list of connector types", - "value": [ - { - "id": ".swimlane", - "name": "Swimlane", - "enabled": true, - "enabled_in_config": true, - "enabled_in_license": true, - "minimum_license_required": "gold", - "supported_feature_ids": [ - "alerting", - "cases", - "siem" - ] - }, - { - "id": ".index", - "name": "Index", - "enabled": true, - "enabled_in_config": true, - "enabled_in_license": true, - "minimum_license_required": "basic", - "supported_feature_ids": [ - "alerting", - "uptime", - "siem" - ] - }, - { - "id": ".server-log", - "name": "Server log", - "enabled": true, - "enabled_in_config": true, - "enabled_in_license": true, - "minimum_license_required": "basic", - "supported_feature_ids": [ - "alerting", - "uptime" - ] - } - ] - }, - "run_index_connector_request": { - "summary": "Run an index connector.", - "value": { - "params": { - "documents": [ - { - "id": "my_doc_id", - "name": "my_doc_name", - "message": "hello, world" - } - ] - } - } - }, - "run_jira_connector_request": { - "summary": "Run a Jira connector to retrieve the list of issue types.", - "value": { - "params": { - "subAction": "issueTypes" - } - } - }, - "run_server_log_connector_request": { - "summary": "Run a server log connector.", - "value": { - "params": { - "level": "warn", - "message": "Test warning message." - } - } - }, - "run_servicenow_itom_connector_request": { - "summary": "Run a ServiceNow ITOM connector to retrieve the list of choices.", - "value": { - "params": { - "subAction": "getChoices", - "subActionParams": { - "fields": [ - "severity", - "urgency" - ] - } - } - } - }, - "run_swimlane_connector_request": { - "summary": "Run a Swimlane connector to create an incident.", - "value": { - "params": { - "subAction": "pushToService", - "subActionParams": { - "comments": [ - { - "commentId": 1, - "comment": "A comment about the incident." - } - ], - "incident": { - "caseId": "1000", - "caseName": "Case name", - "description": "Description of the incident." - } - } - } - } - }, - "run_index_connector_response": { - "summary": "Response from running an index connector.", - "value": { - "connector_id": "fd38c600-96a5-11ed-bb79-353b74189cba", - "data": { - "errors": false, - "items": [ - { - "create": { - "_id": "4JtvwYUBrcyxt2NnfW3y", - "_index": "my-index", - "_primary_term": 1, - "_seq_no": 0, - "_shards": { - "failed": 0, - "successful": 1, - "total": 2 - }, - "_version": 1, - "result": "created", - "status": 201 - } - } - ], - "took": 135 - }, - "status": "ok" - } - }, - "run_jira_connector_response": { - "summary": "Response from retrieving the list of issue types for a Jira connector.", - "value": { - "connector_id": "b3aad810-edbe-11ec-82d1-11348ecbf4a6", - "data": [ - { - "id": 10024, - "name": "Improvement" - }, - { - "id": 10006, - "name": "Task" - }, - { - "id": 10007, - "name": "Sub-task" - }, - { - "id": 10025, - "name": "New Feature" - }, - { - "id": 10023, - "name": "Bug" - }, - { - "id": 10000, - "name": "Epic" - } - ], - "status": "ok" - } - }, - "run_server_log_connector_response": { - "summary": "Response from running a server log connector.", - "value": { - "connector_id": "7fc7b9a0-ecc9-11ec-8736-e7d63118c907", - "status": "ok" - } - }, - "run_servicenow_itom_connector_response": { - "summary": "Response from retrieving the list of choices for a ServiceNow ITOM connector.", - "value": { - "connector_id": "9d9be270-2fd2-11ed-b0e0-87533c532698", - "data": [ - { - "dependent_value": "", - "element": "severity", - "label": "Critical", - "value": 1 - }, - { - "dependent_value": "", - "element": "severity", - "label": "Major", - "value": 2 - }, - { - "dependent_value": "", - "element": "severity", - "label": "Minor", - "value": 3 - }, - { - "dependent_value": "", - "element": "severity", - "label": "Warning", - "value": 4 - }, - { - "dependent_value": "", - "element": "severity", - "label": "OK", - "value": 5 - }, - { - "dependent_value": "", - "element": "severity", - "label": "Clear", - "value": 0 - }, - { - "dependent_value": "", - "element": "urgency", - "label": "1 - High", - "value": 1 - }, - { - "dependent_value": "", - "element": "urgency", - "label": "2 - Medium", - "value": 2 - }, - { - "dependent_value": "", - "element": "urgency", - "label": "3 - Low", - "value": 3 - } - ], - "status": "ok" - } - }, - "run_swimlane_connector_response": { - "summary": "Response from creating a Swimlane incident.", - "value": { - "connector_id": "a4746470-2f94-11ed-b0e0-87533c532698", - "data": { - "id": "aKPmBHWzmdRQtx6Mx", - "title": "TEST-457", - "url": "https://elastic.swimlane.url.us/record/aNcL2xniGHGpa2AHb/aKPmBHWzmdRQtx6Mx", - "pushedDate": "2022-09-08T16:52:27.866Z", - "comments": [ - { - "commentId": 1, - "pushedDate": "2022-09-08T16:52:27.865Z" - } - ] - }, - "status": "ok" - } - } - }, - "responses": { - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Unauthorized response", - "properties": { - "error": { - "type": "string", - "example": "Unauthorized", - "enum": [ - "Unauthorized" - ] - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "integer", - "example": 401, - "enum": [ - 401 - ] - } - } - } - } - } - }, - "404": { - "description": "Object is not found.", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Not found response", - "properties": { - "error": { - "type": "string", - "example": "Not Found", - "enum": [ - "Not Found" - ] - }, - "message": { - "type": "string", - "example": "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found" - }, - "statusCode": { - "type": "integer", - "example": 404, - "enum": [ - 404 - ] - } - } - } - } - } - }, - "200_actions": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/action_response_properties" - } - } - } - } - } - }, - "security": [ - { - "basicAuth": [] - }, - { - "apiKeyAuth": [] - } - ] -} \ No newline at end of file diff --git a/generated/kibanaactions/client.go b/generated/kibanaactions/client.go index 1bfbc80ed..89b6b4ada 100644 --- a/generated/kibanaactions/client.go +++ b/generated/kibanaactions/client.go @@ -1,13 +1,11 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions import ( @@ -18,10 +16,8 @@ import ( "errors" "fmt" "io" - "log" "mime/multipart" "net/http" - "net/http/httputil" "net/url" "os" "path/filepath" @@ -31,13 +27,13 @@ import ( "strings" "time" "unicode/utf8" + + "golang.org/x/oauth2" ) var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") + jsonCheck = regexp.MustCompile("(?i:[application|text]/json)") + xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)") ) // APIClient manages communication with the Connectors API v0.1 @@ -48,7 +44,7 @@ type APIClient struct { // API Services - ConnectorsApi ConnectorsApi + ConnectorsApi *ConnectorsApiService } type service struct { @@ -100,10 +96,10 @@ func selectHeaderAccept(accepts []string) string { return strings.Join(accepts, ",") } -// contains is a case insensitive match, finding needle in a haystack +// contains is a case insenstive match, finding needle in a haystack func contains(haystack []string, needle string) bool { for _, a := range haystack { - if strings.EqualFold(a, needle) { + if strings.ToLower(a) == strings.ToLower(needle) { return true } } @@ -119,157 +115,41 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { // Check the type is as expected. if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) } return nil } -func parameterValueToString(obj interface{}, key string) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param, ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap, err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} +// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. +func parameterToString(obj interface{}, collectionFormat string) string { + var delimiter string -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t, ok := obj.(MappedNullable); ok { - dataMap, err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i := 0; i < lenIndValue; i++ { - var arrayValue = indValue.Index(i) - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType) - } - return - - case reflect.Map: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - iter := indValue.MapRange() - for iter.Next() { - k, v := iter.Key(), iter.Value() - parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType) - } - return - - case reflect.Interface: - fallthrough - case reflect.Ptr: - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType) - return - - case reflect.Int, reflect.Int8, reflect.Int16, - reflect.Int32, reflect.Int64: - value = strconv.FormatInt(v.Int(), 10) - case reflect.Uint, reflect.Uint8, reflect.Uint16, - reflect.Uint32, reflect.Uint64, reflect.Uintptr: - value = strconv.FormatUint(v.Uint(), 10) - case reflect.Float32, reflect.Float64: - value = strconv.FormatFloat(v.Float(), 'g', -1, 32) - case reflect.Bool: - value = strconv.FormatBool(v.Bool()) - case reflect.String: - value = v.String() - default: - value = v.Type().String() + " value" - } + switch collectionFormat { + case "pipes": + delimiter = "|" + case "ssv": + delimiter = " " + case "tsv": + delimiter = "\t" + case "csv": + delimiter = "," } - switch valuesMap := headerOrQueryParams.(type) { - case url.Values: - if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { - valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) - } else { - valuesMap.Add(keyPrefix, value) - } - break - case map[string]string: - valuesMap[keyPrefix] = value - break + if reflect.TypeOf(obj).Kind() == reflect.Slice { + return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") } -} -// helper for converting interface{} parameters to json strings -func parameterToJson(obj interface{}) (string, error) { - jsonBuf, err := json.Marshal(obj) - if err != nil { - return "", err - } - return string(jsonBuf), err + return fmt.Sprintf("%v", obj) } // callAPI do the request. func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { - if c.cfg.Debug { - dump, err := httputil.DumpRequestOut(request, true) - if err != nil { - return nil, err - } - log.Printf("\n%s\n", string(dump)) - } - - resp, err := c.cfg.HTTPClient.Do(request) - if err != nil { - return resp, err - } - - if c.cfg.Debug { - dump, err := httputil.DumpResponse(resp, true) - if err != nil { - return resp, err - } - log.Printf("\n%s\n", string(dump)) - } - return resp, err + return c.cfg.HTTPClient.Do(request) } -// Allow modification of underlying config for alternate implementations and testing -// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior -func (c *APIClient) GetConfig() *Configuration { - return c.cfg -} - -type formFile struct { - fileBytes []byte - fileName string - formFileName string +// Change base path to allow switching to mocks +func (c *APIClient) ChangeBasePath(path string) { + c.cfg.BasePath = path } // prepareRequest build the request @@ -280,7 +160,8 @@ func (c *APIClient) prepareRequest( headerParams map[string]string, queryParams url.Values, formParams url.Values, - formFiles []formFile) (localVarRequest *http.Request, err error) { + fileName string, + fileBytes []byte) (localVarRequest *http.Request, err error) { var body *bytes.Buffer @@ -299,7 +180,7 @@ func (c *APIClient) prepareRequest( } // add form parameters and file if available. - if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { if body != nil { return nil, errors.New("Cannot specify postBody and multipart form at the same time.") } @@ -318,23 +199,21 @@ func (c *APIClient) prepareRequest( } } } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } + if len(fileBytes) > 0 && fileName != "" { + w.Boundary() + //_, fileNm := filepath.Split(fileName) + part, err := w.CreateFormFile("file", filepath.Base(fileName)) + if err != nil { + return nil, err } + _, err = part.Write(fileBytes) + if err != nil { + return nil, err + } + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() } - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - // Set Content-Length headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) w.Close() @@ -356,16 +235,6 @@ func (c *APIClient) prepareRequest( return nil, err } - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - // Adding Query Param query := url.Query() for k, v := range queryParams { @@ -375,11 +244,7 @@ func (c *APIClient) prepareRequest( } // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) + url.RawQuery = query.Encode() // Generate a new request if body != nil { @@ -395,11 +260,16 @@ func (c *APIClient) prepareRequest( if len(headerParams) > 0 { headers := http.Header{} for h, v := range headerParams { - headers[h] = []string{v} + headers.Set(h, v) } localVarRequest.Header = headers } + // Override request host, if applicable + if c.cfg.Host != "" { + localVarRequest.Host = c.cfg.Host + } + // Add the user agent to the request. localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) @@ -409,67 +279,43 @@ func (c *APIClient) prepareRequest( // Walk through any authentication. + // OAuth2 authentication + if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { + // We were able to grab an oauth2 token from the context + var latestToken *oauth2.Token + if latestToken, err = tok.Token(); err != nil { + return nil, err + } + + latestToken.SetAuthHeader(localVarRequest) + } + // Basic HTTP Authentication if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { localVarRequest.SetBasicAuth(auth.UserName, auth.Password) } + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } } for header, value := range c.cfg.DefaultHeader { localVarRequest.Header.Add(header, value) } + return localVarRequest, nil } func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { + if strings.Contains(contentType, "application/xml") { if err = xml.Unmarshal(b, v); err != nil { return err } return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model + } else if strings.Contains(contentType, "application/json") { + if err = json.Unmarshal(b, v); err != nil { return err } return nil @@ -479,14 +325,11 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err // Add a file to the multipart request func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() + file, err := os.Open(path) if err != nil { return err } + defer file.Close() part, err := w.CreateFormFile(fieldName, filepath.Base(path)) if err != nil { @@ -502,13 +345,6 @@ func reportError(format string, a ...interface{}) error { return fmt.Errorf(format, a...) } -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - // Set request body from an interface{} func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { if bodyBuf == nil { @@ -517,8 +353,6 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e if reader, ok := body.(io.Reader); ok { _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) } else if b, ok := body.([]byte); ok { _, err = bodyBuf.Write(b) } else if s, ok := body.(string); ok { @@ -528,7 +362,7 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e } else if jsonCheck.MatchString(contentType) { err = json.NewEncoder(bodyBuf).Encode(body) } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) + xml.NewEncoder(bodyBuf).Encode(body) } if err != nil { @@ -536,7 +370,7 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e } if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) + err = fmt.Errorf("Invalid body type %s\n", contentType) return nil, err } return bodyBuf, nil @@ -598,9 +432,8 @@ func CacheExpires(r *http.Response) time.Time { lifetime, err := time.ParseDuration(maxAge + "s") if err != nil { expires = now - } else { - expires = now.Add(lifetime) } + expires = now.Add(lifetime) } else { expiresHeader := r.Header.Get("Expires") if expiresHeader != "" { @@ -617,43 +450,24 @@ func strlen(s string) int { return utf8.RuneCountInString(s) } -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { +// GenericSwaggerError Provides access to the body, error and model on returned errors. +type GenericSwaggerError struct { body []byte error string model interface{} } // Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { +func (e GenericSwaggerError) Error() string { return e.error } // Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { +func (e GenericSwaggerError) Body() []byte { return e.body } // Model returns the unpacked model of the error -func (e GenericOpenAPIError) Model() interface{} { +func (e GenericSwaggerError) Model() interface{} { return e.model } - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - - // status title (detail) - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/generated/kibanaactions/configuration.go b/generated/kibanaactions/configuration.go index 493a7a22a..7f604985d 100644 --- a/generated/kibanaactions/configuration.go +++ b/generated/kibanaactions/configuration.go @@ -1,20 +1,15 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions import ( - "context" - "fmt" "net/http" - "strings" ) // contextKeys are used to identify the type of value in the context. @@ -28,23 +23,17 @@ func (c contextKey) String() string { } var ( + // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. + ContextOAuth2 = contextKey("token") + // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") - // ContextAPIKeys takes a string apikey as authentication for the request - ContextAPIKeys = contextKey("apiKeys") - - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") + // ContextAPIKey takes an APIKey as authentication for the request + ContextAPIKey = contextKey("apikey") ) // BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth @@ -59,247 +48,24 @@ type APIKey struct { Prefix string } -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client + BasePath string `json:"basePath,omitempty"` + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + HTTPClient *http.Client } -// NewConfiguration returns a new Configuration object func NewConfiguration() *Configuration { cfg := &Configuration{ + BasePath: "http://localhost:5601", DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "http://localhost:5601", - Description: "local", - }, - }, - OperationServers: map[string]ServerConfigurations{ - "ConnectorsApiService.CreateConnector": { - { - URL: "https://localhost:5601", - Description: "No description provided", - }, - }, - "ConnectorsApiService.DeleteConnector": { - { - URL: "https://localhost:5601", - Description: "No description provided", - }, - }, - "ConnectorsApiService.GetConnector": { - { - URL: "https://localhost:5601", - Description: "No description provided", - }, - }, - "ConnectorsApiService.GetConnectorTypes": { - { - URL: "https://localhost:5601", - Description: "No description provided", - }, - }, - "ConnectorsApiService.GetConnectors": { - { - URL: "https://localhost:5601", - Description: "No description provided", - }, - }, - "ConnectorsApiService.LegacyCreateConnector": { - { - URL: "https://localhost:5601", - Description: "No description provided", - }, - }, - "ConnectorsApiService.LegacyDeleteConnector": { - { - URL: "https://localhost:5601", - Description: "No description provided", - }, - }, - "ConnectorsApiService.LegacyGetConnector": { - { - URL: "https://localhost:5601", - Description: "No description provided", - }, - }, - "ConnectorsApiService.LegacyGetConnectorTypes": { - { - URL: "https://localhost:5601", - Description: "No description provided", - }, - }, - "ConnectorsApiService.LegacyGetConnectors": { - { - URL: "https://localhost:5601", - Description: "No description provided", - }, - }, - "ConnectorsApiService.LegacyRunConnector": { - { - URL: "https://localhost:5601", - Description: "No description provided", - }, - }, - "ConnectorsApiService.LegacyUpdateConnector": { - { - URL: "https://localhost:5601", - Description: "No description provided", - }, - }, - "ConnectorsApiService.RunConnector": { - { - URL: "https://localhost:5601", - Description: "No description provided", - }, - }, - "ConnectorsApiService.UpdateConnector": { - { - URL: "https://localhost:5601", - Description: "No description provided", - }, - }, - }, + UserAgent: "Swagger-Codegen/1.0.0/go", } return cfg } -// AddDefaultHeader adds a new HTTP header to the default header in the request func (c *Configuration) AddDefaultHeader(key string, value string) { c.DefaultHeader[key] = value } - -// URL formats template on a index using given variables -func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { - if index < 0 || len(sc) <= index { - return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) - } - url = strings.Replace(url, "{"+name+"}", value, -1) - } else { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/generated/kibanaactions/docs/ActionResponseProperties.md b/generated/kibanaactions/docs/ActionResponseProperties.md index f85473696..4959074c9 100644 --- a/generated/kibanaactions/docs/ActionResponseProperties.md +++ b/generated/kibanaactions/docs/ActionResponseProperties.md @@ -1,212 +1,15 @@ # ActionResponseProperties ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ActionTypeId** | Pointer to **string** | | [optional] -**Config** | Pointer to **map[string]interface{}** | | [optional] -**Id** | Pointer to **string** | | [optional] -**IsDeprecated** | Pointer to **bool** | Indicates whether the action type is deprecated. | [optional] -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the action. | [optional] -**IsPreconfigured** | Pointer to **bool** | Indicates whether it is a preconfigured action. | [optional] -**Name** | Pointer to **string** | | [optional] - -## Methods - -### NewActionResponseProperties - -`func NewActionResponseProperties() *ActionResponseProperties` - -NewActionResponseProperties instantiates a new ActionResponseProperties object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewActionResponsePropertiesWithDefaults - -`func NewActionResponsePropertiesWithDefaults() *ActionResponseProperties` - -NewActionResponsePropertiesWithDefaults instantiates a new ActionResponseProperties object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetActionTypeId - -`func (o *ActionResponseProperties) GetActionTypeId() string` - -GetActionTypeId returns the ActionTypeId field if non-nil, zero value otherwise. - -### GetActionTypeIdOk - -`func (o *ActionResponseProperties) GetActionTypeIdOk() (*string, bool)` - -GetActionTypeIdOk returns a tuple with the ActionTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetActionTypeId - -`func (o *ActionResponseProperties) SetActionTypeId(v string)` - -SetActionTypeId sets ActionTypeId field to given value. - -### HasActionTypeId - -`func (o *ActionResponseProperties) HasActionTypeId() bool` - -HasActionTypeId returns a boolean if a field has been set. - -### GetConfig - -`func (o *ActionResponseProperties) GetConfig() map[string]interface{}` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *ActionResponseProperties) GetConfigOk() (*map[string]interface{}, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *ActionResponseProperties) SetConfig(v map[string]interface{})` - -SetConfig sets Config field to given value. - -### HasConfig - -`func (o *ActionResponseProperties) HasConfig() bool` - -HasConfig returns a boolean if a field has been set. - -### GetId - -`func (o *ActionResponseProperties) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ActionResponseProperties) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ActionResponseProperties) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *ActionResponseProperties) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetIsDeprecated - -`func (o *ActionResponseProperties) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ActionResponseProperties) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ActionResponseProperties) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - -### HasIsDeprecated - -`func (o *ActionResponseProperties) HasIsDeprecated() bool` - -HasIsDeprecated returns a boolean if a field has been set. - -### GetIsMissingSecrets - -`func (o *ActionResponseProperties) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ActionResponseProperties) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ActionResponseProperties) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ActionResponseProperties) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ActionResponseProperties) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ActionResponseProperties) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ActionResponseProperties) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - -### HasIsPreconfigured - -`func (o *ActionResponseProperties) HasIsPreconfigured() bool` - -HasIsPreconfigured returns a boolean if a field has been set. - -### GetName - -`func (o *ActionResponseProperties) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ActionResponseProperties) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ActionResponseProperties) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *ActionResponseProperties) HasName() bool` - -HasName returns a boolean if a field has been set. - +**ActionTypeId** | **string** | | [optional] [default to null] +**Config** | [***interface{}**](interface{}.md) | | [optional] [default to null] +**Id** | **string** | | [optional] [default to null] +**IsDeprecated** | **bool** | Indicates whether the action type is deprecated. | [optional] [default to null] +**IsMissingSecrets** | **bool** | Indicates whether secrets are missing for the action. | [optional] [default to null] +**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured action. | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/AlertIdentifierMapping.md b/generated/kibanaactions/docs/AlertIdentifierMapping.md index 9a5c1898e..3847fccfb 100644 --- a/generated/kibanaactions/docs/AlertIdentifierMapping.md +++ b/generated/kibanaactions/docs/AlertIdentifierMapping.md @@ -1,114 +1,12 @@ # AlertIdentifierMapping ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**FieldType** | **string** | The type of field in Swimlane. | -**Id** | **string** | The identifier for the field in Swimlane. | -**Key** | **string** | The key for the field in Swimlane. | -**Name** | **string** | The name of the field in Swimlane. | - -## Methods - -### NewAlertIdentifierMapping - -`func NewAlertIdentifierMapping(fieldType string, id string, key string, name string, ) *AlertIdentifierMapping` - -NewAlertIdentifierMapping instantiates a new AlertIdentifierMapping object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewAlertIdentifierMappingWithDefaults - -`func NewAlertIdentifierMappingWithDefaults() *AlertIdentifierMapping` - -NewAlertIdentifierMappingWithDefaults instantiates a new AlertIdentifierMapping object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetFieldType - -`func (o *AlertIdentifierMapping) GetFieldType() string` - -GetFieldType returns the FieldType field if non-nil, zero value otherwise. - -### GetFieldTypeOk - -`func (o *AlertIdentifierMapping) GetFieldTypeOk() (*string, bool)` - -GetFieldTypeOk returns a tuple with the FieldType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFieldType - -`func (o *AlertIdentifierMapping) SetFieldType(v string)` - -SetFieldType sets FieldType field to given value. - - -### GetId - -`func (o *AlertIdentifierMapping) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *AlertIdentifierMapping) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *AlertIdentifierMapping) SetId(v string)` - -SetId sets Id field to given value. - - -### GetKey - -`func (o *AlertIdentifierMapping) GetKey() string` - -GetKey returns the Key field if non-nil, zero value otherwise. - -### GetKeyOk - -`func (o *AlertIdentifierMapping) GetKeyOk() (*string, bool)` - -GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKey - -`func (o *AlertIdentifierMapping) SetKey(v string)` - -SetKey sets Key field to given value. - - -### GetName - -`func (o *AlertIdentifierMapping) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *AlertIdentifierMapping) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *AlertIdentifierMapping) SetName(v string)` - -SetName sets Name field to given value. - - +**FieldType** | **string** | The type of field in Swimlane. | [default to null] +**Id** | **string** | The identifier for the field in Swimlane. | [default to null] +**Key** | **string** | The key for the field in Swimlane. | [default to null] +**Name** | **string** | The name of the field in Swimlane. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CaseCommentMapping.md b/generated/kibanaactions/docs/CaseCommentMapping.md index cb47fa08c..20e6aea5e 100644 --- a/generated/kibanaactions/docs/CaseCommentMapping.md +++ b/generated/kibanaactions/docs/CaseCommentMapping.md @@ -1,114 +1,12 @@ # CaseCommentMapping ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**FieldType** | **string** | The type of field in Swimlane. | -**Id** | **string** | The identifier for the field in Swimlane. | -**Key** | **string** | The key for the field in Swimlane. | -**Name** | **string** | The name of the field in Swimlane. | - -## Methods - -### NewCaseCommentMapping - -`func NewCaseCommentMapping(fieldType string, id string, key string, name string, ) *CaseCommentMapping` - -NewCaseCommentMapping instantiates a new CaseCommentMapping object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCaseCommentMappingWithDefaults - -`func NewCaseCommentMappingWithDefaults() *CaseCommentMapping` - -NewCaseCommentMappingWithDefaults instantiates a new CaseCommentMapping object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetFieldType - -`func (o *CaseCommentMapping) GetFieldType() string` - -GetFieldType returns the FieldType field if non-nil, zero value otherwise. - -### GetFieldTypeOk - -`func (o *CaseCommentMapping) GetFieldTypeOk() (*string, bool)` - -GetFieldTypeOk returns a tuple with the FieldType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFieldType - -`func (o *CaseCommentMapping) SetFieldType(v string)` - -SetFieldType sets FieldType field to given value. - - -### GetId - -`func (o *CaseCommentMapping) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *CaseCommentMapping) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *CaseCommentMapping) SetId(v string)` - -SetId sets Id field to given value. - - -### GetKey - -`func (o *CaseCommentMapping) GetKey() string` - -GetKey returns the Key field if non-nil, zero value otherwise. - -### GetKeyOk - -`func (o *CaseCommentMapping) GetKeyOk() (*string, bool)` - -GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKey - -`func (o *CaseCommentMapping) SetKey(v string)` - -SetKey sets Key field to given value. - - -### GetName - -`func (o *CaseCommentMapping) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CaseCommentMapping) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CaseCommentMapping) SetName(v string)` - -SetName sets Name field to given value. - - +**FieldType** | **string** | The type of field in Swimlane. | [default to null] +**Id** | **string** | The identifier for the field in Swimlane. | [default to null] +**Key** | **string** | The key for the field in Swimlane. | [default to null] +**Name** | **string** | The name of the field in Swimlane. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CaseDescriptionMapping.md b/generated/kibanaactions/docs/CaseDescriptionMapping.md index 6771caef9..8cf63591b 100644 --- a/generated/kibanaactions/docs/CaseDescriptionMapping.md +++ b/generated/kibanaactions/docs/CaseDescriptionMapping.md @@ -1,114 +1,12 @@ # CaseDescriptionMapping ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**FieldType** | **string** | The type of field in Swimlane. | -**Id** | **string** | The identifier for the field in Swimlane. | -**Key** | **string** | The key for the field in Swimlane. | -**Name** | **string** | The name of the field in Swimlane. | - -## Methods - -### NewCaseDescriptionMapping - -`func NewCaseDescriptionMapping(fieldType string, id string, key string, name string, ) *CaseDescriptionMapping` - -NewCaseDescriptionMapping instantiates a new CaseDescriptionMapping object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCaseDescriptionMappingWithDefaults - -`func NewCaseDescriptionMappingWithDefaults() *CaseDescriptionMapping` - -NewCaseDescriptionMappingWithDefaults instantiates a new CaseDescriptionMapping object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetFieldType - -`func (o *CaseDescriptionMapping) GetFieldType() string` - -GetFieldType returns the FieldType field if non-nil, zero value otherwise. - -### GetFieldTypeOk - -`func (o *CaseDescriptionMapping) GetFieldTypeOk() (*string, bool)` - -GetFieldTypeOk returns a tuple with the FieldType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFieldType - -`func (o *CaseDescriptionMapping) SetFieldType(v string)` - -SetFieldType sets FieldType field to given value. - - -### GetId - -`func (o *CaseDescriptionMapping) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *CaseDescriptionMapping) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *CaseDescriptionMapping) SetId(v string)` - -SetId sets Id field to given value. - - -### GetKey - -`func (o *CaseDescriptionMapping) GetKey() string` - -GetKey returns the Key field if non-nil, zero value otherwise. - -### GetKeyOk - -`func (o *CaseDescriptionMapping) GetKeyOk() (*string, bool)` - -GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKey - -`func (o *CaseDescriptionMapping) SetKey(v string)` - -SetKey sets Key field to given value. - - -### GetName - -`func (o *CaseDescriptionMapping) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CaseDescriptionMapping) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CaseDescriptionMapping) SetName(v string)` - -SetName sets Name field to given value. - - +**FieldType** | **string** | The type of field in Swimlane. | [default to null] +**Id** | **string** | The identifier for the field in Swimlane. | [default to null] +**Key** | **string** | The key for the field in Swimlane. | [default to null] +**Name** | **string** | The name of the field in Swimlane. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CaseIdentifierMapping.md b/generated/kibanaactions/docs/CaseIdentifierMapping.md index a639b3227..1f0ec419d 100644 --- a/generated/kibanaactions/docs/CaseIdentifierMapping.md +++ b/generated/kibanaactions/docs/CaseIdentifierMapping.md @@ -1,114 +1,12 @@ # CaseIdentifierMapping ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**FieldType** | **string** | The type of field in Swimlane. | -**Id** | **string** | The identifier for the field in Swimlane. | -**Key** | **string** | The key for the field in Swimlane. | -**Name** | **string** | The name of the field in Swimlane. | - -## Methods - -### NewCaseIdentifierMapping - -`func NewCaseIdentifierMapping(fieldType string, id string, key string, name string, ) *CaseIdentifierMapping` - -NewCaseIdentifierMapping instantiates a new CaseIdentifierMapping object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCaseIdentifierMappingWithDefaults - -`func NewCaseIdentifierMappingWithDefaults() *CaseIdentifierMapping` - -NewCaseIdentifierMappingWithDefaults instantiates a new CaseIdentifierMapping object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetFieldType - -`func (o *CaseIdentifierMapping) GetFieldType() string` - -GetFieldType returns the FieldType field if non-nil, zero value otherwise. - -### GetFieldTypeOk - -`func (o *CaseIdentifierMapping) GetFieldTypeOk() (*string, bool)` - -GetFieldTypeOk returns a tuple with the FieldType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFieldType - -`func (o *CaseIdentifierMapping) SetFieldType(v string)` - -SetFieldType sets FieldType field to given value. - - -### GetId - -`func (o *CaseIdentifierMapping) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *CaseIdentifierMapping) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *CaseIdentifierMapping) SetId(v string)` - -SetId sets Id field to given value. - - -### GetKey - -`func (o *CaseIdentifierMapping) GetKey() string` - -GetKey returns the Key field if non-nil, zero value otherwise. - -### GetKeyOk - -`func (o *CaseIdentifierMapping) GetKeyOk() (*string, bool)` - -GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKey - -`func (o *CaseIdentifierMapping) SetKey(v string)` - -SetKey sets Key field to given value. - - -### GetName - -`func (o *CaseIdentifierMapping) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CaseIdentifierMapping) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CaseIdentifierMapping) SetName(v string)` - -SetName sets Name field to given value. - - +**FieldType** | **string** | The type of field in Swimlane. | [default to null] +**Id** | **string** | The identifier for the field in Swimlane. | [default to null] +**Key** | **string** | The key for the field in Swimlane. | [default to null] +**Name** | **string** | The name of the field in Swimlane. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CaseNameMapping.md b/generated/kibanaactions/docs/CaseNameMapping.md index b5a52679a..ff242d7c0 100644 --- a/generated/kibanaactions/docs/CaseNameMapping.md +++ b/generated/kibanaactions/docs/CaseNameMapping.md @@ -1,114 +1,12 @@ # CaseNameMapping ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**FieldType** | **string** | The type of field in Swimlane. | -**Id** | **string** | The identifier for the field in Swimlane. | -**Key** | **string** | The key for the field in Swimlane. | -**Name** | **string** | The name of the field in Swimlane. | - -## Methods - -### NewCaseNameMapping - -`func NewCaseNameMapping(fieldType string, id string, key string, name string, ) *CaseNameMapping` - -NewCaseNameMapping instantiates a new CaseNameMapping object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCaseNameMappingWithDefaults - -`func NewCaseNameMappingWithDefaults() *CaseNameMapping` - -NewCaseNameMappingWithDefaults instantiates a new CaseNameMapping object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetFieldType - -`func (o *CaseNameMapping) GetFieldType() string` - -GetFieldType returns the FieldType field if non-nil, zero value otherwise. - -### GetFieldTypeOk - -`func (o *CaseNameMapping) GetFieldTypeOk() (*string, bool)` - -GetFieldTypeOk returns a tuple with the FieldType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFieldType - -`func (o *CaseNameMapping) SetFieldType(v string)` - -SetFieldType sets FieldType field to given value. - - -### GetId - -`func (o *CaseNameMapping) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *CaseNameMapping) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *CaseNameMapping) SetId(v string)` - -SetId sets Id field to given value. - - -### GetKey - -`func (o *CaseNameMapping) GetKey() string` - -GetKey returns the Key field if non-nil, zero value otherwise. - -### GetKeyOk - -`func (o *CaseNameMapping) GetKeyOk() (*string, bool)` - -GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKey - -`func (o *CaseNameMapping) SetKey(v string)` - -SetKey sets Key field to given value. - - -### GetName - -`func (o *CaseNameMapping) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CaseNameMapping) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CaseNameMapping) SetName(v string)` - -SetName sets Name field to given value. - - +**FieldType** | **string** | The type of field in Swimlane. | [default to null] +**Id** | **string** | The identifier for the field in Swimlane. | [default to null] +**Key** | **string** | The key for the field in Swimlane. | [default to null] +**Name** | **string** | The name of the field in Swimlane. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConfigPropertiesCasesWebhook.md b/generated/kibanaactions/docs/ConfigPropertiesCasesWebhook.md index c7a8897e0..aa0fb51e8 100644 --- a/generated/kibanaactions/docs/ConfigPropertiesCasesWebhook.md +++ b/generated/kibanaactions/docs/ConfigPropertiesCasesWebhook.md @@ -1,380 +1,23 @@ # ConfigPropertiesCasesWebhook ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CreateCommentJson** | Pointer to **string** | A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. | [optional] -**CreateCommentMethod** | Pointer to **string** | The REST API HTTP request method to create a case comment in the third-party system. Valid values are `patch`, `post`, and `put`. | [optional] [default to "put"] -**CreateCommentUrl** | Pointer to **string** | The REST API URL to create a case comment by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts setting`, add the hostname to the allowed hosts. | [optional] -**CreateIncidentJson** | **string** | A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. | -**CreateIncidentMethod** | Pointer to **string** | The REST API HTTP request method to create a case in the third-party system. Valid values are `patch`, `post`, and `put`. | [optional] [default to "post"] -**CreateIncidentResponseKey** | **string** | The JSON key in the create case response that contains the external case ID. | -**CreateIncidentUrl** | **string** | The REST API URL to create a case in the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. | -**GetIncidentResponseExternalTitleKey** | **string** | The JSON key in get case response that contains the external case title. | -**GetIncidentUrl** | **string** | The REST API URL to get the case by ID from the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. You can use a variable to add the external system ID to the URL. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. | -**HasAuth** | Pointer to **bool** | If true, a username and password for login type authentication must be provided. | [optional] [default to true] -**Headers** | Pointer to **string** | A set of key-value pairs sent as headers with the request URLs for the create case, update case, get case, and create comment methods. | [optional] -**UpdateIncidentJson** | **string** | The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. | -**UpdateIncidentMethod** | Pointer to **string** | The REST API HTTP request method to update the case in the third-party system. Valid values are `patch`, `post`, and `put`. | [optional] [default to "put"] -**UpdateIncidentUrl** | **string** | The REST API URL to update the case by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. | -**ViewIncidentUrl** | **string** | The URL to view the case in the external system. You can use variables to add the external system ID or external system title to the URL. | - -## Methods - -### NewConfigPropertiesCasesWebhook - -`func NewConfigPropertiesCasesWebhook(createIncidentJson string, createIncidentResponseKey string, createIncidentUrl string, getIncidentResponseExternalTitleKey string, getIncidentUrl string, updateIncidentJson string, updateIncidentUrl string, viewIncidentUrl string, ) *ConfigPropertiesCasesWebhook` - -NewConfigPropertiesCasesWebhook instantiates a new ConfigPropertiesCasesWebhook object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConfigPropertiesCasesWebhookWithDefaults - -`func NewConfigPropertiesCasesWebhookWithDefaults() *ConfigPropertiesCasesWebhook` - -NewConfigPropertiesCasesWebhookWithDefaults instantiates a new ConfigPropertiesCasesWebhook object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCreateCommentJson - -`func (o *ConfigPropertiesCasesWebhook) GetCreateCommentJson() string` - -GetCreateCommentJson returns the CreateCommentJson field if non-nil, zero value otherwise. - -### GetCreateCommentJsonOk - -`func (o *ConfigPropertiesCasesWebhook) GetCreateCommentJsonOk() (*string, bool)` - -GetCreateCommentJsonOk returns a tuple with the CreateCommentJson field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreateCommentJson - -`func (o *ConfigPropertiesCasesWebhook) SetCreateCommentJson(v string)` - -SetCreateCommentJson sets CreateCommentJson field to given value. - -### HasCreateCommentJson - -`func (o *ConfigPropertiesCasesWebhook) HasCreateCommentJson() bool` - -HasCreateCommentJson returns a boolean if a field has been set. - -### GetCreateCommentMethod - -`func (o *ConfigPropertiesCasesWebhook) GetCreateCommentMethod() string` - -GetCreateCommentMethod returns the CreateCommentMethod field if non-nil, zero value otherwise. - -### GetCreateCommentMethodOk - -`func (o *ConfigPropertiesCasesWebhook) GetCreateCommentMethodOk() (*string, bool)` - -GetCreateCommentMethodOk returns a tuple with the CreateCommentMethod field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreateCommentMethod - -`func (o *ConfigPropertiesCasesWebhook) SetCreateCommentMethod(v string)` - -SetCreateCommentMethod sets CreateCommentMethod field to given value. - -### HasCreateCommentMethod - -`func (o *ConfigPropertiesCasesWebhook) HasCreateCommentMethod() bool` - -HasCreateCommentMethod returns a boolean if a field has been set. - -### GetCreateCommentUrl - -`func (o *ConfigPropertiesCasesWebhook) GetCreateCommentUrl() string` - -GetCreateCommentUrl returns the CreateCommentUrl field if non-nil, zero value otherwise. - -### GetCreateCommentUrlOk - -`func (o *ConfigPropertiesCasesWebhook) GetCreateCommentUrlOk() (*string, bool)` - -GetCreateCommentUrlOk returns a tuple with the CreateCommentUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreateCommentUrl - -`func (o *ConfigPropertiesCasesWebhook) SetCreateCommentUrl(v string)` - -SetCreateCommentUrl sets CreateCommentUrl field to given value. - -### HasCreateCommentUrl - -`func (o *ConfigPropertiesCasesWebhook) HasCreateCommentUrl() bool` - -HasCreateCommentUrl returns a boolean if a field has been set. - -### GetCreateIncidentJson - -`func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentJson() string` - -GetCreateIncidentJson returns the CreateIncidentJson field if non-nil, zero value otherwise. - -### GetCreateIncidentJsonOk - -`func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentJsonOk() (*string, bool)` - -GetCreateIncidentJsonOk returns a tuple with the CreateIncidentJson field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreateIncidentJson - -`func (o *ConfigPropertiesCasesWebhook) SetCreateIncidentJson(v string)` - -SetCreateIncidentJson sets CreateIncidentJson field to given value. - - -### GetCreateIncidentMethod - -`func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentMethod() string` - -GetCreateIncidentMethod returns the CreateIncidentMethod field if non-nil, zero value otherwise. - -### GetCreateIncidentMethodOk - -`func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentMethodOk() (*string, bool)` - -GetCreateIncidentMethodOk returns a tuple with the CreateIncidentMethod field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreateIncidentMethod - -`func (o *ConfigPropertiesCasesWebhook) SetCreateIncidentMethod(v string)` - -SetCreateIncidentMethod sets CreateIncidentMethod field to given value. - -### HasCreateIncidentMethod - -`func (o *ConfigPropertiesCasesWebhook) HasCreateIncidentMethod() bool` - -HasCreateIncidentMethod returns a boolean if a field has been set. - -### GetCreateIncidentResponseKey - -`func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentResponseKey() string` - -GetCreateIncidentResponseKey returns the CreateIncidentResponseKey field if non-nil, zero value otherwise. - -### GetCreateIncidentResponseKeyOk - -`func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentResponseKeyOk() (*string, bool)` - -GetCreateIncidentResponseKeyOk returns a tuple with the CreateIncidentResponseKey field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreateIncidentResponseKey - -`func (o *ConfigPropertiesCasesWebhook) SetCreateIncidentResponseKey(v string)` - -SetCreateIncidentResponseKey sets CreateIncidentResponseKey field to given value. - - -### GetCreateIncidentUrl - -`func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentUrl() string` - -GetCreateIncidentUrl returns the CreateIncidentUrl field if non-nil, zero value otherwise. - -### GetCreateIncidentUrlOk - -`func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentUrlOk() (*string, bool)` - -GetCreateIncidentUrlOk returns a tuple with the CreateIncidentUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreateIncidentUrl - -`func (o *ConfigPropertiesCasesWebhook) SetCreateIncidentUrl(v string)` - -SetCreateIncidentUrl sets CreateIncidentUrl field to given value. - - -### GetGetIncidentResponseExternalTitleKey - -`func (o *ConfigPropertiesCasesWebhook) GetGetIncidentResponseExternalTitleKey() string` - -GetGetIncidentResponseExternalTitleKey returns the GetIncidentResponseExternalTitleKey field if non-nil, zero value otherwise. - -### GetGetIncidentResponseExternalTitleKeyOk - -`func (o *ConfigPropertiesCasesWebhook) GetGetIncidentResponseExternalTitleKeyOk() (*string, bool)` - -GetGetIncidentResponseExternalTitleKeyOk returns a tuple with the GetIncidentResponseExternalTitleKey field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGetIncidentResponseExternalTitleKey - -`func (o *ConfigPropertiesCasesWebhook) SetGetIncidentResponseExternalTitleKey(v string)` - -SetGetIncidentResponseExternalTitleKey sets GetIncidentResponseExternalTitleKey field to given value. - - -### GetGetIncidentUrl - -`func (o *ConfigPropertiesCasesWebhook) GetGetIncidentUrl() string` - -GetGetIncidentUrl returns the GetIncidentUrl field if non-nil, zero value otherwise. - -### GetGetIncidentUrlOk - -`func (o *ConfigPropertiesCasesWebhook) GetGetIncidentUrlOk() (*string, bool)` - -GetGetIncidentUrlOk returns a tuple with the GetIncidentUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGetIncidentUrl - -`func (o *ConfigPropertiesCasesWebhook) SetGetIncidentUrl(v string)` - -SetGetIncidentUrl sets GetIncidentUrl field to given value. - - -### GetHasAuth - -`func (o *ConfigPropertiesCasesWebhook) GetHasAuth() bool` - -GetHasAuth returns the HasAuth field if non-nil, zero value otherwise. - -### GetHasAuthOk - -`func (o *ConfigPropertiesCasesWebhook) GetHasAuthOk() (*bool, bool)` - -GetHasAuthOk returns a tuple with the HasAuth field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHasAuth - -`func (o *ConfigPropertiesCasesWebhook) SetHasAuth(v bool)` - -SetHasAuth sets HasAuth field to given value. - -### HasHasAuth - -`func (o *ConfigPropertiesCasesWebhook) HasHasAuth() bool` - -HasHasAuth returns a boolean if a field has been set. - -### GetHeaders - -`func (o *ConfigPropertiesCasesWebhook) GetHeaders() string` - -GetHeaders returns the Headers field if non-nil, zero value otherwise. - -### GetHeadersOk - -`func (o *ConfigPropertiesCasesWebhook) GetHeadersOk() (*string, bool)` - -GetHeadersOk returns a tuple with the Headers field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHeaders - -`func (o *ConfigPropertiesCasesWebhook) SetHeaders(v string)` - -SetHeaders sets Headers field to given value. - -### HasHeaders - -`func (o *ConfigPropertiesCasesWebhook) HasHeaders() bool` - -HasHeaders returns a boolean if a field has been set. - -### GetUpdateIncidentJson - -`func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentJson() string` - -GetUpdateIncidentJson returns the UpdateIncidentJson field if non-nil, zero value otherwise. - -### GetUpdateIncidentJsonOk - -`func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentJsonOk() (*string, bool)` - -GetUpdateIncidentJsonOk returns a tuple with the UpdateIncidentJson field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdateIncidentJson - -`func (o *ConfigPropertiesCasesWebhook) SetUpdateIncidentJson(v string)` - -SetUpdateIncidentJson sets UpdateIncidentJson field to given value. - - -### GetUpdateIncidentMethod - -`func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentMethod() string` - -GetUpdateIncidentMethod returns the UpdateIncidentMethod field if non-nil, zero value otherwise. - -### GetUpdateIncidentMethodOk - -`func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentMethodOk() (*string, bool)` - -GetUpdateIncidentMethodOk returns a tuple with the UpdateIncidentMethod field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdateIncidentMethod - -`func (o *ConfigPropertiesCasesWebhook) SetUpdateIncidentMethod(v string)` - -SetUpdateIncidentMethod sets UpdateIncidentMethod field to given value. - -### HasUpdateIncidentMethod - -`func (o *ConfigPropertiesCasesWebhook) HasUpdateIncidentMethod() bool` - -HasUpdateIncidentMethod returns a boolean if a field has been set. - -### GetUpdateIncidentUrl - -`func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentUrl() string` - -GetUpdateIncidentUrl returns the UpdateIncidentUrl field if non-nil, zero value otherwise. - -### GetUpdateIncidentUrlOk - -`func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentUrlOk() (*string, bool)` - -GetUpdateIncidentUrlOk returns a tuple with the UpdateIncidentUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdateIncidentUrl - -`func (o *ConfigPropertiesCasesWebhook) SetUpdateIncidentUrl(v string)` - -SetUpdateIncidentUrl sets UpdateIncidentUrl field to given value. - - -### GetViewIncidentUrl - -`func (o *ConfigPropertiesCasesWebhook) GetViewIncidentUrl() string` - -GetViewIncidentUrl returns the ViewIncidentUrl field if non-nil, zero value otherwise. - -### GetViewIncidentUrlOk - -`func (o *ConfigPropertiesCasesWebhook) GetViewIncidentUrlOk() (*string, bool)` - -GetViewIncidentUrlOk returns a tuple with the ViewIncidentUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetViewIncidentUrl - -`func (o *ConfigPropertiesCasesWebhook) SetViewIncidentUrl(v string)` - -SetViewIncidentUrl sets ViewIncidentUrl field to given value. - - +**CreateCommentJson** | **string** | A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. | [optional] [default to null] +**CreateCommentMethod** | **string** | The REST API HTTP request method to create a case comment in the third-party system. Valid values are `patch`, `post`, and `put`. | [optional] [default to CREATE_COMMENT_METHOD.PUT] +**CreateCommentUrl** | **string** | The REST API URL to create a case comment by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts setting`, add the hostname to the allowed hosts. | [optional] [default to null] +**CreateIncidentJson** | **string** | A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. | [default to null] +**CreateIncidentMethod** | **string** | The REST API HTTP request method to create a case in the third-party system. Valid values are `patch`, `post`, and `put`. | [optional] [default to CREATE_INCIDENT_METHOD.POST] +**CreateIncidentResponseKey** | **string** | The JSON key in the create case response that contains the external case ID. | [default to null] +**CreateIncidentUrl** | **string** | The REST API URL to create a case in the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. | [default to null] +**GetIncidentResponseExternalTitleKey** | **string** | The JSON key in get case response that contains the external case title. | [default to null] +**GetIncidentUrl** | **string** | The REST API URL to get the case by ID from the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. You can use a variable to add the external system ID to the URL. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. | [default to null] +**HasAuth** | **bool** | If true, a username and password for login type authentication must be provided. | [optional] [default to true] +**Headers** | **string** | A set of key-value pairs sent as headers with the request URLs for the create case, update case, get case, and create comment methods. | [optional] [default to null] +**UpdateIncidentJson** | **string** | The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. | [default to null] +**UpdateIncidentMethod** | **string** | The REST API HTTP request method to update the case in the third-party system. Valid values are `patch`, `post`, and `put`. | [optional] [default to UPDATE_INCIDENT_METHOD.PUT] +**UpdateIncidentUrl** | **string** | The REST API URL to update the case by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. | [default to null] +**ViewIncidentUrl** | **string** | The URL to view the case in the external system. You can use variables to add the external system ID or external system title to the URL. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConfigPropertiesIndex.md b/generated/kibanaactions/docs/ConfigPropertiesIndex.md index c524f25d4..ee7cc02fa 100644 --- a/generated/kibanaactions/docs/ConfigPropertiesIndex.md +++ b/generated/kibanaactions/docs/ConfigPropertiesIndex.md @@ -1,113 +1,11 @@ # ConfigPropertiesIndex ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ExecutionTimeField** | Pointer to **NullableString** | Specifies a field that will contain the time the alert condition was detected. | [optional] -**Index** | **string** | The Elasticsearch index to be written to. | -**Refresh** | Pointer to **bool** | The refresh policy for the write request, which affects when changes are made visible to search. Refer to the refresh setting for Elasticsearch document APIs. | [optional] [default to false] - -## Methods - -### NewConfigPropertiesIndex - -`func NewConfigPropertiesIndex(index string, ) *ConfigPropertiesIndex` - -NewConfigPropertiesIndex instantiates a new ConfigPropertiesIndex object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConfigPropertiesIndexWithDefaults - -`func NewConfigPropertiesIndexWithDefaults() *ConfigPropertiesIndex` - -NewConfigPropertiesIndexWithDefaults instantiates a new ConfigPropertiesIndex object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetExecutionTimeField - -`func (o *ConfigPropertiesIndex) GetExecutionTimeField() string` - -GetExecutionTimeField returns the ExecutionTimeField field if non-nil, zero value otherwise. - -### GetExecutionTimeFieldOk - -`func (o *ConfigPropertiesIndex) GetExecutionTimeFieldOk() (*string, bool)` - -GetExecutionTimeFieldOk returns a tuple with the ExecutionTimeField field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExecutionTimeField - -`func (o *ConfigPropertiesIndex) SetExecutionTimeField(v string)` - -SetExecutionTimeField sets ExecutionTimeField field to given value. - -### HasExecutionTimeField - -`func (o *ConfigPropertiesIndex) HasExecutionTimeField() bool` - -HasExecutionTimeField returns a boolean if a field has been set. - -### SetExecutionTimeFieldNil - -`func (o *ConfigPropertiesIndex) SetExecutionTimeFieldNil(b bool)` - - SetExecutionTimeFieldNil sets the value for ExecutionTimeField to be an explicit nil - -### UnsetExecutionTimeField -`func (o *ConfigPropertiesIndex) UnsetExecutionTimeField()` - -UnsetExecutionTimeField ensures that no value is present for ExecutionTimeField, not even an explicit nil -### GetIndex - -`func (o *ConfigPropertiesIndex) GetIndex() string` - -GetIndex returns the Index field if non-nil, zero value otherwise. - -### GetIndexOk - -`func (o *ConfigPropertiesIndex) GetIndexOk() (*string, bool)` - -GetIndexOk returns a tuple with the Index field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIndex - -`func (o *ConfigPropertiesIndex) SetIndex(v string)` - -SetIndex sets Index field to given value. - - -### GetRefresh - -`func (o *ConfigPropertiesIndex) GetRefresh() bool` - -GetRefresh returns the Refresh field if non-nil, zero value otherwise. - -### GetRefreshOk - -`func (o *ConfigPropertiesIndex) GetRefreshOk() (*bool, bool)` - -GetRefreshOk returns a tuple with the Refresh field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRefresh - -`func (o *ConfigPropertiesIndex) SetRefresh(v bool)` - -SetRefresh sets Refresh field to given value. - -### HasRefresh - -`func (o *ConfigPropertiesIndex) HasRefresh() bool` - -HasRefresh returns a boolean if a field has been set. - +**ExecutionTimeField** | **string** | Specifies a field that will contain the time the alert condition was detected. | [optional] [default to null] +**Index** | **string** | The Elasticsearch index to be written to. | [default to null] +**Refresh** | **bool** | The refresh policy for the write request, which affects when changes are made visible to search. Refer to the refresh setting for Elasticsearch document APIs. | [optional] [default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConfigPropertiesJira.md b/generated/kibanaactions/docs/ConfigPropertiesJira.md index 5e704f1c2..880ecdbb2 100644 --- a/generated/kibanaactions/docs/ConfigPropertiesJira.md +++ b/generated/kibanaactions/docs/ConfigPropertiesJira.md @@ -1,72 +1,10 @@ # ConfigPropertiesJira ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ApiUrl** | **string** | The Jira instance URL. | -**ProjectKey** | **string** | The Jira project key. | - -## Methods - -### NewConfigPropertiesJira - -`func NewConfigPropertiesJira(apiUrl string, projectKey string, ) *ConfigPropertiesJira` - -NewConfigPropertiesJira instantiates a new ConfigPropertiesJira object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConfigPropertiesJiraWithDefaults - -`func NewConfigPropertiesJiraWithDefaults() *ConfigPropertiesJira` - -NewConfigPropertiesJiraWithDefaults instantiates a new ConfigPropertiesJira object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetApiUrl - -`func (o *ConfigPropertiesJira) GetApiUrl() string` - -GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. - -### GetApiUrlOk - -`func (o *ConfigPropertiesJira) GetApiUrlOk() (*string, bool)` - -GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApiUrl - -`func (o *ConfigPropertiesJira) SetApiUrl(v string)` - -SetApiUrl sets ApiUrl field to given value. - - -### GetProjectKey - -`func (o *ConfigPropertiesJira) GetProjectKey() string` - -GetProjectKey returns the ProjectKey field if non-nil, zero value otherwise. - -### GetProjectKeyOk - -`func (o *ConfigPropertiesJira) GetProjectKeyOk() (*string, bool)` - -GetProjectKeyOk returns a tuple with the ProjectKey field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProjectKey - -`func (o *ConfigPropertiesJira) SetProjectKey(v string)` - -SetProjectKey sets ProjectKey field to given value. - - +**ApiUrl** | **string** | The Jira instance URL. | [default to null] +**ProjectKey** | **string** | The Jira project key. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConfigPropertiesOpsgenie.md b/generated/kibanaactions/docs/ConfigPropertiesOpsgenie.md index 77f85a0f7..76cc5d84c 100644 --- a/generated/kibanaactions/docs/ConfigPropertiesOpsgenie.md +++ b/generated/kibanaactions/docs/ConfigPropertiesOpsgenie.md @@ -1,51 +1,9 @@ # ConfigPropertiesOpsgenie ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ApiUrl** | **string** | The Opsgenie URL. For example, `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. | - -## Methods - -### NewConfigPropertiesOpsgenie - -`func NewConfigPropertiesOpsgenie(apiUrl string, ) *ConfigPropertiesOpsgenie` - -NewConfigPropertiesOpsgenie instantiates a new ConfigPropertiesOpsgenie object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConfigPropertiesOpsgenieWithDefaults - -`func NewConfigPropertiesOpsgenieWithDefaults() *ConfigPropertiesOpsgenie` - -NewConfigPropertiesOpsgenieWithDefaults instantiates a new ConfigPropertiesOpsgenie object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetApiUrl - -`func (o *ConfigPropertiesOpsgenie) GetApiUrl() string` - -GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. - -### GetApiUrlOk - -`func (o *ConfigPropertiesOpsgenie) GetApiUrlOk() (*string, bool)` - -GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApiUrl - -`func (o *ConfigPropertiesOpsgenie) SetApiUrl(v string)` - -SetApiUrl sets ApiUrl field to given value. - - +**ApiUrl** | **string** | The Opsgenie URL. For example, `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConfigPropertiesResilient.md b/generated/kibanaactions/docs/ConfigPropertiesResilient.md index 3573cc5dd..fa4754739 100644 --- a/generated/kibanaactions/docs/ConfigPropertiesResilient.md +++ b/generated/kibanaactions/docs/ConfigPropertiesResilient.md @@ -1,72 +1,10 @@ # ConfigPropertiesResilient ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ApiUrl** | **string** | The IBM Resilient instance URL. | -**OrgId** | **string** | The IBM Resilient organization ID. | - -## Methods - -### NewConfigPropertiesResilient - -`func NewConfigPropertiesResilient(apiUrl string, orgId string, ) *ConfigPropertiesResilient` - -NewConfigPropertiesResilient instantiates a new ConfigPropertiesResilient object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConfigPropertiesResilientWithDefaults - -`func NewConfigPropertiesResilientWithDefaults() *ConfigPropertiesResilient` - -NewConfigPropertiesResilientWithDefaults instantiates a new ConfigPropertiesResilient object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetApiUrl - -`func (o *ConfigPropertiesResilient) GetApiUrl() string` - -GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. - -### GetApiUrlOk - -`func (o *ConfigPropertiesResilient) GetApiUrlOk() (*string, bool)` - -GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApiUrl - -`func (o *ConfigPropertiesResilient) SetApiUrl(v string)` - -SetApiUrl sets ApiUrl field to given value. - - -### GetOrgId - -`func (o *ConfigPropertiesResilient) GetOrgId() string` - -GetOrgId returns the OrgId field if non-nil, zero value otherwise. - -### GetOrgIdOk - -`func (o *ConfigPropertiesResilient) GetOrgIdOk() (*string, bool)` - -GetOrgIdOk returns a tuple with the OrgId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOrgId - -`func (o *ConfigPropertiesResilient) SetOrgId(v string)` - -SetOrgId sets OrgId field to given value. - - +**ApiUrl** | **string** | The IBM Resilient instance URL. | [default to null] +**OrgId** | **string** | The IBM Resilient organization ID. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConfigPropertiesServicenow.md b/generated/kibanaactions/docs/ConfigPropertiesServicenow.md index 07413b9ba..e9a414fd8 100644 --- a/generated/kibanaactions/docs/ConfigPropertiesServicenow.md +++ b/generated/kibanaactions/docs/ConfigPropertiesServicenow.md @@ -1,181 +1,14 @@ # ConfigPropertiesServicenow ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ApiUrl** | **string** | The ServiceNow instance URL. | -**ClientId** | Pointer to **string** | The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. | [optional] -**IsOAuth** | Pointer to **bool** | The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). | [optional] [default to false] -**JwtKeyId** | Pointer to **string** | The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. | [optional] -**UserIdentifierValue** | Pointer to **string** | The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. | [optional] -**UsesTableApi** | Pointer to **bool** | Determines whether the connector uses the Table API or the Import Set API. This property is supported only for ServiceNow ITSM and ServiceNow SecOps connectors. NOTE: If this property is set to `false`, the Elastic application should be installed in ServiceNow. | [optional] [default to true] - -## Methods - -### NewConfigPropertiesServicenow - -`func NewConfigPropertiesServicenow(apiUrl string, ) *ConfigPropertiesServicenow` - -NewConfigPropertiesServicenow instantiates a new ConfigPropertiesServicenow object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConfigPropertiesServicenowWithDefaults - -`func NewConfigPropertiesServicenowWithDefaults() *ConfigPropertiesServicenow` - -NewConfigPropertiesServicenowWithDefaults instantiates a new ConfigPropertiesServicenow object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetApiUrl - -`func (o *ConfigPropertiesServicenow) GetApiUrl() string` - -GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. - -### GetApiUrlOk - -`func (o *ConfigPropertiesServicenow) GetApiUrlOk() (*string, bool)` - -GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApiUrl - -`func (o *ConfigPropertiesServicenow) SetApiUrl(v string)` - -SetApiUrl sets ApiUrl field to given value. - - -### GetClientId - -`func (o *ConfigPropertiesServicenow) GetClientId() string` - -GetClientId returns the ClientId field if non-nil, zero value otherwise. - -### GetClientIdOk - -`func (o *ConfigPropertiesServicenow) GetClientIdOk() (*string, bool)` - -GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetClientId - -`func (o *ConfigPropertiesServicenow) SetClientId(v string)` - -SetClientId sets ClientId field to given value. - -### HasClientId - -`func (o *ConfigPropertiesServicenow) HasClientId() bool` - -HasClientId returns a boolean if a field has been set. - -### GetIsOAuth - -`func (o *ConfigPropertiesServicenow) GetIsOAuth() bool` - -GetIsOAuth returns the IsOAuth field if non-nil, zero value otherwise. - -### GetIsOAuthOk - -`func (o *ConfigPropertiesServicenow) GetIsOAuthOk() (*bool, bool)` - -GetIsOAuthOk returns a tuple with the IsOAuth field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsOAuth - -`func (o *ConfigPropertiesServicenow) SetIsOAuth(v bool)` - -SetIsOAuth sets IsOAuth field to given value. - -### HasIsOAuth - -`func (o *ConfigPropertiesServicenow) HasIsOAuth() bool` - -HasIsOAuth returns a boolean if a field has been set. - -### GetJwtKeyId - -`func (o *ConfigPropertiesServicenow) GetJwtKeyId() string` - -GetJwtKeyId returns the JwtKeyId field if non-nil, zero value otherwise. - -### GetJwtKeyIdOk - -`func (o *ConfigPropertiesServicenow) GetJwtKeyIdOk() (*string, bool)` - -GetJwtKeyIdOk returns a tuple with the JwtKeyId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetJwtKeyId - -`func (o *ConfigPropertiesServicenow) SetJwtKeyId(v string)` - -SetJwtKeyId sets JwtKeyId field to given value. - -### HasJwtKeyId - -`func (o *ConfigPropertiesServicenow) HasJwtKeyId() bool` - -HasJwtKeyId returns a boolean if a field has been set. - -### GetUserIdentifierValue - -`func (o *ConfigPropertiesServicenow) GetUserIdentifierValue() string` - -GetUserIdentifierValue returns the UserIdentifierValue field if non-nil, zero value otherwise. - -### GetUserIdentifierValueOk - -`func (o *ConfigPropertiesServicenow) GetUserIdentifierValueOk() (*string, bool)` - -GetUserIdentifierValueOk returns a tuple with the UserIdentifierValue field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserIdentifierValue - -`func (o *ConfigPropertiesServicenow) SetUserIdentifierValue(v string)` - -SetUserIdentifierValue sets UserIdentifierValue field to given value. - -### HasUserIdentifierValue - -`func (o *ConfigPropertiesServicenow) HasUserIdentifierValue() bool` - -HasUserIdentifierValue returns a boolean if a field has been set. - -### GetUsesTableApi - -`func (o *ConfigPropertiesServicenow) GetUsesTableApi() bool` - -GetUsesTableApi returns the UsesTableApi field if non-nil, zero value otherwise. - -### GetUsesTableApiOk - -`func (o *ConfigPropertiesServicenow) GetUsesTableApiOk() (*bool, bool)` - -GetUsesTableApiOk returns a tuple with the UsesTableApi field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUsesTableApi - -`func (o *ConfigPropertiesServicenow) SetUsesTableApi(v bool)` - -SetUsesTableApi sets UsesTableApi field to given value. - -### HasUsesTableApi - -`func (o *ConfigPropertiesServicenow) HasUsesTableApi() bool` - -HasUsesTableApi returns a boolean if a field has been set. - +**ApiUrl** | **string** | The ServiceNow instance URL. | [default to null] +**ClientId** | **string** | The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. | [optional] [default to null] +**IsOAuth** | **bool** | The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). | [optional] [default to false] +**JwtKeyId** | **string** | The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. | [optional] [default to null] +**UserIdentifierValue** | **string** | The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. | [optional] [default to null] +**UsesTableApi** | **bool** | Determines whether the connector uses the Table API or the Import Set API. This property is supported only for ServiceNow ITSM and ServiceNow SecOps connectors. NOTE: If this property is set to `false`, the Elastic application should be installed in ServiceNow. | [optional] [default to true] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConfigPropertiesServicenowItom.md b/generated/kibanaactions/docs/ConfigPropertiesServicenowItom.md index fee66e3db..bf41b2aca 100644 --- a/generated/kibanaactions/docs/ConfigPropertiesServicenowItom.md +++ b/generated/kibanaactions/docs/ConfigPropertiesServicenowItom.md @@ -1,155 +1,13 @@ # ConfigPropertiesServicenowItom ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ApiUrl** | **string** | The ServiceNow instance URL. | -**ClientId** | Pointer to **string** | The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. | [optional] -**IsOAuth** | Pointer to **bool** | The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). | [optional] [default to false] -**JwtKeyId** | Pointer to **string** | The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. | [optional] -**UserIdentifierValue** | Pointer to **string** | The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. | [optional] - -## Methods - -### NewConfigPropertiesServicenowItom - -`func NewConfigPropertiesServicenowItom(apiUrl string, ) *ConfigPropertiesServicenowItom` - -NewConfigPropertiesServicenowItom instantiates a new ConfigPropertiesServicenowItom object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConfigPropertiesServicenowItomWithDefaults - -`func NewConfigPropertiesServicenowItomWithDefaults() *ConfigPropertiesServicenowItom` - -NewConfigPropertiesServicenowItomWithDefaults instantiates a new ConfigPropertiesServicenowItom object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetApiUrl - -`func (o *ConfigPropertiesServicenowItom) GetApiUrl() string` - -GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. - -### GetApiUrlOk - -`func (o *ConfigPropertiesServicenowItom) GetApiUrlOk() (*string, bool)` - -GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApiUrl - -`func (o *ConfigPropertiesServicenowItom) SetApiUrl(v string)` - -SetApiUrl sets ApiUrl field to given value. - - -### GetClientId - -`func (o *ConfigPropertiesServicenowItom) GetClientId() string` - -GetClientId returns the ClientId field if non-nil, zero value otherwise. - -### GetClientIdOk - -`func (o *ConfigPropertiesServicenowItom) GetClientIdOk() (*string, bool)` - -GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetClientId - -`func (o *ConfigPropertiesServicenowItom) SetClientId(v string)` - -SetClientId sets ClientId field to given value. - -### HasClientId - -`func (o *ConfigPropertiesServicenowItom) HasClientId() bool` - -HasClientId returns a boolean if a field has been set. - -### GetIsOAuth - -`func (o *ConfigPropertiesServicenowItom) GetIsOAuth() bool` - -GetIsOAuth returns the IsOAuth field if non-nil, zero value otherwise. - -### GetIsOAuthOk - -`func (o *ConfigPropertiesServicenowItom) GetIsOAuthOk() (*bool, bool)` - -GetIsOAuthOk returns a tuple with the IsOAuth field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsOAuth - -`func (o *ConfigPropertiesServicenowItom) SetIsOAuth(v bool)` - -SetIsOAuth sets IsOAuth field to given value. - -### HasIsOAuth - -`func (o *ConfigPropertiesServicenowItom) HasIsOAuth() bool` - -HasIsOAuth returns a boolean if a field has been set. - -### GetJwtKeyId - -`func (o *ConfigPropertiesServicenowItom) GetJwtKeyId() string` - -GetJwtKeyId returns the JwtKeyId field if non-nil, zero value otherwise. - -### GetJwtKeyIdOk - -`func (o *ConfigPropertiesServicenowItom) GetJwtKeyIdOk() (*string, bool)` - -GetJwtKeyIdOk returns a tuple with the JwtKeyId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetJwtKeyId - -`func (o *ConfigPropertiesServicenowItom) SetJwtKeyId(v string)` - -SetJwtKeyId sets JwtKeyId field to given value. - -### HasJwtKeyId - -`func (o *ConfigPropertiesServicenowItom) HasJwtKeyId() bool` - -HasJwtKeyId returns a boolean if a field has been set. - -### GetUserIdentifierValue - -`func (o *ConfigPropertiesServicenowItom) GetUserIdentifierValue() string` - -GetUserIdentifierValue returns the UserIdentifierValue field if non-nil, zero value otherwise. - -### GetUserIdentifierValueOk - -`func (o *ConfigPropertiesServicenowItom) GetUserIdentifierValueOk() (*string, bool)` - -GetUserIdentifierValueOk returns a tuple with the UserIdentifierValue field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserIdentifierValue - -`func (o *ConfigPropertiesServicenowItom) SetUserIdentifierValue(v string)` - -SetUserIdentifierValue sets UserIdentifierValue field to given value. - -### HasUserIdentifierValue - -`func (o *ConfigPropertiesServicenowItom) HasUserIdentifierValue() bool` - -HasUserIdentifierValue returns a boolean if a field has been set. - +**ApiUrl** | **string** | The ServiceNow instance URL. | [default to null] +**ClientId** | **string** | The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. | [optional] [default to null] +**IsOAuth** | **bool** | The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). | [optional] [default to false] +**JwtKeyId** | **string** | The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. | [optional] [default to null] +**UserIdentifierValue** | **string** | The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConfigPropertiesSwimlane.md b/generated/kibanaactions/docs/ConfigPropertiesSwimlane.md index a020066bf..b0d90054b 100644 --- a/generated/kibanaactions/docs/ConfigPropertiesSwimlane.md +++ b/generated/kibanaactions/docs/ConfigPropertiesSwimlane.md @@ -1,119 +1,12 @@ # ConfigPropertiesSwimlane ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ApiUrl** | **string** | The Swimlane instance URL. | -**AppId** | **string** | The Swimlane application ID. | -**ConnectorType** | **string** | The type of connector. Valid values are `all`, `alerts`, and `cases`. | -**Mappings** | Pointer to [**ConnectorMappingsPropertiesForASwimlaneConnector**](ConnectorMappingsPropertiesForASwimlaneConnector.md) | | [optional] - -## Methods - -### NewConfigPropertiesSwimlane - -`func NewConfigPropertiesSwimlane(apiUrl string, appId string, connectorType string, ) *ConfigPropertiesSwimlane` - -NewConfigPropertiesSwimlane instantiates a new ConfigPropertiesSwimlane object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConfigPropertiesSwimlaneWithDefaults - -`func NewConfigPropertiesSwimlaneWithDefaults() *ConfigPropertiesSwimlane` - -NewConfigPropertiesSwimlaneWithDefaults instantiates a new ConfigPropertiesSwimlane object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetApiUrl - -`func (o *ConfigPropertiesSwimlane) GetApiUrl() string` - -GetApiUrl returns the ApiUrl field if non-nil, zero value otherwise. - -### GetApiUrlOk - -`func (o *ConfigPropertiesSwimlane) GetApiUrlOk() (*string, bool)` - -GetApiUrlOk returns a tuple with the ApiUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApiUrl - -`func (o *ConfigPropertiesSwimlane) SetApiUrl(v string)` - -SetApiUrl sets ApiUrl field to given value. - - -### GetAppId - -`func (o *ConfigPropertiesSwimlane) GetAppId() string` - -GetAppId returns the AppId field if non-nil, zero value otherwise. - -### GetAppIdOk - -`func (o *ConfigPropertiesSwimlane) GetAppIdOk() (*string, bool)` - -GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAppId - -`func (o *ConfigPropertiesSwimlane) SetAppId(v string)` - -SetAppId sets AppId field to given value. - - -### GetConnectorType - -`func (o *ConfigPropertiesSwimlane) GetConnectorType() string` - -GetConnectorType returns the ConnectorType field if non-nil, zero value otherwise. - -### GetConnectorTypeOk - -`func (o *ConfigPropertiesSwimlane) GetConnectorTypeOk() (*string, bool)` - -GetConnectorTypeOk returns a tuple with the ConnectorType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorType - -`func (o *ConfigPropertiesSwimlane) SetConnectorType(v string)` - -SetConnectorType sets ConnectorType field to given value. - - -### GetMappings - -`func (o *ConfigPropertiesSwimlane) GetMappings() ConnectorMappingsPropertiesForASwimlaneConnector` - -GetMappings returns the Mappings field if non-nil, zero value otherwise. - -### GetMappingsOk - -`func (o *ConfigPropertiesSwimlane) GetMappingsOk() (*ConnectorMappingsPropertiesForASwimlaneConnector, bool)` - -GetMappingsOk returns a tuple with the Mappings field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMappings - -`func (o *ConfigPropertiesSwimlane) SetMappings(v ConnectorMappingsPropertiesForASwimlaneConnector)` - -SetMappings sets Mappings field to given value. - -### HasMappings - -`func (o *ConfigPropertiesSwimlane) HasMappings() bool` - -HasMappings returns a boolean if a field has been set. - +**ApiUrl** | **string** | The Swimlane instance URL. | [default to null] +**AppId** | **string** | The Swimlane application ID. | [default to null] +**ConnectorType** | **string** | The type of connector. Valid values are `all`, `alerts`, and `cases`. | [default to null] +**Mappings** | [***ConnectorMappingsPropertiesForASwimlaneConnector**](Connector mappings properties for a Swimlane connector.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorMappingsPropertiesForASwimlaneConnector.md b/generated/kibanaactions/docs/ConnectorMappingsPropertiesForASwimlaneConnector.md index 78d2db0b5..bcd3f3bcb 100644 --- a/generated/kibanaactions/docs/ConnectorMappingsPropertiesForASwimlaneConnector.md +++ b/generated/kibanaactions/docs/ConnectorMappingsPropertiesForASwimlaneConnector.md @@ -1,212 +1,15 @@ # ConnectorMappingsPropertiesForASwimlaneConnector ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AlertIdConfig** | Pointer to [**AlertIdentifierMapping**](AlertIdentifierMapping.md) | | [optional] -**CaseIdConfig** | Pointer to [**CaseIdentifierMapping**](CaseIdentifierMapping.md) | | [optional] -**CaseNameConfig** | Pointer to [**CaseNameMapping**](CaseNameMapping.md) | | [optional] -**CommentsConfig** | Pointer to [**CaseCommentMapping**](CaseCommentMapping.md) | | [optional] -**DescriptionConfig** | Pointer to [**CaseDescriptionMapping**](CaseDescriptionMapping.md) | | [optional] -**RuleNameConfig** | Pointer to [**RuleNameMapping**](RuleNameMapping.md) | | [optional] -**SeverityConfig** | Pointer to [**SeverityMapping**](SeverityMapping.md) | | [optional] - -## Methods - -### NewConnectorMappingsPropertiesForASwimlaneConnector - -`func NewConnectorMappingsPropertiesForASwimlaneConnector() *ConnectorMappingsPropertiesForASwimlaneConnector` - -NewConnectorMappingsPropertiesForASwimlaneConnector instantiates a new ConnectorMappingsPropertiesForASwimlaneConnector object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorMappingsPropertiesForASwimlaneConnectorWithDefaults - -`func NewConnectorMappingsPropertiesForASwimlaneConnectorWithDefaults() *ConnectorMappingsPropertiesForASwimlaneConnector` - -NewConnectorMappingsPropertiesForASwimlaneConnectorWithDefaults instantiates a new ConnectorMappingsPropertiesForASwimlaneConnector object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAlertIdConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetAlertIdConfig() AlertIdentifierMapping` - -GetAlertIdConfig returns the AlertIdConfig field if non-nil, zero value otherwise. - -### GetAlertIdConfigOk - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetAlertIdConfigOk() (*AlertIdentifierMapping, bool)` - -GetAlertIdConfigOk returns a tuple with the AlertIdConfig field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAlertIdConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetAlertIdConfig(v AlertIdentifierMapping)` - -SetAlertIdConfig sets AlertIdConfig field to given value. - -### HasAlertIdConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasAlertIdConfig() bool` - -HasAlertIdConfig returns a boolean if a field has been set. - -### GetCaseIdConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCaseIdConfig() CaseIdentifierMapping` - -GetCaseIdConfig returns the CaseIdConfig field if non-nil, zero value otherwise. - -### GetCaseIdConfigOk - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCaseIdConfigOk() (*CaseIdentifierMapping, bool)` - -GetCaseIdConfigOk returns a tuple with the CaseIdConfig field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCaseIdConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetCaseIdConfig(v CaseIdentifierMapping)` - -SetCaseIdConfig sets CaseIdConfig field to given value. - -### HasCaseIdConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasCaseIdConfig() bool` - -HasCaseIdConfig returns a boolean if a field has been set. - -### GetCaseNameConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCaseNameConfig() CaseNameMapping` - -GetCaseNameConfig returns the CaseNameConfig field if non-nil, zero value otherwise. - -### GetCaseNameConfigOk - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCaseNameConfigOk() (*CaseNameMapping, bool)` - -GetCaseNameConfigOk returns a tuple with the CaseNameConfig field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCaseNameConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetCaseNameConfig(v CaseNameMapping)` - -SetCaseNameConfig sets CaseNameConfig field to given value. - -### HasCaseNameConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasCaseNameConfig() bool` - -HasCaseNameConfig returns a boolean if a field has been set. - -### GetCommentsConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCommentsConfig() CaseCommentMapping` - -GetCommentsConfig returns the CommentsConfig field if non-nil, zero value otherwise. - -### GetCommentsConfigOk - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCommentsConfigOk() (*CaseCommentMapping, bool)` - -GetCommentsConfigOk returns a tuple with the CommentsConfig field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCommentsConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetCommentsConfig(v CaseCommentMapping)` - -SetCommentsConfig sets CommentsConfig field to given value. - -### HasCommentsConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasCommentsConfig() bool` - -HasCommentsConfig returns a boolean if a field has been set. - -### GetDescriptionConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetDescriptionConfig() CaseDescriptionMapping` - -GetDescriptionConfig returns the DescriptionConfig field if non-nil, zero value otherwise. - -### GetDescriptionConfigOk - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetDescriptionConfigOk() (*CaseDescriptionMapping, bool)` - -GetDescriptionConfigOk returns a tuple with the DescriptionConfig field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescriptionConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetDescriptionConfig(v CaseDescriptionMapping)` - -SetDescriptionConfig sets DescriptionConfig field to given value. - -### HasDescriptionConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasDescriptionConfig() bool` - -HasDescriptionConfig returns a boolean if a field has been set. - -### GetRuleNameConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetRuleNameConfig() RuleNameMapping` - -GetRuleNameConfig returns the RuleNameConfig field if non-nil, zero value otherwise. - -### GetRuleNameConfigOk - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetRuleNameConfigOk() (*RuleNameMapping, bool)` - -GetRuleNameConfigOk returns a tuple with the RuleNameConfig field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRuleNameConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetRuleNameConfig(v RuleNameMapping)` - -SetRuleNameConfig sets RuleNameConfig field to given value. - -### HasRuleNameConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasRuleNameConfig() bool` - -HasRuleNameConfig returns a boolean if a field has been set. - -### GetSeverityConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetSeverityConfig() SeverityMapping` - -GetSeverityConfig returns the SeverityConfig field if non-nil, zero value otherwise. - -### GetSeverityConfigOk - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetSeverityConfigOk() (*SeverityMapping, bool)` - -GetSeverityConfigOk returns a tuple with the SeverityConfig field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSeverityConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetSeverityConfig(v SeverityMapping)` - -SetSeverityConfig sets SeverityConfig field to given value. - -### HasSeverityConfig - -`func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasSeverityConfig() bool` - -HasSeverityConfig returns a boolean if a field has been set. - +**AlertIdConfig** | [***AlertIdentifierMapping**](Alert identifier mapping.md) | | [optional] [default to null] +**CaseIdConfig** | [***CaseIdentifierMapping**](Case identifier mapping.md) | | [optional] [default to null] +**CaseNameConfig** | [***CaseNameMapping**](Case name mapping.md) | | [optional] [default to null] +**CommentsConfig** | [***CaseCommentMapping**](Case comment mapping.md) | | [optional] [default to null] +**DescriptionConfig** | [***CaseDescriptionMapping**](Case description mapping.md) | | [optional] [default to null] +**RuleNameConfig** | [***RuleNameMapping**](Rule name mapping.md) | | [optional] [default to null] +**SeverityConfig** | [***SeverityMapping**](Severity mapping.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponseProperties.md b/generated/kibanaactions/docs/ConnectorResponseProperties.md index fc9e31f5d..bb894194b 100644 --- a/generated/kibanaactions/docs/ConnectorResponseProperties.md +++ b/generated/kibanaactions/docs/ConnectorResponseProperties.md @@ -1,182 +1,8 @@ # ConnectorResponseProperties ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.xmatters`. | -**ConnectorTypeId** | **string** | The type of connector. | -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewConnectorResponseProperties - -`func NewConnectorResponseProperties(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponseProperties` - -NewConnectorResponseProperties instantiates a new ConnectorResponseProperties object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorResponsePropertiesWithDefaults - -`func NewConnectorResponsePropertiesWithDefaults() *ConnectorResponseProperties` - -NewConnectorResponsePropertiesWithDefaults instantiates a new ConnectorResponseProperties object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *ConnectorResponseProperties) GetConfig() map[string]interface{}` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *ConnectorResponseProperties) GetConfigOk() (*map[string]interface{}, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *ConnectorResponseProperties) SetConfig(v map[string]interface{})` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *ConnectorResponseProperties) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *ConnectorResponseProperties) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *ConnectorResponseProperties) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetId - -`func (o *ConnectorResponseProperties) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ConnectorResponseProperties) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ConnectorResponseProperties) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *ConnectorResponseProperties) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ConnectorResponseProperties) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ConnectorResponseProperties) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *ConnectorResponseProperties) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ConnectorResponseProperties) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ConnectorResponseProperties) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ConnectorResponseProperties) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ConnectorResponseProperties) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ConnectorResponseProperties) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ConnectorResponseProperties) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *ConnectorResponseProperties) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ConnectorResponseProperties) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ConnectorResponseProperties) SetName(v string)` - -SetName sets Name field to given value. - - [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesCasesWebhook.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesCasesWebhook.md index 312fe881b..3313c3ae8 100644 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesCasesWebhook.md +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesCasesWebhook.md @@ -1,182 +1,15 @@ # ConnectorResponsePropertiesCasesWebhook ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesCasesWebhook**](ConfigPropertiesCasesWebhook.md) | | -**ConnectorTypeId** | **string** | The type of connector. | -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewConnectorResponsePropertiesCasesWebhook - -`func NewConnectorResponsePropertiesCasesWebhook(config ConfigPropertiesCasesWebhook, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesCasesWebhook` - -NewConnectorResponsePropertiesCasesWebhook instantiates a new ConnectorResponsePropertiesCasesWebhook object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorResponsePropertiesCasesWebhookWithDefaults - -`func NewConnectorResponsePropertiesCasesWebhookWithDefaults() *ConnectorResponsePropertiesCasesWebhook` - -NewConnectorResponsePropertiesCasesWebhookWithDefaults instantiates a new ConnectorResponsePropertiesCasesWebhook object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *ConnectorResponsePropertiesCasesWebhook) GetConfig() ConfigPropertiesCasesWebhook` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *ConnectorResponsePropertiesCasesWebhook) GetConfigOk() (*ConfigPropertiesCasesWebhook, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *ConnectorResponsePropertiesCasesWebhook) SetConfig(v ConfigPropertiesCasesWebhook)` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *ConnectorResponsePropertiesCasesWebhook) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *ConnectorResponsePropertiesCasesWebhook) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *ConnectorResponsePropertiesCasesWebhook) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetId - -`func (o *ConnectorResponsePropertiesCasesWebhook) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ConnectorResponsePropertiesCasesWebhook) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ConnectorResponsePropertiesCasesWebhook) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *ConnectorResponsePropertiesCasesWebhook) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ConnectorResponsePropertiesCasesWebhook) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ConnectorResponsePropertiesCasesWebhook) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesCasesWebhook) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ConnectorResponsePropertiesCasesWebhook) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesCasesWebhook) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ConnectorResponsePropertiesCasesWebhook) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ConnectorResponsePropertiesCasesWebhook) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ConnectorResponsePropertiesCasesWebhook) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ConnectorResponsePropertiesCasesWebhook) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *ConnectorResponsePropertiesCasesWebhook) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ConnectorResponsePropertiesCasesWebhook) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ConnectorResponsePropertiesCasesWebhook) SetName(v string)` - -SetName sets Name field to given value. - - +**Config** | [***ConfigPropertiesCasesWebhook**](config_properties_cases_webhook.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Id** | **string** | The identifier for the connector. | [default to null] +**IsDeprecated** | **bool** | | [default to null] +**IsMissingSecrets** | **bool** | | [optional] [default to null] +**IsPreconfigured** | **bool** | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesEmail.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesEmail.md index 8ec48945c..51b3754e1 100644 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesEmail.md +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesEmail.md @@ -1,182 +1,15 @@ # ConnectorResponsePropertiesEmail ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.email`. | -**ConnectorTypeId** | **string** | The type of connector. | -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewConnectorResponsePropertiesEmail - -`func NewConnectorResponsePropertiesEmail(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesEmail` - -NewConnectorResponsePropertiesEmail instantiates a new ConnectorResponsePropertiesEmail object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorResponsePropertiesEmailWithDefaults - -`func NewConnectorResponsePropertiesEmailWithDefaults() *ConnectorResponsePropertiesEmail` - -NewConnectorResponsePropertiesEmailWithDefaults instantiates a new ConnectorResponsePropertiesEmail object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *ConnectorResponsePropertiesEmail) GetConfig() map[string]interface{}` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *ConnectorResponsePropertiesEmail) GetConfigOk() (*map[string]interface{}, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *ConnectorResponsePropertiesEmail) SetConfig(v map[string]interface{})` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *ConnectorResponsePropertiesEmail) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *ConnectorResponsePropertiesEmail) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *ConnectorResponsePropertiesEmail) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetId - -`func (o *ConnectorResponsePropertiesEmail) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ConnectorResponsePropertiesEmail) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ConnectorResponsePropertiesEmail) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *ConnectorResponsePropertiesEmail) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ConnectorResponsePropertiesEmail) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ConnectorResponsePropertiesEmail) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesEmail) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ConnectorResponsePropertiesEmail) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesEmail) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ConnectorResponsePropertiesEmail) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ConnectorResponsePropertiesEmail) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ConnectorResponsePropertiesEmail) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ConnectorResponsePropertiesEmail) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *ConnectorResponsePropertiesEmail) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ConnectorResponsePropertiesEmail) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ConnectorResponsePropertiesEmail) SetName(v string)` - -SetName sets Name field to given value. - - +**Config** | [***ModelMap**](map.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Id** | **string** | The identifier for the connector. | [default to null] +**IsDeprecated** | **bool** | | [default to null] +**IsMissingSecrets** | **bool** | | [optional] [default to null] +**IsPreconfigured** | **bool** | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesIndex.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesIndex.md index 7022f0ca4..68016edc8 100644 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesIndex.md +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesIndex.md @@ -1,182 +1,15 @@ # ConnectorResponsePropertiesIndex ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesIndex**](ConfigPropertiesIndex.md) | | -**ConnectorTypeId** | **string** | The type of connector. | -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewConnectorResponsePropertiesIndex - -`func NewConnectorResponsePropertiesIndex(config ConfigPropertiesIndex, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesIndex` - -NewConnectorResponsePropertiesIndex instantiates a new ConnectorResponsePropertiesIndex object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorResponsePropertiesIndexWithDefaults - -`func NewConnectorResponsePropertiesIndexWithDefaults() *ConnectorResponsePropertiesIndex` - -NewConnectorResponsePropertiesIndexWithDefaults instantiates a new ConnectorResponsePropertiesIndex object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *ConnectorResponsePropertiesIndex) GetConfig() ConfigPropertiesIndex` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *ConnectorResponsePropertiesIndex) GetConfigOk() (*ConfigPropertiesIndex, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *ConnectorResponsePropertiesIndex) SetConfig(v ConfigPropertiesIndex)` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *ConnectorResponsePropertiesIndex) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *ConnectorResponsePropertiesIndex) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *ConnectorResponsePropertiesIndex) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetId - -`func (o *ConnectorResponsePropertiesIndex) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ConnectorResponsePropertiesIndex) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ConnectorResponsePropertiesIndex) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *ConnectorResponsePropertiesIndex) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ConnectorResponsePropertiesIndex) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ConnectorResponsePropertiesIndex) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesIndex) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ConnectorResponsePropertiesIndex) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesIndex) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ConnectorResponsePropertiesIndex) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ConnectorResponsePropertiesIndex) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ConnectorResponsePropertiesIndex) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ConnectorResponsePropertiesIndex) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *ConnectorResponsePropertiesIndex) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ConnectorResponsePropertiesIndex) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ConnectorResponsePropertiesIndex) SetName(v string)` - -SetName sets Name field to given value. - - +**Config** | [***ConfigPropertiesIndex**](config_properties_index.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Id** | **string** | The identifier for the connector. | [default to null] +**IsDeprecated** | **bool** | | [default to null] +**IsMissingSecrets** | **bool** | | [optional] [default to null] +**IsPreconfigured** | **bool** | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesJira.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesJira.md index 4b5c455f8..42b303842 100644 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesJira.md +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesJira.md @@ -1,182 +1,15 @@ # ConnectorResponsePropertiesJira ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesJira**](ConfigPropertiesJira.md) | | -**ConnectorTypeId** | **string** | The type of connector. | -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewConnectorResponsePropertiesJira - -`func NewConnectorResponsePropertiesJira(config ConfigPropertiesJira, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesJira` - -NewConnectorResponsePropertiesJira instantiates a new ConnectorResponsePropertiesJira object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorResponsePropertiesJiraWithDefaults - -`func NewConnectorResponsePropertiesJiraWithDefaults() *ConnectorResponsePropertiesJira` - -NewConnectorResponsePropertiesJiraWithDefaults instantiates a new ConnectorResponsePropertiesJira object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *ConnectorResponsePropertiesJira) GetConfig() ConfigPropertiesJira` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *ConnectorResponsePropertiesJira) GetConfigOk() (*ConfigPropertiesJira, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *ConnectorResponsePropertiesJira) SetConfig(v ConfigPropertiesJira)` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *ConnectorResponsePropertiesJira) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *ConnectorResponsePropertiesJira) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *ConnectorResponsePropertiesJira) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetId - -`func (o *ConnectorResponsePropertiesJira) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ConnectorResponsePropertiesJira) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ConnectorResponsePropertiesJira) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *ConnectorResponsePropertiesJira) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ConnectorResponsePropertiesJira) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ConnectorResponsePropertiesJira) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesJira) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ConnectorResponsePropertiesJira) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesJira) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ConnectorResponsePropertiesJira) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ConnectorResponsePropertiesJira) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ConnectorResponsePropertiesJira) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ConnectorResponsePropertiesJira) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *ConnectorResponsePropertiesJira) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ConnectorResponsePropertiesJira) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ConnectorResponsePropertiesJira) SetName(v string)` - -SetName sets Name field to given value. - - +**Config** | [***ConfigPropertiesJira**](config_properties_jira.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Id** | **string** | The identifier for the connector. | [default to null] +**IsDeprecated** | **bool** | | [default to null] +**IsMissingSecrets** | **bool** | | [optional] [default to null] +**IsPreconfigured** | **bool** | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesOpsgenie.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesOpsgenie.md index 56ed8deaf..1592d0b71 100644 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesOpsgenie.md +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesOpsgenie.md @@ -1,182 +1,15 @@ # ConnectorResponsePropertiesOpsgenie ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesOpsgenie**](ConfigPropertiesOpsgenie.md) | | -**ConnectorTypeId** | **string** | The type of connector. | -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewConnectorResponsePropertiesOpsgenie - -`func NewConnectorResponsePropertiesOpsgenie(config ConfigPropertiesOpsgenie, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesOpsgenie` - -NewConnectorResponsePropertiesOpsgenie instantiates a new ConnectorResponsePropertiesOpsgenie object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorResponsePropertiesOpsgenieWithDefaults - -`func NewConnectorResponsePropertiesOpsgenieWithDefaults() *ConnectorResponsePropertiesOpsgenie` - -NewConnectorResponsePropertiesOpsgenieWithDefaults instantiates a new ConnectorResponsePropertiesOpsgenie object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *ConnectorResponsePropertiesOpsgenie) GetConfig() ConfigPropertiesOpsgenie` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *ConnectorResponsePropertiesOpsgenie) GetConfigOk() (*ConfigPropertiesOpsgenie, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *ConnectorResponsePropertiesOpsgenie) SetConfig(v ConfigPropertiesOpsgenie)` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *ConnectorResponsePropertiesOpsgenie) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *ConnectorResponsePropertiesOpsgenie) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *ConnectorResponsePropertiesOpsgenie) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetId - -`func (o *ConnectorResponsePropertiesOpsgenie) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ConnectorResponsePropertiesOpsgenie) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ConnectorResponsePropertiesOpsgenie) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *ConnectorResponsePropertiesOpsgenie) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ConnectorResponsePropertiesOpsgenie) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ConnectorResponsePropertiesOpsgenie) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesOpsgenie) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ConnectorResponsePropertiesOpsgenie) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesOpsgenie) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ConnectorResponsePropertiesOpsgenie) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ConnectorResponsePropertiesOpsgenie) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ConnectorResponsePropertiesOpsgenie) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ConnectorResponsePropertiesOpsgenie) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *ConnectorResponsePropertiesOpsgenie) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ConnectorResponsePropertiesOpsgenie) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ConnectorResponsePropertiesOpsgenie) SetName(v string)` - -SetName sets Name field to given value. - - +**Config** | [***ConfigPropertiesOpsgenie**](config_properties_opsgenie.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Id** | **string** | The identifier for the connector. | [default to null] +**IsDeprecated** | **bool** | | [default to null] +**IsMissingSecrets** | **bool** | | [optional] [default to null] +**IsPreconfigured** | **bool** | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesPagerduty.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesPagerduty.md index 11d780bc5..cc0d5e93d 100644 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesPagerduty.md +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesPagerduty.md @@ -1,182 +1,15 @@ # ConnectorResponsePropertiesPagerduty ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.pagerduty`. | -**ConnectorTypeId** | **string** | The type of connector. | -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewConnectorResponsePropertiesPagerduty - -`func NewConnectorResponsePropertiesPagerduty(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesPagerduty` - -NewConnectorResponsePropertiesPagerduty instantiates a new ConnectorResponsePropertiesPagerduty object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorResponsePropertiesPagerdutyWithDefaults - -`func NewConnectorResponsePropertiesPagerdutyWithDefaults() *ConnectorResponsePropertiesPagerduty` - -NewConnectorResponsePropertiesPagerdutyWithDefaults instantiates a new ConnectorResponsePropertiesPagerduty object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *ConnectorResponsePropertiesPagerduty) GetConfig() map[string]interface{}` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *ConnectorResponsePropertiesPagerduty) GetConfigOk() (*map[string]interface{}, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *ConnectorResponsePropertiesPagerduty) SetConfig(v map[string]interface{})` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *ConnectorResponsePropertiesPagerduty) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *ConnectorResponsePropertiesPagerduty) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *ConnectorResponsePropertiesPagerduty) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetId - -`func (o *ConnectorResponsePropertiesPagerduty) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ConnectorResponsePropertiesPagerduty) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ConnectorResponsePropertiesPagerduty) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *ConnectorResponsePropertiesPagerduty) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ConnectorResponsePropertiesPagerduty) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ConnectorResponsePropertiesPagerduty) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesPagerduty) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ConnectorResponsePropertiesPagerduty) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesPagerduty) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ConnectorResponsePropertiesPagerduty) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ConnectorResponsePropertiesPagerduty) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ConnectorResponsePropertiesPagerduty) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ConnectorResponsePropertiesPagerduty) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *ConnectorResponsePropertiesPagerduty) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ConnectorResponsePropertiesPagerduty) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ConnectorResponsePropertiesPagerduty) SetName(v string)` - -SetName sets Name field to given value. - - +**Config** | [***ModelMap**](map.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Id** | **string** | The identifier for the connector. | [default to null] +**IsDeprecated** | **bool** | | [default to null] +**IsMissingSecrets** | **bool** | | [optional] [default to null] +**IsPreconfigured** | **bool** | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesResilient.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesResilient.md index 2f1351883..5143d760c 100644 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesResilient.md +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesResilient.md @@ -1,182 +1,15 @@ # ConnectorResponsePropertiesResilient ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesResilient**](ConfigPropertiesResilient.md) | | -**ConnectorTypeId** | **string** | The type of connector. | -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewConnectorResponsePropertiesResilient - -`func NewConnectorResponsePropertiesResilient(config ConfigPropertiesResilient, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesResilient` - -NewConnectorResponsePropertiesResilient instantiates a new ConnectorResponsePropertiesResilient object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorResponsePropertiesResilientWithDefaults - -`func NewConnectorResponsePropertiesResilientWithDefaults() *ConnectorResponsePropertiesResilient` - -NewConnectorResponsePropertiesResilientWithDefaults instantiates a new ConnectorResponsePropertiesResilient object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *ConnectorResponsePropertiesResilient) GetConfig() ConfigPropertiesResilient` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *ConnectorResponsePropertiesResilient) GetConfigOk() (*ConfigPropertiesResilient, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *ConnectorResponsePropertiesResilient) SetConfig(v ConfigPropertiesResilient)` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *ConnectorResponsePropertiesResilient) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *ConnectorResponsePropertiesResilient) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *ConnectorResponsePropertiesResilient) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetId - -`func (o *ConnectorResponsePropertiesResilient) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ConnectorResponsePropertiesResilient) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ConnectorResponsePropertiesResilient) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *ConnectorResponsePropertiesResilient) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ConnectorResponsePropertiesResilient) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ConnectorResponsePropertiesResilient) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesResilient) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ConnectorResponsePropertiesResilient) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesResilient) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ConnectorResponsePropertiesResilient) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ConnectorResponsePropertiesResilient) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ConnectorResponsePropertiesResilient) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ConnectorResponsePropertiesResilient) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *ConnectorResponsePropertiesResilient) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ConnectorResponsePropertiesResilient) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ConnectorResponsePropertiesResilient) SetName(v string)` - -SetName sets Name field to given value. - - +**Config** | [***ConfigPropertiesResilient**](config_properties_resilient.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Id** | **string** | The identifier for the connector. | [default to null] +**IsDeprecated** | **bool** | | [default to null] +**IsMissingSecrets** | **bool** | | [optional] [default to null] +**IsPreconfigured** | **bool** | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesServerlog.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesServerlog.md index 1406ab7fa..68741666d 100644 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesServerlog.md +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesServerlog.md @@ -1,192 +1,15 @@ # ConnectorResponsePropertiesServerlog ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | **map[string]interface{}** | | -**ConnectorTypeId** | **string** | The type of connector. | -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewConnectorResponsePropertiesServerlog - -`func NewConnectorResponsePropertiesServerlog(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesServerlog` - -NewConnectorResponsePropertiesServerlog instantiates a new ConnectorResponsePropertiesServerlog object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorResponsePropertiesServerlogWithDefaults - -`func NewConnectorResponsePropertiesServerlogWithDefaults() *ConnectorResponsePropertiesServerlog` - -NewConnectorResponsePropertiesServerlogWithDefaults instantiates a new ConnectorResponsePropertiesServerlog object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *ConnectorResponsePropertiesServerlog) GetConfig() map[string]interface{}` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *ConnectorResponsePropertiesServerlog) GetConfigOk() (*map[string]interface{}, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *ConnectorResponsePropertiesServerlog) SetConfig(v map[string]interface{})` - -SetConfig sets Config field to given value. - - -### SetConfigNil - -`func (o *ConnectorResponsePropertiesServerlog) SetConfigNil(b bool)` - - SetConfigNil sets the value for Config to be an explicit nil - -### UnsetConfig -`func (o *ConnectorResponsePropertiesServerlog) UnsetConfig()` - -UnsetConfig ensures that no value is present for Config, not even an explicit nil -### GetConnectorTypeId - -`func (o *ConnectorResponsePropertiesServerlog) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *ConnectorResponsePropertiesServerlog) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *ConnectorResponsePropertiesServerlog) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetId - -`func (o *ConnectorResponsePropertiesServerlog) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ConnectorResponsePropertiesServerlog) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ConnectorResponsePropertiesServerlog) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *ConnectorResponsePropertiesServerlog) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ConnectorResponsePropertiesServerlog) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ConnectorResponsePropertiesServerlog) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesServerlog) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ConnectorResponsePropertiesServerlog) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesServerlog) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ConnectorResponsePropertiesServerlog) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ConnectorResponsePropertiesServerlog) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ConnectorResponsePropertiesServerlog) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ConnectorResponsePropertiesServerlog) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *ConnectorResponsePropertiesServerlog) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ConnectorResponsePropertiesServerlog) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ConnectorResponsePropertiesServerlog) SetName(v string)` - -SetName sets Name field to given value. - - +**Config** | [***interface{}**](interface{}.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Id** | **string** | The identifier for the connector. | [default to null] +**IsDeprecated** | **bool** | | [default to null] +**IsMissingSecrets** | **bool** | | [optional] [default to null] +**IsPreconfigured** | **bool** | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenow.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenow.md index 3d2d84495..ead93d977 100644 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenow.md +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenow.md @@ -1,182 +1,15 @@ # ConnectorResponsePropertiesServicenow ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesServicenow**](ConfigPropertiesServicenow.md) | | -**ConnectorTypeId** | **string** | The type of connector. | -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewConnectorResponsePropertiesServicenow - -`func NewConnectorResponsePropertiesServicenow(config ConfigPropertiesServicenow, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesServicenow` - -NewConnectorResponsePropertiesServicenow instantiates a new ConnectorResponsePropertiesServicenow object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorResponsePropertiesServicenowWithDefaults - -`func NewConnectorResponsePropertiesServicenowWithDefaults() *ConnectorResponsePropertiesServicenow` - -NewConnectorResponsePropertiesServicenowWithDefaults instantiates a new ConnectorResponsePropertiesServicenow object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *ConnectorResponsePropertiesServicenow) GetConfig() ConfigPropertiesServicenow` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *ConnectorResponsePropertiesServicenow) GetConfigOk() (*ConfigPropertiesServicenow, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *ConnectorResponsePropertiesServicenow) SetConfig(v ConfigPropertiesServicenow)` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *ConnectorResponsePropertiesServicenow) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *ConnectorResponsePropertiesServicenow) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *ConnectorResponsePropertiesServicenow) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetId - -`func (o *ConnectorResponsePropertiesServicenow) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ConnectorResponsePropertiesServicenow) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ConnectorResponsePropertiesServicenow) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *ConnectorResponsePropertiesServicenow) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ConnectorResponsePropertiesServicenow) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ConnectorResponsePropertiesServicenow) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesServicenow) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ConnectorResponsePropertiesServicenow) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesServicenow) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ConnectorResponsePropertiesServicenow) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ConnectorResponsePropertiesServicenow) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ConnectorResponsePropertiesServicenow) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ConnectorResponsePropertiesServicenow) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *ConnectorResponsePropertiesServicenow) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ConnectorResponsePropertiesServicenow) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ConnectorResponsePropertiesServicenow) SetName(v string)` - -SetName sets Name field to given value. - - +**Config** | [***ConfigPropertiesServicenow**](config_properties_servicenow.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Id** | **string** | The identifier for the connector. | [default to null] +**IsDeprecated** | **bool** | | [default to null] +**IsMissingSecrets** | **bool** | | [optional] [default to null] +**IsPreconfigured** | **bool** | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowItom.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowItom.md index 9cbf251d0..2a4d1d86a 100644 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowItom.md +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowItom.md @@ -1,182 +1,15 @@ # ConnectorResponsePropertiesServicenowItom ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesServicenowItom**](ConfigPropertiesServicenowItom.md) | | -**ConnectorTypeId** | **string** | The type of connector. | -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewConnectorResponsePropertiesServicenowItom - -`func NewConnectorResponsePropertiesServicenowItom(config ConfigPropertiesServicenowItom, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesServicenowItom` - -NewConnectorResponsePropertiesServicenowItom instantiates a new ConnectorResponsePropertiesServicenowItom object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorResponsePropertiesServicenowItomWithDefaults - -`func NewConnectorResponsePropertiesServicenowItomWithDefaults() *ConnectorResponsePropertiesServicenowItom` - -NewConnectorResponsePropertiesServicenowItomWithDefaults instantiates a new ConnectorResponsePropertiesServicenowItom object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *ConnectorResponsePropertiesServicenowItom) GetConfig() ConfigPropertiesServicenowItom` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *ConnectorResponsePropertiesServicenowItom) GetConfigOk() (*ConfigPropertiesServicenowItom, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *ConnectorResponsePropertiesServicenowItom) SetConfig(v ConfigPropertiesServicenowItom)` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *ConnectorResponsePropertiesServicenowItom) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *ConnectorResponsePropertiesServicenowItom) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *ConnectorResponsePropertiesServicenowItom) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetId - -`func (o *ConnectorResponsePropertiesServicenowItom) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ConnectorResponsePropertiesServicenowItom) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ConnectorResponsePropertiesServicenowItom) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *ConnectorResponsePropertiesServicenowItom) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ConnectorResponsePropertiesServicenowItom) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ConnectorResponsePropertiesServicenowItom) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesServicenowItom) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ConnectorResponsePropertiesServicenowItom) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesServicenowItom) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ConnectorResponsePropertiesServicenowItom) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ConnectorResponsePropertiesServicenowItom) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ConnectorResponsePropertiesServicenowItom) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ConnectorResponsePropertiesServicenowItom) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *ConnectorResponsePropertiesServicenowItom) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ConnectorResponsePropertiesServicenowItom) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ConnectorResponsePropertiesServicenowItom) SetName(v string)` - -SetName sets Name field to given value. - - +**Config** | [***ConfigPropertiesServicenowItom**](config_properties_servicenow_itom.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Id** | **string** | The identifier for the connector. | [default to null] +**IsDeprecated** | **bool** | | [default to null] +**IsMissingSecrets** | **bool** | | [optional] [default to null] +**IsPreconfigured** | **bool** | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowSir.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowSir.md index e7ff1fc5d..a480bebbf 100644 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowSir.md +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowSir.md @@ -1,182 +1,15 @@ # ConnectorResponsePropertiesServicenowSir ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesServicenow**](ConfigPropertiesServicenow.md) | | -**ConnectorTypeId** | **string** | The type of connector. | -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewConnectorResponsePropertiesServicenowSir - -`func NewConnectorResponsePropertiesServicenowSir(config ConfigPropertiesServicenow, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesServicenowSir` - -NewConnectorResponsePropertiesServicenowSir instantiates a new ConnectorResponsePropertiesServicenowSir object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorResponsePropertiesServicenowSirWithDefaults - -`func NewConnectorResponsePropertiesServicenowSirWithDefaults() *ConnectorResponsePropertiesServicenowSir` - -NewConnectorResponsePropertiesServicenowSirWithDefaults instantiates a new ConnectorResponsePropertiesServicenowSir object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *ConnectorResponsePropertiesServicenowSir) GetConfig() ConfigPropertiesServicenow` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *ConnectorResponsePropertiesServicenowSir) GetConfigOk() (*ConfigPropertiesServicenow, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *ConnectorResponsePropertiesServicenowSir) SetConfig(v ConfigPropertiesServicenow)` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *ConnectorResponsePropertiesServicenowSir) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *ConnectorResponsePropertiesServicenowSir) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *ConnectorResponsePropertiesServicenowSir) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetId - -`func (o *ConnectorResponsePropertiesServicenowSir) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ConnectorResponsePropertiesServicenowSir) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ConnectorResponsePropertiesServicenowSir) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *ConnectorResponsePropertiesServicenowSir) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ConnectorResponsePropertiesServicenowSir) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ConnectorResponsePropertiesServicenowSir) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesServicenowSir) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ConnectorResponsePropertiesServicenowSir) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesServicenowSir) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ConnectorResponsePropertiesServicenowSir) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ConnectorResponsePropertiesServicenowSir) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ConnectorResponsePropertiesServicenowSir) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ConnectorResponsePropertiesServicenowSir) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *ConnectorResponsePropertiesServicenowSir) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ConnectorResponsePropertiesServicenowSir) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ConnectorResponsePropertiesServicenowSir) SetName(v string)` - -SetName sets Name field to given value. - - +**Config** | [***ConfigPropertiesServicenow**](config_properties_servicenow.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Id** | **string** | The identifier for the connector. | [default to null] +**IsDeprecated** | **bool** | | [default to null] +**IsMissingSecrets** | **bool** | | [optional] [default to null] +**IsPreconfigured** | **bool** | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesSlack.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesSlack.md index f88435d2b..881318965 100644 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesSlack.md +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesSlack.md @@ -1,161 +1,14 @@ # ConnectorResponsePropertiesSlack ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ConnectorTypeId** | **string** | The type of connector. | -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewConnectorResponsePropertiesSlack - -`func NewConnectorResponsePropertiesSlack(connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesSlack` - -NewConnectorResponsePropertiesSlack instantiates a new ConnectorResponsePropertiesSlack object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorResponsePropertiesSlackWithDefaults - -`func NewConnectorResponsePropertiesSlackWithDefaults() *ConnectorResponsePropertiesSlack` - -NewConnectorResponsePropertiesSlackWithDefaults instantiates a new ConnectorResponsePropertiesSlack object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConnectorTypeId - -`func (o *ConnectorResponsePropertiesSlack) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *ConnectorResponsePropertiesSlack) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *ConnectorResponsePropertiesSlack) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetId - -`func (o *ConnectorResponsePropertiesSlack) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ConnectorResponsePropertiesSlack) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ConnectorResponsePropertiesSlack) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *ConnectorResponsePropertiesSlack) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ConnectorResponsePropertiesSlack) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ConnectorResponsePropertiesSlack) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesSlack) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ConnectorResponsePropertiesSlack) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesSlack) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ConnectorResponsePropertiesSlack) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ConnectorResponsePropertiesSlack) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ConnectorResponsePropertiesSlack) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ConnectorResponsePropertiesSlack) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *ConnectorResponsePropertiesSlack) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ConnectorResponsePropertiesSlack) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ConnectorResponsePropertiesSlack) SetName(v string)` - -SetName sets Name field to given value. - - +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Id** | **string** | The identifier for the connector. | [default to null] +**IsDeprecated** | **bool** | | [default to null] +**IsMissingSecrets** | **bool** | | [optional] [default to null] +**IsPreconfigured** | **bool** | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesSwimlane.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesSwimlane.md index 53886014d..4b4a7da73 100644 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesSwimlane.md +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesSwimlane.md @@ -1,182 +1,15 @@ # ConnectorResponsePropertiesSwimlane ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesSwimlane**](ConfigPropertiesSwimlane.md) | | -**ConnectorTypeId** | **string** | The type of connector. | -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewConnectorResponsePropertiesSwimlane - -`func NewConnectorResponsePropertiesSwimlane(config ConfigPropertiesSwimlane, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesSwimlane` - -NewConnectorResponsePropertiesSwimlane instantiates a new ConnectorResponsePropertiesSwimlane object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorResponsePropertiesSwimlaneWithDefaults - -`func NewConnectorResponsePropertiesSwimlaneWithDefaults() *ConnectorResponsePropertiesSwimlane` - -NewConnectorResponsePropertiesSwimlaneWithDefaults instantiates a new ConnectorResponsePropertiesSwimlane object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *ConnectorResponsePropertiesSwimlane) GetConfig() ConfigPropertiesSwimlane` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *ConnectorResponsePropertiesSwimlane) GetConfigOk() (*ConfigPropertiesSwimlane, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *ConnectorResponsePropertiesSwimlane) SetConfig(v ConfigPropertiesSwimlane)` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *ConnectorResponsePropertiesSwimlane) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *ConnectorResponsePropertiesSwimlane) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *ConnectorResponsePropertiesSwimlane) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetId - -`func (o *ConnectorResponsePropertiesSwimlane) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ConnectorResponsePropertiesSwimlane) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ConnectorResponsePropertiesSwimlane) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *ConnectorResponsePropertiesSwimlane) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ConnectorResponsePropertiesSwimlane) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ConnectorResponsePropertiesSwimlane) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesSwimlane) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ConnectorResponsePropertiesSwimlane) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesSwimlane) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ConnectorResponsePropertiesSwimlane) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ConnectorResponsePropertiesSwimlane) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ConnectorResponsePropertiesSwimlane) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ConnectorResponsePropertiesSwimlane) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *ConnectorResponsePropertiesSwimlane) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ConnectorResponsePropertiesSwimlane) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ConnectorResponsePropertiesSwimlane) SetName(v string)` - -SetName sets Name field to given value. - - +**Config** | [***ConfigPropertiesSwimlane**](config_properties_swimlane.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Id** | **string** | The identifier for the connector. | [default to null] +**IsDeprecated** | **bool** | | [default to null] +**IsMissingSecrets** | **bool** | | [optional] [default to null] +**IsPreconfigured** | **bool** | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesTeams.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesTeams.md index 09f88d03a..d1039e351 100644 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesTeams.md +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesTeams.md @@ -1,161 +1,14 @@ # ConnectorResponsePropertiesTeams ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ConnectorTypeId** | **string** | The type of connector. | -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewConnectorResponsePropertiesTeams - -`func NewConnectorResponsePropertiesTeams(connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesTeams` - -NewConnectorResponsePropertiesTeams instantiates a new ConnectorResponsePropertiesTeams object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorResponsePropertiesTeamsWithDefaults - -`func NewConnectorResponsePropertiesTeamsWithDefaults() *ConnectorResponsePropertiesTeams` - -NewConnectorResponsePropertiesTeamsWithDefaults instantiates a new ConnectorResponsePropertiesTeams object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConnectorTypeId - -`func (o *ConnectorResponsePropertiesTeams) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *ConnectorResponsePropertiesTeams) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *ConnectorResponsePropertiesTeams) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetId - -`func (o *ConnectorResponsePropertiesTeams) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ConnectorResponsePropertiesTeams) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ConnectorResponsePropertiesTeams) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *ConnectorResponsePropertiesTeams) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ConnectorResponsePropertiesTeams) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ConnectorResponsePropertiesTeams) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesTeams) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ConnectorResponsePropertiesTeams) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesTeams) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ConnectorResponsePropertiesTeams) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ConnectorResponsePropertiesTeams) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ConnectorResponsePropertiesTeams) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ConnectorResponsePropertiesTeams) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *ConnectorResponsePropertiesTeams) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ConnectorResponsePropertiesTeams) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ConnectorResponsePropertiesTeams) SetName(v string)` - -SetName sets Name field to given value. - - +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Id** | **string** | The identifier for the connector. | [default to null] +**IsDeprecated** | **bool** | | [default to null] +**IsMissingSecrets** | **bool** | | [optional] [default to null] +**IsPreconfigured** | **bool** | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesTines.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesTines.md index e3e66ce75..71fcfb659 100644 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesTines.md +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesTines.md @@ -1,182 +1,15 @@ # ConnectorResponsePropertiesTines ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.tines`. | -**ConnectorTypeId** | **string** | The type of connector. | -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewConnectorResponsePropertiesTines - -`func NewConnectorResponsePropertiesTines(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesTines` - -NewConnectorResponsePropertiesTines instantiates a new ConnectorResponsePropertiesTines object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorResponsePropertiesTinesWithDefaults - -`func NewConnectorResponsePropertiesTinesWithDefaults() *ConnectorResponsePropertiesTines` - -NewConnectorResponsePropertiesTinesWithDefaults instantiates a new ConnectorResponsePropertiesTines object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *ConnectorResponsePropertiesTines) GetConfig() map[string]interface{}` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *ConnectorResponsePropertiesTines) GetConfigOk() (*map[string]interface{}, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *ConnectorResponsePropertiesTines) SetConfig(v map[string]interface{})` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *ConnectorResponsePropertiesTines) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *ConnectorResponsePropertiesTines) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *ConnectorResponsePropertiesTines) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetId - -`func (o *ConnectorResponsePropertiesTines) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ConnectorResponsePropertiesTines) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ConnectorResponsePropertiesTines) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *ConnectorResponsePropertiesTines) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ConnectorResponsePropertiesTines) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ConnectorResponsePropertiesTines) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesTines) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ConnectorResponsePropertiesTines) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesTines) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ConnectorResponsePropertiesTines) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ConnectorResponsePropertiesTines) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ConnectorResponsePropertiesTines) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ConnectorResponsePropertiesTines) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *ConnectorResponsePropertiesTines) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ConnectorResponsePropertiesTines) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ConnectorResponsePropertiesTines) SetName(v string)` - -SetName sets Name field to given value. - - +**Config** | [***ModelMap**](map.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Id** | **string** | The identifier for the connector. | [default to null] +**IsDeprecated** | **bool** | | [default to null] +**IsMissingSecrets** | **bool** | | [optional] [default to null] +**IsPreconfigured** | **bool** | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesWebhook.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesWebhook.md index 0578d3a8b..505d53c62 100644 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesWebhook.md +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesWebhook.md @@ -1,182 +1,15 @@ # ConnectorResponsePropertiesWebhook ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.webhook`. | -**ConnectorTypeId** | **string** | The type of connector. | -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewConnectorResponsePropertiesWebhook - -`func NewConnectorResponsePropertiesWebhook(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesWebhook` - -NewConnectorResponsePropertiesWebhook instantiates a new ConnectorResponsePropertiesWebhook object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorResponsePropertiesWebhookWithDefaults - -`func NewConnectorResponsePropertiesWebhookWithDefaults() *ConnectorResponsePropertiesWebhook` - -NewConnectorResponsePropertiesWebhookWithDefaults instantiates a new ConnectorResponsePropertiesWebhook object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *ConnectorResponsePropertiesWebhook) GetConfig() map[string]interface{}` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *ConnectorResponsePropertiesWebhook) GetConfigOk() (*map[string]interface{}, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *ConnectorResponsePropertiesWebhook) SetConfig(v map[string]interface{})` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *ConnectorResponsePropertiesWebhook) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *ConnectorResponsePropertiesWebhook) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *ConnectorResponsePropertiesWebhook) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetId - -`func (o *ConnectorResponsePropertiesWebhook) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ConnectorResponsePropertiesWebhook) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ConnectorResponsePropertiesWebhook) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *ConnectorResponsePropertiesWebhook) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ConnectorResponsePropertiesWebhook) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ConnectorResponsePropertiesWebhook) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesWebhook) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ConnectorResponsePropertiesWebhook) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesWebhook) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ConnectorResponsePropertiesWebhook) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ConnectorResponsePropertiesWebhook) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ConnectorResponsePropertiesWebhook) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ConnectorResponsePropertiesWebhook) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *ConnectorResponsePropertiesWebhook) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ConnectorResponsePropertiesWebhook) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ConnectorResponsePropertiesWebhook) SetName(v string)` - -SetName sets Name field to given value. - - +**Config** | [***ModelMap**](map.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Id** | **string** | The identifier for the connector. | [default to null] +**IsDeprecated** | **bool** | | [default to null] +**IsMissingSecrets** | **bool** | | [optional] [default to null] +**IsPreconfigured** | **bool** | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesXmatters.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesXmatters.md index 6eba5164b..c12547c31 100644 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesXmatters.md +++ b/generated/kibanaactions/docs/ConnectorResponsePropertiesXmatters.md @@ -1,182 +1,15 @@ # ConnectorResponsePropertiesXmatters ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.xmatters`. | -**ConnectorTypeId** | **string** | The type of connector. | -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewConnectorResponsePropertiesXmatters - -`func NewConnectorResponsePropertiesXmatters(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string, ) *ConnectorResponsePropertiesXmatters` - -NewConnectorResponsePropertiesXmatters instantiates a new ConnectorResponsePropertiesXmatters object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConnectorResponsePropertiesXmattersWithDefaults - -`func NewConnectorResponsePropertiesXmattersWithDefaults() *ConnectorResponsePropertiesXmatters` - -NewConnectorResponsePropertiesXmattersWithDefaults instantiates a new ConnectorResponsePropertiesXmatters object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *ConnectorResponsePropertiesXmatters) GetConfig() map[string]interface{}` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *ConnectorResponsePropertiesXmatters) GetConfigOk() (*map[string]interface{}, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *ConnectorResponsePropertiesXmatters) SetConfig(v map[string]interface{})` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *ConnectorResponsePropertiesXmatters) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *ConnectorResponsePropertiesXmatters) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *ConnectorResponsePropertiesXmatters) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetId - -`func (o *ConnectorResponsePropertiesXmatters) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ConnectorResponsePropertiesXmatters) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ConnectorResponsePropertiesXmatters) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *ConnectorResponsePropertiesXmatters) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *ConnectorResponsePropertiesXmatters) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *ConnectorResponsePropertiesXmatters) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesXmatters) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *ConnectorResponsePropertiesXmatters) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *ConnectorResponsePropertiesXmatters) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *ConnectorResponsePropertiesXmatters) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *ConnectorResponsePropertiesXmatters) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *ConnectorResponsePropertiesXmatters) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *ConnectorResponsePropertiesXmatters) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *ConnectorResponsePropertiesXmatters) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ConnectorResponsePropertiesXmatters) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *ConnectorResponsePropertiesXmatters) SetName(v string)` - -SetName sets Name field to given value. - - +**Config** | [***ModelMap**](map.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Id** | **string** | The identifier for the connector. | [default to null] +**IsDeprecated** | **bool** | | [default to null] +**IsMissingSecrets** | **bool** | | [optional] [default to null] +**IsPreconfigured** | **bool** | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorTypes.md b/generated/kibanaactions/docs/ConnectorTypes.md index 905aa4c79..abcf0a016 100644 --- a/generated/kibanaactions/docs/ConnectorTypes.md +++ b/generated/kibanaactions/docs/ConnectorTypes.md @@ -1,43 +1,8 @@ # ConnectorTypes -## Enum - - -* `CASES_WEBHOOK` (value: `".cases-webhook"`) - -* `EMAIL` (value: `".email"`) - -* `INDEX` (value: `".index"`) - -* `JIRA` (value: `".jira"`) - -* `OPSGENIE` (value: `".opsgenie"`) - -* `PAGERDUTY` (value: `".pagerduty"`) - -* `RESILIENT` (value: `".resilient"`) - -* `SERVICENOW` (value: `".servicenow"`) - -* `SERVICENOW_ITOM` (value: `".servicenow-itom"`) - -* `SERVICENOW_SIR` (value: `".servicenow-sir"`) - -* `SERVER_LOG` (value: `".server-log"`) - -* `SLACK` (value: `".slack"`) - -* `SWIMLANE` (value: `".swimlane"`) - -* `TEAMS` (value: `".teams"`) - -* `TINES` (value: `".tines"`) - -* `WEBHOOK` (value: `".webhook"`) - -* `XMATTERS` (value: `".xmatters"`) - +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorsApi.md b/generated/kibanaactions/docs/ConnectorsApi.md index 98d260d62..847955ef5 100644 --- a/generated/kibanaactions/docs/ConnectorsApi.md +++ b/generated/kibanaactions/docs/ConnectorsApi.md @@ -1,4 +1,4 @@ -# \ConnectorsApi +# {{classname}} All URIs are relative to *http://localhost:5601* @@ -19,136 +19,50 @@ Method | HTTP request | Description [**RunConnector**](ConnectorsApi.md#RunConnector) | **Post** /s/{spaceId}/api/actions/connector/{connectorId}/_execute | Runs a connector. [**UpdateConnector**](ConnectorsApi.md#UpdateConnector) | **Put** /s/{spaceId}/api/actions/connector/{connectorId} | Updates the attributes for a connector. - - -## CreateConnector - -> ConnectorResponseProperties CreateConnector(ctx, spaceId).KbnXsrf(kbnXsrf).CreateConnectorRequestBodyProperties(createConnectorRequestBodyProperties).Execute() - +# **CreateConnector** +> ConnectorResponseProperties CreateConnector(ctx, body, kbnXsrf, spaceId) Creates a connector. +You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" -) - -func main() { - kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection - spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - createConnectorRequestBodyProperties := openapiclient.Create_connector_request_body_properties{CreateConnectorRequestCasesWebhook: openapiclient.NewCreateConnectorRequestCasesWebhook(*openapiclient.NewConfigPropertiesCasesWebhook("{"fields":{"summary":{"[object Object]":null},"description":{"[object Object]":null},"labels":{"[object Object]":null}}}", "CreateIncidentResponseKey_example", "CreateIncidentUrl_example", "GetIncidentResponseExternalTitleKey_example", "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}", "{"fields":{"summary":{"[object Object]":null},"description":{"[object Object]":null},"labels":{"[object Object]":null}}}", "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.ID}}}", "https://testing-jira.atlassian.net/browse/{{{external.system.title}}}"), ".cases-webhook", "my-connector")} // CreateConnectorRequestBodyProperties | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConnectorsApi.CreateConnector(context.Background(), spaceId).KbnXsrf(kbnXsrf).CreateConnectorRequestBodyProperties(createConnectorRequestBodyProperties).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.CreateConnector``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateConnector`: ConnectorResponseProperties - fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.CreateConnector`: %v\n", resp) -} -``` - -### Path Parameters - +### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateConnectorRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kbnXsrf** | **string** | Cross-site request forgery protection | - - **createConnectorRequestBodyProperties** | [**CreateConnectorRequestBodyProperties**](CreateConnectorRequestBodyProperties.md) | | + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**CreateConnectorRequestBodyProperties**](CreateConnectorRequestBodyProperties.md)| | + **kbnXsrf** | **string**| Cross-site request forgery protection | + **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | ### Return type -[**ConnectorResponseProperties**](ConnectorResponseProperties.md) +[**ConnectorResponseProperties**](connector_response_properties.md) ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) ### HTTP request headers -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - + - **Content-Type**: application/json + - **Accept**: application/json -## DeleteConnector - -> DeleteConnector(ctx, connectorId, spaceId).KbnXsrf(kbnXsrf).Execute() +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **DeleteConnector** +> DeleteConnector(ctx, kbnXsrf, connectorId, spaceId) Deletes a connector. +You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be recovered. - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" -) - -func main() { - kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection - connectorId := "df770e30-8b8b-11ed-a780-3b746c987a81" // string | An identifier for the connector. - spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ConnectorsApi.DeleteConnector(context.Background(), connectorId, spaceId).KbnXsrf(kbnXsrf).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.DeleteConnector``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - +### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**connectorId** | **string** | An identifier for the connector. | -**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteConnectorRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kbnXsrf** | **string** | Cross-site request forgery protection | - - + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **kbnXsrf** | **string**| Cross-site request forgery protection | + **connectorId** | **string**| An identifier for the connector. | + **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | ### Return type @@ -156,361 +70,152 @@ Name | Type | Description | Notes ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) ### HTTP request headers -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetConnector + - **Content-Type**: Not defined + - **Accept**: application/json -> ConnectorResponseProperties GetConnector(ctx, connectorId, spaceId).Execute() +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **GetConnector** +> ConnectorResponseProperties GetConnector(ctx, connectorId, spaceId) Retrieves a connector by ID. +You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" -) - -func main() { - connectorId := "df770e30-8b8b-11ed-a780-3b746c987a81" // string | An identifier for the connector. - spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConnectorsApi.GetConnector(context.Background(), connectorId, spaceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.GetConnector``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetConnector`: ConnectorResponseProperties - fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.GetConnector`: %v\n", resp) -} -``` - -### Path Parameters - +### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**connectorId** | **string** | An identifier for the connector. | -**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetConnectorRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **connectorId** | **string**| An identifier for the connector. | + **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | ### Return type -[**ConnectorResponseProperties**](ConnectorResponseProperties.md) +[**ConnectorResponseProperties**](connector_response_properties.md) ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) ### HTTP request headers -- **Content-Type**: Not defined -- **Accept**: application/json + - **Content-Type**: Not defined + - **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetConnectorTypes - -> []GetConnectorTypesResponseBodyPropertiesInner GetConnectorTypes(ctx, spaceId).FeatureId(featureId).Execute() +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **GetConnectorTypes** +> []InlineResponse200 GetConnectorTypes(ctx, spaceId, optional) Retrieves a list of all connector types. +You do not need any Kibana feature privileges to run this API. - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" -) - -func main() { - spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - featureId := openapiclient.features("alerting") // Features | A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases). (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConnectorsApi.GetConnectorTypes(context.Background(), spaceId).FeatureId(featureId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.GetConnectorTypes``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetConnectorTypes`: []GetConnectorTypesResponseBodyPropertiesInner - fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.GetConnectorTypes`: %v\n", resp) -} -``` - -### Path Parameters - +### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetConnectorTypesRequest struct via the builder pattern - + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + **optional** | ***ConnectorsApiGetConnectorTypesOpts** | optional parameters | nil if no parameters +### Optional Parameters +Optional parameters are passed through a pointer to a ConnectorsApiGetConnectorTypesOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **featureId** | [**Features**](Features.md) | A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases). | + **featureId** | [**optional.Interface of Features**](.md)| A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases). | ### Return type -[**[]GetConnectorTypesResponseBodyPropertiesInner**](GetConnectorTypesResponseBodyPropertiesInner.md) +[**[]InlineResponse200**](inline_response_200.md) ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) ### HTTP request headers -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - + - **Content-Type**: Not defined + - **Accept**: application/json -## GetConnectors - -> []GetConnectorsResponseBodyProperties GetConnectors(ctx, spaceId).Execute() +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **GetConnectors** +> []GetConnectorsResponseBodyProperties GetConnectors(ctx, spaceId) Retrieves all connectors. +You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" -) - -func main() { - spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConnectorsApi.GetConnectors(context.Background(), spaceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.GetConnectors``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetConnectors`: []GetConnectorsResponseBodyProperties - fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.GetConnectors`: %v\n", resp) -} -``` - -### Path Parameters - +### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetConnectorsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | ### Return type -[**[]GetConnectorsResponseBodyProperties**](GetConnectorsResponseBodyProperties.md) +[**[]GetConnectorsResponseBodyProperties**](Get connectors response body properties.md) ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) ### HTTP request headers -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) + - **Content-Type**: Not defined + - **Accept**: application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## LegacyCreateConnector - -> ActionResponseProperties LegacyCreateConnector(ctx, spaceId).KbnXsrf(kbnXsrf).LegacyCreateConnectorRequestProperties(legacyCreateConnectorRequestProperties).Execute() - +# **LegacyCreateConnector** +> ActionResponseProperties LegacyCreateConnector(ctx, body, kbnXsrf, spaceId) Creates a connector. +Deprecated in 7.13.0. Use the create connector API instead. - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" -) - -func main() { - kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection - spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - legacyCreateConnectorRequestProperties := *openapiclient.NewLegacyCreateConnectorRequestProperties() // LegacyCreateConnectorRequestProperties | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConnectorsApi.LegacyCreateConnector(context.Background(), spaceId).KbnXsrf(kbnXsrf).LegacyCreateConnectorRequestProperties(legacyCreateConnectorRequestProperties).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.LegacyCreateConnector``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LegacyCreateConnector`: ActionResponseProperties - fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.LegacyCreateConnector`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiLegacyCreateConnectorRequest struct via the builder pattern - +### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **kbnXsrf** | **string** | Cross-site request forgery protection | - - **legacyCreateConnectorRequestProperties** | [**LegacyCreateConnectorRequestProperties**](LegacyCreateConnectorRequestProperties.md) | | + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**LegacyCreateConnectorRequestProperties**](LegacyCreateConnectorRequestProperties.md)| | + **kbnXsrf** | **string**| Cross-site request forgery protection | + **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | ### Return type -[**ActionResponseProperties**](ActionResponseProperties.md) +[**ActionResponseProperties**](action_response_properties.md) ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) ### HTTP request headers -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## LegacyDeleteConnector + - **Content-Type**: application/json + - **Accept**: application/json -> LegacyDeleteConnector(ctx, actionId, spaceId).KbnXsrf(kbnXsrf).Execute() +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **LegacyDeleteConnector** +> LegacyDeleteConnector(ctx, kbnXsrf, actionId, spaceId) Deletes a connector. +Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, it cannot be recovered. - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" -) - -func main() { - kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection - actionId := "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad" // string | An identifier for the action. - spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.ConnectorsApi.LegacyDeleteConnector(context.Background(), actionId, spaceId).KbnXsrf(kbnXsrf).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.LegacyDeleteConnector``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - +### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**actionId** | **string** | An identifier for the action. | -**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiLegacyDeleteConnectorRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kbnXsrf** | **string** | Cross-site request forgery protection | - - + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **kbnXsrf** | **string**| Cross-site request forgery protection | + **actionId** | **string**| An identifier for the action. | + **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | ### Return type @@ -518,535 +223,221 @@ Name | Type | Description | Notes ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) ### HTTP request headers -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## LegacyGetConnector + - **Content-Type**: Not defined + - **Accept**: application/json -> ActionResponseProperties LegacyGetConnector(ctx, actionId, spaceId).Execute() +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **LegacyGetConnector** +> ActionResponseProperties LegacyGetConnector(ctx, actionId, spaceId) Retrieves a connector by ID. +Deprecated in 7.13.0. Use the get connector API instead. - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" -) - -func main() { - actionId := "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad" // string | An identifier for the action. - spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConnectorsApi.LegacyGetConnector(context.Background(), actionId, spaceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.LegacyGetConnector``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LegacyGetConnector`: ActionResponseProperties - fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.LegacyGetConnector`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**actionId** | **string** | An identifier for the action. | -**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiLegacyGetConnectorRequest struct via the builder pattern - +### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **actionId** | **string**| An identifier for the action. | + **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | ### Return type -[**ActionResponseProperties**](ActionResponseProperties.md) +[**ActionResponseProperties**](action_response_properties.md) ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) ### HTTP request headers -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) + - **Content-Type**: Not defined + - **Accept**: application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## LegacyGetConnectorTypes - -> []LegacyGetConnectorTypesResponseBodyPropertiesInner LegacyGetConnectorTypes(ctx, spaceId).Execute() - +# **LegacyGetConnectorTypes** +> []InlineResponse2002 LegacyGetConnectorTypes(ctx, spaceId) Retrieves a list of all connector types. +Deprecated in 7.13.0. Use the get all connector types API instead. - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" -) - -func main() { - spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConnectorsApi.LegacyGetConnectorTypes(context.Background(), spaceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.LegacyGetConnectorTypes``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LegacyGetConnectorTypes`: []LegacyGetConnectorTypesResponseBodyPropertiesInner - fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.LegacyGetConnectorTypes`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiLegacyGetConnectorTypesRequest struct via the builder pattern - +### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | ### Return type -[**[]LegacyGetConnectorTypesResponseBodyPropertiesInner**](LegacyGetConnectorTypesResponseBodyPropertiesInner.md) +[**[]InlineResponse2002**](inline_response_200_2.md) ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) ### HTTP request headers -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## LegacyGetConnectors + - **Content-Type**: Not defined + - **Accept**: application/json -> []ActionResponseProperties LegacyGetConnectors(ctx, spaceId).Execute() +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **LegacyGetConnectors** +> []ActionResponseProperties LegacyGetConnectors(ctx, spaceId) Retrieves all connectors. +Deprecated in 7.13.0. Use the get all connectors API instead. - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" -) - -func main() { - spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConnectorsApi.LegacyGetConnectors(context.Background(), spaceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.LegacyGetConnectors``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LegacyGetConnectors`: []ActionResponseProperties - fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.LegacyGetConnectors`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiLegacyGetConnectorsRequest struct via the builder pattern - +### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | ### Return type -[**[]ActionResponseProperties**](ActionResponseProperties.md) +[**[]ActionResponseProperties**](action_response_properties.md) ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) ### HTTP request headers -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) + - **Content-Type**: Not defined + - **Accept**: application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## LegacyRunConnector - -> LegacyRunConnector200Response LegacyRunConnector(ctx, actionId, spaceId).KbnXsrf(kbnXsrf).LegacyRunConnectorRequestBodyProperties(legacyRunConnectorRequestBodyProperties).Execute() - +# **LegacyRunConnector** +> InlineResponse2003 LegacyRunConnector(ctx, body, kbnXsrf, actionId, spaceId) Runs a connector. +Deprecated in 7.13.0. Use the run connector API instead. - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" -) - -func main() { - kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection - actionId := "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad" // string | An identifier for the action. - spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - legacyRunConnectorRequestBodyProperties := *openapiclient.NewLegacyRunConnectorRequestBodyProperties(map[string]interface{}(123)) // LegacyRunConnectorRequestBodyProperties | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConnectorsApi.LegacyRunConnector(context.Background(), actionId, spaceId).KbnXsrf(kbnXsrf).LegacyRunConnectorRequestBodyProperties(legacyRunConnectorRequestBodyProperties).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.LegacyRunConnector``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LegacyRunConnector`: LegacyRunConnector200Response - fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.LegacyRunConnector`: %v\n", resp) -} -``` - -### Path Parameters - +### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**actionId** | **string** | An identifier for the action. | -**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiLegacyRunConnectorRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kbnXsrf** | **string** | Cross-site request forgery protection | - - - **legacyRunConnectorRequestBodyProperties** | [**LegacyRunConnectorRequestBodyProperties**](LegacyRunConnectorRequestBodyProperties.md) | | + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**LegacyRunConnectorRequestBodyProperties**](LegacyRunConnectorRequestBodyProperties.md)| | + **kbnXsrf** | **string**| Cross-site request forgery protection | + **actionId** | **string**| An identifier for the action. | + **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | ### Return type -[**LegacyRunConnector200Response**](LegacyRunConnector200Response.md) +[**InlineResponse2003**](inline_response_200_3.md) ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) ### HTTP request headers -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - + - **Content-Type**: application/json + - **Accept**: application/json -## LegacyUpdateConnector - -> ActionResponseProperties LegacyUpdateConnector(ctx, actionId, spaceId).KbnXsrf(kbnXsrf).LegacyUpdateConnectorRequestBodyProperties(legacyUpdateConnectorRequestBodyProperties).Execute() +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **LegacyUpdateConnector** +> ActionResponseProperties LegacyUpdateConnector(ctx, body, kbnXsrf, actionId, spaceId) Updates the attributes for a connector. +Deprecated in 7.13.0. Use the update connector API instead. - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" -) - -func main() { - kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection - actionId := "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad" // string | An identifier for the action. - spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - legacyUpdateConnectorRequestBodyProperties := *openapiclient.NewLegacyUpdateConnectorRequestBodyProperties() // LegacyUpdateConnectorRequestBodyProperties | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConnectorsApi.LegacyUpdateConnector(context.Background(), actionId, spaceId).KbnXsrf(kbnXsrf).LegacyUpdateConnectorRequestBodyProperties(legacyUpdateConnectorRequestBodyProperties).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.LegacyUpdateConnector``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LegacyUpdateConnector`: ActionResponseProperties - fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.LegacyUpdateConnector`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**actionId** | **string** | An identifier for the action. | -**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiLegacyUpdateConnectorRequest struct via the builder pattern - +### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **kbnXsrf** | **string** | Cross-site request forgery protection | - - - **legacyUpdateConnectorRequestBodyProperties** | [**LegacyUpdateConnectorRequestBodyProperties**](LegacyUpdateConnectorRequestBodyProperties.md) | | + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**LegacyUpdateConnectorRequestBodyProperties**](LegacyUpdateConnectorRequestBodyProperties.md)| | + **kbnXsrf** | **string**| Cross-site request forgery protection | + **actionId** | **string**| An identifier for the action. | + **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | ### Return type -[**ActionResponseProperties**](ActionResponseProperties.md) +[**ActionResponseProperties**](action_response_properties.md) ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) ### HTTP request headers -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## RunConnector + - **Content-Type**: application/json + - **Accept**: application/json -> RunConnector200Response RunConnector(ctx, connectorId, spaceId).KbnXsrf(kbnXsrf).RunConnectorRequestBodyProperties(runConnectorRequestBodyProperties).Execute() +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **RunConnector** +> InlineResponse2001 RunConnector(ctx, body, kbnXsrf, connectorId, spaceId) Runs a connector. +You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. If you use an index connector, you must also have `all`, `create`, `index`, or `write` indices privileges. - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" -) - -func main() { - kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection - connectorId := "df770e30-8b8b-11ed-a780-3b746c987a81" // string | An identifier for the connector. - spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - runConnectorRequestBodyProperties := *openapiclient.NewRunConnectorRequestBodyProperties(openapiclient.Run_connector_request_body_properties_params{RunConnectorParamsDocuments: openapiclient.NewRunConnectorParamsDocuments([]map[string]interface{}{map[string]interface{}{"key": interface{}(123)}})}) // RunConnectorRequestBodyProperties | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConnectorsApi.RunConnector(context.Background(), connectorId, spaceId).KbnXsrf(kbnXsrf).RunConnectorRequestBodyProperties(runConnectorRequestBodyProperties).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.RunConnector``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RunConnector`: RunConnector200Response - fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.RunConnector`: %v\n", resp) -} -``` - -### Path Parameters - +### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**connectorId** | **string** | An identifier for the connector. | -**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRunConnectorRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kbnXsrf** | **string** | Cross-site request forgery protection | - - - **runConnectorRequestBodyProperties** | [**RunConnectorRequestBodyProperties**](RunConnectorRequestBodyProperties.md) | | + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**RunConnectorRequestBodyProperties**](RunConnectorRequestBodyProperties.md)| | + **kbnXsrf** | **string**| Cross-site request forgery protection | + **connectorId** | **string**| An identifier for the connector. | + **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | ### Return type -[**RunConnector200Response**](RunConnector200Response.md) +[**InlineResponse2001**](inline_response_200_1.md) ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) ### HTTP request headers -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateConnector + - **Content-Type**: application/json + - **Accept**: application/json -> ConnectorResponseProperties UpdateConnector(ctx, connectorId, spaceId).KbnXsrf(kbnXsrf).UpdateConnectorRequestBodyProperties(updateConnectorRequestBodyProperties).Execute() +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **UpdateConnector** +> ConnectorResponseProperties UpdateConnector(ctx, body, kbnXsrf, connectorId, spaceId) Updates the attributes for a connector. +You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/elastic/terraform-provider-elasticstack/kibanaactions" -) - -func main() { - kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection - connectorId := "df770e30-8b8b-11ed-a780-3b746c987a81" // string | An identifier for the connector. - spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - updateConnectorRequestBodyProperties := openapiclient.Update_connector_request_body_properties{UpdateConnectorRequestCasesWebhook: openapiclient.NewUpdateConnectorRequestCasesWebhook(*openapiclient.NewConfigPropertiesCasesWebhook("{"fields":{"summary":{"[object Object]":null},"description":{"[object Object]":null},"labels":{"[object Object]":null}}}", "CreateIncidentResponseKey_example", "CreateIncidentUrl_example", "GetIncidentResponseExternalTitleKey_example", "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}", "{"fields":{"summary":{"[object Object]":null},"description":{"[object Object]":null},"labels":{"[object Object]":null}}}", "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.ID}}}", "https://testing-jira.atlassian.net/browse/{{{external.system.title}}}"), "my-connector")} // UpdateConnectorRequestBodyProperties | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ConnectorsApi.UpdateConnector(context.Background(), connectorId, spaceId).KbnXsrf(kbnXsrf).UpdateConnectorRequestBodyProperties(updateConnectorRequestBodyProperties).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsApi.UpdateConnector``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateConnector`: ConnectorResponseProperties - fmt.Fprintf(os.Stdout, "Response from `ConnectorsApi.UpdateConnector`: %v\n", resp) -} -``` - -### Path Parameters - +### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**connectorId** | **string** | An identifier for the connector. | -**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateConnectorRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kbnXsrf** | **string** | Cross-site request forgery protection | - - - **updateConnectorRequestBodyProperties** | [**UpdateConnectorRequestBodyProperties**](UpdateConnectorRequestBodyProperties.md) | | + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**UpdateConnectorRequestBodyProperties**](UpdateConnectorRequestBodyProperties.md)| | + **kbnXsrf** | **string**| Cross-site request forgery protection | + **connectorId** | **string**| An identifier for the connector. | + **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | ### Return type -[**ConnectorResponseProperties**](ConnectorResponseProperties.md) +[**ConnectorResponseProperties**](connector_response_properties.md) ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) ### HTTP request headers -- **Content-Type**: application/json -- **Accept**: application/json + - **Content-Type**: application/json + - **Accept**: application/json -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/generated/kibanaactions/docs/CreateConnectorRequestBodyProperties.md b/generated/kibanaactions/docs/CreateConnectorRequestBodyProperties.md index e9c3ff651..a1b3d1b4f 100644 --- a/generated/kibanaactions/docs/CreateConnectorRequestBodyProperties.md +++ b/generated/kibanaactions/docs/CreateConnectorRequestBodyProperties.md @@ -1,114 +1,8 @@ # CreateConnectorRequestBodyProperties ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.xmatters`. | -**ConnectorTypeId** | **string** | The type of connector. | -**Name** | **string** | The display name for the connector. | -**Secrets** | **map[string]interface{}** | Defines secrets for connectors when type is `.xmatters`. | - -## Methods - -### NewCreateConnectorRequestBodyProperties - -`func NewCreateConnectorRequestBodyProperties(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}, ) *CreateConnectorRequestBodyProperties` - -NewCreateConnectorRequestBodyProperties instantiates a new CreateConnectorRequestBodyProperties object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateConnectorRequestBodyPropertiesWithDefaults - -`func NewCreateConnectorRequestBodyPropertiesWithDefaults() *CreateConnectorRequestBodyProperties` - -NewCreateConnectorRequestBodyPropertiesWithDefaults instantiates a new CreateConnectorRequestBodyProperties object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *CreateConnectorRequestBodyProperties) GetConfig() map[string]interface{}` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *CreateConnectorRequestBodyProperties) GetConfigOk() (*map[string]interface{}, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *CreateConnectorRequestBodyProperties) SetConfig(v map[string]interface{})` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *CreateConnectorRequestBodyProperties) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *CreateConnectorRequestBodyProperties) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *CreateConnectorRequestBodyProperties) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetName - -`func (o *CreateConnectorRequestBodyProperties) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateConnectorRequestBodyProperties) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CreateConnectorRequestBodyProperties) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *CreateConnectorRequestBodyProperties) GetSecrets() map[string]interface{}` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *CreateConnectorRequestBodyProperties) GetSecretsOk() (*map[string]interface{}, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *CreateConnectorRequestBodyProperties) SetSecrets(v map[string]interface{})` - -SetSecrets sets Secrets field to given value. - - [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestCasesWebhook.md b/generated/kibanaactions/docs/CreateConnectorRequestCasesWebhook.md index b9a2f3e9b..06504fda2 100644 --- a/generated/kibanaactions/docs/CreateConnectorRequestCasesWebhook.md +++ b/generated/kibanaactions/docs/CreateConnectorRequestCasesWebhook.md @@ -1,119 +1,12 @@ # CreateConnectorRequestCasesWebhook ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesCasesWebhook**](ConfigPropertiesCasesWebhook.md) | | -**ConnectorTypeId** | **string** | The type of connector. | -**Name** | **string** | The display name for the connector. | -**Secrets** | Pointer to [**SecretsPropertiesCasesWebhook**](SecretsPropertiesCasesWebhook.md) | | [optional] - -## Methods - -### NewCreateConnectorRequestCasesWebhook - -`func NewCreateConnectorRequestCasesWebhook(config ConfigPropertiesCasesWebhook, connectorTypeId string, name string, ) *CreateConnectorRequestCasesWebhook` - -NewCreateConnectorRequestCasesWebhook instantiates a new CreateConnectorRequestCasesWebhook object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateConnectorRequestCasesWebhookWithDefaults - -`func NewCreateConnectorRequestCasesWebhookWithDefaults() *CreateConnectorRequestCasesWebhook` - -NewCreateConnectorRequestCasesWebhookWithDefaults instantiates a new CreateConnectorRequestCasesWebhook object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *CreateConnectorRequestCasesWebhook) GetConfig() ConfigPropertiesCasesWebhook` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *CreateConnectorRequestCasesWebhook) GetConfigOk() (*ConfigPropertiesCasesWebhook, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *CreateConnectorRequestCasesWebhook) SetConfig(v ConfigPropertiesCasesWebhook)` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *CreateConnectorRequestCasesWebhook) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *CreateConnectorRequestCasesWebhook) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *CreateConnectorRequestCasesWebhook) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetName - -`func (o *CreateConnectorRequestCasesWebhook) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateConnectorRequestCasesWebhook) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CreateConnectorRequestCasesWebhook) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *CreateConnectorRequestCasesWebhook) GetSecrets() SecretsPropertiesCasesWebhook` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *CreateConnectorRequestCasesWebhook) GetSecretsOk() (*SecretsPropertiesCasesWebhook, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *CreateConnectorRequestCasesWebhook) SetSecrets(v SecretsPropertiesCasesWebhook)` - -SetSecrets sets Secrets field to given value. - -### HasSecrets - -`func (o *CreateConnectorRequestCasesWebhook) HasSecrets() bool` - -HasSecrets returns a boolean if a field has been set. - +**Config** | [***ConfigPropertiesCasesWebhook**](config_properties_cases_webhook.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***SecretsPropertiesCasesWebhook**](secrets_properties_cases_webhook.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestEmail.md b/generated/kibanaactions/docs/CreateConnectorRequestEmail.md index d505849e4..c6fe8d266 100644 --- a/generated/kibanaactions/docs/CreateConnectorRequestEmail.md +++ b/generated/kibanaactions/docs/CreateConnectorRequestEmail.md @@ -1,114 +1,12 @@ # CreateConnectorRequestEmail ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.email`. | -**ConnectorTypeId** | **string** | The type of connector. | -**Name** | **string** | The display name for the connector. | -**Secrets** | **map[string]interface{}** | Defines secrets for connectors when type is `.email`. | - -## Methods - -### NewCreateConnectorRequestEmail - -`func NewCreateConnectorRequestEmail(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}, ) *CreateConnectorRequestEmail` - -NewCreateConnectorRequestEmail instantiates a new CreateConnectorRequestEmail object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateConnectorRequestEmailWithDefaults - -`func NewCreateConnectorRequestEmailWithDefaults() *CreateConnectorRequestEmail` - -NewCreateConnectorRequestEmailWithDefaults instantiates a new CreateConnectorRequestEmail object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *CreateConnectorRequestEmail) GetConfig() map[string]interface{}` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *CreateConnectorRequestEmail) GetConfigOk() (*map[string]interface{}, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *CreateConnectorRequestEmail) SetConfig(v map[string]interface{})` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *CreateConnectorRequestEmail) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *CreateConnectorRequestEmail) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *CreateConnectorRequestEmail) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetName - -`func (o *CreateConnectorRequestEmail) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateConnectorRequestEmail) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CreateConnectorRequestEmail) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *CreateConnectorRequestEmail) GetSecrets() map[string]interface{}` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *CreateConnectorRequestEmail) GetSecretsOk() (*map[string]interface{}, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *CreateConnectorRequestEmail) SetSecrets(v map[string]interface{})` - -SetSecrets sets Secrets field to given value. - - +**Config** | [***ModelMap**](map.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***ModelMap**](map.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestIndex.md b/generated/kibanaactions/docs/CreateConnectorRequestIndex.md index 83a09caf6..b8c81f0d2 100644 --- a/generated/kibanaactions/docs/CreateConnectorRequestIndex.md +++ b/generated/kibanaactions/docs/CreateConnectorRequestIndex.md @@ -1,93 +1,11 @@ # CreateConnectorRequestIndex ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesIndex**](ConfigPropertiesIndex.md) | | -**ConnectorTypeId** | **string** | The type of connector. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewCreateConnectorRequestIndex - -`func NewCreateConnectorRequestIndex(config ConfigPropertiesIndex, connectorTypeId string, name string, ) *CreateConnectorRequestIndex` - -NewCreateConnectorRequestIndex instantiates a new CreateConnectorRequestIndex object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateConnectorRequestIndexWithDefaults - -`func NewCreateConnectorRequestIndexWithDefaults() *CreateConnectorRequestIndex` - -NewCreateConnectorRequestIndexWithDefaults instantiates a new CreateConnectorRequestIndex object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *CreateConnectorRequestIndex) GetConfig() ConfigPropertiesIndex` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *CreateConnectorRequestIndex) GetConfigOk() (*ConfigPropertiesIndex, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *CreateConnectorRequestIndex) SetConfig(v ConfigPropertiesIndex)` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *CreateConnectorRequestIndex) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *CreateConnectorRequestIndex) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *CreateConnectorRequestIndex) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetName - -`func (o *CreateConnectorRequestIndex) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateConnectorRequestIndex) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CreateConnectorRequestIndex) SetName(v string)` - -SetName sets Name field to given value. - - +**Config** | [***ConfigPropertiesIndex**](config_properties_index.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestJira.md b/generated/kibanaactions/docs/CreateConnectorRequestJira.md index f79f71f44..9327d7992 100644 --- a/generated/kibanaactions/docs/CreateConnectorRequestJira.md +++ b/generated/kibanaactions/docs/CreateConnectorRequestJira.md @@ -1,114 +1,12 @@ # CreateConnectorRequestJira ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesJira**](ConfigPropertiesJira.md) | | -**ConnectorTypeId** | **string** | The type of connector. | -**Name** | **string** | The display name for the connector. | -**Secrets** | [**SecretsPropertiesJira**](SecretsPropertiesJira.md) | | - -## Methods - -### NewCreateConnectorRequestJira - -`func NewCreateConnectorRequestJira(config ConfigPropertiesJira, connectorTypeId string, name string, secrets SecretsPropertiesJira, ) *CreateConnectorRequestJira` - -NewCreateConnectorRequestJira instantiates a new CreateConnectorRequestJira object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateConnectorRequestJiraWithDefaults - -`func NewCreateConnectorRequestJiraWithDefaults() *CreateConnectorRequestJira` - -NewCreateConnectorRequestJiraWithDefaults instantiates a new CreateConnectorRequestJira object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *CreateConnectorRequestJira) GetConfig() ConfigPropertiesJira` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *CreateConnectorRequestJira) GetConfigOk() (*ConfigPropertiesJira, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *CreateConnectorRequestJira) SetConfig(v ConfigPropertiesJira)` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *CreateConnectorRequestJira) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *CreateConnectorRequestJira) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *CreateConnectorRequestJira) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetName - -`func (o *CreateConnectorRequestJira) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateConnectorRequestJira) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CreateConnectorRequestJira) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *CreateConnectorRequestJira) GetSecrets() SecretsPropertiesJira` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *CreateConnectorRequestJira) GetSecretsOk() (*SecretsPropertiesJira, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *CreateConnectorRequestJira) SetSecrets(v SecretsPropertiesJira)` - -SetSecrets sets Secrets field to given value. - - +**Config** | [***ConfigPropertiesJira**](config_properties_jira.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***SecretsPropertiesJira**](secrets_properties_jira.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestOpsgenie.md b/generated/kibanaactions/docs/CreateConnectorRequestOpsgenie.md index 4c968540c..3ad2704ab 100644 --- a/generated/kibanaactions/docs/CreateConnectorRequestOpsgenie.md +++ b/generated/kibanaactions/docs/CreateConnectorRequestOpsgenie.md @@ -1,114 +1,12 @@ # CreateConnectorRequestOpsgenie ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesOpsgenie**](ConfigPropertiesOpsgenie.md) | | -**ConnectorTypeId** | **string** | The type of connector. | -**Name** | **string** | The display name for the connector. | -**Secrets** | [**SecretsPropertiesOpsgenie**](SecretsPropertiesOpsgenie.md) | | - -## Methods - -### NewCreateConnectorRequestOpsgenie - -`func NewCreateConnectorRequestOpsgenie(config ConfigPropertiesOpsgenie, connectorTypeId string, name string, secrets SecretsPropertiesOpsgenie, ) *CreateConnectorRequestOpsgenie` - -NewCreateConnectorRequestOpsgenie instantiates a new CreateConnectorRequestOpsgenie object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateConnectorRequestOpsgenieWithDefaults - -`func NewCreateConnectorRequestOpsgenieWithDefaults() *CreateConnectorRequestOpsgenie` - -NewCreateConnectorRequestOpsgenieWithDefaults instantiates a new CreateConnectorRequestOpsgenie object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *CreateConnectorRequestOpsgenie) GetConfig() ConfigPropertiesOpsgenie` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *CreateConnectorRequestOpsgenie) GetConfigOk() (*ConfigPropertiesOpsgenie, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *CreateConnectorRequestOpsgenie) SetConfig(v ConfigPropertiesOpsgenie)` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *CreateConnectorRequestOpsgenie) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *CreateConnectorRequestOpsgenie) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *CreateConnectorRequestOpsgenie) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetName - -`func (o *CreateConnectorRequestOpsgenie) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateConnectorRequestOpsgenie) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CreateConnectorRequestOpsgenie) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *CreateConnectorRequestOpsgenie) GetSecrets() SecretsPropertiesOpsgenie` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *CreateConnectorRequestOpsgenie) GetSecretsOk() (*SecretsPropertiesOpsgenie, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *CreateConnectorRequestOpsgenie) SetSecrets(v SecretsPropertiesOpsgenie)` - -SetSecrets sets Secrets field to given value. - - +**Config** | [***ConfigPropertiesOpsgenie**](config_properties_opsgenie.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***SecretsPropertiesOpsgenie**](secrets_properties_opsgenie.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestPagerduty.md b/generated/kibanaactions/docs/CreateConnectorRequestPagerduty.md index ac97fdd5c..0ab08c0ae 100644 --- a/generated/kibanaactions/docs/CreateConnectorRequestPagerduty.md +++ b/generated/kibanaactions/docs/CreateConnectorRequestPagerduty.md @@ -1,114 +1,12 @@ # CreateConnectorRequestPagerduty ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.pagerduty`. | -**ConnectorTypeId** | **string** | The type of connector. | -**Name** | **string** | The display name for the connector. | -**Secrets** | **map[string]interface{}** | Defines secrets for connectors when type is `.pagerduty`. | - -## Methods - -### NewCreateConnectorRequestPagerduty - -`func NewCreateConnectorRequestPagerduty(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}, ) *CreateConnectorRequestPagerduty` - -NewCreateConnectorRequestPagerduty instantiates a new CreateConnectorRequestPagerduty object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateConnectorRequestPagerdutyWithDefaults - -`func NewCreateConnectorRequestPagerdutyWithDefaults() *CreateConnectorRequestPagerduty` - -NewCreateConnectorRequestPagerdutyWithDefaults instantiates a new CreateConnectorRequestPagerduty object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *CreateConnectorRequestPagerduty) GetConfig() map[string]interface{}` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *CreateConnectorRequestPagerduty) GetConfigOk() (*map[string]interface{}, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *CreateConnectorRequestPagerduty) SetConfig(v map[string]interface{})` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *CreateConnectorRequestPagerduty) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *CreateConnectorRequestPagerduty) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *CreateConnectorRequestPagerduty) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetName - -`func (o *CreateConnectorRequestPagerduty) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateConnectorRequestPagerduty) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CreateConnectorRequestPagerduty) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *CreateConnectorRequestPagerduty) GetSecrets() map[string]interface{}` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *CreateConnectorRequestPagerduty) GetSecretsOk() (*map[string]interface{}, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *CreateConnectorRequestPagerduty) SetSecrets(v map[string]interface{})` - -SetSecrets sets Secrets field to given value. - - +**Config** | [***ModelMap**](map.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***ModelMap**](map.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestResilient.md b/generated/kibanaactions/docs/CreateConnectorRequestResilient.md index d9729d0cf..464bb8abf 100644 --- a/generated/kibanaactions/docs/CreateConnectorRequestResilient.md +++ b/generated/kibanaactions/docs/CreateConnectorRequestResilient.md @@ -1,114 +1,12 @@ # CreateConnectorRequestResilient ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesResilient**](ConfigPropertiesResilient.md) | | -**ConnectorTypeId** | **string** | The type of connector. | -**Name** | **string** | The display name for the connector. | -**Secrets** | [**SecretsPropertiesResilient**](SecretsPropertiesResilient.md) | | - -## Methods - -### NewCreateConnectorRequestResilient - -`func NewCreateConnectorRequestResilient(config ConfigPropertiesResilient, connectorTypeId string, name string, secrets SecretsPropertiesResilient, ) *CreateConnectorRequestResilient` - -NewCreateConnectorRequestResilient instantiates a new CreateConnectorRequestResilient object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateConnectorRequestResilientWithDefaults - -`func NewCreateConnectorRequestResilientWithDefaults() *CreateConnectorRequestResilient` - -NewCreateConnectorRequestResilientWithDefaults instantiates a new CreateConnectorRequestResilient object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *CreateConnectorRequestResilient) GetConfig() ConfigPropertiesResilient` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *CreateConnectorRequestResilient) GetConfigOk() (*ConfigPropertiesResilient, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *CreateConnectorRequestResilient) SetConfig(v ConfigPropertiesResilient)` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *CreateConnectorRequestResilient) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *CreateConnectorRequestResilient) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *CreateConnectorRequestResilient) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetName - -`func (o *CreateConnectorRequestResilient) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateConnectorRequestResilient) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CreateConnectorRequestResilient) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *CreateConnectorRequestResilient) GetSecrets() SecretsPropertiesResilient` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *CreateConnectorRequestResilient) GetSecretsOk() (*SecretsPropertiesResilient, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *CreateConnectorRequestResilient) SetSecrets(v SecretsPropertiesResilient)` - -SetSecrets sets Secrets field to given value. - - +**Config** | [***ConfigPropertiesResilient**](config_properties_resilient.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***SecretsPropertiesResilient**](secrets_properties_resilient.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestServerlog.md b/generated/kibanaactions/docs/CreateConnectorRequestServerlog.md index 95eaf5cbc..f44c20be3 100644 --- a/generated/kibanaactions/docs/CreateConnectorRequestServerlog.md +++ b/generated/kibanaactions/docs/CreateConnectorRequestServerlog.md @@ -1,72 +1,10 @@ # CreateConnectorRequestServerlog ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ConnectorTypeId** | **string** | The type of connector. | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewCreateConnectorRequestServerlog - -`func NewCreateConnectorRequestServerlog(connectorTypeId string, name string, ) *CreateConnectorRequestServerlog` - -NewCreateConnectorRequestServerlog instantiates a new CreateConnectorRequestServerlog object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateConnectorRequestServerlogWithDefaults - -`func NewCreateConnectorRequestServerlogWithDefaults() *CreateConnectorRequestServerlog` - -NewCreateConnectorRequestServerlogWithDefaults instantiates a new CreateConnectorRequestServerlog object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConnectorTypeId - -`func (o *CreateConnectorRequestServerlog) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *CreateConnectorRequestServerlog) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *CreateConnectorRequestServerlog) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetName - -`func (o *CreateConnectorRequestServerlog) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateConnectorRequestServerlog) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CreateConnectorRequestServerlog) SetName(v string)` - -SetName sets Name field to given value. - - +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestServicenow.md b/generated/kibanaactions/docs/CreateConnectorRequestServicenow.md index c6d0d4403..993ef5d53 100644 --- a/generated/kibanaactions/docs/CreateConnectorRequestServicenow.md +++ b/generated/kibanaactions/docs/CreateConnectorRequestServicenow.md @@ -1,114 +1,12 @@ # CreateConnectorRequestServicenow ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesServicenow**](ConfigPropertiesServicenow.md) | | -**ConnectorTypeId** | **string** | The type of connector. | -**Name** | **string** | The display name for the connector. | -**Secrets** | [**SecretsPropertiesServicenow**](SecretsPropertiesServicenow.md) | | - -## Methods - -### NewCreateConnectorRequestServicenow - -`func NewCreateConnectorRequestServicenow(config ConfigPropertiesServicenow, connectorTypeId string, name string, secrets SecretsPropertiesServicenow, ) *CreateConnectorRequestServicenow` - -NewCreateConnectorRequestServicenow instantiates a new CreateConnectorRequestServicenow object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateConnectorRequestServicenowWithDefaults - -`func NewCreateConnectorRequestServicenowWithDefaults() *CreateConnectorRequestServicenow` - -NewCreateConnectorRequestServicenowWithDefaults instantiates a new CreateConnectorRequestServicenow object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *CreateConnectorRequestServicenow) GetConfig() ConfigPropertiesServicenow` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *CreateConnectorRequestServicenow) GetConfigOk() (*ConfigPropertiesServicenow, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *CreateConnectorRequestServicenow) SetConfig(v ConfigPropertiesServicenow)` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *CreateConnectorRequestServicenow) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *CreateConnectorRequestServicenow) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *CreateConnectorRequestServicenow) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetName - -`func (o *CreateConnectorRequestServicenow) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateConnectorRequestServicenow) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CreateConnectorRequestServicenow) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *CreateConnectorRequestServicenow) GetSecrets() SecretsPropertiesServicenow` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *CreateConnectorRequestServicenow) GetSecretsOk() (*SecretsPropertiesServicenow, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *CreateConnectorRequestServicenow) SetSecrets(v SecretsPropertiesServicenow)` - -SetSecrets sets Secrets field to given value. - - +**Config** | [***ConfigPropertiesServicenow**](config_properties_servicenow.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***SecretsPropertiesServicenow**](secrets_properties_servicenow.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestServicenowItom.md b/generated/kibanaactions/docs/CreateConnectorRequestServicenowItom.md index c4c13f29b..7584090ed 100644 --- a/generated/kibanaactions/docs/CreateConnectorRequestServicenowItom.md +++ b/generated/kibanaactions/docs/CreateConnectorRequestServicenowItom.md @@ -1,114 +1,12 @@ # CreateConnectorRequestServicenowItom ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesServicenowItom**](ConfigPropertiesServicenowItom.md) | | -**ConnectorTypeId** | **string** | The type of connector. | -**Name** | **string** | The display name for the connector. | -**Secrets** | [**SecretsPropertiesServicenow**](SecretsPropertiesServicenow.md) | | - -## Methods - -### NewCreateConnectorRequestServicenowItom - -`func NewCreateConnectorRequestServicenowItom(config ConfigPropertiesServicenowItom, connectorTypeId string, name string, secrets SecretsPropertiesServicenow, ) *CreateConnectorRequestServicenowItom` - -NewCreateConnectorRequestServicenowItom instantiates a new CreateConnectorRequestServicenowItom object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateConnectorRequestServicenowItomWithDefaults - -`func NewCreateConnectorRequestServicenowItomWithDefaults() *CreateConnectorRequestServicenowItom` - -NewCreateConnectorRequestServicenowItomWithDefaults instantiates a new CreateConnectorRequestServicenowItom object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *CreateConnectorRequestServicenowItom) GetConfig() ConfigPropertiesServicenowItom` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *CreateConnectorRequestServicenowItom) GetConfigOk() (*ConfigPropertiesServicenowItom, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *CreateConnectorRequestServicenowItom) SetConfig(v ConfigPropertiesServicenowItom)` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *CreateConnectorRequestServicenowItom) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *CreateConnectorRequestServicenowItom) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *CreateConnectorRequestServicenowItom) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetName - -`func (o *CreateConnectorRequestServicenowItom) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateConnectorRequestServicenowItom) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CreateConnectorRequestServicenowItom) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *CreateConnectorRequestServicenowItom) GetSecrets() SecretsPropertiesServicenow` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *CreateConnectorRequestServicenowItom) GetSecretsOk() (*SecretsPropertiesServicenow, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *CreateConnectorRequestServicenowItom) SetSecrets(v SecretsPropertiesServicenow)` - -SetSecrets sets Secrets field to given value. - - +**Config** | [***ConfigPropertiesServicenowItom**](config_properties_servicenow_itom.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***SecretsPropertiesServicenow**](secrets_properties_servicenow.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestServicenowSir.md b/generated/kibanaactions/docs/CreateConnectorRequestServicenowSir.md index f5ea005ef..6fdb79bcd 100644 --- a/generated/kibanaactions/docs/CreateConnectorRequestServicenowSir.md +++ b/generated/kibanaactions/docs/CreateConnectorRequestServicenowSir.md @@ -1,114 +1,12 @@ # CreateConnectorRequestServicenowSir ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesServicenow**](ConfigPropertiesServicenow.md) | | -**ConnectorTypeId** | **string** | The type of connector. | -**Name** | **string** | The display name for the connector. | -**Secrets** | [**SecretsPropertiesServicenow**](SecretsPropertiesServicenow.md) | | - -## Methods - -### NewCreateConnectorRequestServicenowSir - -`func NewCreateConnectorRequestServicenowSir(config ConfigPropertiesServicenow, connectorTypeId string, name string, secrets SecretsPropertiesServicenow, ) *CreateConnectorRequestServicenowSir` - -NewCreateConnectorRequestServicenowSir instantiates a new CreateConnectorRequestServicenowSir object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateConnectorRequestServicenowSirWithDefaults - -`func NewCreateConnectorRequestServicenowSirWithDefaults() *CreateConnectorRequestServicenowSir` - -NewCreateConnectorRequestServicenowSirWithDefaults instantiates a new CreateConnectorRequestServicenowSir object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *CreateConnectorRequestServicenowSir) GetConfig() ConfigPropertiesServicenow` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *CreateConnectorRequestServicenowSir) GetConfigOk() (*ConfigPropertiesServicenow, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *CreateConnectorRequestServicenowSir) SetConfig(v ConfigPropertiesServicenow)` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *CreateConnectorRequestServicenowSir) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *CreateConnectorRequestServicenowSir) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *CreateConnectorRequestServicenowSir) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetName - -`func (o *CreateConnectorRequestServicenowSir) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateConnectorRequestServicenowSir) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CreateConnectorRequestServicenowSir) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *CreateConnectorRequestServicenowSir) GetSecrets() SecretsPropertiesServicenow` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *CreateConnectorRequestServicenowSir) GetSecretsOk() (*SecretsPropertiesServicenow, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *CreateConnectorRequestServicenowSir) SetSecrets(v SecretsPropertiesServicenow)` - -SetSecrets sets Secrets field to given value. - - +**Config** | [***ConfigPropertiesServicenow**](config_properties_servicenow.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***SecretsPropertiesServicenow**](secrets_properties_servicenow.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestSlack.md b/generated/kibanaactions/docs/CreateConnectorRequestSlack.md index 431c8db64..364fc22a1 100644 --- a/generated/kibanaactions/docs/CreateConnectorRequestSlack.md +++ b/generated/kibanaactions/docs/CreateConnectorRequestSlack.md @@ -1,93 +1,11 @@ # CreateConnectorRequestSlack ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ConnectorTypeId** | **string** | The type of connector. | -**Name** | **string** | The display name for the connector. | -**Secrets** | **map[string]interface{}** | Defines secrets for connectors when type is `.slack`. | - -## Methods - -### NewCreateConnectorRequestSlack - -`func NewCreateConnectorRequestSlack(connectorTypeId string, name string, secrets map[string]interface{}, ) *CreateConnectorRequestSlack` - -NewCreateConnectorRequestSlack instantiates a new CreateConnectorRequestSlack object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateConnectorRequestSlackWithDefaults - -`func NewCreateConnectorRequestSlackWithDefaults() *CreateConnectorRequestSlack` - -NewCreateConnectorRequestSlackWithDefaults instantiates a new CreateConnectorRequestSlack object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConnectorTypeId - -`func (o *CreateConnectorRequestSlack) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *CreateConnectorRequestSlack) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *CreateConnectorRequestSlack) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetName - -`func (o *CreateConnectorRequestSlack) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateConnectorRequestSlack) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CreateConnectorRequestSlack) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *CreateConnectorRequestSlack) GetSecrets() map[string]interface{}` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *CreateConnectorRequestSlack) GetSecretsOk() (*map[string]interface{}, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *CreateConnectorRequestSlack) SetSecrets(v map[string]interface{})` - -SetSecrets sets Secrets field to given value. - - +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***ModelMap**](map.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestSwimlane.md b/generated/kibanaactions/docs/CreateConnectorRequestSwimlane.md index fb78402cf..1d41a2006 100644 --- a/generated/kibanaactions/docs/CreateConnectorRequestSwimlane.md +++ b/generated/kibanaactions/docs/CreateConnectorRequestSwimlane.md @@ -1,114 +1,12 @@ # CreateConnectorRequestSwimlane ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesSwimlane**](ConfigPropertiesSwimlane.md) | | -**ConnectorTypeId** | **string** | The type of connector. | -**Name** | **string** | The display name for the connector. | -**Secrets** | [**SecretsPropertiesSwimlane**](SecretsPropertiesSwimlane.md) | | - -## Methods - -### NewCreateConnectorRequestSwimlane - -`func NewCreateConnectorRequestSwimlane(config ConfigPropertiesSwimlane, connectorTypeId string, name string, secrets SecretsPropertiesSwimlane, ) *CreateConnectorRequestSwimlane` - -NewCreateConnectorRequestSwimlane instantiates a new CreateConnectorRequestSwimlane object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateConnectorRequestSwimlaneWithDefaults - -`func NewCreateConnectorRequestSwimlaneWithDefaults() *CreateConnectorRequestSwimlane` - -NewCreateConnectorRequestSwimlaneWithDefaults instantiates a new CreateConnectorRequestSwimlane object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *CreateConnectorRequestSwimlane) GetConfig() ConfigPropertiesSwimlane` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *CreateConnectorRequestSwimlane) GetConfigOk() (*ConfigPropertiesSwimlane, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *CreateConnectorRequestSwimlane) SetConfig(v ConfigPropertiesSwimlane)` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *CreateConnectorRequestSwimlane) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *CreateConnectorRequestSwimlane) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *CreateConnectorRequestSwimlane) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetName - -`func (o *CreateConnectorRequestSwimlane) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateConnectorRequestSwimlane) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CreateConnectorRequestSwimlane) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *CreateConnectorRequestSwimlane) GetSecrets() SecretsPropertiesSwimlane` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *CreateConnectorRequestSwimlane) GetSecretsOk() (*SecretsPropertiesSwimlane, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *CreateConnectorRequestSwimlane) SetSecrets(v SecretsPropertiesSwimlane)` - -SetSecrets sets Secrets field to given value. - - +**Config** | [***ConfigPropertiesSwimlane**](config_properties_swimlane.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***SecretsPropertiesSwimlane**](secrets_properties_swimlane.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestTeams.md b/generated/kibanaactions/docs/CreateConnectorRequestTeams.md index 682deb579..208df975a 100644 --- a/generated/kibanaactions/docs/CreateConnectorRequestTeams.md +++ b/generated/kibanaactions/docs/CreateConnectorRequestTeams.md @@ -1,93 +1,11 @@ # CreateConnectorRequestTeams ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ConnectorTypeId** | **string** | The type of connector. | -**Name** | **string** | The display name for the connector. | -**Secrets** | **map[string]interface{}** | Defines secrets for connectors when type is `.teams`. | - -## Methods - -### NewCreateConnectorRequestTeams - -`func NewCreateConnectorRequestTeams(connectorTypeId string, name string, secrets map[string]interface{}, ) *CreateConnectorRequestTeams` - -NewCreateConnectorRequestTeams instantiates a new CreateConnectorRequestTeams object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateConnectorRequestTeamsWithDefaults - -`func NewCreateConnectorRequestTeamsWithDefaults() *CreateConnectorRequestTeams` - -NewCreateConnectorRequestTeamsWithDefaults instantiates a new CreateConnectorRequestTeams object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConnectorTypeId - -`func (o *CreateConnectorRequestTeams) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *CreateConnectorRequestTeams) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *CreateConnectorRequestTeams) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetName - -`func (o *CreateConnectorRequestTeams) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateConnectorRequestTeams) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CreateConnectorRequestTeams) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *CreateConnectorRequestTeams) GetSecrets() map[string]interface{}` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *CreateConnectorRequestTeams) GetSecretsOk() (*map[string]interface{}, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *CreateConnectorRequestTeams) SetSecrets(v map[string]interface{})` - -SetSecrets sets Secrets field to given value. - - +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***ModelMap**](map.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestTines.md b/generated/kibanaactions/docs/CreateConnectorRequestTines.md index 23851e441..49c66bb75 100644 --- a/generated/kibanaactions/docs/CreateConnectorRequestTines.md +++ b/generated/kibanaactions/docs/CreateConnectorRequestTines.md @@ -1,114 +1,12 @@ # CreateConnectorRequestTines ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.tines`. | -**ConnectorTypeId** | **string** | The type of connector. | -**Name** | **string** | The display name for the connector. | -**Secrets** | **map[string]interface{}** | Defines secrets for connectors when type is `.tines`. | - -## Methods - -### NewCreateConnectorRequestTines - -`func NewCreateConnectorRequestTines(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}, ) *CreateConnectorRequestTines` - -NewCreateConnectorRequestTines instantiates a new CreateConnectorRequestTines object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateConnectorRequestTinesWithDefaults - -`func NewCreateConnectorRequestTinesWithDefaults() *CreateConnectorRequestTines` - -NewCreateConnectorRequestTinesWithDefaults instantiates a new CreateConnectorRequestTines object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *CreateConnectorRequestTines) GetConfig() map[string]interface{}` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *CreateConnectorRequestTines) GetConfigOk() (*map[string]interface{}, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *CreateConnectorRequestTines) SetConfig(v map[string]interface{})` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *CreateConnectorRequestTines) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *CreateConnectorRequestTines) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *CreateConnectorRequestTines) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetName - -`func (o *CreateConnectorRequestTines) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateConnectorRequestTines) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CreateConnectorRequestTines) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *CreateConnectorRequestTines) GetSecrets() map[string]interface{}` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *CreateConnectorRequestTines) GetSecretsOk() (*map[string]interface{}, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *CreateConnectorRequestTines) SetSecrets(v map[string]interface{})` - -SetSecrets sets Secrets field to given value. - - +**Config** | [***ModelMap**](map.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***ModelMap**](map.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestWebhook.md b/generated/kibanaactions/docs/CreateConnectorRequestWebhook.md index 3de369955..33f3a79cd 100644 --- a/generated/kibanaactions/docs/CreateConnectorRequestWebhook.md +++ b/generated/kibanaactions/docs/CreateConnectorRequestWebhook.md @@ -1,114 +1,12 @@ # CreateConnectorRequestWebhook ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.webhook`. | -**ConnectorTypeId** | **string** | The type of connector. | -**Name** | **string** | The display name for the connector. | -**Secrets** | **map[string]interface{}** | Defines secrets for connectors when type is `.webhook`. | - -## Methods - -### NewCreateConnectorRequestWebhook - -`func NewCreateConnectorRequestWebhook(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}, ) *CreateConnectorRequestWebhook` - -NewCreateConnectorRequestWebhook instantiates a new CreateConnectorRequestWebhook object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateConnectorRequestWebhookWithDefaults - -`func NewCreateConnectorRequestWebhookWithDefaults() *CreateConnectorRequestWebhook` - -NewCreateConnectorRequestWebhookWithDefaults instantiates a new CreateConnectorRequestWebhook object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *CreateConnectorRequestWebhook) GetConfig() map[string]interface{}` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *CreateConnectorRequestWebhook) GetConfigOk() (*map[string]interface{}, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *CreateConnectorRequestWebhook) SetConfig(v map[string]interface{})` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *CreateConnectorRequestWebhook) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *CreateConnectorRequestWebhook) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *CreateConnectorRequestWebhook) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetName - -`func (o *CreateConnectorRequestWebhook) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateConnectorRequestWebhook) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CreateConnectorRequestWebhook) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *CreateConnectorRequestWebhook) GetSecrets() map[string]interface{}` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *CreateConnectorRequestWebhook) GetSecretsOk() (*map[string]interface{}, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *CreateConnectorRequestWebhook) SetSecrets(v map[string]interface{})` - -SetSecrets sets Secrets field to given value. - - +**Config** | [***ModelMap**](map.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***ModelMap**](map.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestXmatters.md b/generated/kibanaactions/docs/CreateConnectorRequestXmatters.md index 1c75fceee..c35871984 100644 --- a/generated/kibanaactions/docs/CreateConnectorRequestXmatters.md +++ b/generated/kibanaactions/docs/CreateConnectorRequestXmatters.md @@ -1,114 +1,12 @@ # CreateConnectorRequestXmatters ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | **map[string]interface{}** | Defines properties for connectors when type is `.xmatters`. | -**ConnectorTypeId** | **string** | The type of connector. | -**Name** | **string** | The display name for the connector. | -**Secrets** | **map[string]interface{}** | Defines secrets for connectors when type is `.xmatters`. | - -## Methods - -### NewCreateConnectorRequestXmatters - -`func NewCreateConnectorRequestXmatters(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}, ) *CreateConnectorRequestXmatters` - -NewCreateConnectorRequestXmatters instantiates a new CreateConnectorRequestXmatters object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCreateConnectorRequestXmattersWithDefaults - -`func NewCreateConnectorRequestXmattersWithDefaults() *CreateConnectorRequestXmatters` - -NewCreateConnectorRequestXmattersWithDefaults instantiates a new CreateConnectorRequestXmatters object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *CreateConnectorRequestXmatters) GetConfig() map[string]interface{}` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *CreateConnectorRequestXmatters) GetConfigOk() (*map[string]interface{}, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *CreateConnectorRequestXmatters) SetConfig(v map[string]interface{})` - -SetConfig sets Config field to given value. - - -### GetConnectorTypeId - -`func (o *CreateConnectorRequestXmatters) GetConnectorTypeId() string` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *CreateConnectorRequestXmatters) GetConnectorTypeIdOk() (*string, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *CreateConnectorRequestXmatters) SetConnectorTypeId(v string)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetName - -`func (o *CreateConnectorRequestXmatters) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateConnectorRequestXmatters) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *CreateConnectorRequestXmatters) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *CreateConnectorRequestXmatters) GetSecrets() map[string]interface{}` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *CreateConnectorRequestXmatters) GetSecretsOk() (*map[string]interface{}, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *CreateConnectorRequestXmatters) SetSecrets(v map[string]interface{})` - -SetSecrets sets Secrets field to given value. - - +**Config** | [***ModelMap**](map.md) | | [default to null] +**ConnectorTypeId** | **string** | The type of connector. | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***ModelMap**](map.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/Features.md b/generated/kibanaactions/docs/Features.md index 571d97c2a..d21f461d4 100644 --- a/generated/kibanaactions/docs/Features.md +++ b/generated/kibanaactions/docs/Features.md @@ -1,17 +1,8 @@ # Features -## Enum - - -* `ALERTING` (value: `"alerting"`) - -* `CASES` (value: `"cases"`) - -* `UPTIME` (value: `"uptime"`) - -* `SIEM` (value: `"siem"`) - +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/GetConnector404Response.md b/generated/kibanaactions/docs/GetConnector404Response.md deleted file mode 100644 index b07a86dd4..000000000 --- a/generated/kibanaactions/docs/GetConnector404Response.md +++ /dev/null @@ -1,108 +0,0 @@ -# GetConnector404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error** | Pointer to **string** | | [optional] -**Message** | Pointer to **string** | | [optional] -**StatusCode** | Pointer to **int32** | | [optional] - -## Methods - -### NewGetConnector404Response - -`func NewGetConnector404Response() *GetConnector404Response` - -NewGetConnector404Response instantiates a new GetConnector404Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetConnector404ResponseWithDefaults - -`func NewGetConnector404ResponseWithDefaults() *GetConnector404Response` - -NewGetConnector404ResponseWithDefaults instantiates a new GetConnector404Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetError - -`func (o *GetConnector404Response) GetError() string` - -GetError returns the Error field if non-nil, zero value otherwise. - -### GetErrorOk - -`func (o *GetConnector404Response) GetErrorOk() (*string, bool)` - -GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetError - -`func (o *GetConnector404Response) SetError(v string)` - -SetError sets Error field to given value. - -### HasError - -`func (o *GetConnector404Response) HasError() bool` - -HasError returns a boolean if a field has been set. - -### GetMessage - -`func (o *GetConnector404Response) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *GetConnector404Response) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *GetConnector404Response) SetMessage(v string)` - -SetMessage sets Message field to given value. - -### HasMessage - -`func (o *GetConnector404Response) HasMessage() bool` - -HasMessage returns a boolean if a field has been set. - -### GetStatusCode - -`func (o *GetConnector404Response) GetStatusCode() int32` - -GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. - -### GetStatusCodeOk - -`func (o *GetConnector404Response) GetStatusCodeOk() (*int32, bool)` - -GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatusCode - -`func (o *GetConnector404Response) SetStatusCode(v int32)` - -SetStatusCode sets StatusCode field to given value. - -### HasStatusCode - -`func (o *GetConnector404Response) HasStatusCode() bool` - -HasStatusCode returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/kibanaactions/docs/GetConnectorTypesResponseBodyPropertiesInner.md b/generated/kibanaactions/docs/GetConnectorTypesResponseBodyPropertiesInner.md deleted file mode 100644 index 2d833ac96..000000000 --- a/generated/kibanaactions/docs/GetConnectorTypesResponseBodyPropertiesInner.md +++ /dev/null @@ -1,212 +0,0 @@ -# GetConnectorTypesResponseBodyPropertiesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | Pointer to **bool** | Indicates whether the connector type is enabled in Kibana. | [optional] -**EnabledInConfig** | Pointer to **bool** | Indicates whether the connector type is enabled in the Kibana `.yml` file. | [optional] -**EnabledInLicense** | Pointer to **bool** | Indicates whether the connector is enabled in the license. | [optional] -**Id** | Pointer to [**ConnectorTypes**](ConnectorTypes.md) | | [optional] -**MinimumLicenseRequired** | Pointer to **string** | The license that is required to use the connector type. | [optional] -**Name** | Pointer to **string** | The name of the connector type. | [optional] -**SupportedFeatureIds** | Pointer to [**[]Features**](Features.md) | The Kibana features that are supported by the connector type. | [optional] - -## Methods - -### NewGetConnectorTypesResponseBodyPropertiesInner - -`func NewGetConnectorTypesResponseBodyPropertiesInner() *GetConnectorTypesResponseBodyPropertiesInner` - -NewGetConnectorTypesResponseBodyPropertiesInner instantiates a new GetConnectorTypesResponseBodyPropertiesInner object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetConnectorTypesResponseBodyPropertiesInnerWithDefaults - -`func NewGetConnectorTypesResponseBodyPropertiesInnerWithDefaults() *GetConnectorTypesResponseBodyPropertiesInner` - -NewGetConnectorTypesResponseBodyPropertiesInnerWithDefaults instantiates a new GetConnectorTypesResponseBodyPropertiesInner object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetEnabled - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabled() bool` - -GetEnabled returns the Enabled field if non-nil, zero value otherwise. - -### GetEnabledOk - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledOk() (*bool, bool)` - -GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnabled - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) SetEnabled(v bool)` - -SetEnabled sets Enabled field to given value. - -### HasEnabled - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) HasEnabled() bool` - -HasEnabled returns a boolean if a field has been set. - -### GetEnabledInConfig - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledInConfig() bool` - -GetEnabledInConfig returns the EnabledInConfig field if non-nil, zero value otherwise. - -### GetEnabledInConfigOk - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledInConfigOk() (*bool, bool)` - -GetEnabledInConfigOk returns a tuple with the EnabledInConfig field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnabledInConfig - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) SetEnabledInConfig(v bool)` - -SetEnabledInConfig sets EnabledInConfig field to given value. - -### HasEnabledInConfig - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) HasEnabledInConfig() bool` - -HasEnabledInConfig returns a boolean if a field has been set. - -### GetEnabledInLicense - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledInLicense() bool` - -GetEnabledInLicense returns the EnabledInLicense field if non-nil, zero value otherwise. - -### GetEnabledInLicenseOk - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledInLicenseOk() (*bool, bool)` - -GetEnabledInLicenseOk returns a tuple with the EnabledInLicense field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnabledInLicense - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) SetEnabledInLicense(v bool)` - -SetEnabledInLicense sets EnabledInLicense field to given value. - -### HasEnabledInLicense - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) HasEnabledInLicense() bool` - -HasEnabledInLicense returns a boolean if a field has been set. - -### GetId - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetId() ConnectorTypes` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetIdOk() (*ConnectorTypes, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) SetId(v ConnectorTypes)` - -SetId sets Id field to given value. - -### HasId - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetMinimumLicenseRequired - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetMinimumLicenseRequired() string` - -GetMinimumLicenseRequired returns the MinimumLicenseRequired field if non-nil, zero value otherwise. - -### GetMinimumLicenseRequiredOk - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetMinimumLicenseRequiredOk() (*string, bool)` - -GetMinimumLicenseRequiredOk returns a tuple with the MinimumLicenseRequired field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMinimumLicenseRequired - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) SetMinimumLicenseRequired(v string)` - -SetMinimumLicenseRequired sets MinimumLicenseRequired field to given value. - -### HasMinimumLicenseRequired - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) HasMinimumLicenseRequired() bool` - -HasMinimumLicenseRequired returns a boolean if a field has been set. - -### GetName - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetSupportedFeatureIds - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetSupportedFeatureIds() []Features` - -GetSupportedFeatureIds returns the SupportedFeatureIds field if non-nil, zero value otherwise. - -### GetSupportedFeatureIdsOk - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) GetSupportedFeatureIdsOk() (*[]Features, bool)` - -GetSupportedFeatureIdsOk returns a tuple with the SupportedFeatureIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSupportedFeatureIds - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) SetSupportedFeatureIds(v []Features)` - -SetSupportedFeatureIds sets SupportedFeatureIds field to given value. - -### HasSupportedFeatureIds - -`func (o *GetConnectorTypesResponseBodyPropertiesInner) HasSupportedFeatureIds() bool` - -HasSupportedFeatureIds returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/kibanaactions/docs/GetConnectorsResponseBodyProperties.md b/generated/kibanaactions/docs/GetConnectorsResponseBodyProperties.md index ec44cbfcf..e55d34b9b 100644 --- a/generated/kibanaactions/docs/GetConnectorsResponseBodyProperties.md +++ b/generated/kibanaactions/docs/GetConnectorsResponseBodyProperties.md @@ -1,218 +1,16 @@ # GetConnectorsResponseBodyProperties ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ConnectorTypeId** | [**ConnectorTypes**](ConnectorTypes.md) | | -**Config** | Pointer to **map[string]interface{}** | The configuration for the connector. Configuration properties vary depending on the connector type. | [optional] -**Id** | **string** | The identifier for the connector. | -**IsDeprecated** | **bool** | Indicates whether the connector type is deprecated. | -**IsMissingSecrets** | Pointer to **bool** | Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. | [optional] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. | -**Name** | **string** | The display name for the connector. | +**ConnectorTypeId** | [***ConnectorTypes**](connector_types.md) | | [default to null] +**Config** | [**ModelMap**](interface{}.md) | The configuration for the connector. Configuration properties vary depending on the connector type. | [optional] [default to null] +**Id** | **string** | The identifier for the connector. | [default to null] +**IsDeprecated** | **bool** | | [default to null] +**IsMissingSecrets** | **bool** | | [optional] [default to null] +**IsPreconfigured** | **bool** | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] **ReferencedByCount** | **int32** | Indicates the number of saved objects that reference the connector. If `is_preconfigured` is true, this value is not calculated. | [default to 0] -## Methods - -### NewGetConnectorsResponseBodyProperties - -`func NewGetConnectorsResponseBodyProperties(connectorTypeId ConnectorTypes, id string, isDeprecated bool, isPreconfigured bool, name string, referencedByCount int32, ) *GetConnectorsResponseBodyProperties` - -NewGetConnectorsResponseBodyProperties instantiates a new GetConnectorsResponseBodyProperties object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGetConnectorsResponseBodyPropertiesWithDefaults - -`func NewGetConnectorsResponseBodyPropertiesWithDefaults() *GetConnectorsResponseBodyProperties` - -NewGetConnectorsResponseBodyPropertiesWithDefaults instantiates a new GetConnectorsResponseBodyProperties object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConnectorTypeId - -`func (o *GetConnectorsResponseBodyProperties) GetConnectorTypeId() ConnectorTypes` - -GetConnectorTypeId returns the ConnectorTypeId field if non-nil, zero value otherwise. - -### GetConnectorTypeIdOk - -`func (o *GetConnectorsResponseBodyProperties) GetConnectorTypeIdOk() (*ConnectorTypes, bool)` - -GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorTypeId - -`func (o *GetConnectorsResponseBodyProperties) SetConnectorTypeId(v ConnectorTypes)` - -SetConnectorTypeId sets ConnectorTypeId field to given value. - - -### GetConfig - -`func (o *GetConnectorsResponseBodyProperties) GetConfig() map[string]interface{}` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *GetConnectorsResponseBodyProperties) GetConfigOk() (*map[string]interface{}, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *GetConnectorsResponseBodyProperties) SetConfig(v map[string]interface{})` - -SetConfig sets Config field to given value. - -### HasConfig - -`func (o *GetConnectorsResponseBodyProperties) HasConfig() bool` - -HasConfig returns a boolean if a field has been set. - -### SetConfigNil - -`func (o *GetConnectorsResponseBodyProperties) SetConfigNil(b bool)` - - SetConfigNil sets the value for Config to be an explicit nil - -### UnsetConfig -`func (o *GetConnectorsResponseBodyProperties) UnsetConfig()` - -UnsetConfig ensures that no value is present for Config, not even an explicit nil -### GetId - -`func (o *GetConnectorsResponseBodyProperties) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GetConnectorsResponseBodyProperties) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GetConnectorsResponseBodyProperties) SetId(v string)` - -SetId sets Id field to given value. - - -### GetIsDeprecated - -`func (o *GetConnectorsResponseBodyProperties) GetIsDeprecated() bool` - -GetIsDeprecated returns the IsDeprecated field if non-nil, zero value otherwise. - -### GetIsDeprecatedOk - -`func (o *GetConnectorsResponseBodyProperties) GetIsDeprecatedOk() (*bool, bool)` - -GetIsDeprecatedOk returns a tuple with the IsDeprecated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDeprecated - -`func (o *GetConnectorsResponseBodyProperties) SetIsDeprecated(v bool)` - -SetIsDeprecated sets IsDeprecated field to given value. - - -### GetIsMissingSecrets - -`func (o *GetConnectorsResponseBodyProperties) GetIsMissingSecrets() bool` - -GetIsMissingSecrets returns the IsMissingSecrets field if non-nil, zero value otherwise. - -### GetIsMissingSecretsOk - -`func (o *GetConnectorsResponseBodyProperties) GetIsMissingSecretsOk() (*bool, bool)` - -GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsMissingSecrets - -`func (o *GetConnectorsResponseBodyProperties) SetIsMissingSecrets(v bool)` - -SetIsMissingSecrets sets IsMissingSecrets field to given value. - -### HasIsMissingSecrets - -`func (o *GetConnectorsResponseBodyProperties) HasIsMissingSecrets() bool` - -HasIsMissingSecrets returns a boolean if a field has been set. - -### GetIsPreconfigured - -`func (o *GetConnectorsResponseBodyProperties) GetIsPreconfigured() bool` - -GetIsPreconfigured returns the IsPreconfigured field if non-nil, zero value otherwise. - -### GetIsPreconfiguredOk - -`func (o *GetConnectorsResponseBodyProperties) GetIsPreconfiguredOk() (*bool, bool)` - -GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPreconfigured - -`func (o *GetConnectorsResponseBodyProperties) SetIsPreconfigured(v bool)` - -SetIsPreconfigured sets IsPreconfigured field to given value. - - -### GetName - -`func (o *GetConnectorsResponseBodyProperties) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *GetConnectorsResponseBodyProperties) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *GetConnectorsResponseBodyProperties) SetName(v string)` - -SetName sets Name field to given value. - - -### GetReferencedByCount - -`func (o *GetConnectorsResponseBodyProperties) GetReferencedByCount() int32` - -GetReferencedByCount returns the ReferencedByCount field if non-nil, zero value otherwise. - -### GetReferencedByCountOk - -`func (o *GetConnectorsResponseBodyProperties) GetReferencedByCountOk() (*int32, bool)` - -GetReferencedByCountOk returns a tuple with the ReferencedByCount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetReferencedByCount - -`func (o *GetConnectorsResponseBodyProperties) SetReferencedByCount(v int32)` - -SetReferencedByCount sets ReferencedByCount field to given value. - - - [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/InlineResponse200.md b/generated/kibanaactions/docs/InlineResponse200.md new file mode 100644 index 000000000..f8a7ae353 --- /dev/null +++ b/generated/kibanaactions/docs/InlineResponse200.md @@ -0,0 +1,15 @@ +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates whether the connector type is enabled in Kibana. | [optional] [default to null] +**EnabledInConfig** | **bool** | Indicates whether the connector type is enabled in the Kibana `.yml` file. | [optional] [default to null] +**EnabledInLicense** | **bool** | Indicates whether the connector is enabled in the license. | [optional] [default to null] +**Id** | [***ConnectorTypes**](connector_types.md) | | [optional] [default to null] +**MinimumLicenseRequired** | **string** | The license that is required to use the connector type. | [optional] [default to null] +**Name** | **string** | The name of the connector type. | [optional] [default to null] +**SupportedFeatureIds** | [**[]Features**](features.md) | The Kibana features that are supported by the connector type. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/generated/kibanaactions/docs/InlineResponse2001.md b/generated/kibanaactions/docs/InlineResponse2001.md new file mode 100644 index 000000000..95aec6f75 --- /dev/null +++ b/generated/kibanaactions/docs/InlineResponse2001.md @@ -0,0 +1,11 @@ +# InlineResponse2001 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConnectorId** | **string** | The identifier for the connector. | [default to null] +**Data** | [***OneOfinlineResponse2001Data**](OneOfinlineResponse2001Data.md) | | [optional] [default to null] +**Status** | **string** | The status of the action. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/generated/kibanaactions/docs/InlineResponse2002.md b/generated/kibanaactions/docs/InlineResponse2002.md new file mode 100644 index 000000000..1ef4a390b --- /dev/null +++ b/generated/kibanaactions/docs/InlineResponse2002.md @@ -0,0 +1,14 @@ +# InlineResponse2002 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates whether the connector type is enabled in Kibana. | [optional] [default to null] +**EnabledInConfig** | **bool** | Indicates whether the connector type is enabled in the Kibana `.yml` file. | [optional] [default to null] +**EnabledInLicense** | **bool** | Indicates whether the connector is enabled in the license. | [optional] [default to null] +**Id** | **string** | The unique identifier for the connector type. | [optional] [default to null] +**MinimumLicenseRequired** | **string** | The license that is required to use the connector type. | [optional] [default to null] +**Name** | **string** | The name of the connector type. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/generated/kibanaactions/docs/InlineResponse2003.md b/generated/kibanaactions/docs/InlineResponse2003.md new file mode 100644 index 000000000..37aa85249 --- /dev/null +++ b/generated/kibanaactions/docs/InlineResponse2003.md @@ -0,0 +1,11 @@ +# InlineResponse2003 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActionId** | **string** | | [optional] [default to null] +**Data** | [***OneOfinlineResponse2003Data**](OneOfinlineResponse2003Data.md) | | [optional] [default to null] +**Status** | **string** | The status of the action. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/generated/kibanaactions/docs/InlineResponse400.md b/generated/kibanaactions/docs/InlineResponse400.md new file mode 100644 index 000000000..f0a62c680 --- /dev/null +++ b/generated/kibanaactions/docs/InlineResponse400.md @@ -0,0 +1,11 @@ +# InlineResponse400 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error_** | **string** | | [optional] [default to null] +**Message** | **string** | | [optional] [default to null] +**StatusCode** | **int32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/generated/kibanaactions/docs/InlineResponse404.md b/generated/kibanaactions/docs/InlineResponse404.md new file mode 100644 index 000000000..c664305af --- /dev/null +++ b/generated/kibanaactions/docs/InlineResponse404.md @@ -0,0 +1,11 @@ +# InlineResponse404 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error_** | **string** | | [optional] [default to null] +**Message** | **string** | | [optional] [default to null] +**StatusCode** | **int32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/generated/kibanaactions/docs/LegacyCreateConnectorRequestProperties.md b/generated/kibanaactions/docs/LegacyCreateConnectorRequestProperties.md index 2f2156054..d7dc50410 100644 --- a/generated/kibanaactions/docs/LegacyCreateConnectorRequestProperties.md +++ b/generated/kibanaactions/docs/LegacyCreateConnectorRequestProperties.md @@ -1,134 +1,12 @@ # LegacyCreateConnectorRequestProperties ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ActionTypeId** | Pointer to **string** | The connector type identifier. | [optional] -**Config** | Pointer to **map[string]interface{}** | The configuration for the connector. Configuration properties vary depending on the connector type. | [optional] -**Name** | Pointer to **string** | The display name for the connector. | [optional] -**Secrets** | Pointer to **map[string]interface{}** | The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. NOTE: Remember these values. You must provide them each time you update the connector. | [optional] - -## Methods - -### NewLegacyCreateConnectorRequestProperties - -`func NewLegacyCreateConnectorRequestProperties() *LegacyCreateConnectorRequestProperties` - -NewLegacyCreateConnectorRequestProperties instantiates a new LegacyCreateConnectorRequestProperties object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewLegacyCreateConnectorRequestPropertiesWithDefaults - -`func NewLegacyCreateConnectorRequestPropertiesWithDefaults() *LegacyCreateConnectorRequestProperties` - -NewLegacyCreateConnectorRequestPropertiesWithDefaults instantiates a new LegacyCreateConnectorRequestProperties object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetActionTypeId - -`func (o *LegacyCreateConnectorRequestProperties) GetActionTypeId() string` - -GetActionTypeId returns the ActionTypeId field if non-nil, zero value otherwise. - -### GetActionTypeIdOk - -`func (o *LegacyCreateConnectorRequestProperties) GetActionTypeIdOk() (*string, bool)` - -GetActionTypeIdOk returns a tuple with the ActionTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetActionTypeId - -`func (o *LegacyCreateConnectorRequestProperties) SetActionTypeId(v string)` - -SetActionTypeId sets ActionTypeId field to given value. - -### HasActionTypeId - -`func (o *LegacyCreateConnectorRequestProperties) HasActionTypeId() bool` - -HasActionTypeId returns a boolean if a field has been set. - -### GetConfig - -`func (o *LegacyCreateConnectorRequestProperties) GetConfig() map[string]interface{}` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *LegacyCreateConnectorRequestProperties) GetConfigOk() (*map[string]interface{}, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *LegacyCreateConnectorRequestProperties) SetConfig(v map[string]interface{})` - -SetConfig sets Config field to given value. - -### HasConfig - -`func (o *LegacyCreateConnectorRequestProperties) HasConfig() bool` - -HasConfig returns a boolean if a field has been set. - -### GetName - -`func (o *LegacyCreateConnectorRequestProperties) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *LegacyCreateConnectorRequestProperties) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *LegacyCreateConnectorRequestProperties) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *LegacyCreateConnectorRequestProperties) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetSecrets - -`func (o *LegacyCreateConnectorRequestProperties) GetSecrets() map[string]interface{}` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *LegacyCreateConnectorRequestProperties) GetSecretsOk() (*map[string]interface{}, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *LegacyCreateConnectorRequestProperties) SetSecrets(v map[string]interface{})` - -SetSecrets sets Secrets field to given value. - -### HasSecrets - -`func (o *LegacyCreateConnectorRequestProperties) HasSecrets() bool` - -HasSecrets returns a boolean if a field has been set. - +**ActionTypeId** | **string** | The connector type identifier. | [optional] [default to null] +**Config** | [***interface{}**](interface{}.md) | The configuration for the connector. Configuration properties vary depending on the connector type. | [optional] [default to null] +**Name** | **string** | The display name for the connector. | [optional] [default to null] +**Secrets** | [***interface{}**](interface{}.md) | The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. NOTE: Remember these values. You must provide them each time you update the connector. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/LegacyGetConnectorTypesResponseBodyPropertiesInner.md b/generated/kibanaactions/docs/LegacyGetConnectorTypesResponseBodyPropertiesInner.md deleted file mode 100644 index 32c56b2ed..000000000 --- a/generated/kibanaactions/docs/LegacyGetConnectorTypesResponseBodyPropertiesInner.md +++ /dev/null @@ -1,186 +0,0 @@ -# LegacyGetConnectorTypesResponseBodyPropertiesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | Pointer to **bool** | Indicates whether the connector type is enabled in Kibana. | [optional] -**EnabledInConfig** | Pointer to **bool** | Indicates whether the connector type is enabled in the Kibana `.yml` file. | [optional] -**EnabledInLicense** | Pointer to **bool** | Indicates whether the connector is enabled in the license. | [optional] -**Id** | Pointer to **string** | The unique identifier for the connector type. | [optional] -**MinimumLicenseRequired** | Pointer to **string** | The license that is required to use the connector type. | [optional] -**Name** | Pointer to **string** | The name of the connector type. | [optional] - -## Methods - -### NewLegacyGetConnectorTypesResponseBodyPropertiesInner - -`func NewLegacyGetConnectorTypesResponseBodyPropertiesInner() *LegacyGetConnectorTypesResponseBodyPropertiesInner` - -NewLegacyGetConnectorTypesResponseBodyPropertiesInner instantiates a new LegacyGetConnectorTypesResponseBodyPropertiesInner object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewLegacyGetConnectorTypesResponseBodyPropertiesInnerWithDefaults - -`func NewLegacyGetConnectorTypesResponseBodyPropertiesInnerWithDefaults() *LegacyGetConnectorTypesResponseBodyPropertiesInner` - -NewLegacyGetConnectorTypesResponseBodyPropertiesInnerWithDefaults instantiates a new LegacyGetConnectorTypesResponseBodyPropertiesInner object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetEnabled - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabled() bool` - -GetEnabled returns the Enabled field if non-nil, zero value otherwise. - -### GetEnabledOk - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledOk() (*bool, bool)` - -GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnabled - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetEnabled(v bool)` - -SetEnabled sets Enabled field to given value. - -### HasEnabled - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasEnabled() bool` - -HasEnabled returns a boolean if a field has been set. - -### GetEnabledInConfig - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledInConfig() bool` - -GetEnabledInConfig returns the EnabledInConfig field if non-nil, zero value otherwise. - -### GetEnabledInConfigOk - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledInConfigOk() (*bool, bool)` - -GetEnabledInConfigOk returns a tuple with the EnabledInConfig field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnabledInConfig - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetEnabledInConfig(v bool)` - -SetEnabledInConfig sets EnabledInConfig field to given value. - -### HasEnabledInConfig - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasEnabledInConfig() bool` - -HasEnabledInConfig returns a boolean if a field has been set. - -### GetEnabledInLicense - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledInLicense() bool` - -GetEnabledInLicense returns the EnabledInLicense field if non-nil, zero value otherwise. - -### GetEnabledInLicenseOk - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledInLicenseOk() (*bool, bool)` - -GetEnabledInLicenseOk returns a tuple with the EnabledInLicense field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnabledInLicense - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetEnabledInLicense(v bool)` - -SetEnabledInLicense sets EnabledInLicense field to given value. - -### HasEnabledInLicense - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasEnabledInLicense() bool` - -HasEnabledInLicense returns a boolean if a field has been set. - -### GetId - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetMinimumLicenseRequired - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetMinimumLicenseRequired() string` - -GetMinimumLicenseRequired returns the MinimumLicenseRequired field if non-nil, zero value otherwise. - -### GetMinimumLicenseRequiredOk - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetMinimumLicenseRequiredOk() (*string, bool)` - -GetMinimumLicenseRequiredOk returns a tuple with the MinimumLicenseRequired field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMinimumLicenseRequired - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetMinimumLicenseRequired(v string)` - -SetMinimumLicenseRequired sets MinimumLicenseRequired field to given value. - -### HasMinimumLicenseRequired - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasMinimumLicenseRequired() bool` - -HasMinimumLicenseRequired returns a boolean if a field has been set. - -### GetName - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasName() bool` - -HasName returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/kibanaactions/docs/LegacyRunConnector200Response.md b/generated/kibanaactions/docs/LegacyRunConnector200Response.md deleted file mode 100644 index 17ca58a2e..000000000 --- a/generated/kibanaactions/docs/LegacyRunConnector200Response.md +++ /dev/null @@ -1,108 +0,0 @@ -# LegacyRunConnector200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ActionId** | Pointer to **string** | | [optional] -**Data** | Pointer to [**RunConnector200ResponseData**](RunConnector200ResponseData.md) | | [optional] -**Status** | Pointer to **string** | The status of the action. | [optional] - -## Methods - -### NewLegacyRunConnector200Response - -`func NewLegacyRunConnector200Response() *LegacyRunConnector200Response` - -NewLegacyRunConnector200Response instantiates a new LegacyRunConnector200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewLegacyRunConnector200ResponseWithDefaults - -`func NewLegacyRunConnector200ResponseWithDefaults() *LegacyRunConnector200Response` - -NewLegacyRunConnector200ResponseWithDefaults instantiates a new LegacyRunConnector200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetActionId - -`func (o *LegacyRunConnector200Response) GetActionId() string` - -GetActionId returns the ActionId field if non-nil, zero value otherwise. - -### GetActionIdOk - -`func (o *LegacyRunConnector200Response) GetActionIdOk() (*string, bool)` - -GetActionIdOk returns a tuple with the ActionId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetActionId - -`func (o *LegacyRunConnector200Response) SetActionId(v string)` - -SetActionId sets ActionId field to given value. - -### HasActionId - -`func (o *LegacyRunConnector200Response) HasActionId() bool` - -HasActionId returns a boolean if a field has been set. - -### GetData - -`func (o *LegacyRunConnector200Response) GetData() RunConnector200ResponseData` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *LegacyRunConnector200Response) GetDataOk() (*RunConnector200ResponseData, bool)` - -GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetData - -`func (o *LegacyRunConnector200Response) SetData(v RunConnector200ResponseData)` - -SetData sets Data field to given value. - -### HasData - -`func (o *LegacyRunConnector200Response) HasData() bool` - -HasData returns a boolean if a field has been set. - -### GetStatus - -`func (o *LegacyRunConnector200Response) GetStatus() string` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *LegacyRunConnector200Response) GetStatusOk() (*string, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *LegacyRunConnector200Response) SetStatus(v string)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *LegacyRunConnector200Response) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/kibanaactions/docs/LegacyRunConnectorRequestBodyProperties.md b/generated/kibanaactions/docs/LegacyRunConnectorRequestBodyProperties.md index 99b4047b7..42d9e9d02 100644 --- a/generated/kibanaactions/docs/LegacyRunConnectorRequestBodyProperties.md +++ b/generated/kibanaactions/docs/LegacyRunConnectorRequestBodyProperties.md @@ -1,51 +1,9 @@ # LegacyRunConnectorRequestBodyProperties ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Params** | **map[string]interface{}** | The parameters of the connector. Parameter properties vary depending on the connector type. | - -## Methods - -### NewLegacyRunConnectorRequestBodyProperties - -`func NewLegacyRunConnectorRequestBodyProperties(params map[string]interface{}, ) *LegacyRunConnectorRequestBodyProperties` - -NewLegacyRunConnectorRequestBodyProperties instantiates a new LegacyRunConnectorRequestBodyProperties object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewLegacyRunConnectorRequestBodyPropertiesWithDefaults - -`func NewLegacyRunConnectorRequestBodyPropertiesWithDefaults() *LegacyRunConnectorRequestBodyProperties` - -NewLegacyRunConnectorRequestBodyPropertiesWithDefaults instantiates a new LegacyRunConnectorRequestBodyProperties object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetParams - -`func (o *LegacyRunConnectorRequestBodyProperties) GetParams() map[string]interface{}` - -GetParams returns the Params field if non-nil, zero value otherwise. - -### GetParamsOk - -`func (o *LegacyRunConnectorRequestBodyProperties) GetParamsOk() (*map[string]interface{}, bool)` - -GetParamsOk returns a tuple with the Params field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetParams - -`func (o *LegacyRunConnectorRequestBodyProperties) SetParams(v map[string]interface{})` - -SetParams sets Params field to given value. - - +**Params** | [***interface{}**](interface{}.md) | The parameters of the connector. Parameter properties vary depending on the connector type. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/LegacyUpdateConnectorRequestBodyProperties.md b/generated/kibanaactions/docs/LegacyUpdateConnectorRequestBodyProperties.md index ec69e2209..66373d9f8 100644 --- a/generated/kibanaactions/docs/LegacyUpdateConnectorRequestBodyProperties.md +++ b/generated/kibanaactions/docs/LegacyUpdateConnectorRequestBodyProperties.md @@ -1,108 +1,11 @@ # LegacyUpdateConnectorRequestBodyProperties ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | Pointer to **map[string]interface{}** | The new connector configuration. Configuration properties vary depending on the connector type. | [optional] -**Name** | Pointer to **string** | The new name for the connector. | [optional] -**Secrets** | Pointer to **map[string]interface{}** | The updated secrets configuration for the connector. Secrets properties vary depending on the connector type. | [optional] - -## Methods - -### NewLegacyUpdateConnectorRequestBodyProperties - -`func NewLegacyUpdateConnectorRequestBodyProperties() *LegacyUpdateConnectorRequestBodyProperties` - -NewLegacyUpdateConnectorRequestBodyProperties instantiates a new LegacyUpdateConnectorRequestBodyProperties object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewLegacyUpdateConnectorRequestBodyPropertiesWithDefaults - -`func NewLegacyUpdateConnectorRequestBodyPropertiesWithDefaults() *LegacyUpdateConnectorRequestBodyProperties` - -NewLegacyUpdateConnectorRequestBodyPropertiesWithDefaults instantiates a new LegacyUpdateConnectorRequestBodyProperties object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *LegacyUpdateConnectorRequestBodyProperties) GetConfig() map[string]interface{}` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *LegacyUpdateConnectorRequestBodyProperties) GetConfigOk() (*map[string]interface{}, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *LegacyUpdateConnectorRequestBodyProperties) SetConfig(v map[string]interface{})` - -SetConfig sets Config field to given value. - -### HasConfig - -`func (o *LegacyUpdateConnectorRequestBodyProperties) HasConfig() bool` - -HasConfig returns a boolean if a field has been set. - -### GetName - -`func (o *LegacyUpdateConnectorRequestBodyProperties) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *LegacyUpdateConnectorRequestBodyProperties) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *LegacyUpdateConnectorRequestBodyProperties) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *LegacyUpdateConnectorRequestBodyProperties) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetSecrets - -`func (o *LegacyUpdateConnectorRequestBodyProperties) GetSecrets() map[string]interface{}` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *LegacyUpdateConnectorRequestBodyProperties) GetSecretsOk() (*map[string]interface{}, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *LegacyUpdateConnectorRequestBodyProperties) SetSecrets(v map[string]interface{})` - -SetSecrets sets Secrets field to given value. - -### HasSecrets - -`func (o *LegacyUpdateConnectorRequestBodyProperties) HasSecrets() bool` - -HasSecrets returns a boolean if a field has been set. - +**Config** | [***interface{}**](interface{}.md) | The new connector configuration. Configuration properties vary depending on the connector type. | [optional] [default to null] +**Name** | **string** | The new name for the connector. | [optional] [default to null] +**Secrets** | [***interface{}**](interface{}.md) | The updated secrets configuration for the connector. Secrets properties vary depending on the connector type. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/Model401Response.md b/generated/kibanaactions/docs/Model401Response.md deleted file mode 100644 index a53c5cd69..000000000 --- a/generated/kibanaactions/docs/Model401Response.md +++ /dev/null @@ -1,108 +0,0 @@ -# Model401Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error** | Pointer to **string** | | [optional] -**Message** | Pointer to **string** | | [optional] -**StatusCode** | Pointer to **int32** | | [optional] - -## Methods - -### NewModel401Response - -`func NewModel401Response() *Model401Response` - -NewModel401Response instantiates a new Model401Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewModel401ResponseWithDefaults - -`func NewModel401ResponseWithDefaults() *Model401Response` - -NewModel401ResponseWithDefaults instantiates a new Model401Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetError - -`func (o *Model401Response) GetError() string` - -GetError returns the Error field if non-nil, zero value otherwise. - -### GetErrorOk - -`func (o *Model401Response) GetErrorOk() (*string, bool)` - -GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetError - -`func (o *Model401Response) SetError(v string)` - -SetError sets Error field to given value. - -### HasError - -`func (o *Model401Response) HasError() bool` - -HasError returns a boolean if a field has been set. - -### GetMessage - -`func (o *Model401Response) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *Model401Response) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *Model401Response) SetMessage(v string)` - -SetMessage sets Message field to given value. - -### HasMessage - -`func (o *Model401Response) HasMessage() bool` - -HasMessage returns a boolean if a field has been set. - -### GetStatusCode - -`func (o *Model401Response) GetStatusCode() int32` - -GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. - -### GetStatusCodeOk - -`func (o *Model401Response) GetStatusCodeOk() (*int32, bool)` - -GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatusCode - -`func (o *Model401Response) SetStatusCode(v int32)` - -SetStatusCode sets StatusCode field to given value. - -### HasStatusCode - -`func (o *Model401Response) HasStatusCode() bool` - -HasStatusCode returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/kibanaactions/docs/Model404Response.md b/generated/kibanaactions/docs/Model404Response.md deleted file mode 100644 index 1bfd84837..000000000 --- a/generated/kibanaactions/docs/Model404Response.md +++ /dev/null @@ -1,108 +0,0 @@ -# Model404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error** | Pointer to **string** | | [optional] -**Message** | Pointer to **string** | | [optional] -**StatusCode** | Pointer to **int32** | | [optional] - -## Methods - -### NewModel404Response - -`func NewModel404Response() *Model404Response` - -NewModel404Response instantiates a new Model404Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewModel404ResponseWithDefaults - -`func NewModel404ResponseWithDefaults() *Model404Response` - -NewModel404ResponseWithDefaults instantiates a new Model404Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetError - -`func (o *Model404Response) GetError() string` - -GetError returns the Error field if non-nil, zero value otherwise. - -### GetErrorOk - -`func (o *Model404Response) GetErrorOk() (*string, bool)` - -GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetError - -`func (o *Model404Response) SetError(v string)` - -SetError sets Error field to given value. - -### HasError - -`func (o *Model404Response) HasError() bool` - -HasError returns a boolean if a field has been set. - -### GetMessage - -`func (o *Model404Response) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *Model404Response) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *Model404Response) SetMessage(v string)` - -SetMessage sets Message field to given value. - -### HasMessage - -`func (o *Model404Response) HasMessage() bool` - -HasMessage returns a boolean if a field has been set. - -### GetStatusCode - -`func (o *Model404Response) GetStatusCode() int32` - -GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. - -### GetStatusCodeOk - -`func (o *Model404Response) GetStatusCodeOk() (*int32, bool)` - -GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatusCode - -`func (o *Model404Response) SetStatusCode(v int32)` - -SetStatusCode sets StatusCode field to given value. - -### HasStatusCode - -`func (o *Model404Response) HasStatusCode() bool` - -HasStatusCode returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/kibanaactions/docs/NotFoundResponse.md b/generated/kibanaactions/docs/NotFoundResponse.md index fdf5a82dc..efef6cf08 100644 --- a/generated/kibanaactions/docs/NotFoundResponse.md +++ b/generated/kibanaactions/docs/NotFoundResponse.md @@ -1,108 +1,11 @@ # NotFoundResponse ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Error** | Pointer to **string** | | [optional] -**Message** | Pointer to **string** | | [optional] -**StatusCode** | Pointer to **int32** | | [optional] - -## Methods - -### NewNotFoundResponse - -`func NewNotFoundResponse() *NotFoundResponse` - -NewNotFoundResponse instantiates a new NotFoundResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewNotFoundResponseWithDefaults - -`func NewNotFoundResponseWithDefaults() *NotFoundResponse` - -NewNotFoundResponseWithDefaults instantiates a new NotFoundResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetError - -`func (o *NotFoundResponse) GetError() string` - -GetError returns the Error field if non-nil, zero value otherwise. - -### GetErrorOk - -`func (o *NotFoundResponse) GetErrorOk() (*string, bool)` - -GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetError - -`func (o *NotFoundResponse) SetError(v string)` - -SetError sets Error field to given value. - -### HasError - -`func (o *NotFoundResponse) HasError() bool` - -HasError returns a boolean if a field has been set. - -### GetMessage - -`func (o *NotFoundResponse) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *NotFoundResponse) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *NotFoundResponse) SetMessage(v string)` - -SetMessage sets Message field to given value. - -### HasMessage - -`func (o *NotFoundResponse) HasMessage() bool` - -HasMessage returns a boolean if a field has been set. - -### GetStatusCode - -`func (o *NotFoundResponse) GetStatusCode() int32` - -GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. - -### GetStatusCodeOk - -`func (o *NotFoundResponse) GetStatusCodeOk() (*int32, bool)` - -GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatusCode - -`func (o *NotFoundResponse) SetStatusCode(v int32)` - -SetStatusCode sets StatusCode field to given value. - -### HasStatusCode - -`func (o *NotFoundResponse) HasStatusCode() bool` - -HasStatusCode returns a boolean if a field has been set. - +**Error_** | **string** | | [optional] [default to null] +**Message** | **string** | | [optional] [default to null] +**StatusCode** | **int32** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/OneOfRunConnectorRequestBodyPropertiesParams.md b/generated/kibanaactions/docs/OneOfRunConnectorRequestBodyPropertiesParams.md new file mode 100644 index 000000000..f9ec8aed1 --- /dev/null +++ b/generated/kibanaactions/docs/OneOfRunConnectorRequestBodyPropertiesParams.md @@ -0,0 +1,8 @@ +# OneOfRunConnectorRequestBodyPropertiesParams + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/generated/kibanaactions/docs/OneOfinlineResponse2001Data.md b/generated/kibanaactions/docs/OneOfinlineResponse2001Data.md new file mode 100644 index 000000000..df4e57405 --- /dev/null +++ b/generated/kibanaactions/docs/OneOfinlineResponse2001Data.md @@ -0,0 +1,8 @@ +# OneOfinlineResponse2001Data + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/generated/kibanaactions/docs/OneOfinlineResponse2003Data.md b/generated/kibanaactions/docs/OneOfinlineResponse2003Data.md new file mode 100644 index 000000000..8d059cc4e --- /dev/null +++ b/generated/kibanaactions/docs/OneOfinlineResponse2003Data.md @@ -0,0 +1,8 @@ +# OneOfinlineResponse2003Data + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md b/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md new file mode 100644 index 000000000..06e110388 --- /dev/null +++ b/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md @@ -0,0 +1,8 @@ +# OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md b/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md new file mode 100644 index 000000000..a176b0aac --- /dev/null +++ b/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md @@ -0,0 +1,8 @@ +# OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md b/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md new file mode 100644 index 000000000..eaa247f28 --- /dev/null +++ b/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md @@ -0,0 +1,8 @@ +# OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md b/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md new file mode 100644 index 000000000..497ce69b4 --- /dev/null +++ b/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md @@ -0,0 +1,8 @@ +# OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/generated/kibanaactions/docs/RuleNameMapping.md b/generated/kibanaactions/docs/RuleNameMapping.md index 268f13731..93189f032 100644 --- a/generated/kibanaactions/docs/RuleNameMapping.md +++ b/generated/kibanaactions/docs/RuleNameMapping.md @@ -1,114 +1,12 @@ # RuleNameMapping ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**FieldType** | **string** | The type of field in Swimlane. | -**Id** | **string** | The identifier for the field in Swimlane. | -**Key** | **string** | The key for the field in Swimlane. | -**Name** | **string** | The name of the field in Swimlane. | - -## Methods - -### NewRuleNameMapping - -`func NewRuleNameMapping(fieldType string, id string, key string, name string, ) *RuleNameMapping` - -NewRuleNameMapping instantiates a new RuleNameMapping object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRuleNameMappingWithDefaults - -`func NewRuleNameMappingWithDefaults() *RuleNameMapping` - -NewRuleNameMappingWithDefaults instantiates a new RuleNameMapping object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetFieldType - -`func (o *RuleNameMapping) GetFieldType() string` - -GetFieldType returns the FieldType field if non-nil, zero value otherwise. - -### GetFieldTypeOk - -`func (o *RuleNameMapping) GetFieldTypeOk() (*string, bool)` - -GetFieldTypeOk returns a tuple with the FieldType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFieldType - -`func (o *RuleNameMapping) SetFieldType(v string)` - -SetFieldType sets FieldType field to given value. - - -### GetId - -`func (o *RuleNameMapping) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *RuleNameMapping) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *RuleNameMapping) SetId(v string)` - -SetId sets Id field to given value. - - -### GetKey - -`func (o *RuleNameMapping) GetKey() string` - -GetKey returns the Key field if non-nil, zero value otherwise. - -### GetKeyOk - -`func (o *RuleNameMapping) GetKeyOk() (*string, bool)` - -GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKey - -`func (o *RuleNameMapping) SetKey(v string)` - -SetKey sets Key field to given value. - - -### GetName - -`func (o *RuleNameMapping) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *RuleNameMapping) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *RuleNameMapping) SetName(v string)` - -SetName sets Name field to given value. - - +**FieldType** | **string** | The type of field in Swimlane. | [default to null] +**Id** | **string** | The identifier for the field in Swimlane. | [default to null] +**Key** | **string** | The key for the field in Swimlane. | [default to null] +**Name** | **string** | The name of the field in Swimlane. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnector200Response.md b/generated/kibanaactions/docs/RunConnector200Response.md deleted file mode 100644 index 8f052cbe0..000000000 --- a/generated/kibanaactions/docs/RunConnector200Response.md +++ /dev/null @@ -1,98 +0,0 @@ -# RunConnector200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ConnectorId** | **string** | The identifier for the connector. | -**Data** | Pointer to [**RunConnector200ResponseData**](RunConnector200ResponseData.md) | | [optional] -**Status** | **string** | The status of the action. | - -## Methods - -### NewRunConnector200Response - -`func NewRunConnector200Response(connectorId string, status string, ) *RunConnector200Response` - -NewRunConnector200Response instantiates a new RunConnector200Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnector200ResponseWithDefaults - -`func NewRunConnector200ResponseWithDefaults() *RunConnector200Response` - -NewRunConnector200ResponseWithDefaults instantiates a new RunConnector200Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConnectorId - -`func (o *RunConnector200Response) GetConnectorId() string` - -GetConnectorId returns the ConnectorId field if non-nil, zero value otherwise. - -### GetConnectorIdOk - -`func (o *RunConnector200Response) GetConnectorIdOk() (*string, bool)` - -GetConnectorIdOk returns a tuple with the ConnectorId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorId - -`func (o *RunConnector200Response) SetConnectorId(v string)` - -SetConnectorId sets ConnectorId field to given value. - - -### GetData - -`func (o *RunConnector200Response) GetData() RunConnector200ResponseData` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *RunConnector200Response) GetDataOk() (*RunConnector200ResponseData, bool)` - -GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetData - -`func (o *RunConnector200Response) SetData(v RunConnector200ResponseData)` - -SetData sets Data field to given value. - -### HasData - -`func (o *RunConnector200Response) HasData() bool` - -HasData returns a boolean if a field has been set. - -### GetStatus - -`func (o *RunConnector200Response) GetStatus() string` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *RunConnector200Response) GetStatusOk() (*string, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *RunConnector200Response) SetStatus(v string)` - -SetStatus sets Status field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/kibanaactions/docs/RunConnector200ResponseData.md b/generated/kibanaactions/docs/RunConnector200ResponseData.md deleted file mode 100644 index 328a89d2a..000000000 --- a/generated/kibanaactions/docs/RunConnector200ResponseData.md +++ /dev/null @@ -1,30 +0,0 @@ -# RunConnector200ResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Methods - -### NewRunConnector200ResponseData - -`func NewRunConnector200ResponseData() *RunConnector200ResponseData` - -NewRunConnector200ResponseData instantiates a new RunConnector200ResponseData object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnector200ResponseDataWithDefaults - -`func NewRunConnector200ResponseDataWithDefaults() *RunConnector200ResponseData` - -NewRunConnector200ResponseDataWithDefaults instantiates a new RunConnector200ResponseData object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/kibanaactions/docs/RunConnectorParamsDocuments.md b/generated/kibanaactions/docs/RunConnectorParamsDocuments.md index f94c70607..2b410b4d1 100644 --- a/generated/kibanaactions/docs/RunConnectorParamsDocuments.md +++ b/generated/kibanaactions/docs/RunConnectorParamsDocuments.md @@ -1,51 +1,9 @@ # RunConnectorParamsDocuments ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Documents** | **[]map[string]interface{}** | The documents in JSON format for index connectors. | - -## Methods - -### NewRunConnectorParamsDocuments - -`func NewRunConnectorParamsDocuments(documents []map[string]interface{}, ) *RunConnectorParamsDocuments` - -NewRunConnectorParamsDocuments instantiates a new RunConnectorParamsDocuments object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorParamsDocumentsWithDefaults - -`func NewRunConnectorParamsDocumentsWithDefaults() *RunConnectorParamsDocuments` - -NewRunConnectorParamsDocumentsWithDefaults instantiates a new RunConnectorParamsDocuments object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDocuments - -`func (o *RunConnectorParamsDocuments) GetDocuments() []map[string]interface{}` - -GetDocuments returns the Documents field if non-nil, zero value otherwise. - -### GetDocumentsOk - -`func (o *RunConnectorParamsDocuments) GetDocumentsOk() (*[]map[string]interface{}, bool)` - -GetDocumentsOk returns a tuple with the Documents field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDocuments - -`func (o *RunConnectorParamsDocuments) SetDocuments(v []map[string]interface{})` - -SetDocuments sets Documents field to given value. - - +**Documents** | [**[]ModelMap**](map.md) | The documents in JSON format for index connectors. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorParamsLevelMessage.md b/generated/kibanaactions/docs/RunConnectorParamsLevelMessage.md index 8350cddae..b0567f86b 100644 --- a/generated/kibanaactions/docs/RunConnectorParamsLevelMessage.md +++ b/generated/kibanaactions/docs/RunConnectorParamsLevelMessage.md @@ -1,77 +1,10 @@ # RunConnectorParamsLevelMessage ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Level** | Pointer to **string** | The log level of the message for server log connectors. | [optional] [default to "info"] -**Message** | **string** | The message for server log connectors. | - -## Methods - -### NewRunConnectorParamsLevelMessage - -`func NewRunConnectorParamsLevelMessage(message string, ) *RunConnectorParamsLevelMessage` - -NewRunConnectorParamsLevelMessage instantiates a new RunConnectorParamsLevelMessage object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorParamsLevelMessageWithDefaults - -`func NewRunConnectorParamsLevelMessageWithDefaults() *RunConnectorParamsLevelMessage` - -NewRunConnectorParamsLevelMessageWithDefaults instantiates a new RunConnectorParamsLevelMessage object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetLevel - -`func (o *RunConnectorParamsLevelMessage) GetLevel() string` - -GetLevel returns the Level field if non-nil, zero value otherwise. - -### GetLevelOk - -`func (o *RunConnectorParamsLevelMessage) GetLevelOk() (*string, bool)` - -GetLevelOk returns a tuple with the Level field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLevel - -`func (o *RunConnectorParamsLevelMessage) SetLevel(v string)` - -SetLevel sets Level field to given value. - -### HasLevel - -`func (o *RunConnectorParamsLevelMessage) HasLevel() bool` - -HasLevel returns a boolean if a field has been set. - -### GetMessage - -`func (o *RunConnectorParamsLevelMessage) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *RunConnectorParamsLevelMessage) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *RunConnectorParamsLevelMessage) SetMessage(v string)` - -SetMessage sets Message field to given value. - - +**Level** | **string** | The log level of the message for server log connectors. | [optional] [default to LEVEL.INFO] +**Message** | **string** | The message for server log connectors. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorRequestBodyProperties.md b/generated/kibanaactions/docs/RunConnectorRequestBodyProperties.md index c0bcc5adc..ad6d5fc9f 100644 --- a/generated/kibanaactions/docs/RunConnectorRequestBodyProperties.md +++ b/generated/kibanaactions/docs/RunConnectorRequestBodyProperties.md @@ -1,51 +1,9 @@ # RunConnectorRequestBodyProperties ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Params** | [**RunConnectorRequestBodyPropertiesParams**](RunConnectorRequestBodyPropertiesParams.md) | | - -## Methods - -### NewRunConnectorRequestBodyProperties - -`func NewRunConnectorRequestBodyProperties(params RunConnectorRequestBodyPropertiesParams, ) *RunConnectorRequestBodyProperties` - -NewRunConnectorRequestBodyProperties instantiates a new RunConnectorRequestBodyProperties object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorRequestBodyPropertiesWithDefaults - -`func NewRunConnectorRequestBodyPropertiesWithDefaults() *RunConnectorRequestBodyProperties` - -NewRunConnectorRequestBodyPropertiesWithDefaults instantiates a new RunConnectorRequestBodyProperties object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetParams - -`func (o *RunConnectorRequestBodyProperties) GetParams() RunConnectorRequestBodyPropertiesParams` - -GetParams returns the Params field if non-nil, zero value otherwise. - -### GetParamsOk - -`func (o *RunConnectorRequestBodyProperties) GetParamsOk() (*RunConnectorRequestBodyPropertiesParams, bool)` - -GetParamsOk returns a tuple with the Params field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetParams - -`func (o *RunConnectorRequestBodyProperties) SetParams(v RunConnectorRequestBodyPropertiesParams)` - -SetParams sets Params field to given value. - - +**Params** | [***OneOfRunConnectorRequestBodyPropertiesParams**](OneOfRunConnectorRequestBodyPropertiesParams.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorRequestBodyPropertiesParams.md b/generated/kibanaactions/docs/RunConnectorRequestBodyPropertiesParams.md deleted file mode 100644 index 9143c339a..000000000 --- a/generated/kibanaactions/docs/RunConnectorRequestBodyPropertiesParams.md +++ /dev/null @@ -1,98 +0,0 @@ -# RunConnectorRequestBodyPropertiesParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Documents** | **[]map[string]interface{}** | The documents in JSON format for index connectors. | -**Level** | Pointer to **string** | The log level of the message for server log connectors. | [optional] [default to "info"] -**Message** | **string** | The message for server log connectors. | - -## Methods - -### NewRunConnectorRequestBodyPropertiesParams - -`func NewRunConnectorRequestBodyPropertiesParams(documents []map[string]interface{}, message string, ) *RunConnectorRequestBodyPropertiesParams` - -NewRunConnectorRequestBodyPropertiesParams instantiates a new RunConnectorRequestBodyPropertiesParams object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorRequestBodyPropertiesParamsWithDefaults - -`func NewRunConnectorRequestBodyPropertiesParamsWithDefaults() *RunConnectorRequestBodyPropertiesParams` - -NewRunConnectorRequestBodyPropertiesParamsWithDefaults instantiates a new RunConnectorRequestBodyPropertiesParams object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDocuments - -`func (o *RunConnectorRequestBodyPropertiesParams) GetDocuments() []map[string]interface{}` - -GetDocuments returns the Documents field if non-nil, zero value otherwise. - -### GetDocumentsOk - -`func (o *RunConnectorRequestBodyPropertiesParams) GetDocumentsOk() (*[]map[string]interface{}, bool)` - -GetDocumentsOk returns a tuple with the Documents field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDocuments - -`func (o *RunConnectorRequestBodyPropertiesParams) SetDocuments(v []map[string]interface{})` - -SetDocuments sets Documents field to given value. - - -### GetLevel - -`func (o *RunConnectorRequestBodyPropertiesParams) GetLevel() string` - -GetLevel returns the Level field if non-nil, zero value otherwise. - -### GetLevelOk - -`func (o *RunConnectorRequestBodyPropertiesParams) GetLevelOk() (*string, bool)` - -GetLevelOk returns a tuple with the Level field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLevel - -`func (o *RunConnectorRequestBodyPropertiesParams) SetLevel(v string)` - -SetLevel sets Level field to given value. - -### HasLevel - -`func (o *RunConnectorRequestBodyPropertiesParams) HasLevel() bool` - -HasLevel returns a boolean if a field has been set. - -### GetMessage - -`func (o *RunConnectorRequestBodyPropertiesParams) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *RunConnectorRequestBodyPropertiesParams) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *RunConnectorRequestBodyPropertiesParams) SetMessage(v string)` - -SetMessage sets Message field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionAddevent.md b/generated/kibanaactions/docs/RunConnectorSubactionAddevent.md index db137ca50..d75e0b3f3 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionAddevent.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionAddevent.md @@ -1,77 +1,10 @@ # RunConnectorSubactionAddevent ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | -**SubActionParams** | Pointer to [**RunConnectorSubactionAddeventSubActionParams**](RunConnectorSubactionAddeventSubActionParams.md) | | [optional] - -## Methods - -### NewRunConnectorSubactionAddevent - -`func NewRunConnectorSubactionAddevent(subAction string, ) *RunConnectorSubactionAddevent` - -NewRunConnectorSubactionAddevent instantiates a new RunConnectorSubactionAddevent object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionAddeventWithDefaults - -`func NewRunConnectorSubactionAddeventWithDefaults() *RunConnectorSubactionAddevent` - -NewRunConnectorSubactionAddeventWithDefaults instantiates a new RunConnectorSubactionAddevent object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSubAction - -`func (o *RunConnectorSubactionAddevent) GetSubAction() string` - -GetSubAction returns the SubAction field if non-nil, zero value otherwise. - -### GetSubActionOk - -`func (o *RunConnectorSubactionAddevent) GetSubActionOk() (*string, bool)` - -GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubAction - -`func (o *RunConnectorSubactionAddevent) SetSubAction(v string)` - -SetSubAction sets SubAction field to given value. - - -### GetSubActionParams - -`func (o *RunConnectorSubactionAddevent) GetSubActionParams() RunConnectorSubactionAddeventSubActionParams` - -GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. - -### GetSubActionParamsOk - -`func (o *RunConnectorSubactionAddevent) GetSubActionParamsOk() (*RunConnectorSubactionAddeventSubActionParams, bool)` - -GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubActionParams - -`func (o *RunConnectorSubactionAddevent) SetSubActionParams(v RunConnectorSubactionAddeventSubActionParams)` - -SetSubActionParams sets SubActionParams field to given value. - -### HasSubActionParams - -`func (o *RunConnectorSubactionAddevent) HasSubActionParams() bool` - -HasSubActionParams returns a boolean if a field has been set. - +**SubAction** | **string** | The action to test. | [default to null] +**SubActionParams** | [***RunConnectorSubactionAddeventSubActionParams**](run_connector_subaction_addevent_subActionParams.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionAddeventSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionAddeventSubActionParams.md index 28280ca7f..c14ff4900 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionAddeventSubActionParams.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionAddeventSubActionParams.md @@ -1,316 +1,19 @@ # RunConnectorSubactionAddeventSubActionParams ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AdditionalInfo** | Pointer to **string** | Additional information about the event. | [optional] -**Description** | Pointer to **string** | The details about the event. | [optional] -**EventClass** | Pointer to **string** | A specific instance of the source. | [optional] -**MessageKey** | Pointer to **string** | All actions sharing this key are associated with the same ServiceNow alert. The default value is `<rule ID>:<alert instance ID>`. | [optional] -**MetricName** | Pointer to **string** | The name of the metric. | [optional] -**Node** | Pointer to **string** | The host that the event was triggered for. | [optional] -**Resource** | Pointer to **string** | The name of the resource. | [optional] -**Severity** | Pointer to **string** | The severity of the event. | [optional] -**Source** | Pointer to **string** | The name of the event source type. | [optional] -**TimeOfEvent** | Pointer to **string** | The time of the event. | [optional] -**Type** | Pointer to **string** | The type of event. | [optional] - -## Methods - -### NewRunConnectorSubactionAddeventSubActionParams - -`func NewRunConnectorSubactionAddeventSubActionParams() *RunConnectorSubactionAddeventSubActionParams` - -NewRunConnectorSubactionAddeventSubActionParams instantiates a new RunConnectorSubactionAddeventSubActionParams object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionAddeventSubActionParamsWithDefaults - -`func NewRunConnectorSubactionAddeventSubActionParamsWithDefaults() *RunConnectorSubactionAddeventSubActionParams` - -NewRunConnectorSubactionAddeventSubActionParamsWithDefaults instantiates a new RunConnectorSubactionAddeventSubActionParams object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAdditionalInfo - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetAdditionalInfo() string` - -GetAdditionalInfo returns the AdditionalInfo field if non-nil, zero value otherwise. - -### GetAdditionalInfoOk - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetAdditionalInfoOk() (*string, bool)` - -GetAdditionalInfoOk returns a tuple with the AdditionalInfo field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAdditionalInfo - -`func (o *RunConnectorSubactionAddeventSubActionParams) SetAdditionalInfo(v string)` - -SetAdditionalInfo sets AdditionalInfo field to given value. - -### HasAdditionalInfo - -`func (o *RunConnectorSubactionAddeventSubActionParams) HasAdditionalInfo() bool` - -HasAdditionalInfo returns a boolean if a field has been set. - -### GetDescription - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *RunConnectorSubactionAddeventSubActionParams) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *RunConnectorSubactionAddeventSubActionParams) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. - -### GetEventClass - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetEventClass() string` - -GetEventClass returns the EventClass field if non-nil, zero value otherwise. - -### GetEventClassOk - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetEventClassOk() (*string, bool)` - -GetEventClassOk returns a tuple with the EventClass field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEventClass - -`func (o *RunConnectorSubactionAddeventSubActionParams) SetEventClass(v string)` - -SetEventClass sets EventClass field to given value. - -### HasEventClass - -`func (o *RunConnectorSubactionAddeventSubActionParams) HasEventClass() bool` - -HasEventClass returns a boolean if a field has been set. - -### GetMessageKey - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetMessageKey() string` - -GetMessageKey returns the MessageKey field if non-nil, zero value otherwise. - -### GetMessageKeyOk - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetMessageKeyOk() (*string, bool)` - -GetMessageKeyOk returns a tuple with the MessageKey field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessageKey - -`func (o *RunConnectorSubactionAddeventSubActionParams) SetMessageKey(v string)` - -SetMessageKey sets MessageKey field to given value. - -### HasMessageKey - -`func (o *RunConnectorSubactionAddeventSubActionParams) HasMessageKey() bool` - -HasMessageKey returns a boolean if a field has been set. - -### GetMetricName - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetMetricName() string` - -GetMetricName returns the MetricName field if non-nil, zero value otherwise. - -### GetMetricNameOk - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetMetricNameOk() (*string, bool)` - -GetMetricNameOk returns a tuple with the MetricName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetricName - -`func (o *RunConnectorSubactionAddeventSubActionParams) SetMetricName(v string)` - -SetMetricName sets MetricName field to given value. - -### HasMetricName - -`func (o *RunConnectorSubactionAddeventSubActionParams) HasMetricName() bool` - -HasMetricName returns a boolean if a field has been set. - -### GetNode - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetNode() string` - -GetNode returns the Node field if non-nil, zero value otherwise. - -### GetNodeOk - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetNodeOk() (*string, bool)` - -GetNodeOk returns a tuple with the Node field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNode - -`func (o *RunConnectorSubactionAddeventSubActionParams) SetNode(v string)` - -SetNode sets Node field to given value. - -### HasNode - -`func (o *RunConnectorSubactionAddeventSubActionParams) HasNode() bool` - -HasNode returns a boolean if a field has been set. - -### GetResource - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetResource() string` - -GetResource returns the Resource field if non-nil, zero value otherwise. - -### GetResourceOk - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetResourceOk() (*string, bool)` - -GetResourceOk returns a tuple with the Resource field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResource - -`func (o *RunConnectorSubactionAddeventSubActionParams) SetResource(v string)` - -SetResource sets Resource field to given value. - -### HasResource - -`func (o *RunConnectorSubactionAddeventSubActionParams) HasResource() bool` - -HasResource returns a boolean if a field has been set. - -### GetSeverity - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetSeverity() string` - -GetSeverity returns the Severity field if non-nil, zero value otherwise. - -### GetSeverityOk - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetSeverityOk() (*string, bool)` - -GetSeverityOk returns a tuple with the Severity field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSeverity - -`func (o *RunConnectorSubactionAddeventSubActionParams) SetSeverity(v string)` - -SetSeverity sets Severity field to given value. - -### HasSeverity - -`func (o *RunConnectorSubactionAddeventSubActionParams) HasSeverity() bool` - -HasSeverity returns a boolean if a field has been set. - -### GetSource - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetSource() string` - -GetSource returns the Source field if non-nil, zero value otherwise. - -### GetSourceOk - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetSourceOk() (*string, bool)` - -GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSource - -`func (o *RunConnectorSubactionAddeventSubActionParams) SetSource(v string)` - -SetSource sets Source field to given value. - -### HasSource - -`func (o *RunConnectorSubactionAddeventSubActionParams) HasSource() bool` - -HasSource returns a boolean if a field has been set. - -### GetTimeOfEvent - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetTimeOfEvent() string` - -GetTimeOfEvent returns the TimeOfEvent field if non-nil, zero value otherwise. - -### GetTimeOfEventOk - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetTimeOfEventOk() (*string, bool)` - -GetTimeOfEventOk returns a tuple with the TimeOfEvent field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTimeOfEvent - -`func (o *RunConnectorSubactionAddeventSubActionParams) SetTimeOfEvent(v string)` - -SetTimeOfEvent sets TimeOfEvent field to given value. - -### HasTimeOfEvent - -`func (o *RunConnectorSubactionAddeventSubActionParams) HasTimeOfEvent() bool` - -HasTimeOfEvent returns a boolean if a field has been set. - -### GetType - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *RunConnectorSubactionAddeventSubActionParams) GetTypeOk() (*string, bool)` - -GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetType - -`func (o *RunConnectorSubactionAddeventSubActionParams) SetType(v string)` - -SetType sets Type field to given value. - -### HasType - -`func (o *RunConnectorSubactionAddeventSubActionParams) HasType() bool` - -HasType returns a boolean if a field has been set. - +**AdditionalInfo** | **string** | Additional information about the event. | [optional] [default to null] +**Description** | **string** | The details about the event. | [optional] [default to null] +**EventClass** | **string** | A specific instance of the source. | [optional] [default to null] +**MessageKey** | **string** | All actions sharing this key are associated with the same ServiceNow alert. The default value is `<rule ID>:<alert instance ID>`. | [optional] [default to null] +**MetricName** | **string** | The name of the metric. | [optional] [default to null] +**Node** | **string** | The host that the event was triggered for. | [optional] [default to null] +**Resource** | **string** | The name of the resource. | [optional] [default to null] +**Severity** | **string** | The severity of the event. | [optional] [default to null] +**Source** | **string** | The name of the event source type. | [optional] [default to null] +**TimeOfEvent** | **string** | The time of the event. | [optional] [default to null] +**Type_** | **string** | The type of event. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionClosealert.md b/generated/kibanaactions/docs/RunConnectorSubactionClosealert.md index 8329373ec..fd1fa2525 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionClosealert.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionClosealert.md @@ -1,72 +1,10 @@ # RunConnectorSubactionClosealert ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | -**SubActionParams** | [**RunConnectorSubactionClosealertSubActionParams**](RunConnectorSubactionClosealertSubActionParams.md) | | - -## Methods - -### NewRunConnectorSubactionClosealert - -`func NewRunConnectorSubactionClosealert(subAction string, subActionParams RunConnectorSubactionClosealertSubActionParams, ) *RunConnectorSubactionClosealert` - -NewRunConnectorSubactionClosealert instantiates a new RunConnectorSubactionClosealert object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionClosealertWithDefaults - -`func NewRunConnectorSubactionClosealertWithDefaults() *RunConnectorSubactionClosealert` - -NewRunConnectorSubactionClosealertWithDefaults instantiates a new RunConnectorSubactionClosealert object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSubAction - -`func (o *RunConnectorSubactionClosealert) GetSubAction() string` - -GetSubAction returns the SubAction field if non-nil, zero value otherwise. - -### GetSubActionOk - -`func (o *RunConnectorSubactionClosealert) GetSubActionOk() (*string, bool)` - -GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubAction - -`func (o *RunConnectorSubactionClosealert) SetSubAction(v string)` - -SetSubAction sets SubAction field to given value. - - -### GetSubActionParams - -`func (o *RunConnectorSubactionClosealert) GetSubActionParams() RunConnectorSubactionClosealertSubActionParams` - -GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. - -### GetSubActionParamsOk - -`func (o *RunConnectorSubactionClosealert) GetSubActionParamsOk() (*RunConnectorSubactionClosealertSubActionParams, bool)` - -GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubActionParams - -`func (o *RunConnectorSubactionClosealert) SetSubActionParams(v RunConnectorSubactionClosealertSubActionParams)` - -SetSubActionParams sets SubActionParams field to given value. - - +**SubAction** | **string** | The action to test. | [default to null] +**SubActionParams** | [***RunConnectorSubactionClosealertSubActionParams**](run_connector_subaction_closealert_subActionParams.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionClosealertSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionClosealertSubActionParams.md index d2871566c..4c9d1aa06 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionClosealertSubActionParams.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionClosealertSubActionParams.md @@ -1,129 +1,12 @@ # RunConnectorSubactionClosealertSubActionParams ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Alias** | **string** | The unique identifier used for alert deduplication in Opsgenie. The alias must match the value used when creating the alert. | -**Note** | Pointer to **string** | Additional information for the alert. | [optional] -**Source** | Pointer to **string** | The display name for the source of the alert. | [optional] -**User** | Pointer to **string** | The display name for the owner. | [optional] - -## Methods - -### NewRunConnectorSubactionClosealertSubActionParams - -`func NewRunConnectorSubactionClosealertSubActionParams(alias string, ) *RunConnectorSubactionClosealertSubActionParams` - -NewRunConnectorSubactionClosealertSubActionParams instantiates a new RunConnectorSubactionClosealertSubActionParams object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionClosealertSubActionParamsWithDefaults - -`func NewRunConnectorSubactionClosealertSubActionParamsWithDefaults() *RunConnectorSubactionClosealertSubActionParams` - -NewRunConnectorSubactionClosealertSubActionParamsWithDefaults instantiates a new RunConnectorSubactionClosealertSubActionParams object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAlias - -`func (o *RunConnectorSubactionClosealertSubActionParams) GetAlias() string` - -GetAlias returns the Alias field if non-nil, zero value otherwise. - -### GetAliasOk - -`func (o *RunConnectorSubactionClosealertSubActionParams) GetAliasOk() (*string, bool)` - -GetAliasOk returns a tuple with the Alias field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAlias - -`func (o *RunConnectorSubactionClosealertSubActionParams) SetAlias(v string)` - -SetAlias sets Alias field to given value. - - -### GetNote - -`func (o *RunConnectorSubactionClosealertSubActionParams) GetNote() string` - -GetNote returns the Note field if non-nil, zero value otherwise. - -### GetNoteOk - -`func (o *RunConnectorSubactionClosealertSubActionParams) GetNoteOk() (*string, bool)` - -GetNoteOk returns a tuple with the Note field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNote - -`func (o *RunConnectorSubactionClosealertSubActionParams) SetNote(v string)` - -SetNote sets Note field to given value. - -### HasNote - -`func (o *RunConnectorSubactionClosealertSubActionParams) HasNote() bool` - -HasNote returns a boolean if a field has been set. - -### GetSource - -`func (o *RunConnectorSubactionClosealertSubActionParams) GetSource() string` - -GetSource returns the Source field if non-nil, zero value otherwise. - -### GetSourceOk - -`func (o *RunConnectorSubactionClosealertSubActionParams) GetSourceOk() (*string, bool)` - -GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSource - -`func (o *RunConnectorSubactionClosealertSubActionParams) SetSource(v string)` - -SetSource sets Source field to given value. - -### HasSource - -`func (o *RunConnectorSubactionClosealertSubActionParams) HasSource() bool` - -HasSource returns a boolean if a field has been set. - -### GetUser - -`func (o *RunConnectorSubactionClosealertSubActionParams) GetUser() string` - -GetUser returns the User field if non-nil, zero value otherwise. - -### GetUserOk - -`func (o *RunConnectorSubactionClosealertSubActionParams) GetUserOk() (*string, bool)` - -GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUser - -`func (o *RunConnectorSubactionClosealertSubActionParams) SetUser(v string)` - -SetUser sets User field to given value. - -### HasUser - -`func (o *RunConnectorSubactionClosealertSubActionParams) HasUser() bool` - -HasUser returns a boolean if a field has been set. - +**Alias** | **string** | The unique identifier used for alert deduplication in Opsgenie. The alias must match the value used when creating the alert. | [default to null] +**Note** | **string** | Additional information for the alert. | [optional] [default to null] +**Source** | **string** | The display name for the source of the alert. | [optional] [default to null] +**User** | **string** | The display name for the owner. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionCreatealert.md b/generated/kibanaactions/docs/RunConnectorSubactionCreatealert.md index 6528932a8..87c466c1f 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionCreatealert.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionCreatealert.md @@ -1,72 +1,10 @@ # RunConnectorSubactionCreatealert ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | -**SubActionParams** | [**RunConnectorSubactionCreatealertSubActionParams**](RunConnectorSubactionCreatealertSubActionParams.md) | | - -## Methods - -### NewRunConnectorSubactionCreatealert - -`func NewRunConnectorSubactionCreatealert(subAction string, subActionParams RunConnectorSubactionCreatealertSubActionParams, ) *RunConnectorSubactionCreatealert` - -NewRunConnectorSubactionCreatealert instantiates a new RunConnectorSubactionCreatealert object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionCreatealertWithDefaults - -`func NewRunConnectorSubactionCreatealertWithDefaults() *RunConnectorSubactionCreatealert` - -NewRunConnectorSubactionCreatealertWithDefaults instantiates a new RunConnectorSubactionCreatealert object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSubAction - -`func (o *RunConnectorSubactionCreatealert) GetSubAction() string` - -GetSubAction returns the SubAction field if non-nil, zero value otherwise. - -### GetSubActionOk - -`func (o *RunConnectorSubactionCreatealert) GetSubActionOk() (*string, bool)` - -GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubAction - -`func (o *RunConnectorSubactionCreatealert) SetSubAction(v string)` - -SetSubAction sets SubAction field to given value. - - -### GetSubActionParams - -`func (o *RunConnectorSubactionCreatealert) GetSubActionParams() RunConnectorSubactionCreatealertSubActionParams` - -GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. - -### GetSubActionParamsOk - -`func (o *RunConnectorSubactionCreatealert) GetSubActionParamsOk() (*RunConnectorSubactionCreatealertSubActionParams, bool)` - -GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubActionParams - -`func (o *RunConnectorSubactionCreatealert) SetSubActionParams(v RunConnectorSubactionCreatealertSubActionParams)` - -SetSubActionParams sets SubActionParams field to given value. - - +**SubAction** | **string** | The action to test. | [default to null] +**SubActionParams** | [***RunConnectorSubactionCreatealertSubActionParams**](run_connector_subaction_createalert_subActionParams.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParams.md index 24b3da7ef..9e26dd761 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParams.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParams.md @@ -1,363 +1,21 @@ # RunConnectorSubactionCreatealertSubActionParams ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Actions** | Pointer to **[]string** | The custom actions available to the alert. | [optional] -**Alias** | Pointer to **string** | The unique identifier used for alert deduplication in Opsgenie. | [optional] -**Description** | Pointer to **string** | A description that provides detailed information about the alert. | [optional] -**Details** | Pointer to **map[string]interface{}** | The custom properties of the alert. | [optional] -**Entity** | Pointer to **string** | The domain of the alert. For example, the application or server name. | [optional] -**Message** | **string** | The alert message. | -**Note** | Pointer to **string** | Additional information for the alert. | [optional] -**Priority** | Pointer to **string** | The priority level for the alert. | [optional] -**Responders** | Pointer to [**[]RunConnectorSubactionCreatealertSubActionParamsRespondersInner**](RunConnectorSubactionCreatealertSubActionParamsRespondersInner.md) | The entities to receive notifications about the alert. If `type` is `user`, either `id` or `username` is required. If `type` is `team`, either `id` or `name` is required. | [optional] -**Source** | Pointer to **string** | The display name for the source of the alert. | [optional] -**Tags** | Pointer to **[]string** | The tags for the alert. | [optional] -**User** | Pointer to **string** | The display name for the owner. | [optional] -**VisibleTo** | Pointer to [**[]RunConnectorSubactionCreatealertSubActionParamsVisibleToInner**](RunConnectorSubactionCreatealertSubActionParamsVisibleToInner.md) | The teams and users that the alert will be visible to without sending a notification. Only one of `id`, `name`, or `username` is required. | [optional] - -## Methods - -### NewRunConnectorSubactionCreatealertSubActionParams - -`func NewRunConnectorSubactionCreatealertSubActionParams(message string, ) *RunConnectorSubactionCreatealertSubActionParams` - -NewRunConnectorSubactionCreatealertSubActionParams instantiates a new RunConnectorSubactionCreatealertSubActionParams object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionCreatealertSubActionParamsWithDefaults - -`func NewRunConnectorSubactionCreatealertSubActionParamsWithDefaults() *RunConnectorSubactionCreatealertSubActionParams` - -NewRunConnectorSubactionCreatealertSubActionParamsWithDefaults instantiates a new RunConnectorSubactionCreatealertSubActionParams object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetActions - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetActions() []string` - -GetActions returns the Actions field if non-nil, zero value otherwise. - -### GetActionsOk - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetActionsOk() (*[]string, bool)` - -GetActionsOk returns a tuple with the Actions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetActions - -`func (o *RunConnectorSubactionCreatealertSubActionParams) SetActions(v []string)` - -SetActions sets Actions field to given value. - -### HasActions - -`func (o *RunConnectorSubactionCreatealertSubActionParams) HasActions() bool` - -HasActions returns a boolean if a field has been set. - -### GetAlias - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetAlias() string` - -GetAlias returns the Alias field if non-nil, zero value otherwise. - -### GetAliasOk - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetAliasOk() (*string, bool)` - -GetAliasOk returns a tuple with the Alias field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAlias - -`func (o *RunConnectorSubactionCreatealertSubActionParams) SetAlias(v string)` - -SetAlias sets Alias field to given value. - -### HasAlias - -`func (o *RunConnectorSubactionCreatealertSubActionParams) HasAlias() bool` - -HasAlias returns a boolean if a field has been set. - -### GetDescription - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *RunConnectorSubactionCreatealertSubActionParams) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *RunConnectorSubactionCreatealertSubActionParams) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. - -### GetDetails - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetDetails() map[string]interface{}` - -GetDetails returns the Details field if non-nil, zero value otherwise. - -### GetDetailsOk - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetDetailsOk() (*map[string]interface{}, bool)` - -GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDetails - -`func (o *RunConnectorSubactionCreatealertSubActionParams) SetDetails(v map[string]interface{})` - -SetDetails sets Details field to given value. - -### HasDetails - -`func (o *RunConnectorSubactionCreatealertSubActionParams) HasDetails() bool` - -HasDetails returns a boolean if a field has been set. - -### GetEntity - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetEntity() string` - -GetEntity returns the Entity field if non-nil, zero value otherwise. - -### GetEntityOk - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetEntityOk() (*string, bool)` - -GetEntityOk returns a tuple with the Entity field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEntity - -`func (o *RunConnectorSubactionCreatealertSubActionParams) SetEntity(v string)` - -SetEntity sets Entity field to given value. - -### HasEntity - -`func (o *RunConnectorSubactionCreatealertSubActionParams) HasEntity() bool` - -HasEntity returns a boolean if a field has been set. - -### GetMessage - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *RunConnectorSubactionCreatealertSubActionParams) SetMessage(v string)` - -SetMessage sets Message field to given value. - - -### GetNote - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetNote() string` - -GetNote returns the Note field if non-nil, zero value otherwise. - -### GetNoteOk - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetNoteOk() (*string, bool)` - -GetNoteOk returns a tuple with the Note field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNote - -`func (o *RunConnectorSubactionCreatealertSubActionParams) SetNote(v string)` - -SetNote sets Note field to given value. - -### HasNote - -`func (o *RunConnectorSubactionCreatealertSubActionParams) HasNote() bool` - -HasNote returns a boolean if a field has been set. - -### GetPriority - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetPriority() string` - -GetPriority returns the Priority field if non-nil, zero value otherwise. - -### GetPriorityOk - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetPriorityOk() (*string, bool)` - -GetPriorityOk returns a tuple with the Priority field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPriority - -`func (o *RunConnectorSubactionCreatealertSubActionParams) SetPriority(v string)` - -SetPriority sets Priority field to given value. - -### HasPriority - -`func (o *RunConnectorSubactionCreatealertSubActionParams) HasPriority() bool` - -HasPriority returns a boolean if a field has been set. - -### GetResponders - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetResponders() []RunConnectorSubactionCreatealertSubActionParamsRespondersInner` - -GetResponders returns the Responders field if non-nil, zero value otherwise. - -### GetRespondersOk - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetRespondersOk() (*[]RunConnectorSubactionCreatealertSubActionParamsRespondersInner, bool)` - -GetRespondersOk returns a tuple with the Responders field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResponders - -`func (o *RunConnectorSubactionCreatealertSubActionParams) SetResponders(v []RunConnectorSubactionCreatealertSubActionParamsRespondersInner)` - -SetResponders sets Responders field to given value. - -### HasResponders - -`func (o *RunConnectorSubactionCreatealertSubActionParams) HasResponders() bool` - -HasResponders returns a boolean if a field has been set. - -### GetSource - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetSource() string` - -GetSource returns the Source field if non-nil, zero value otherwise. - -### GetSourceOk - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetSourceOk() (*string, bool)` - -GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSource - -`func (o *RunConnectorSubactionCreatealertSubActionParams) SetSource(v string)` - -SetSource sets Source field to given value. - -### HasSource - -`func (o *RunConnectorSubactionCreatealertSubActionParams) HasSource() bool` - -HasSource returns a boolean if a field has been set. - -### GetTags - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetTags() []string` - -GetTags returns the Tags field if non-nil, zero value otherwise. - -### GetTagsOk - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetTagsOk() (*[]string, bool)` - -GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTags - -`func (o *RunConnectorSubactionCreatealertSubActionParams) SetTags(v []string)` - -SetTags sets Tags field to given value. - -### HasTags - -`func (o *RunConnectorSubactionCreatealertSubActionParams) HasTags() bool` - -HasTags returns a boolean if a field has been set. - -### GetUser - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetUser() string` - -GetUser returns the User field if non-nil, zero value otherwise. - -### GetUserOk - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetUserOk() (*string, bool)` - -GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUser - -`func (o *RunConnectorSubactionCreatealertSubActionParams) SetUser(v string)` - -SetUser sets User field to given value. - -### HasUser - -`func (o *RunConnectorSubactionCreatealertSubActionParams) HasUser() bool` - -HasUser returns a boolean if a field has been set. - -### GetVisibleTo - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetVisibleTo() []RunConnectorSubactionCreatealertSubActionParamsVisibleToInner` - -GetVisibleTo returns the VisibleTo field if non-nil, zero value otherwise. - -### GetVisibleToOk - -`func (o *RunConnectorSubactionCreatealertSubActionParams) GetVisibleToOk() (*[]RunConnectorSubactionCreatealertSubActionParamsVisibleToInner, bool)` - -GetVisibleToOk returns a tuple with the VisibleTo field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVisibleTo - -`func (o *RunConnectorSubactionCreatealertSubActionParams) SetVisibleTo(v []RunConnectorSubactionCreatealertSubActionParamsVisibleToInner)` - -SetVisibleTo sets VisibleTo field to given value. - -### HasVisibleTo - -`func (o *RunConnectorSubactionCreatealertSubActionParams) HasVisibleTo() bool` - -HasVisibleTo returns a boolean if a field has been set. - +**Actions** | **[]string** | The custom actions available to the alert. | [optional] [default to null] +**Alias** | **string** | The unique identifier used for alert deduplication in Opsgenie. | [optional] [default to null] +**Description** | **string** | A description that provides detailed information about the alert. | [optional] [default to null] +**Details** | [**ModelMap**](interface{}.md) | The custom properties of the alert. | [optional] [default to null] +**Entity** | **string** | The domain of the alert. For example, the application or server name. | [optional] [default to null] +**Message** | **string** | The alert message. | [default to null] +**Note** | **string** | Additional information for the alert. | [optional] [default to null] +**Priority** | **string** | The priority level for the alert. | [optional] [default to null] +**Responders** | [**[]RunConnectorSubactionCreatealertSubActionParamsResponders**](run_connector_subaction_createalert_subActionParams_responders.md) | The entities to receive notifications about the alert. If `type` is `user`, either `id` or `username` is required. If `type` is `team`, either `id` or `name` is required. | [optional] [default to null] +**Source** | **string** | The display name for the source of the alert. | [optional] [default to null] +**Tags** | **[]string** | The tags for the alert. | [optional] [default to null] +**User** | **string** | The display name for the owner. | [optional] [default to null] +**VisibleTo** | [**[]RunConnectorSubactionCreatealertSubActionParamsVisibleTo**](run_connector_subaction_createalert_subActionParams_visibleTo.md) | The teams and users that the alert will be visible to without sending a notification. Only one of `id`, `name`, or `username` is required. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsResponders.md b/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsResponders.md new file mode 100644 index 000000000..8dd3f379c --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsResponders.md @@ -0,0 +1,12 @@ +# RunConnectorSubactionCreatealertSubActionParamsResponders + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The identifier for the entity. | [optional] [default to null] +**Name** | **string** | The name of the entity. | [optional] [default to null] +**Type_** | **string** | The type of responders, in this case `escalation`. | [optional] [default to null] +**Username** | **string** | A valid email address for the user. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsRespondersInner.md b/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsRespondersInner.md deleted file mode 100644 index 1eef38bf9..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsRespondersInner.md +++ /dev/null @@ -1,134 +0,0 @@ -# RunConnectorSubactionCreatealertSubActionParamsRespondersInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | The identifier for the entity. | [optional] -**Name** | Pointer to **string** | The name of the entity. | [optional] -**Type** | Pointer to **string** | The type of responders, in this case `escalation`. | [optional] -**Username** | Pointer to **string** | A valid email address for the user. | [optional] - -## Methods - -### NewRunConnectorSubactionCreatealertSubActionParamsRespondersInner - -`func NewRunConnectorSubactionCreatealertSubActionParamsRespondersInner() *RunConnectorSubactionCreatealertSubActionParamsRespondersInner` - -NewRunConnectorSubactionCreatealertSubActionParamsRespondersInner instantiates a new RunConnectorSubactionCreatealertSubActionParamsRespondersInner object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionCreatealertSubActionParamsRespondersInnerWithDefaults - -`func NewRunConnectorSubactionCreatealertSubActionParamsRespondersInnerWithDefaults() *RunConnectorSubactionCreatealertSubActionParamsRespondersInner` - -NewRunConnectorSubactionCreatealertSubActionParamsRespondersInnerWithDefaults instantiates a new RunConnectorSubactionCreatealertSubActionParamsRespondersInner object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetType - -`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetTypeOk() (*string, bool)` - -GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetType - -`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) SetType(v string)` - -SetType sets Type field to given value. - -### HasType - -`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) HasType() bool` - -HasType returns a boolean if a field has been set. - -### GetUsername - -`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetUsername() string` - -GetUsername returns the Username field if non-nil, zero value otherwise. - -### GetUsernameOk - -`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetUsernameOk() (*string, bool)` - -GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUsername - -`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) SetUsername(v string)` - -SetUsername sets Username field to given value. - -### HasUsername - -`func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) HasUsername() bool` - -HasUsername returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsVisibleTo.md b/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsVisibleTo.md new file mode 100644 index 000000000..53b52be2f --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsVisibleTo.md @@ -0,0 +1,12 @@ +# RunConnectorSubactionCreatealertSubActionParamsVisibleTo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The identifier for the entity. | [optional] [default to null] +**Name** | **string** | The name of the entity. | [optional] [default to null] +**Type_** | **string** | Valid values are `team` and `user`. | [default to null] +**Username** | **string** | The user name. This property is required only when the `type` is `user`. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsVisibleToInner.md b/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsVisibleToInner.md deleted file mode 100644 index b829f3de6..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsVisibleToInner.md +++ /dev/null @@ -1,129 +0,0 @@ -# RunConnectorSubactionCreatealertSubActionParamsVisibleToInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | The identifier for the entity. | [optional] -**Name** | Pointer to **string** | The name of the entity. | [optional] -**Type** | **string** | Valid values are `team` and `user`. | -**Username** | Pointer to **string** | The user name. This property is required only when the `type` is `user`. | [optional] - -## Methods - -### NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInner - -`func NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInner(type_ string, ) *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner` - -NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInner instantiates a new RunConnectorSubactionCreatealertSubActionParamsVisibleToInner object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInnerWithDefaults - -`func NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInnerWithDefaults() *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner` - -NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInnerWithDefaults instantiates a new RunConnectorSubactionCreatealertSubActionParamsVisibleToInner object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetType - -`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetTypeOk() (*string, bool)` - -GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetType - -`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) SetType(v string)` - -SetType sets Type field to given value. - - -### GetUsername - -`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetUsername() string` - -GetUsername returns the Username field if non-nil, zero value otherwise. - -### GetUsernameOk - -`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetUsernameOk() (*string, bool)` - -GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUsername - -`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) SetUsername(v string)` - -SetUsername sets Username field to given value. - -### HasUsername - -`func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) HasUsername() bool` - -HasUsername returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetype.md b/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetype.md index d511ea0df..1e4adf37f 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetype.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetype.md @@ -1,72 +1,10 @@ # RunConnectorSubactionFieldsbyissuetype ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | -**SubActionParams** | [**RunConnectorSubactionFieldsbyissuetypeSubActionParams**](RunConnectorSubactionFieldsbyissuetypeSubActionParams.md) | | - -## Methods - -### NewRunConnectorSubactionFieldsbyissuetype - -`func NewRunConnectorSubactionFieldsbyissuetype(subAction string, subActionParams RunConnectorSubactionFieldsbyissuetypeSubActionParams, ) *RunConnectorSubactionFieldsbyissuetype` - -NewRunConnectorSubactionFieldsbyissuetype instantiates a new RunConnectorSubactionFieldsbyissuetype object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionFieldsbyissuetypeWithDefaults - -`func NewRunConnectorSubactionFieldsbyissuetypeWithDefaults() *RunConnectorSubactionFieldsbyissuetype` - -NewRunConnectorSubactionFieldsbyissuetypeWithDefaults instantiates a new RunConnectorSubactionFieldsbyissuetype object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSubAction - -`func (o *RunConnectorSubactionFieldsbyissuetype) GetSubAction() string` - -GetSubAction returns the SubAction field if non-nil, zero value otherwise. - -### GetSubActionOk - -`func (o *RunConnectorSubactionFieldsbyissuetype) GetSubActionOk() (*string, bool)` - -GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubAction - -`func (o *RunConnectorSubactionFieldsbyissuetype) SetSubAction(v string)` - -SetSubAction sets SubAction field to given value. - - -### GetSubActionParams - -`func (o *RunConnectorSubactionFieldsbyissuetype) GetSubActionParams() RunConnectorSubactionFieldsbyissuetypeSubActionParams` - -GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. - -### GetSubActionParamsOk - -`func (o *RunConnectorSubactionFieldsbyissuetype) GetSubActionParamsOk() (*RunConnectorSubactionFieldsbyissuetypeSubActionParams, bool)` - -GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubActionParams - -`func (o *RunConnectorSubactionFieldsbyissuetype) SetSubActionParams(v RunConnectorSubactionFieldsbyissuetypeSubActionParams)` - -SetSubActionParams sets SubActionParams field to given value. - - +**SubAction** | **string** | The action to test. | [default to null] +**SubActionParams** | [***RunConnectorSubactionFieldsbyissuetypeSubActionParams**](run_connector_subaction_fieldsbyissuetype_subActionParams.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetypeSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetypeSubActionParams.md index 2de07280e..a0e5f5290 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetypeSubActionParams.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetypeSubActionParams.md @@ -1,51 +1,9 @@ # RunConnectorSubactionFieldsbyissuetypeSubActionParams ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | The Jira issue type identifier. | - -## Methods - -### NewRunConnectorSubactionFieldsbyissuetypeSubActionParams - -`func NewRunConnectorSubactionFieldsbyissuetypeSubActionParams(id string, ) *RunConnectorSubactionFieldsbyissuetypeSubActionParams` - -NewRunConnectorSubactionFieldsbyissuetypeSubActionParams instantiates a new RunConnectorSubactionFieldsbyissuetypeSubActionParams object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionFieldsbyissuetypeSubActionParamsWithDefaults - -`func NewRunConnectorSubactionFieldsbyissuetypeSubActionParamsWithDefaults() *RunConnectorSubactionFieldsbyissuetypeSubActionParams` - -NewRunConnectorSubactionFieldsbyissuetypeSubActionParamsWithDefaults instantiates a new RunConnectorSubactionFieldsbyissuetypeSubActionParams object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *RunConnectorSubactionFieldsbyissuetypeSubActionParams) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *RunConnectorSubactionFieldsbyissuetypeSubActionParams) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *RunConnectorSubactionFieldsbyissuetypeSubActionParams) SetId(v string)` - -SetId sets Id field to given value. - - +**Id** | **string** | The Jira issue type identifier. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionGetchoices.md b/generated/kibanaactions/docs/RunConnectorSubactionGetchoices.md index f5a7039ad..7b3c46c8a 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionGetchoices.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionGetchoices.md @@ -1,72 +1,10 @@ # RunConnectorSubactionGetchoices ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | -**SubActionParams** | [**RunConnectorSubactionGetchoicesSubActionParams**](RunConnectorSubactionGetchoicesSubActionParams.md) | | - -## Methods - -### NewRunConnectorSubactionGetchoices - -`func NewRunConnectorSubactionGetchoices(subAction string, subActionParams RunConnectorSubactionGetchoicesSubActionParams, ) *RunConnectorSubactionGetchoices` - -NewRunConnectorSubactionGetchoices instantiates a new RunConnectorSubactionGetchoices object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionGetchoicesWithDefaults - -`func NewRunConnectorSubactionGetchoicesWithDefaults() *RunConnectorSubactionGetchoices` - -NewRunConnectorSubactionGetchoicesWithDefaults instantiates a new RunConnectorSubactionGetchoices object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSubAction - -`func (o *RunConnectorSubactionGetchoices) GetSubAction() string` - -GetSubAction returns the SubAction field if non-nil, zero value otherwise. - -### GetSubActionOk - -`func (o *RunConnectorSubactionGetchoices) GetSubActionOk() (*string, bool)` - -GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubAction - -`func (o *RunConnectorSubactionGetchoices) SetSubAction(v string)` - -SetSubAction sets SubAction field to given value. - - -### GetSubActionParams - -`func (o *RunConnectorSubactionGetchoices) GetSubActionParams() RunConnectorSubactionGetchoicesSubActionParams` - -GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. - -### GetSubActionParamsOk - -`func (o *RunConnectorSubactionGetchoices) GetSubActionParamsOk() (*RunConnectorSubactionGetchoicesSubActionParams, bool)` - -GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubActionParams - -`func (o *RunConnectorSubactionGetchoices) SetSubActionParams(v RunConnectorSubactionGetchoicesSubActionParams)` - -SetSubActionParams sets SubActionParams field to given value. - - +**SubAction** | **string** | The action to test. | [default to null] +**SubActionParams** | [***RunConnectorSubactionGetchoicesSubActionParams**](run_connector_subaction_getchoices_subActionParams.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionGetchoicesSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionGetchoicesSubActionParams.md index 7b85cf71e..bd669e77b 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionGetchoicesSubActionParams.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionGetchoicesSubActionParams.md @@ -1,51 +1,9 @@ # RunConnectorSubactionGetchoicesSubActionParams ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Fields** | **[]string** | An array of fields. | - -## Methods - -### NewRunConnectorSubactionGetchoicesSubActionParams - -`func NewRunConnectorSubactionGetchoicesSubActionParams(fields []string, ) *RunConnectorSubactionGetchoicesSubActionParams` - -NewRunConnectorSubactionGetchoicesSubActionParams instantiates a new RunConnectorSubactionGetchoicesSubActionParams object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionGetchoicesSubActionParamsWithDefaults - -`func NewRunConnectorSubactionGetchoicesSubActionParamsWithDefaults() *RunConnectorSubactionGetchoicesSubActionParams` - -NewRunConnectorSubactionGetchoicesSubActionParamsWithDefaults instantiates a new RunConnectorSubactionGetchoicesSubActionParams object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetFields - -`func (o *RunConnectorSubactionGetchoicesSubActionParams) GetFields() []string` - -GetFields returns the Fields field if non-nil, zero value otherwise. - -### GetFieldsOk - -`func (o *RunConnectorSubactionGetchoicesSubActionParams) GetFieldsOk() (*[]string, bool)` - -GetFieldsOk returns a tuple with the Fields field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFields - -`func (o *RunConnectorSubactionGetchoicesSubActionParams) SetFields(v []string)` - -SetFields sets Fields field to given value. - - +**Fields** | **[]string** | An array of fields. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionGetfields.md b/generated/kibanaactions/docs/RunConnectorSubactionGetfields.md index 06f830c97..d15617682 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionGetfields.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionGetfields.md @@ -1,51 +1,9 @@ # RunConnectorSubactionGetfields ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | - -## Methods - -### NewRunConnectorSubactionGetfields - -`func NewRunConnectorSubactionGetfields(subAction string, ) *RunConnectorSubactionGetfields` - -NewRunConnectorSubactionGetfields instantiates a new RunConnectorSubactionGetfields object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionGetfieldsWithDefaults - -`func NewRunConnectorSubactionGetfieldsWithDefaults() *RunConnectorSubactionGetfields` - -NewRunConnectorSubactionGetfieldsWithDefaults instantiates a new RunConnectorSubactionGetfields object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSubAction - -`func (o *RunConnectorSubactionGetfields) GetSubAction() string` - -GetSubAction returns the SubAction field if non-nil, zero value otherwise. - -### GetSubActionOk - -`func (o *RunConnectorSubactionGetfields) GetSubActionOk() (*string, bool)` - -GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubAction - -`func (o *RunConnectorSubactionGetfields) SetSubAction(v string)` - -SetSubAction sets SubAction field to given value. - - +**SubAction** | **string** | The action to test. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionGetincident.md b/generated/kibanaactions/docs/RunConnectorSubactionGetincident.md index 1a0822d89..452c79056 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionGetincident.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionGetincident.md @@ -1,72 +1,10 @@ # RunConnectorSubactionGetincident ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | -**SubActionParams** | [**RunConnectorSubactionGetincidentSubActionParams**](RunConnectorSubactionGetincidentSubActionParams.md) | | - -## Methods - -### NewRunConnectorSubactionGetincident - -`func NewRunConnectorSubactionGetincident(subAction string, subActionParams RunConnectorSubactionGetincidentSubActionParams, ) *RunConnectorSubactionGetincident` - -NewRunConnectorSubactionGetincident instantiates a new RunConnectorSubactionGetincident object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionGetincidentWithDefaults - -`func NewRunConnectorSubactionGetincidentWithDefaults() *RunConnectorSubactionGetincident` - -NewRunConnectorSubactionGetincidentWithDefaults instantiates a new RunConnectorSubactionGetincident object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSubAction - -`func (o *RunConnectorSubactionGetincident) GetSubAction() string` - -GetSubAction returns the SubAction field if non-nil, zero value otherwise. - -### GetSubActionOk - -`func (o *RunConnectorSubactionGetincident) GetSubActionOk() (*string, bool)` - -GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubAction - -`func (o *RunConnectorSubactionGetincident) SetSubAction(v string)` - -SetSubAction sets SubAction field to given value. - - -### GetSubActionParams - -`func (o *RunConnectorSubactionGetincident) GetSubActionParams() RunConnectorSubactionGetincidentSubActionParams` - -GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. - -### GetSubActionParamsOk - -`func (o *RunConnectorSubactionGetincident) GetSubActionParamsOk() (*RunConnectorSubactionGetincidentSubActionParams, bool)` - -GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubActionParams - -`func (o *RunConnectorSubactionGetincident) SetSubActionParams(v RunConnectorSubactionGetincidentSubActionParams)` - -SetSubActionParams sets SubActionParams field to given value. - - +**SubAction** | **string** | The action to test. | [default to null] +**SubActionParams** | [***RunConnectorSubactionGetincidentSubActionParams**](run_connector_subaction_getincident_subActionParams.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionGetincidentSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionGetincidentSubActionParams.md index b7988fad3..c518179a7 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionGetincidentSubActionParams.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionGetincidentSubActionParams.md @@ -1,51 +1,9 @@ # RunConnectorSubactionGetincidentSubActionParams ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ExternalId** | **string** | The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. | - -## Methods - -### NewRunConnectorSubactionGetincidentSubActionParams - -`func NewRunConnectorSubactionGetincidentSubActionParams(externalId string, ) *RunConnectorSubactionGetincidentSubActionParams` - -NewRunConnectorSubactionGetincidentSubActionParams instantiates a new RunConnectorSubactionGetincidentSubActionParams object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionGetincidentSubActionParamsWithDefaults - -`func NewRunConnectorSubactionGetincidentSubActionParamsWithDefaults() *RunConnectorSubactionGetincidentSubActionParams` - -NewRunConnectorSubactionGetincidentSubActionParamsWithDefaults instantiates a new RunConnectorSubactionGetincidentSubActionParams object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetExternalId - -`func (o *RunConnectorSubactionGetincidentSubActionParams) GetExternalId() string` - -GetExternalId returns the ExternalId field if non-nil, zero value otherwise. - -### GetExternalIdOk - -`func (o *RunConnectorSubactionGetincidentSubActionParams) GetExternalIdOk() (*string, bool)` - -GetExternalIdOk returns a tuple with the ExternalId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExternalId - -`func (o *RunConnectorSubactionGetincidentSubActionParams) SetExternalId(v string)` - -SetExternalId sets ExternalId field to given value. - - +**ExternalId** | **string** | The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionIssue.md b/generated/kibanaactions/docs/RunConnectorSubactionIssue.md index 6111a7305..88d26800c 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionIssue.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionIssue.md @@ -1,77 +1,10 @@ # RunConnectorSubactionIssue ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | -**SubActionParams** | Pointer to [**RunConnectorSubactionIssueSubActionParams**](RunConnectorSubactionIssueSubActionParams.md) | | [optional] - -## Methods - -### NewRunConnectorSubactionIssue - -`func NewRunConnectorSubactionIssue(subAction string, ) *RunConnectorSubactionIssue` - -NewRunConnectorSubactionIssue instantiates a new RunConnectorSubactionIssue object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionIssueWithDefaults - -`func NewRunConnectorSubactionIssueWithDefaults() *RunConnectorSubactionIssue` - -NewRunConnectorSubactionIssueWithDefaults instantiates a new RunConnectorSubactionIssue object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSubAction - -`func (o *RunConnectorSubactionIssue) GetSubAction() string` - -GetSubAction returns the SubAction field if non-nil, zero value otherwise. - -### GetSubActionOk - -`func (o *RunConnectorSubactionIssue) GetSubActionOk() (*string, bool)` - -GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubAction - -`func (o *RunConnectorSubactionIssue) SetSubAction(v string)` - -SetSubAction sets SubAction field to given value. - - -### GetSubActionParams - -`func (o *RunConnectorSubactionIssue) GetSubActionParams() RunConnectorSubactionIssueSubActionParams` - -GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. - -### GetSubActionParamsOk - -`func (o *RunConnectorSubactionIssue) GetSubActionParamsOk() (*RunConnectorSubactionIssueSubActionParams, bool)` - -GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubActionParams - -`func (o *RunConnectorSubactionIssue) SetSubActionParams(v RunConnectorSubactionIssueSubActionParams)` - -SetSubActionParams sets SubActionParams field to given value. - -### HasSubActionParams - -`func (o *RunConnectorSubactionIssue) HasSubActionParams() bool` - -HasSubActionParams returns a boolean if a field has been set. - +**SubAction** | **string** | The action to test. | [default to null] +**SubActionParams** | [***RunConnectorSubactionIssueSubActionParams**](run_connector_subaction_issue_subActionParams.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionIssueSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionIssueSubActionParams.md index 43d16c388..29f99a340 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionIssueSubActionParams.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionIssueSubActionParams.md @@ -1,51 +1,9 @@ # RunConnectorSubactionIssueSubActionParams ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | The Jira issue identifier. | - -## Methods - -### NewRunConnectorSubactionIssueSubActionParams - -`func NewRunConnectorSubactionIssueSubActionParams(id string, ) *RunConnectorSubactionIssueSubActionParams` - -NewRunConnectorSubactionIssueSubActionParams instantiates a new RunConnectorSubactionIssueSubActionParams object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionIssueSubActionParamsWithDefaults - -`func NewRunConnectorSubactionIssueSubActionParamsWithDefaults() *RunConnectorSubactionIssueSubActionParams` - -NewRunConnectorSubactionIssueSubActionParamsWithDefaults instantiates a new RunConnectorSubactionIssueSubActionParams object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *RunConnectorSubactionIssueSubActionParams) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *RunConnectorSubactionIssueSubActionParams) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *RunConnectorSubactionIssueSubActionParams) SetId(v string)` - -SetId sets Id field to given value. - - +**Id** | **string** | The Jira issue identifier. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionIssues.md b/generated/kibanaactions/docs/RunConnectorSubactionIssues.md index 09eb8b903..dd6b9cfcb 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionIssues.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionIssues.md @@ -1,72 +1,10 @@ # RunConnectorSubactionIssues ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | -**SubActionParams** | [**RunConnectorSubactionIssuesSubActionParams**](RunConnectorSubactionIssuesSubActionParams.md) | | - -## Methods - -### NewRunConnectorSubactionIssues - -`func NewRunConnectorSubactionIssues(subAction string, subActionParams RunConnectorSubactionIssuesSubActionParams, ) *RunConnectorSubactionIssues` - -NewRunConnectorSubactionIssues instantiates a new RunConnectorSubactionIssues object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionIssuesWithDefaults - -`func NewRunConnectorSubactionIssuesWithDefaults() *RunConnectorSubactionIssues` - -NewRunConnectorSubactionIssuesWithDefaults instantiates a new RunConnectorSubactionIssues object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSubAction - -`func (o *RunConnectorSubactionIssues) GetSubAction() string` - -GetSubAction returns the SubAction field if non-nil, zero value otherwise. - -### GetSubActionOk - -`func (o *RunConnectorSubactionIssues) GetSubActionOk() (*string, bool)` - -GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubAction - -`func (o *RunConnectorSubactionIssues) SetSubAction(v string)` - -SetSubAction sets SubAction field to given value. - - -### GetSubActionParams - -`func (o *RunConnectorSubactionIssues) GetSubActionParams() RunConnectorSubactionIssuesSubActionParams` - -GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. - -### GetSubActionParamsOk - -`func (o *RunConnectorSubactionIssues) GetSubActionParamsOk() (*RunConnectorSubactionIssuesSubActionParams, bool)` - -GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubActionParams - -`func (o *RunConnectorSubactionIssues) SetSubActionParams(v RunConnectorSubactionIssuesSubActionParams)` - -SetSubActionParams sets SubActionParams field to given value. - - +**SubAction** | **string** | The action to test. | [default to null] +**SubActionParams** | [***RunConnectorSubactionIssuesSubActionParams**](run_connector_subaction_issues_subActionParams.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionIssuesSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionIssuesSubActionParams.md index 26e087deb..b844e8e85 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionIssuesSubActionParams.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionIssuesSubActionParams.md @@ -1,51 +1,9 @@ # RunConnectorSubactionIssuesSubActionParams ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Title** | **string** | The title of the Jira issue. | - -## Methods - -### NewRunConnectorSubactionIssuesSubActionParams - -`func NewRunConnectorSubactionIssuesSubActionParams(title string, ) *RunConnectorSubactionIssuesSubActionParams` - -NewRunConnectorSubactionIssuesSubActionParams instantiates a new RunConnectorSubactionIssuesSubActionParams object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionIssuesSubActionParamsWithDefaults - -`func NewRunConnectorSubactionIssuesSubActionParamsWithDefaults() *RunConnectorSubactionIssuesSubActionParams` - -NewRunConnectorSubactionIssuesSubActionParamsWithDefaults instantiates a new RunConnectorSubactionIssuesSubActionParams object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetTitle - -`func (o *RunConnectorSubactionIssuesSubActionParams) GetTitle() string` - -GetTitle returns the Title field if non-nil, zero value otherwise. - -### GetTitleOk - -`func (o *RunConnectorSubactionIssuesSubActionParams) GetTitleOk() (*string, bool)` - -GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTitle - -`func (o *RunConnectorSubactionIssuesSubActionParams) SetTitle(v string)` - -SetTitle sets Title field to given value. - - +**Title** | **string** | The title of the Jira issue. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionIssuetypes.md b/generated/kibanaactions/docs/RunConnectorSubactionIssuetypes.md index 6c8d0ef9a..e77cf6122 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionIssuetypes.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionIssuetypes.md @@ -1,51 +1,9 @@ # RunConnectorSubactionIssuetypes ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | - -## Methods - -### NewRunConnectorSubactionIssuetypes - -`func NewRunConnectorSubactionIssuetypes(subAction string, ) *RunConnectorSubactionIssuetypes` - -NewRunConnectorSubactionIssuetypes instantiates a new RunConnectorSubactionIssuetypes object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionIssuetypesWithDefaults - -`func NewRunConnectorSubactionIssuetypesWithDefaults() *RunConnectorSubactionIssuetypes` - -NewRunConnectorSubactionIssuetypesWithDefaults instantiates a new RunConnectorSubactionIssuetypes object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSubAction - -`func (o *RunConnectorSubactionIssuetypes) GetSubAction() string` - -GetSubAction returns the SubAction field if non-nil, zero value otherwise. - -### GetSubActionOk - -`func (o *RunConnectorSubactionIssuetypes) GetSubActionOk() (*string, bool)` - -GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubAction - -`func (o *RunConnectorSubactionIssuetypes) SetSubAction(v string)` - -SetSubAction sets SubAction field to given value. - - +**SubAction** | **string** | The action to test. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoservice.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoservice.md index fcf2c9055..ad2148491 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionPushtoservice.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionPushtoservice.md @@ -1,72 +1,10 @@ # RunConnectorSubactionPushtoservice ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | -**SubActionParams** | [**RunConnectorSubactionPushtoserviceSubActionParams**](RunConnectorSubactionPushtoserviceSubActionParams.md) | | - -## Methods - -### NewRunConnectorSubactionPushtoservice - -`func NewRunConnectorSubactionPushtoservice(subAction string, subActionParams RunConnectorSubactionPushtoserviceSubActionParams, ) *RunConnectorSubactionPushtoservice` - -NewRunConnectorSubactionPushtoservice instantiates a new RunConnectorSubactionPushtoservice object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionPushtoserviceWithDefaults - -`func NewRunConnectorSubactionPushtoserviceWithDefaults() *RunConnectorSubactionPushtoservice` - -NewRunConnectorSubactionPushtoserviceWithDefaults instantiates a new RunConnectorSubactionPushtoservice object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSubAction - -`func (o *RunConnectorSubactionPushtoservice) GetSubAction() string` - -GetSubAction returns the SubAction field if non-nil, zero value otherwise. - -### GetSubActionOk - -`func (o *RunConnectorSubactionPushtoservice) GetSubActionOk() (*string, bool)` - -GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubAction - -`func (o *RunConnectorSubactionPushtoservice) SetSubAction(v string)` - -SetSubAction sets SubAction field to given value. - - -### GetSubActionParams - -`func (o *RunConnectorSubactionPushtoservice) GetSubActionParams() RunConnectorSubactionPushtoserviceSubActionParams` - -GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. - -### GetSubActionParamsOk - -`func (o *RunConnectorSubactionPushtoservice) GetSubActionParamsOk() (*RunConnectorSubactionPushtoserviceSubActionParams, bool)` - -GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubActionParams - -`func (o *RunConnectorSubactionPushtoservice) SetSubActionParams(v RunConnectorSubactionPushtoserviceSubActionParams)` - -SetSubActionParams sets SubActionParams field to given value. - - +**SubAction** | **string** | The action to test. | [default to null] +**SubActionParams** | [***RunConnectorSubactionPushtoserviceSubActionParams**](run_connector_subaction_pushtoservice_subActionParams.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParams.md index a1d5b0e62..f2480fdfd 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParams.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParams.md @@ -1,82 +1,10 @@ # RunConnectorSubactionPushtoserviceSubActionParams ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Comments** | Pointer to [**[]RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner**](RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner.md) | Additional information that is sent to Jira, ServiceNow ITSM, ServiceNow SecOps, or Swimlane. | [optional] -**Incident** | Pointer to [**RunConnectorSubactionPushtoserviceSubActionParamsIncident**](RunConnectorSubactionPushtoserviceSubActionParamsIncident.md) | | [optional] - -## Methods - -### NewRunConnectorSubactionPushtoserviceSubActionParams - -`func NewRunConnectorSubactionPushtoserviceSubActionParams() *RunConnectorSubactionPushtoserviceSubActionParams` - -NewRunConnectorSubactionPushtoserviceSubActionParams instantiates a new RunConnectorSubactionPushtoserviceSubActionParams object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionPushtoserviceSubActionParamsWithDefaults - -`func NewRunConnectorSubactionPushtoserviceSubActionParamsWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParams` - -NewRunConnectorSubactionPushtoserviceSubActionParamsWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParams object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetComments - -`func (o *RunConnectorSubactionPushtoserviceSubActionParams) GetComments() []RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner` - -GetComments returns the Comments field if non-nil, zero value otherwise. - -### GetCommentsOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParams) GetCommentsOk() (*[]RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner, bool)` - -GetCommentsOk returns a tuple with the Comments field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetComments - -`func (o *RunConnectorSubactionPushtoserviceSubActionParams) SetComments(v []RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner)` - -SetComments sets Comments field to given value. - -### HasComments - -`func (o *RunConnectorSubactionPushtoserviceSubActionParams) HasComments() bool` - -HasComments returns a boolean if a field has been set. - -### GetIncident - -`func (o *RunConnectorSubactionPushtoserviceSubActionParams) GetIncident() RunConnectorSubactionPushtoserviceSubActionParamsIncident` - -GetIncident returns the Incident field if non-nil, zero value otherwise. - -### GetIncidentOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParams) GetIncidentOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncident, bool)` - -GetIncidentOk returns a tuple with the Incident field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncident - -`func (o *RunConnectorSubactionPushtoserviceSubActionParams) SetIncident(v RunConnectorSubactionPushtoserviceSubActionParamsIncident)` - -SetIncident sets Incident field to given value. - -### HasIncident - -`func (o *RunConnectorSubactionPushtoserviceSubActionParams) HasIncident() bool` - -HasIncident returns a boolean if a field has been set. - +**Comments** | [**[]RunConnectorSubactionPushtoserviceSubActionParamsComments**](run_connector_subaction_pushtoservice_subActionParams_comments.md) | Additional information that is sent to Jira, ServiceNow ITSM, ServiceNow SecOps, or Swimlane. | [optional] [default to null] +**Incident** | [***RunConnectorSubactionPushtoserviceSubActionParamsIncident**](run_connector_subaction_pushtoservice_subActionParams_incident.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsComments.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsComments.md new file mode 100644 index 000000000..b6878267a --- /dev/null +++ b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsComments.md @@ -0,0 +1,10 @@ +# RunConnectorSubactionPushtoserviceSubActionParamsComments + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Comment** | **string** | A comment related to the incident. For example, describe how to troubleshoot the issue. | [optional] [default to null] +**CommentId** | **int32** | A unique identifier for the comment. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner.md deleted file mode 100644 index 8721338d1..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner.md +++ /dev/null @@ -1,82 +0,0 @@ -# RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Comment** | Pointer to **string** | A comment related to the incident. For example, describe how to troubleshoot the issue. | [optional] -**CommentId** | Pointer to **int32** | A unique identifier for the comment. | [optional] - -## Methods - -### NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner - -`func NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner() *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner` - -NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInnerWithDefaults - -`func NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInnerWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner` - -NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInnerWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetComment - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) GetComment() string` - -GetComment returns the Comment field if non-nil, zero value otherwise. - -### GetCommentOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) GetCommentOk() (*string, bool)` - -GetCommentOk returns a tuple with the Comment field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetComment - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) SetComment(v string)` - -SetComment sets Comment field to given value. - -### HasComment - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) HasComment() bool` - -HasComment returns a boolean if a field has been set. - -### GetCommentId - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) GetCommentId() int32` - -GetCommentId returns the CommentId field if non-nil, zero value otherwise. - -### GetCommentIdOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) GetCommentIdOk() (*int32, bool)` - -GetCommentIdOk returns a tuple with the CommentId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCommentId - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) SetCommentId(v int32)` - -SetCommentId sets CommentId field to given value. - -### HasCommentId - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) HasCommentId() bool` - -HasCommentId returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncident.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncident.md index 7d6b6927a..358d2571f 100644 --- a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncident.md +++ b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncident.md @@ -1,654 +1,32 @@ # RunConnectorSubactionPushtoserviceSubActionParamsIncident ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AlertId** | Pointer to **string** | The alert identifier for Swimlane connectors. | [optional] -**CaseId** | Pointer to **string** | The case identifier for the incident for Swimlane connectors. | [optional] -**CaseName** | Pointer to **string** | The case name for the incident for Swimlane connectors. | [optional] -**Category** | Pointer to **string** | The category of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. | [optional] -**CorrelationDisplay** | Pointer to **string** | A descriptive label of the alert for correlation purposes for ServiceNow ITSM and ServiceNow SecOps connectors. | [optional] -**CorrelationId** | Pointer to **string** | The correlation identifier for the security incident for ServiceNow ITSM and ServiveNow SecOps connectors. Connectors using the same correlation ID are associated with the same ServiceNow incident. This value determines whether a new ServiceNow incident is created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the correlation ID value in ServiceNow. The maximum character length for this value is 100 characters. NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that ServiceNow creates a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, ServiceNow creates and continually updates a single incident record for the alert. | [optional] -**Description** | Pointer to **string** | The description of the incident for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors. | [optional] -**DestIp** | Pointer to [**RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp**](RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md) | | [optional] -**ExternalId** | Pointer to **string** | The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. If present, the incident is updated. Otherwise, a new incident is created. | [optional] -**Impact** | Pointer to **string** | The impact of the incident for ServiceNow ITSM connectors. | [optional] -**IssueType** | Pointer to **int32** | The type of incident for Jira connectors. For example, 10006. To obtain the list of valid values, set `subAction` to `issueTypes`. | [optional] -**Labels** | Pointer to **[]string** | The labels for the incident for Jira connectors. NOTE: Labels cannot contain spaces. | [optional] -**MalwareHash** | Pointer to [**RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash**](RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md) | | [optional] -**MalwareUrl** | Pointer to [**RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl**](RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md) | | [optional] -**Parent** | Pointer to **string** | The ID or key of the parent issue for Jira connectors. Applies only to `Sub-task` types of issues. | [optional] -**Priority** | Pointer to **string** | The priority of the incident in Jira and ServiceNow SecOps connectors. | [optional] -**RuleName** | Pointer to **string** | The rule name for Swimlane connectors. | [optional] -**Severity** | Pointer to **string** | The severity of the incident for ServiceNow ITSM and Swimlane connectors. | [optional] -**ShortDescription** | Pointer to **string** | A short description of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. It is used for searching the contents of the knowledge base. | [optional] -**SourceIp** | Pointer to [**RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp**](RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md) | | [optional] -**Subcategory** | Pointer to **string** | The subcategory of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. | [optional] -**Summary** | Pointer to **string** | A summary of the incident for Jira connectors. | [optional] -**Title** | Pointer to **string** | A title for the incident for Jira connectors. It is used for searching the contents of the knowledge base. | [optional] -**Urgency** | Pointer to **string** | The urgency of the incident for ServiceNow ITSM connectors. | [optional] - -## Methods - -### NewRunConnectorSubactionPushtoserviceSubActionParamsIncident - -`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncident() *RunConnectorSubactionPushtoserviceSubActionParamsIncident` - -NewRunConnectorSubactionPushtoserviceSubActionParamsIncident instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncident object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentWithDefaults - -`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParamsIncident` - -NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncident object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAlertId - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetAlertId() string` - -GetAlertId returns the AlertId field if non-nil, zero value otherwise. - -### GetAlertIdOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetAlertIdOk() (*string, bool)` - -GetAlertIdOk returns a tuple with the AlertId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAlertId - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetAlertId(v string)` - -SetAlertId sets AlertId field to given value. - -### HasAlertId - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasAlertId() bool` - -HasAlertId returns a boolean if a field has been set. - -### GetCaseId - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCaseId() string` - -GetCaseId returns the CaseId field if non-nil, zero value otherwise. - -### GetCaseIdOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCaseIdOk() (*string, bool)` - -GetCaseIdOk returns a tuple with the CaseId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCaseId - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCaseId(v string)` - -SetCaseId sets CaseId field to given value. - -### HasCaseId - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCaseId() bool` - -HasCaseId returns a boolean if a field has been set. - -### GetCaseName - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCaseName() string` - -GetCaseName returns the CaseName field if non-nil, zero value otherwise. - -### GetCaseNameOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCaseNameOk() (*string, bool)` - -GetCaseNameOk returns a tuple with the CaseName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCaseName - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCaseName(v string)` - -SetCaseName sets CaseName field to given value. - -### HasCaseName - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCaseName() bool` - -HasCaseName returns a boolean if a field has been set. - -### GetCategory - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCategory() string` - -GetCategory returns the Category field if non-nil, zero value otherwise. - -### GetCategoryOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCategoryOk() (*string, bool)` - -GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCategory - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCategory(v string)` - -SetCategory sets Category field to given value. - -### HasCategory - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCategory() bool` - -HasCategory returns a boolean if a field has been set. - -### GetCorrelationDisplay - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCorrelationDisplay() string` - -GetCorrelationDisplay returns the CorrelationDisplay field if non-nil, zero value otherwise. - -### GetCorrelationDisplayOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCorrelationDisplayOk() (*string, bool)` - -GetCorrelationDisplayOk returns a tuple with the CorrelationDisplay field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCorrelationDisplay - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCorrelationDisplay(v string)` - -SetCorrelationDisplay sets CorrelationDisplay field to given value. - -### HasCorrelationDisplay - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCorrelationDisplay() bool` - -HasCorrelationDisplay returns a boolean if a field has been set. - -### GetCorrelationId - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCorrelationId() string` - -GetCorrelationId returns the CorrelationId field if non-nil, zero value otherwise. - -### GetCorrelationIdOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCorrelationIdOk() (*string, bool)` - -GetCorrelationIdOk returns a tuple with the CorrelationId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCorrelationId - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCorrelationId(v string)` - -SetCorrelationId sets CorrelationId field to given value. - -### HasCorrelationId - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCorrelationId() bool` - -HasCorrelationId returns a boolean if a field has been set. - -### GetDescription - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. - -### GetDestIp - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetDestIp() RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp` - -GetDestIp returns the DestIp field if non-nil, zero value otherwise. - -### GetDestIpOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetDestIpOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp, bool)` - -GetDestIpOk returns a tuple with the DestIp field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDestIp - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetDestIp(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp)` - -SetDestIp sets DestIp field to given value. - -### HasDestIp - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasDestIp() bool` - -HasDestIp returns a boolean if a field has been set. - -### GetExternalId - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetExternalId() string` - -GetExternalId returns the ExternalId field if non-nil, zero value otherwise. - -### GetExternalIdOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetExternalIdOk() (*string, bool)` - -GetExternalIdOk returns a tuple with the ExternalId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExternalId - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetExternalId(v string)` - -SetExternalId sets ExternalId field to given value. - -### HasExternalId - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasExternalId() bool` - -HasExternalId returns a boolean if a field has been set. - -### GetImpact - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetImpact() string` - -GetImpact returns the Impact field if non-nil, zero value otherwise. - -### GetImpactOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetImpactOk() (*string, bool)` - -GetImpactOk returns a tuple with the Impact field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetImpact - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetImpact(v string)` - -SetImpact sets Impact field to given value. - -### HasImpact - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasImpact() bool` - -HasImpact returns a boolean if a field has been set. - -### GetIssueType - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetIssueType() int32` - -GetIssueType returns the IssueType field if non-nil, zero value otherwise. - -### GetIssueTypeOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetIssueTypeOk() (*int32, bool)` - -GetIssueTypeOk returns a tuple with the IssueType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIssueType - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetIssueType(v int32)` - -SetIssueType sets IssueType field to given value. - -### HasIssueType - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasIssueType() bool` - -HasIssueType returns a boolean if a field has been set. - -### GetLabels - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetLabels() []string` - -GetLabels returns the Labels field if non-nil, zero value otherwise. - -### GetLabelsOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetLabelsOk() (*[]string, bool)` - -GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLabels - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetLabels(v []string)` - -SetLabels sets Labels field to given value. - -### HasLabels - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasLabels() bool` - -HasLabels returns a boolean if a field has been set. - -### GetMalwareHash - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetMalwareHash() RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash` - -GetMalwareHash returns the MalwareHash field if non-nil, zero value otherwise. - -### GetMalwareHashOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetMalwareHashOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash, bool)` - -GetMalwareHashOk returns a tuple with the MalwareHash field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMalwareHash - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetMalwareHash(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash)` - -SetMalwareHash sets MalwareHash field to given value. - -### HasMalwareHash - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasMalwareHash() bool` - -HasMalwareHash returns a boolean if a field has been set. - -### GetMalwareUrl - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetMalwareUrl() RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl` - -GetMalwareUrl returns the MalwareUrl field if non-nil, zero value otherwise. - -### GetMalwareUrlOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetMalwareUrlOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl, bool)` - -GetMalwareUrlOk returns a tuple with the MalwareUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMalwareUrl - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetMalwareUrl(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl)` - -SetMalwareUrl sets MalwareUrl field to given value. - -### HasMalwareUrl - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasMalwareUrl() bool` - -HasMalwareUrl returns a boolean if a field has been set. - -### GetParent - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetParent() string` - -GetParent returns the Parent field if non-nil, zero value otherwise. - -### GetParentOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetParentOk() (*string, bool)` - -GetParentOk returns a tuple with the Parent field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetParent - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetParent(v string)` - -SetParent sets Parent field to given value. - -### HasParent - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasParent() bool` - -HasParent returns a boolean if a field has been set. - -### GetPriority - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetPriority() string` - -GetPriority returns the Priority field if non-nil, zero value otherwise. - -### GetPriorityOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetPriorityOk() (*string, bool)` - -GetPriorityOk returns a tuple with the Priority field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPriority - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetPriority(v string)` - -SetPriority sets Priority field to given value. - -### HasPriority - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasPriority() bool` - -HasPriority returns a boolean if a field has been set. - -### GetRuleName - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetRuleName() string` - -GetRuleName returns the RuleName field if non-nil, zero value otherwise. - -### GetRuleNameOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetRuleNameOk() (*string, bool)` - -GetRuleNameOk returns a tuple with the RuleName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRuleName - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetRuleName(v string)` - -SetRuleName sets RuleName field to given value. - -### HasRuleName - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasRuleName() bool` - -HasRuleName returns a boolean if a field has been set. - -### GetSeverity - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSeverity() string` - -GetSeverity returns the Severity field if non-nil, zero value otherwise. - -### GetSeverityOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSeverityOk() (*string, bool)` - -GetSeverityOk returns a tuple with the Severity field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSeverity - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetSeverity(v string)` - -SetSeverity sets Severity field to given value. - -### HasSeverity - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasSeverity() bool` - -HasSeverity returns a boolean if a field has been set. - -### GetShortDescription - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetShortDescription() string` - -GetShortDescription returns the ShortDescription field if non-nil, zero value otherwise. - -### GetShortDescriptionOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetShortDescriptionOk() (*string, bool)` - -GetShortDescriptionOk returns a tuple with the ShortDescription field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetShortDescription - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetShortDescription(v string)` - -SetShortDescription sets ShortDescription field to given value. - -### HasShortDescription - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasShortDescription() bool` - -HasShortDescription returns a boolean if a field has been set. - -### GetSourceIp - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSourceIp() RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp` - -GetSourceIp returns the SourceIp field if non-nil, zero value otherwise. - -### GetSourceIpOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSourceIpOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp, bool)` - -GetSourceIpOk returns a tuple with the SourceIp field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSourceIp - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetSourceIp(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp)` - -SetSourceIp sets SourceIp field to given value. - -### HasSourceIp - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasSourceIp() bool` - -HasSourceIp returns a boolean if a field has been set. - -### GetSubcategory - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSubcategory() string` - -GetSubcategory returns the Subcategory field if non-nil, zero value otherwise. - -### GetSubcategoryOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSubcategoryOk() (*string, bool)` - -GetSubcategoryOk returns a tuple with the Subcategory field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubcategory - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetSubcategory(v string)` - -SetSubcategory sets Subcategory field to given value. - -### HasSubcategory - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasSubcategory() bool` - -HasSubcategory returns a boolean if a field has been set. - -### GetSummary - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSummary() string` - -GetSummary returns the Summary field if non-nil, zero value otherwise. - -### GetSummaryOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSummaryOk() (*string, bool)` - -GetSummaryOk returns a tuple with the Summary field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSummary - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetSummary(v string)` - -SetSummary sets Summary field to given value. - -### HasSummary - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasSummary() bool` - -HasSummary returns a boolean if a field has been set. - -### GetTitle - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetTitle() string` - -GetTitle returns the Title field if non-nil, zero value otherwise. - -### GetTitleOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetTitleOk() (*string, bool)` - -GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTitle - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetTitle(v string)` - -SetTitle sets Title field to given value. - -### HasTitle - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasTitle() bool` - -HasTitle returns a boolean if a field has been set. - -### GetUrgency - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetUrgency() string` - -GetUrgency returns the Urgency field if non-nil, zero value otherwise. - -### GetUrgencyOk - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetUrgencyOk() (*string, bool)` - -GetUrgencyOk returns a tuple with the Urgency field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUrgency - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetUrgency(v string)` - -SetUrgency sets Urgency field to given value. - -### HasUrgency - -`func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasUrgency() bool` - -HasUrgency returns a boolean if a field has been set. - +**AlertId** | **string** | The alert identifier for Swimlane connectors. | [optional] [default to null] +**CaseId** | **string** | The case identifier for the incident for Swimlane connectors. | [optional] [default to null] +**CaseName** | **string** | The case name for the incident for Swimlane connectors. | [optional] [default to null] +**Category** | **string** | The category of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. | [optional] [default to null] +**CorrelationDisplay** | **string** | A descriptive label of the alert for correlation purposes for ServiceNow ITSM and ServiceNow SecOps connectors. | [optional] [default to null] +**CorrelationId** | **string** | The correlation identifier for the security incident for ServiceNow ITSM and ServiveNow SecOps connectors. Connectors using the same correlation ID are associated with the same ServiceNow incident. This value determines whether a new ServiceNow incident is created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the correlation ID value in ServiceNow. The maximum character length for this value is 100 characters. NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that ServiceNow creates a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, ServiceNow creates and continually updates a single incident record for the alert. | [optional] [default to null] +**Description** | **string** | The description of the incident for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors. | [optional] [default to null] +**DestIp** | [***OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp**](OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md) | A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. | [optional] [default to null] +**ExternalId** | **string** | The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. If present, the incident is updated. Otherwise, a new incident is created. | [optional] [default to null] +**Impact** | **string** | The impact of the incident for ServiceNow ITSM connectors. | [optional] [default to null] +**IssueType** | **int32** | The type of incident for Jira connectors. For example, 10006. To obtain the list of valid values, set `subAction` to `issueTypes`. | [optional] [default to null] +**Labels** | **[]string** | The labels for the incident for Jira connectors. NOTE: Labels cannot contain spaces. | [optional] [default to null] +**MalwareHash** | [***OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash**](OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md) | A list of malware hashes related to the security incident for ServiceNow SecOps connectors. The hashes are added as observables to the security incident. | [optional] [default to null] +**MalwareUrl** | **OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl** | A list of malware URLs related to the security incident for ServiceNow SecOps connectors. The URLs are added as observables to the security incident. | [optional] [default to null] +**Parent** | **string** | The ID or key of the parent issue for Jira connectors. Applies only to `Sub-task` types of issues. | [optional] [default to null] +**Priority** | **string** | The priority of the incident in Jira and ServiceNow SecOps connectors. | [optional] [default to null] +**RuleName** | **string** | The rule name for Swimlane connectors. | [optional] [default to null] +**Severity** | **string** | The severity of the incident for ServiceNow ITSM and Swimlane connectors. | [optional] [default to null] +**ShortDescription** | **string** | A short description of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. It is used for searching the contents of the knowledge base. | [optional] [default to null] +**SourceIp** | [***OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp**](OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md) | A list of source IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. | [optional] [default to null] +**Subcategory** | **string** | The subcategory of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. | [optional] [default to null] +**Summary** | **string** | A summary of the incident for Jira connectors. | [optional] [default to null] +**Title** | **string** | A title for the incident for Jira connectors. It is used for searching the contents of the knowledge base. | [optional] [default to null] +**Urgency** | **string** | The urgency of the incident for ServiceNow ITSM connectors. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md deleted file mode 100644 index 50f6e1317..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md +++ /dev/null @@ -1,30 +0,0 @@ -# RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Methods - -### NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp - -`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp` - -NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIpWithDefaults - -`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIpWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp` - -NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIpWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md deleted file mode 100644 index af1d7ccce..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md +++ /dev/null @@ -1,30 +0,0 @@ -# RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Methods - -### NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash - -`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash` - -NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHashWithDefaults - -`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHashWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash` - -NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHashWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md deleted file mode 100644 index a44bf61a4..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md +++ /dev/null @@ -1,30 +0,0 @@ -# RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Methods - -### NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl - -`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl` - -NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrlWithDefaults - -`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrlWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl` - -NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrlWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md deleted file mode 100644 index 535ad6189..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md +++ /dev/null @@ -1,30 +0,0 @@ -# RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Methods - -### NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp - -`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp` - -NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIpWithDefaults - -`func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIpWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp` - -NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIpWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/kibanaactions/docs/SecretsPropertiesCasesWebhook.md b/generated/kibanaactions/docs/SecretsPropertiesCasesWebhook.md index 8ff0bdac4..959eac415 100644 --- a/generated/kibanaactions/docs/SecretsPropertiesCasesWebhook.md +++ b/generated/kibanaactions/docs/SecretsPropertiesCasesWebhook.md @@ -1,82 +1,10 @@ # SecretsPropertiesCasesWebhook ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Password** | Pointer to **string** | The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. | [optional] -**User** | Pointer to **string** | The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. | [optional] - -## Methods - -### NewSecretsPropertiesCasesWebhook - -`func NewSecretsPropertiesCasesWebhook() *SecretsPropertiesCasesWebhook` - -NewSecretsPropertiesCasesWebhook instantiates a new SecretsPropertiesCasesWebhook object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewSecretsPropertiesCasesWebhookWithDefaults - -`func NewSecretsPropertiesCasesWebhookWithDefaults() *SecretsPropertiesCasesWebhook` - -NewSecretsPropertiesCasesWebhookWithDefaults instantiates a new SecretsPropertiesCasesWebhook object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetPassword - -`func (o *SecretsPropertiesCasesWebhook) GetPassword() string` - -GetPassword returns the Password field if non-nil, zero value otherwise. - -### GetPasswordOk - -`func (o *SecretsPropertiesCasesWebhook) GetPasswordOk() (*string, bool)` - -GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPassword - -`func (o *SecretsPropertiesCasesWebhook) SetPassword(v string)` - -SetPassword sets Password field to given value. - -### HasPassword - -`func (o *SecretsPropertiesCasesWebhook) HasPassword() bool` - -HasPassword returns a boolean if a field has been set. - -### GetUser - -`func (o *SecretsPropertiesCasesWebhook) GetUser() string` - -GetUser returns the User field if non-nil, zero value otherwise. - -### GetUserOk - -`func (o *SecretsPropertiesCasesWebhook) GetUserOk() (*string, bool)` - -GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUser - -`func (o *SecretsPropertiesCasesWebhook) SetUser(v string)` - -SetUser sets User field to given value. - -### HasUser - -`func (o *SecretsPropertiesCasesWebhook) HasUser() bool` - -HasUser returns a boolean if a field has been set. - +**Password** | **string** | The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. | [optional] [default to null] +**User** | **string** | The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/SecretsPropertiesJira.md b/generated/kibanaactions/docs/SecretsPropertiesJira.md index ae3ab197d..8fba8bbd0 100644 --- a/generated/kibanaactions/docs/SecretsPropertiesJira.md +++ b/generated/kibanaactions/docs/SecretsPropertiesJira.md @@ -1,72 +1,10 @@ # SecretsPropertiesJira ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ApiToken** | **string** | The Jira API authentication token for HTTP basic authentication. | -**Email** | **string** | The account email for HTTP Basic authentication. | - -## Methods - -### NewSecretsPropertiesJira - -`func NewSecretsPropertiesJira(apiToken string, email string, ) *SecretsPropertiesJira` - -NewSecretsPropertiesJira instantiates a new SecretsPropertiesJira object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewSecretsPropertiesJiraWithDefaults - -`func NewSecretsPropertiesJiraWithDefaults() *SecretsPropertiesJira` - -NewSecretsPropertiesJiraWithDefaults instantiates a new SecretsPropertiesJira object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetApiToken - -`func (o *SecretsPropertiesJira) GetApiToken() string` - -GetApiToken returns the ApiToken field if non-nil, zero value otherwise. - -### GetApiTokenOk - -`func (o *SecretsPropertiesJira) GetApiTokenOk() (*string, bool)` - -GetApiTokenOk returns a tuple with the ApiToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApiToken - -`func (o *SecretsPropertiesJira) SetApiToken(v string)` - -SetApiToken sets ApiToken field to given value. - - -### GetEmail - -`func (o *SecretsPropertiesJira) GetEmail() string` - -GetEmail returns the Email field if non-nil, zero value otherwise. - -### GetEmailOk - -`func (o *SecretsPropertiesJira) GetEmailOk() (*string, bool)` - -GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEmail - -`func (o *SecretsPropertiesJira) SetEmail(v string)` - -SetEmail sets Email field to given value. - - +**ApiToken** | **string** | The Jira API authentication token for HTTP basic authentication. | [default to null] +**Email** | **string** | The account email for HTTP Basic authentication. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/SecretsPropertiesOpsgenie.md b/generated/kibanaactions/docs/SecretsPropertiesOpsgenie.md index a4116129f..f34e1c25e 100644 --- a/generated/kibanaactions/docs/SecretsPropertiesOpsgenie.md +++ b/generated/kibanaactions/docs/SecretsPropertiesOpsgenie.md @@ -1,51 +1,9 @@ # SecretsPropertiesOpsgenie ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ApiKey** | **string** | The Opsgenie API authentication key for HTTP Basic authentication. | - -## Methods - -### NewSecretsPropertiesOpsgenie - -`func NewSecretsPropertiesOpsgenie(apiKey string, ) *SecretsPropertiesOpsgenie` - -NewSecretsPropertiesOpsgenie instantiates a new SecretsPropertiesOpsgenie object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewSecretsPropertiesOpsgenieWithDefaults - -`func NewSecretsPropertiesOpsgenieWithDefaults() *SecretsPropertiesOpsgenie` - -NewSecretsPropertiesOpsgenieWithDefaults instantiates a new SecretsPropertiesOpsgenie object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetApiKey - -`func (o *SecretsPropertiesOpsgenie) GetApiKey() string` - -GetApiKey returns the ApiKey field if non-nil, zero value otherwise. - -### GetApiKeyOk - -`func (o *SecretsPropertiesOpsgenie) GetApiKeyOk() (*string, bool)` - -GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApiKey - -`func (o *SecretsPropertiesOpsgenie) SetApiKey(v string)` - -SetApiKey sets ApiKey field to given value. - - +**ApiKey** | **string** | The Opsgenie API authentication key for HTTP Basic authentication. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/SecretsPropertiesResilient.md b/generated/kibanaactions/docs/SecretsPropertiesResilient.md index d8bf1ba85..c25f2420d 100644 --- a/generated/kibanaactions/docs/SecretsPropertiesResilient.md +++ b/generated/kibanaactions/docs/SecretsPropertiesResilient.md @@ -1,72 +1,10 @@ # SecretsPropertiesResilient ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ApiKeyId** | **string** | The authentication key ID for HTTP Basic authentication. | -**ApiKeySecret** | **string** | The authentication key secret for HTTP Basic authentication. | - -## Methods - -### NewSecretsPropertiesResilient - -`func NewSecretsPropertiesResilient(apiKeyId string, apiKeySecret string, ) *SecretsPropertiesResilient` - -NewSecretsPropertiesResilient instantiates a new SecretsPropertiesResilient object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewSecretsPropertiesResilientWithDefaults - -`func NewSecretsPropertiesResilientWithDefaults() *SecretsPropertiesResilient` - -NewSecretsPropertiesResilientWithDefaults instantiates a new SecretsPropertiesResilient object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetApiKeyId - -`func (o *SecretsPropertiesResilient) GetApiKeyId() string` - -GetApiKeyId returns the ApiKeyId field if non-nil, zero value otherwise. - -### GetApiKeyIdOk - -`func (o *SecretsPropertiesResilient) GetApiKeyIdOk() (*string, bool)` - -GetApiKeyIdOk returns a tuple with the ApiKeyId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApiKeyId - -`func (o *SecretsPropertiesResilient) SetApiKeyId(v string)` - -SetApiKeyId sets ApiKeyId field to given value. - - -### GetApiKeySecret - -`func (o *SecretsPropertiesResilient) GetApiKeySecret() string` - -GetApiKeySecret returns the ApiKeySecret field if non-nil, zero value otherwise. - -### GetApiKeySecretOk - -`func (o *SecretsPropertiesResilient) GetApiKeySecretOk() (*string, bool)` - -GetApiKeySecretOk returns a tuple with the ApiKeySecret field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApiKeySecret - -`func (o *SecretsPropertiesResilient) SetApiKeySecret(v string)` - -SetApiKeySecret sets ApiKeySecret field to given value. - - +**ApiKeyId** | **string** | The authentication key ID for HTTP Basic authentication. | [default to null] +**ApiKeySecret** | **string** | The authentication key secret for HTTP Basic authentication. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/SecretsPropertiesServicenow.md b/generated/kibanaactions/docs/SecretsPropertiesServicenow.md index 62278c963..a5f269a91 100644 --- a/generated/kibanaactions/docs/SecretsPropertiesServicenow.md +++ b/generated/kibanaactions/docs/SecretsPropertiesServicenow.md @@ -1,160 +1,13 @@ # SecretsPropertiesServicenow ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ClientSecret** | Pointer to **string** | The client secret assigned to your OAuth application. This property is required when `isOAuth` is `true`. | [optional] -**Password** | Pointer to **string** | The password for HTTP basic authentication. This property is required when `isOAuth` is `false`. | [optional] -**PrivateKey** | Pointer to **string** | The RSA private key that you created for use in ServiceNow. This property is required when `isOAuth` is `true`. | [optional] -**PrivateKeyPassword** | Pointer to **string** | The password for the RSA private key. This property is required when `isOAuth` is `true` and you set a password on your private key. | [optional] -**Username** | Pointer to **string** | The username for HTTP basic authentication. This property is required when `isOAuth` is `false`. | [optional] - -## Methods - -### NewSecretsPropertiesServicenow - -`func NewSecretsPropertiesServicenow() *SecretsPropertiesServicenow` - -NewSecretsPropertiesServicenow instantiates a new SecretsPropertiesServicenow object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewSecretsPropertiesServicenowWithDefaults - -`func NewSecretsPropertiesServicenowWithDefaults() *SecretsPropertiesServicenow` - -NewSecretsPropertiesServicenowWithDefaults instantiates a new SecretsPropertiesServicenow object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetClientSecret - -`func (o *SecretsPropertiesServicenow) GetClientSecret() string` - -GetClientSecret returns the ClientSecret field if non-nil, zero value otherwise. - -### GetClientSecretOk - -`func (o *SecretsPropertiesServicenow) GetClientSecretOk() (*string, bool)` - -GetClientSecretOk returns a tuple with the ClientSecret field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetClientSecret - -`func (o *SecretsPropertiesServicenow) SetClientSecret(v string)` - -SetClientSecret sets ClientSecret field to given value. - -### HasClientSecret - -`func (o *SecretsPropertiesServicenow) HasClientSecret() bool` - -HasClientSecret returns a boolean if a field has been set. - -### GetPassword - -`func (o *SecretsPropertiesServicenow) GetPassword() string` - -GetPassword returns the Password field if non-nil, zero value otherwise. - -### GetPasswordOk - -`func (o *SecretsPropertiesServicenow) GetPasswordOk() (*string, bool)` - -GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPassword - -`func (o *SecretsPropertiesServicenow) SetPassword(v string)` - -SetPassword sets Password field to given value. - -### HasPassword - -`func (o *SecretsPropertiesServicenow) HasPassword() bool` - -HasPassword returns a boolean if a field has been set. - -### GetPrivateKey - -`func (o *SecretsPropertiesServicenow) GetPrivateKey() string` - -GetPrivateKey returns the PrivateKey field if non-nil, zero value otherwise. - -### GetPrivateKeyOk - -`func (o *SecretsPropertiesServicenow) GetPrivateKeyOk() (*string, bool)` - -GetPrivateKeyOk returns a tuple with the PrivateKey field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPrivateKey - -`func (o *SecretsPropertiesServicenow) SetPrivateKey(v string)` - -SetPrivateKey sets PrivateKey field to given value. - -### HasPrivateKey - -`func (o *SecretsPropertiesServicenow) HasPrivateKey() bool` - -HasPrivateKey returns a boolean if a field has been set. - -### GetPrivateKeyPassword - -`func (o *SecretsPropertiesServicenow) GetPrivateKeyPassword() string` - -GetPrivateKeyPassword returns the PrivateKeyPassword field if non-nil, zero value otherwise. - -### GetPrivateKeyPasswordOk - -`func (o *SecretsPropertiesServicenow) GetPrivateKeyPasswordOk() (*string, bool)` - -GetPrivateKeyPasswordOk returns a tuple with the PrivateKeyPassword field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPrivateKeyPassword - -`func (o *SecretsPropertiesServicenow) SetPrivateKeyPassword(v string)` - -SetPrivateKeyPassword sets PrivateKeyPassword field to given value. - -### HasPrivateKeyPassword - -`func (o *SecretsPropertiesServicenow) HasPrivateKeyPassword() bool` - -HasPrivateKeyPassword returns a boolean if a field has been set. - -### GetUsername - -`func (o *SecretsPropertiesServicenow) GetUsername() string` - -GetUsername returns the Username field if non-nil, zero value otherwise. - -### GetUsernameOk - -`func (o *SecretsPropertiesServicenow) GetUsernameOk() (*string, bool)` - -GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUsername - -`func (o *SecretsPropertiesServicenow) SetUsername(v string)` - -SetUsername sets Username field to given value. - -### HasUsername - -`func (o *SecretsPropertiesServicenow) HasUsername() bool` - -HasUsername returns a boolean if a field has been set. - +**ClientSecret** | **string** | The client secret assigned to your OAuth application. This property is required when `isOAuth` is `true`. | [optional] [default to null] +**Password** | **string** | The password for HTTP basic authentication. This property is required when `isOAuth` is `false`. | [optional] [default to null] +**PrivateKey** | **string** | The RSA private key that you created for use in ServiceNow. This property is required when `isOAuth` is `true`. | [optional] [default to null] +**PrivateKeyPassword** | **string** | The password for the RSA private key. This property is required when `isOAuth` is `true` and you set a password on your private key. | [optional] [default to null] +**Username** | **string** | The username for HTTP basic authentication. This property is required when `isOAuth` is `false`. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/SecretsPropertiesSwimlane.md b/generated/kibanaactions/docs/SecretsPropertiesSwimlane.md index 12881fb69..e2a5a1fd1 100644 --- a/generated/kibanaactions/docs/SecretsPropertiesSwimlane.md +++ b/generated/kibanaactions/docs/SecretsPropertiesSwimlane.md @@ -1,56 +1,9 @@ # SecretsPropertiesSwimlane ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ApiToken** | Pointer to **string** | Swimlane API authentication token. | [optional] - -## Methods - -### NewSecretsPropertiesSwimlane - -`func NewSecretsPropertiesSwimlane() *SecretsPropertiesSwimlane` - -NewSecretsPropertiesSwimlane instantiates a new SecretsPropertiesSwimlane object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewSecretsPropertiesSwimlaneWithDefaults - -`func NewSecretsPropertiesSwimlaneWithDefaults() *SecretsPropertiesSwimlane` - -NewSecretsPropertiesSwimlaneWithDefaults instantiates a new SecretsPropertiesSwimlane object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetApiToken - -`func (o *SecretsPropertiesSwimlane) GetApiToken() string` - -GetApiToken returns the ApiToken field if non-nil, zero value otherwise. - -### GetApiTokenOk - -`func (o *SecretsPropertiesSwimlane) GetApiTokenOk() (*string, bool)` - -GetApiTokenOk returns a tuple with the ApiToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApiToken - -`func (o *SecretsPropertiesSwimlane) SetApiToken(v string)` - -SetApiToken sets ApiToken field to given value. - -### HasApiToken - -`func (o *SecretsPropertiesSwimlane) HasApiToken() bool` - -HasApiToken returns a boolean if a field has been set. - +**ApiToken** | **string** | Swimlane API authentication token. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/SeverityMapping.md b/generated/kibanaactions/docs/SeverityMapping.md index 9d057b2f9..76ff4b63e 100644 --- a/generated/kibanaactions/docs/SeverityMapping.md +++ b/generated/kibanaactions/docs/SeverityMapping.md @@ -1,114 +1,12 @@ # SeverityMapping ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**FieldType** | **string** | The type of field in Swimlane. | -**Id** | **string** | The identifier for the field in Swimlane. | -**Key** | **string** | The key for the field in Swimlane. | -**Name** | **string** | The name of the field in Swimlane. | - -## Methods - -### NewSeverityMapping - -`func NewSeverityMapping(fieldType string, id string, key string, name string, ) *SeverityMapping` - -NewSeverityMapping instantiates a new SeverityMapping object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewSeverityMappingWithDefaults - -`func NewSeverityMappingWithDefaults() *SeverityMapping` - -NewSeverityMappingWithDefaults instantiates a new SeverityMapping object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetFieldType - -`func (o *SeverityMapping) GetFieldType() string` - -GetFieldType returns the FieldType field if non-nil, zero value otherwise. - -### GetFieldTypeOk - -`func (o *SeverityMapping) GetFieldTypeOk() (*string, bool)` - -GetFieldTypeOk returns a tuple with the FieldType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFieldType - -`func (o *SeverityMapping) SetFieldType(v string)` - -SetFieldType sets FieldType field to given value. - - -### GetId - -`func (o *SeverityMapping) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *SeverityMapping) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *SeverityMapping) SetId(v string)` - -SetId sets Id field to given value. - - -### GetKey - -`func (o *SeverityMapping) GetKey() string` - -GetKey returns the Key field if non-nil, zero value otherwise. - -### GetKeyOk - -`func (o *SeverityMapping) GetKeyOk() (*string, bool)` - -GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKey - -`func (o *SeverityMapping) SetKey(v string)` - -SetKey sets Key field to given value. - - -### GetName - -`func (o *SeverityMapping) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *SeverityMapping) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *SeverityMapping) SetName(v string)` - -SetName sets Name field to given value. - - +**FieldType** | **string** | The type of field in Swimlane. | [default to null] +**Id** | **string** | The identifier for the field in Swimlane. | [default to null] +**Key** | **string** | The key for the field in Swimlane. | [default to null] +**Name** | **string** | The name of the field in Swimlane. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/SubactionParameters.md b/generated/kibanaactions/docs/SubactionParameters.md deleted file mode 100644 index 2c2327e89..000000000 --- a/generated/kibanaactions/docs/SubactionParameters.md +++ /dev/null @@ -1,72 +0,0 @@ -# SubactionParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | -**SubActionParams** | [**RunConnectorSubactionPushtoserviceSubActionParams**](RunConnectorSubactionPushtoserviceSubActionParams.md) | | - -## Methods - -### NewSubactionParameters - -`func NewSubactionParameters(subAction string, subActionParams RunConnectorSubactionPushtoserviceSubActionParams, ) *SubactionParameters` - -NewSubactionParameters instantiates a new SubactionParameters object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewSubactionParametersWithDefaults - -`func NewSubactionParametersWithDefaults() *SubactionParameters` - -NewSubactionParametersWithDefaults instantiates a new SubactionParameters object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetSubAction - -`func (o *SubactionParameters) GetSubAction() string` - -GetSubAction returns the SubAction field if non-nil, zero value otherwise. - -### GetSubActionOk - -`func (o *SubactionParameters) GetSubActionOk() (*string, bool)` - -GetSubActionOk returns a tuple with the SubAction field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubAction - -`func (o *SubactionParameters) SetSubAction(v string)` - -SetSubAction sets SubAction field to given value. - - -### GetSubActionParams - -`func (o *SubactionParameters) GetSubActionParams() RunConnectorSubactionPushtoserviceSubActionParams` - -GetSubActionParams returns the SubActionParams field if non-nil, zero value otherwise. - -### GetSubActionParamsOk - -`func (o *SubactionParameters) GetSubActionParamsOk() (*RunConnectorSubactionPushtoserviceSubActionParams, bool)` - -GetSubActionParamsOk returns a tuple with the SubActionParams field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubActionParams - -`func (o *SubactionParameters) SetSubActionParams(v RunConnectorSubactionPushtoserviceSubActionParams)` - -SetSubActionParams sets SubActionParams field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/kibanaactions/docs/UnauthorizedResponse.md b/generated/kibanaactions/docs/UnauthorizedResponse.md index 13eaff5bf..28d90caff 100644 --- a/generated/kibanaactions/docs/UnauthorizedResponse.md +++ b/generated/kibanaactions/docs/UnauthorizedResponse.md @@ -1,108 +1,11 @@ # UnauthorizedResponse ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Error** | Pointer to **string** | | [optional] -**Message** | Pointer to **string** | | [optional] -**StatusCode** | Pointer to **int32** | | [optional] - -## Methods - -### NewUnauthorizedResponse - -`func NewUnauthorizedResponse() *UnauthorizedResponse` - -NewUnauthorizedResponse instantiates a new UnauthorizedResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUnauthorizedResponseWithDefaults - -`func NewUnauthorizedResponseWithDefaults() *UnauthorizedResponse` - -NewUnauthorizedResponseWithDefaults instantiates a new UnauthorizedResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetError - -`func (o *UnauthorizedResponse) GetError() string` - -GetError returns the Error field if non-nil, zero value otherwise. - -### GetErrorOk - -`func (o *UnauthorizedResponse) GetErrorOk() (*string, bool)` - -GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetError - -`func (o *UnauthorizedResponse) SetError(v string)` - -SetError sets Error field to given value. - -### HasError - -`func (o *UnauthorizedResponse) HasError() bool` - -HasError returns a boolean if a field has been set. - -### GetMessage - -`func (o *UnauthorizedResponse) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *UnauthorizedResponse) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *UnauthorizedResponse) SetMessage(v string)` - -SetMessage sets Message field to given value. - -### HasMessage - -`func (o *UnauthorizedResponse) HasMessage() bool` - -HasMessage returns a boolean if a field has been set. - -### GetStatusCode - -`func (o *UnauthorizedResponse) GetStatusCode() int32` - -GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. - -### GetStatusCodeOk - -`func (o *UnauthorizedResponse) GetStatusCodeOk() (*int32, bool)` - -GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatusCode - -`func (o *UnauthorizedResponse) SetStatusCode(v int32)` - -SetStatusCode sets StatusCode field to given value. - -### HasStatusCode - -`func (o *UnauthorizedResponse) HasStatusCode() bool` - -HasStatusCode returns a boolean if a field has been set. - +**Error_** | **string** | | [optional] [default to null] +**Message** | **string** | | [optional] [default to null] +**StatusCode** | **int32** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnector400Response.md b/generated/kibanaactions/docs/UpdateConnector400Response.md deleted file mode 100644 index fd9c67d90..000000000 --- a/generated/kibanaactions/docs/UpdateConnector400Response.md +++ /dev/null @@ -1,108 +0,0 @@ -# UpdateConnector400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error** | Pointer to **string** | | [optional] -**Message** | Pointer to **string** | | [optional] -**StatusCode** | Pointer to **int32** | | [optional] - -## Methods - -### NewUpdateConnector400Response - -`func NewUpdateConnector400Response() *UpdateConnector400Response` - -NewUpdateConnector400Response instantiates a new UpdateConnector400Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdateConnector400ResponseWithDefaults - -`func NewUpdateConnector400ResponseWithDefaults() *UpdateConnector400Response` - -NewUpdateConnector400ResponseWithDefaults instantiates a new UpdateConnector400Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetError - -`func (o *UpdateConnector400Response) GetError() string` - -GetError returns the Error field if non-nil, zero value otherwise. - -### GetErrorOk - -`func (o *UpdateConnector400Response) GetErrorOk() (*string, bool)` - -GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetError - -`func (o *UpdateConnector400Response) SetError(v string)` - -SetError sets Error field to given value. - -### HasError - -`func (o *UpdateConnector400Response) HasError() bool` - -HasError returns a boolean if a field has been set. - -### GetMessage - -`func (o *UpdateConnector400Response) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *UpdateConnector400Response) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *UpdateConnector400Response) SetMessage(v string)` - -SetMessage sets Message field to given value. - -### HasMessage - -`func (o *UpdateConnector400Response) HasMessage() bool` - -HasMessage returns a boolean if a field has been set. - -### GetStatusCode - -`func (o *UpdateConnector400Response) GetStatusCode() int32` - -GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. - -### GetStatusCodeOk - -`func (o *UpdateConnector400Response) GetStatusCodeOk() (*int32, bool)` - -GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatusCode - -`func (o *UpdateConnector400Response) SetStatusCode(v int32)` - -SetStatusCode sets StatusCode field to given value. - -### HasStatusCode - -`func (o *UpdateConnector400Response) HasStatusCode() bool` - -HasStatusCode returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestBodyProperties.md b/generated/kibanaactions/docs/UpdateConnectorRequestBodyProperties.md index c6f7835ed..cbcd15379 100644 --- a/generated/kibanaactions/docs/UpdateConnectorRequestBodyProperties.md +++ b/generated/kibanaactions/docs/UpdateConnectorRequestBodyProperties.md @@ -1,93 +1,8 @@ # UpdateConnectorRequestBodyProperties ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesSwimlane**](ConfigPropertiesSwimlane.md) | | -**Name** | **string** | The display name for the connector. | -**Secrets** | [**SecretsPropertiesSwimlane**](SecretsPropertiesSwimlane.md) | | - -## Methods - -### NewUpdateConnectorRequestBodyProperties - -`func NewUpdateConnectorRequestBodyProperties(config ConfigPropertiesSwimlane, name string, secrets SecretsPropertiesSwimlane, ) *UpdateConnectorRequestBodyProperties` - -NewUpdateConnectorRequestBodyProperties instantiates a new UpdateConnectorRequestBodyProperties object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdateConnectorRequestBodyPropertiesWithDefaults - -`func NewUpdateConnectorRequestBodyPropertiesWithDefaults() *UpdateConnectorRequestBodyProperties` - -NewUpdateConnectorRequestBodyPropertiesWithDefaults instantiates a new UpdateConnectorRequestBodyProperties object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *UpdateConnectorRequestBodyProperties) GetConfig() ConfigPropertiesSwimlane` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *UpdateConnectorRequestBodyProperties) GetConfigOk() (*ConfigPropertiesSwimlane, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *UpdateConnectorRequestBodyProperties) SetConfig(v ConfigPropertiesSwimlane)` - -SetConfig sets Config field to given value. - - -### GetName - -`func (o *UpdateConnectorRequestBodyProperties) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *UpdateConnectorRequestBodyProperties) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *UpdateConnectorRequestBodyProperties) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *UpdateConnectorRequestBodyProperties) GetSecrets() SecretsPropertiesSwimlane` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *UpdateConnectorRequestBodyProperties) GetSecretsOk() (*SecretsPropertiesSwimlane, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *UpdateConnectorRequestBodyProperties) SetSecrets(v SecretsPropertiesSwimlane)` - -SetSecrets sets Secrets field to given value. - - [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestCasesWebhook.md b/generated/kibanaactions/docs/UpdateConnectorRequestCasesWebhook.md index 70a302752..f05f30b2a 100644 --- a/generated/kibanaactions/docs/UpdateConnectorRequestCasesWebhook.md +++ b/generated/kibanaactions/docs/UpdateConnectorRequestCasesWebhook.md @@ -1,98 +1,11 @@ # UpdateConnectorRequestCasesWebhook ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesCasesWebhook**](ConfigPropertiesCasesWebhook.md) | | -**Name** | **string** | The display name for the connector. | -**Secrets** | Pointer to [**SecretsPropertiesCasesWebhook**](SecretsPropertiesCasesWebhook.md) | | [optional] - -## Methods - -### NewUpdateConnectorRequestCasesWebhook - -`func NewUpdateConnectorRequestCasesWebhook(config ConfigPropertiesCasesWebhook, name string, ) *UpdateConnectorRequestCasesWebhook` - -NewUpdateConnectorRequestCasesWebhook instantiates a new UpdateConnectorRequestCasesWebhook object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdateConnectorRequestCasesWebhookWithDefaults - -`func NewUpdateConnectorRequestCasesWebhookWithDefaults() *UpdateConnectorRequestCasesWebhook` - -NewUpdateConnectorRequestCasesWebhookWithDefaults instantiates a new UpdateConnectorRequestCasesWebhook object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *UpdateConnectorRequestCasesWebhook) GetConfig() ConfigPropertiesCasesWebhook` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *UpdateConnectorRequestCasesWebhook) GetConfigOk() (*ConfigPropertiesCasesWebhook, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *UpdateConnectorRequestCasesWebhook) SetConfig(v ConfigPropertiesCasesWebhook)` - -SetConfig sets Config field to given value. - - -### GetName - -`func (o *UpdateConnectorRequestCasesWebhook) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *UpdateConnectorRequestCasesWebhook) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *UpdateConnectorRequestCasesWebhook) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *UpdateConnectorRequestCasesWebhook) GetSecrets() SecretsPropertiesCasesWebhook` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *UpdateConnectorRequestCasesWebhook) GetSecretsOk() (*SecretsPropertiesCasesWebhook, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *UpdateConnectorRequestCasesWebhook) SetSecrets(v SecretsPropertiesCasesWebhook)` - -SetSecrets sets Secrets field to given value. - -### HasSecrets - -`func (o *UpdateConnectorRequestCasesWebhook) HasSecrets() bool` - -HasSecrets returns a boolean if a field has been set. - +**Config** | [***ConfigPropertiesCasesWebhook**](config_properties_cases_webhook.md) | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***SecretsPropertiesCasesWebhook**](secrets_properties_cases_webhook.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestIndex.md b/generated/kibanaactions/docs/UpdateConnectorRequestIndex.md index eb9c989ff..98442fc61 100644 --- a/generated/kibanaactions/docs/UpdateConnectorRequestIndex.md +++ b/generated/kibanaactions/docs/UpdateConnectorRequestIndex.md @@ -1,72 +1,10 @@ # UpdateConnectorRequestIndex ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesIndex**](ConfigPropertiesIndex.md) | | -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewUpdateConnectorRequestIndex - -`func NewUpdateConnectorRequestIndex(config ConfigPropertiesIndex, name string, ) *UpdateConnectorRequestIndex` - -NewUpdateConnectorRequestIndex instantiates a new UpdateConnectorRequestIndex object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdateConnectorRequestIndexWithDefaults - -`func NewUpdateConnectorRequestIndexWithDefaults() *UpdateConnectorRequestIndex` - -NewUpdateConnectorRequestIndexWithDefaults instantiates a new UpdateConnectorRequestIndex object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *UpdateConnectorRequestIndex) GetConfig() ConfigPropertiesIndex` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *UpdateConnectorRequestIndex) GetConfigOk() (*ConfigPropertiesIndex, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *UpdateConnectorRequestIndex) SetConfig(v ConfigPropertiesIndex)` - -SetConfig sets Config field to given value. - - -### GetName - -`func (o *UpdateConnectorRequestIndex) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *UpdateConnectorRequestIndex) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *UpdateConnectorRequestIndex) SetName(v string)` - -SetName sets Name field to given value. - - +**Config** | [***ConfigPropertiesIndex**](config_properties_index.md) | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestJira.md b/generated/kibanaactions/docs/UpdateConnectorRequestJira.md index 85aadd4d3..d85876156 100644 --- a/generated/kibanaactions/docs/UpdateConnectorRequestJira.md +++ b/generated/kibanaactions/docs/UpdateConnectorRequestJira.md @@ -1,93 +1,11 @@ # UpdateConnectorRequestJira ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesJira**](ConfigPropertiesJira.md) | | -**Name** | **string** | The display name for the connector. | -**Secrets** | [**SecretsPropertiesJira**](SecretsPropertiesJira.md) | | - -## Methods - -### NewUpdateConnectorRequestJira - -`func NewUpdateConnectorRequestJira(config ConfigPropertiesJira, name string, secrets SecretsPropertiesJira, ) *UpdateConnectorRequestJira` - -NewUpdateConnectorRequestJira instantiates a new UpdateConnectorRequestJira object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdateConnectorRequestJiraWithDefaults - -`func NewUpdateConnectorRequestJiraWithDefaults() *UpdateConnectorRequestJira` - -NewUpdateConnectorRequestJiraWithDefaults instantiates a new UpdateConnectorRequestJira object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *UpdateConnectorRequestJira) GetConfig() ConfigPropertiesJira` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *UpdateConnectorRequestJira) GetConfigOk() (*ConfigPropertiesJira, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *UpdateConnectorRequestJira) SetConfig(v ConfigPropertiesJira)` - -SetConfig sets Config field to given value. - - -### GetName - -`func (o *UpdateConnectorRequestJira) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *UpdateConnectorRequestJira) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *UpdateConnectorRequestJira) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *UpdateConnectorRequestJira) GetSecrets() SecretsPropertiesJira` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *UpdateConnectorRequestJira) GetSecretsOk() (*SecretsPropertiesJira, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *UpdateConnectorRequestJira) SetSecrets(v SecretsPropertiesJira)` - -SetSecrets sets Secrets field to given value. - - +**Config** | [***ConfigPropertiesJira**](config_properties_jira.md) | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***SecretsPropertiesJira**](secrets_properties_jira.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestOpsgenie.md b/generated/kibanaactions/docs/UpdateConnectorRequestOpsgenie.md index b2700341e..0c9fb4807 100644 --- a/generated/kibanaactions/docs/UpdateConnectorRequestOpsgenie.md +++ b/generated/kibanaactions/docs/UpdateConnectorRequestOpsgenie.md @@ -1,93 +1,11 @@ # UpdateConnectorRequestOpsgenie ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesOpsgenie**](ConfigPropertiesOpsgenie.md) | | -**Name** | **string** | The display name for the connector. | -**Secrets** | [**SecretsPropertiesOpsgenie**](SecretsPropertiesOpsgenie.md) | | - -## Methods - -### NewUpdateConnectorRequestOpsgenie - -`func NewUpdateConnectorRequestOpsgenie(config ConfigPropertiesOpsgenie, name string, secrets SecretsPropertiesOpsgenie, ) *UpdateConnectorRequestOpsgenie` - -NewUpdateConnectorRequestOpsgenie instantiates a new UpdateConnectorRequestOpsgenie object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdateConnectorRequestOpsgenieWithDefaults - -`func NewUpdateConnectorRequestOpsgenieWithDefaults() *UpdateConnectorRequestOpsgenie` - -NewUpdateConnectorRequestOpsgenieWithDefaults instantiates a new UpdateConnectorRequestOpsgenie object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *UpdateConnectorRequestOpsgenie) GetConfig() ConfigPropertiesOpsgenie` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *UpdateConnectorRequestOpsgenie) GetConfigOk() (*ConfigPropertiesOpsgenie, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *UpdateConnectorRequestOpsgenie) SetConfig(v ConfigPropertiesOpsgenie)` - -SetConfig sets Config field to given value. - - -### GetName - -`func (o *UpdateConnectorRequestOpsgenie) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *UpdateConnectorRequestOpsgenie) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *UpdateConnectorRequestOpsgenie) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *UpdateConnectorRequestOpsgenie) GetSecrets() SecretsPropertiesOpsgenie` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *UpdateConnectorRequestOpsgenie) GetSecretsOk() (*SecretsPropertiesOpsgenie, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *UpdateConnectorRequestOpsgenie) SetSecrets(v SecretsPropertiesOpsgenie)` - -SetSecrets sets Secrets field to given value. - - +**Config** | [***ConfigPropertiesOpsgenie**](config_properties_opsgenie.md) | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***SecretsPropertiesOpsgenie**](secrets_properties_opsgenie.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestResilient.md b/generated/kibanaactions/docs/UpdateConnectorRequestResilient.md index 0b095b429..f8a870119 100644 --- a/generated/kibanaactions/docs/UpdateConnectorRequestResilient.md +++ b/generated/kibanaactions/docs/UpdateConnectorRequestResilient.md @@ -1,93 +1,11 @@ # UpdateConnectorRequestResilient ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesResilient**](ConfigPropertiesResilient.md) | | -**Name** | **string** | The display name for the connector. | -**Secrets** | [**SecretsPropertiesResilient**](SecretsPropertiesResilient.md) | | - -## Methods - -### NewUpdateConnectorRequestResilient - -`func NewUpdateConnectorRequestResilient(config ConfigPropertiesResilient, name string, secrets SecretsPropertiesResilient, ) *UpdateConnectorRequestResilient` - -NewUpdateConnectorRequestResilient instantiates a new UpdateConnectorRequestResilient object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdateConnectorRequestResilientWithDefaults - -`func NewUpdateConnectorRequestResilientWithDefaults() *UpdateConnectorRequestResilient` - -NewUpdateConnectorRequestResilientWithDefaults instantiates a new UpdateConnectorRequestResilient object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *UpdateConnectorRequestResilient) GetConfig() ConfigPropertiesResilient` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *UpdateConnectorRequestResilient) GetConfigOk() (*ConfigPropertiesResilient, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *UpdateConnectorRequestResilient) SetConfig(v ConfigPropertiesResilient)` - -SetConfig sets Config field to given value. - - -### GetName - -`func (o *UpdateConnectorRequestResilient) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *UpdateConnectorRequestResilient) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *UpdateConnectorRequestResilient) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *UpdateConnectorRequestResilient) GetSecrets() SecretsPropertiesResilient` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *UpdateConnectorRequestResilient) GetSecretsOk() (*SecretsPropertiesResilient, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *UpdateConnectorRequestResilient) SetSecrets(v SecretsPropertiesResilient)` - -SetSecrets sets Secrets field to given value. - - +**Config** | [***ConfigPropertiesResilient**](config_properties_resilient.md) | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***SecretsPropertiesResilient**](secrets_properties_resilient.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestServerlog.md b/generated/kibanaactions/docs/UpdateConnectorRequestServerlog.md index c0471ed4a..a44c133a5 100644 --- a/generated/kibanaactions/docs/UpdateConnectorRequestServerlog.md +++ b/generated/kibanaactions/docs/UpdateConnectorRequestServerlog.md @@ -1,51 +1,9 @@ # UpdateConnectorRequestServerlog ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The display name for the connector. | - -## Methods - -### NewUpdateConnectorRequestServerlog - -`func NewUpdateConnectorRequestServerlog(name string, ) *UpdateConnectorRequestServerlog` - -NewUpdateConnectorRequestServerlog instantiates a new UpdateConnectorRequestServerlog object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdateConnectorRequestServerlogWithDefaults - -`func NewUpdateConnectorRequestServerlogWithDefaults() *UpdateConnectorRequestServerlog` - -NewUpdateConnectorRequestServerlogWithDefaults instantiates a new UpdateConnectorRequestServerlog object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetName - -`func (o *UpdateConnectorRequestServerlog) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *UpdateConnectorRequestServerlog) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *UpdateConnectorRequestServerlog) SetName(v string)` - -SetName sets Name field to given value. - - +**Name** | **string** | The display name for the connector. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestServicenow.md b/generated/kibanaactions/docs/UpdateConnectorRequestServicenow.md index b767622f8..ad93d53b9 100644 --- a/generated/kibanaactions/docs/UpdateConnectorRequestServicenow.md +++ b/generated/kibanaactions/docs/UpdateConnectorRequestServicenow.md @@ -1,93 +1,11 @@ # UpdateConnectorRequestServicenow ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesServicenow**](ConfigPropertiesServicenow.md) | | -**Name** | **string** | The display name for the connector. | -**Secrets** | [**SecretsPropertiesServicenow**](SecretsPropertiesServicenow.md) | | - -## Methods - -### NewUpdateConnectorRequestServicenow - -`func NewUpdateConnectorRequestServicenow(config ConfigPropertiesServicenow, name string, secrets SecretsPropertiesServicenow, ) *UpdateConnectorRequestServicenow` - -NewUpdateConnectorRequestServicenow instantiates a new UpdateConnectorRequestServicenow object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdateConnectorRequestServicenowWithDefaults - -`func NewUpdateConnectorRequestServicenowWithDefaults() *UpdateConnectorRequestServicenow` - -NewUpdateConnectorRequestServicenowWithDefaults instantiates a new UpdateConnectorRequestServicenow object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *UpdateConnectorRequestServicenow) GetConfig() ConfigPropertiesServicenow` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *UpdateConnectorRequestServicenow) GetConfigOk() (*ConfigPropertiesServicenow, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *UpdateConnectorRequestServicenow) SetConfig(v ConfigPropertiesServicenow)` - -SetConfig sets Config field to given value. - - -### GetName - -`func (o *UpdateConnectorRequestServicenow) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *UpdateConnectorRequestServicenow) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *UpdateConnectorRequestServicenow) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *UpdateConnectorRequestServicenow) GetSecrets() SecretsPropertiesServicenow` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *UpdateConnectorRequestServicenow) GetSecretsOk() (*SecretsPropertiesServicenow, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *UpdateConnectorRequestServicenow) SetSecrets(v SecretsPropertiesServicenow)` - -SetSecrets sets Secrets field to given value. - - +**Config** | [***ConfigPropertiesServicenow**](config_properties_servicenow.md) | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***SecretsPropertiesServicenow**](secrets_properties_servicenow.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestServicenowItom.md b/generated/kibanaactions/docs/UpdateConnectorRequestServicenowItom.md index 4bd1756cb..73604632a 100644 --- a/generated/kibanaactions/docs/UpdateConnectorRequestServicenowItom.md +++ b/generated/kibanaactions/docs/UpdateConnectorRequestServicenowItom.md @@ -1,93 +1,11 @@ # UpdateConnectorRequestServicenowItom ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesServicenowItom**](ConfigPropertiesServicenowItom.md) | | -**Name** | **string** | The display name for the connector. | -**Secrets** | [**SecretsPropertiesServicenow**](SecretsPropertiesServicenow.md) | | - -## Methods - -### NewUpdateConnectorRequestServicenowItom - -`func NewUpdateConnectorRequestServicenowItom(config ConfigPropertiesServicenowItom, name string, secrets SecretsPropertiesServicenow, ) *UpdateConnectorRequestServicenowItom` - -NewUpdateConnectorRequestServicenowItom instantiates a new UpdateConnectorRequestServicenowItom object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdateConnectorRequestServicenowItomWithDefaults - -`func NewUpdateConnectorRequestServicenowItomWithDefaults() *UpdateConnectorRequestServicenowItom` - -NewUpdateConnectorRequestServicenowItomWithDefaults instantiates a new UpdateConnectorRequestServicenowItom object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *UpdateConnectorRequestServicenowItom) GetConfig() ConfigPropertiesServicenowItom` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *UpdateConnectorRequestServicenowItom) GetConfigOk() (*ConfigPropertiesServicenowItom, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *UpdateConnectorRequestServicenowItom) SetConfig(v ConfigPropertiesServicenowItom)` - -SetConfig sets Config field to given value. - - -### GetName - -`func (o *UpdateConnectorRequestServicenowItom) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *UpdateConnectorRequestServicenowItom) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *UpdateConnectorRequestServicenowItom) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *UpdateConnectorRequestServicenowItom) GetSecrets() SecretsPropertiesServicenow` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *UpdateConnectorRequestServicenowItom) GetSecretsOk() (*SecretsPropertiesServicenow, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *UpdateConnectorRequestServicenowItom) SetSecrets(v SecretsPropertiesServicenow)` - -SetSecrets sets Secrets field to given value. - - +**Config** | [***ConfigPropertiesServicenowItom**](config_properties_servicenow_itom.md) | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***SecretsPropertiesServicenow**](secrets_properties_servicenow.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestSwimlane.md b/generated/kibanaactions/docs/UpdateConnectorRequestSwimlane.md index 5a2ad0323..57bc2089d 100644 --- a/generated/kibanaactions/docs/UpdateConnectorRequestSwimlane.md +++ b/generated/kibanaactions/docs/UpdateConnectorRequestSwimlane.md @@ -1,93 +1,11 @@ # UpdateConnectorRequestSwimlane ## Properties - Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Config** | [**ConfigPropertiesSwimlane**](ConfigPropertiesSwimlane.md) | | -**Name** | **string** | The display name for the connector. | -**Secrets** | [**SecretsPropertiesSwimlane**](SecretsPropertiesSwimlane.md) | | - -## Methods - -### NewUpdateConnectorRequestSwimlane - -`func NewUpdateConnectorRequestSwimlane(config ConfigPropertiesSwimlane, name string, secrets SecretsPropertiesSwimlane, ) *UpdateConnectorRequestSwimlane` - -NewUpdateConnectorRequestSwimlane instantiates a new UpdateConnectorRequestSwimlane object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUpdateConnectorRequestSwimlaneWithDefaults - -`func NewUpdateConnectorRequestSwimlaneWithDefaults() *UpdateConnectorRequestSwimlane` - -NewUpdateConnectorRequestSwimlaneWithDefaults instantiates a new UpdateConnectorRequestSwimlane object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetConfig - -`func (o *UpdateConnectorRequestSwimlane) GetConfig() ConfigPropertiesSwimlane` - -GetConfig returns the Config field if non-nil, zero value otherwise. - -### GetConfigOk - -`func (o *UpdateConnectorRequestSwimlane) GetConfigOk() (*ConfigPropertiesSwimlane, bool)` - -GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfig - -`func (o *UpdateConnectorRequestSwimlane) SetConfig(v ConfigPropertiesSwimlane)` - -SetConfig sets Config field to given value. - - -### GetName - -`func (o *UpdateConnectorRequestSwimlane) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *UpdateConnectorRequestSwimlane) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *UpdateConnectorRequestSwimlane) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSecrets - -`func (o *UpdateConnectorRequestSwimlane) GetSecrets() SecretsPropertiesSwimlane` - -GetSecrets returns the Secrets field if non-nil, zero value otherwise. - -### GetSecretsOk - -`func (o *UpdateConnectorRequestSwimlane) GetSecretsOk() (*SecretsPropertiesSwimlane, bool)` - -GetSecretsOk returns a tuple with the Secrets field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSecrets - -`func (o *UpdateConnectorRequestSwimlane) SetSecrets(v SecretsPropertiesSwimlane)` - -SetSecrets sets Secrets field to given value. - - +**Config** | [***ConfigPropertiesSwimlane**](config_properties_swimlane.md) | | [default to null] +**Name** | **string** | The display name for the connector. | [default to null] +**Secrets** | [***SecretsPropertiesSwimlane**](secrets_properties_swimlane.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/git_push.sh b/generated/kibanaactions/git_push.sh index 9c304b700..ae01b182a 100644 --- a/generated/kibanaactions/git_push.sh +++ b/generated/kibanaactions/git_push.sh @@ -1,25 +1,19 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" git_user_id=$1 git_repo_id=$2 release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi if [ "$git_user_id" = "" ]; then - git_user_id="elastic" + git_user_id="GIT_USER_ID" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi if [ "$git_repo_id" = "" ]; then - git_repo_id="terraform-provider-elasticstack" + git_repo_id="GIT_REPO_ID" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi @@ -34,18 +28,18 @@ git init # Adds the files in the local repository and stages them for commit. git add . -# Commits the tracked changes and prepares them to be pushed to a remote repository. +# Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote -git_remote=$(git remote) +git_remote=`git remote` if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git fi fi @@ -53,5 +47,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' + diff --git a/generated/kibanaactions/model_401_response.go b/generated/kibanaactions/model_401_response.go deleted file mode 100644 index 8cd8e8e61..000000000 --- a/generated/kibanaactions/model_401_response.go +++ /dev/null @@ -1,196 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" -) - -// checks if the Model401Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Model401Response{} - -// Model401Response struct for Model401Response -type Model401Response struct { - Error *string `json:"error,omitempty"` - Message *string `json:"message,omitempty"` - StatusCode *int32 `json:"statusCode,omitempty"` -} - -// NewModel401Response instantiates a new Model401Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewModel401Response() *Model401Response { - this := Model401Response{} - return &this -} - -// NewModel401ResponseWithDefaults instantiates a new Model401Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewModel401ResponseWithDefaults() *Model401Response { - this := Model401Response{} - return &this -} - -// GetError returns the Error field value if set, zero value otherwise. -func (o *Model401Response) GetError() string { - if o == nil || IsNil(o.Error) { - var ret string - return ret - } - return *o.Error -} - -// GetErrorOk returns a tuple with the Error field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Model401Response) GetErrorOk() (*string, bool) { - if o == nil || IsNil(o.Error) { - return nil, false - } - return o.Error, true -} - -// HasError returns a boolean if a field has been set. -func (o *Model401Response) HasError() bool { - if o != nil && !IsNil(o.Error) { - return true - } - - return false -} - -// SetError gets a reference to the given string and assigns it to the Error field. -func (o *Model401Response) SetError(v string) { - o.Error = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *Model401Response) GetMessage() string { - if o == nil || IsNil(o.Message) { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Model401Response) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *Model401Response) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *Model401Response) SetMessage(v string) { - o.Message = &v -} - -// GetStatusCode returns the StatusCode field value if set, zero value otherwise. -func (o *Model401Response) GetStatusCode() int32 { - if o == nil || IsNil(o.StatusCode) { - var ret int32 - return ret - } - return *o.StatusCode -} - -// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Model401Response) GetStatusCodeOk() (*int32, bool) { - if o == nil || IsNil(o.StatusCode) { - return nil, false - } - return o.StatusCode, true -} - -// HasStatusCode returns a boolean if a field has been set. -func (o *Model401Response) HasStatusCode() bool { - if o != nil && !IsNil(o.StatusCode) { - return true - } - - return false -} - -// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. -func (o *Model401Response) SetStatusCode(v int32) { - o.StatusCode = &v -} - -func (o Model401Response) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Model401Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Error) { - toSerialize["error"] = o.Error - } - if !IsNil(o.Message) { - toSerialize["message"] = o.Message - } - if !IsNil(o.StatusCode) { - toSerialize["statusCode"] = o.StatusCode - } - return toSerialize, nil -} - -type NullableModel401Response struct { - value *Model401Response - isSet bool -} - -func (v NullableModel401Response) Get() *Model401Response { - return v.value -} - -func (v *NullableModel401Response) Set(val *Model401Response) { - v.value = val - v.isSet = true -} - -func (v NullableModel401Response) IsSet() bool { - return v.isSet -} - -func (v *NullableModel401Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableModel401Response(val *Model401Response) *NullableModel401Response { - return &NullableModel401Response{value: val, isSet: true} -} - -func (v NullableModel401Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableModel401Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_404_response.go b/generated/kibanaactions/model_404_response.go deleted file mode 100644 index 2cfda38f7..000000000 --- a/generated/kibanaactions/model_404_response.go +++ /dev/null @@ -1,196 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" -) - -// checks if the Model404Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Model404Response{} - -// Model404Response struct for Model404Response -type Model404Response struct { - Error *string `json:"error,omitempty"` - Message *string `json:"message,omitempty"` - StatusCode *int32 `json:"statusCode,omitempty"` -} - -// NewModel404Response instantiates a new Model404Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewModel404Response() *Model404Response { - this := Model404Response{} - return &this -} - -// NewModel404ResponseWithDefaults instantiates a new Model404Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewModel404ResponseWithDefaults() *Model404Response { - this := Model404Response{} - return &this -} - -// GetError returns the Error field value if set, zero value otherwise. -func (o *Model404Response) GetError() string { - if o == nil || IsNil(o.Error) { - var ret string - return ret - } - return *o.Error -} - -// GetErrorOk returns a tuple with the Error field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Model404Response) GetErrorOk() (*string, bool) { - if o == nil || IsNil(o.Error) { - return nil, false - } - return o.Error, true -} - -// HasError returns a boolean if a field has been set. -func (o *Model404Response) HasError() bool { - if o != nil && !IsNil(o.Error) { - return true - } - - return false -} - -// SetError gets a reference to the given string and assigns it to the Error field. -func (o *Model404Response) SetError(v string) { - o.Error = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *Model404Response) GetMessage() string { - if o == nil || IsNil(o.Message) { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Model404Response) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *Model404Response) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *Model404Response) SetMessage(v string) { - o.Message = &v -} - -// GetStatusCode returns the StatusCode field value if set, zero value otherwise. -func (o *Model404Response) GetStatusCode() int32 { - if o == nil || IsNil(o.StatusCode) { - var ret int32 - return ret - } - return *o.StatusCode -} - -// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Model404Response) GetStatusCodeOk() (*int32, bool) { - if o == nil || IsNil(o.StatusCode) { - return nil, false - } - return o.StatusCode, true -} - -// HasStatusCode returns a boolean if a field has been set. -func (o *Model404Response) HasStatusCode() bool { - if o != nil && !IsNil(o.StatusCode) { - return true - } - - return false -} - -// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. -func (o *Model404Response) SetStatusCode(v int32) { - o.StatusCode = &v -} - -func (o Model404Response) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Model404Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Error) { - toSerialize["error"] = o.Error - } - if !IsNil(o.Message) { - toSerialize["message"] = o.Message - } - if !IsNil(o.StatusCode) { - toSerialize["statusCode"] = o.StatusCode - } - return toSerialize, nil -} - -type NullableModel404Response struct { - value *Model404Response - isSet bool -} - -func (v NullableModel404Response) Get() *Model404Response { - return v.value -} - -func (v *NullableModel404Response) Set(val *Model404Response) { - v.value = val - v.isSet = true -} - -func (v NullableModel404Response) IsSet() bool { - return v.isSet -} - -func (v *NullableModel404Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableModel404Response(val *Model404Response) *NullableModel404Response { - return &NullableModel404Response{value: val, isSet: true} -} - -func (v NullableModel404Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableModel404Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_action_response_properties.go b/generated/kibanaactions/model_action_response_properties.go index 5975f3575..072e97706 100644 --- a/generated/kibanaactions/model_action_response_properties.go +++ b/generated/kibanaactions/model_action_response_properties.go @@ -1,343 +1,23 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ActionResponseProperties type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ActionResponseProperties{} - -// ActionResponseProperties The properties vary depending on the action type. +// The properties vary depending on the action type. type ActionResponseProperties struct { - ActionTypeId *string `json:"actionTypeId,omitempty"` - Config map[string]interface{} `json:"config,omitempty"` - Id *string `json:"id,omitempty"` + ActionTypeId string `json:"actionTypeId,omitempty"` + Config *interface{} `json:"config,omitempty"` + Id string `json:"id,omitempty"` // Indicates whether the action type is deprecated. - IsDeprecated *bool `json:"isDeprecated,omitempty"` + IsDeprecated bool `json:"isDeprecated,omitempty"` // Indicates whether secrets are missing for the action. - IsMissingSecrets *bool `json:"isMissingSecrets,omitempty"` + IsMissingSecrets bool `json:"isMissingSecrets,omitempty"` // Indicates whether it is a preconfigured action. - IsPreconfigured *bool `json:"isPreconfigured,omitempty"` - Name *string `json:"name,omitempty"` -} - -// NewActionResponseProperties instantiates a new ActionResponseProperties object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewActionResponseProperties() *ActionResponseProperties { - this := ActionResponseProperties{} - return &this -} - -// NewActionResponsePropertiesWithDefaults instantiates a new ActionResponseProperties object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewActionResponsePropertiesWithDefaults() *ActionResponseProperties { - this := ActionResponseProperties{} - return &this -} - -// GetActionTypeId returns the ActionTypeId field value if set, zero value otherwise. -func (o *ActionResponseProperties) GetActionTypeId() string { - if o == nil || IsNil(o.ActionTypeId) { - var ret string - return ret - } - return *o.ActionTypeId -} - -// GetActionTypeIdOk returns a tuple with the ActionTypeId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActionResponseProperties) GetActionTypeIdOk() (*string, bool) { - if o == nil || IsNil(o.ActionTypeId) { - return nil, false - } - return o.ActionTypeId, true -} - -// HasActionTypeId returns a boolean if a field has been set. -func (o *ActionResponseProperties) HasActionTypeId() bool { - if o != nil && !IsNil(o.ActionTypeId) { - return true - } - - return false -} - -// SetActionTypeId gets a reference to the given string and assigns it to the ActionTypeId field. -func (o *ActionResponseProperties) SetActionTypeId(v string) { - o.ActionTypeId = &v -} - -// GetConfig returns the Config field value if set, zero value otherwise. -func (o *ActionResponseProperties) GetConfig() map[string]interface{} { - if o == nil || IsNil(o.Config) { - var ret map[string]interface{} - return ret - } - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActionResponseProperties) GetConfigOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Config) { - return map[string]interface{}{}, false - } - return o.Config, true -} - -// HasConfig returns a boolean if a field has been set. -func (o *ActionResponseProperties) HasConfig() bool { - if o != nil && !IsNil(o.Config) { - return true - } - - return false -} - -// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. -func (o *ActionResponseProperties) SetConfig(v map[string]interface{}) { - o.Config = v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *ActionResponseProperties) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActionResponseProperties) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *ActionResponseProperties) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *ActionResponseProperties) SetId(v string) { - o.Id = &v -} - -// GetIsDeprecated returns the IsDeprecated field value if set, zero value otherwise. -func (o *ActionResponseProperties) GetIsDeprecated() bool { - if o == nil || IsNil(o.IsDeprecated) { - var ret bool - return ret - } - return *o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActionResponseProperties) GetIsDeprecatedOk() (*bool, bool) { - if o == nil || IsNil(o.IsDeprecated) { - return nil, false - } - return o.IsDeprecated, true -} - -// HasIsDeprecated returns a boolean if a field has been set. -func (o *ActionResponseProperties) HasIsDeprecated() bool { - if o != nil && !IsNil(o.IsDeprecated) { - return true - } - - return false -} - -// SetIsDeprecated gets a reference to the given bool and assigns it to the IsDeprecated field. -func (o *ActionResponseProperties) SetIsDeprecated(v bool) { - o.IsDeprecated = &v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *ActionResponseProperties) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActionResponseProperties) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *ActionResponseProperties) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *ActionResponseProperties) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value if set, zero value otherwise. -func (o *ActionResponseProperties) GetIsPreconfigured() bool { - if o == nil || IsNil(o.IsPreconfigured) { - var ret bool - return ret - } - return *o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActionResponseProperties) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil || IsNil(o.IsPreconfigured) { - return nil, false - } - return o.IsPreconfigured, true -} - -// HasIsPreconfigured returns a boolean if a field has been set. -func (o *ActionResponseProperties) HasIsPreconfigured() bool { - if o != nil && !IsNil(o.IsPreconfigured) { - return true - } - - return false -} - -// SetIsPreconfigured gets a reference to the given bool and assigns it to the IsPreconfigured field. -func (o *ActionResponseProperties) SetIsPreconfigured(v bool) { - o.IsPreconfigured = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *ActionResponseProperties) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActionResponseProperties) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ActionResponseProperties) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ActionResponseProperties) SetName(v string) { - o.Name = &v -} - -func (o ActionResponseProperties) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ActionResponseProperties) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ActionTypeId) { - toSerialize["actionTypeId"] = o.ActionTypeId - } - if !IsNil(o.Config) { - toSerialize["config"] = o.Config - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.IsDeprecated) { - toSerialize["isDeprecated"] = o.IsDeprecated - } - if !IsNil(o.IsMissingSecrets) { - toSerialize["isMissingSecrets"] = o.IsMissingSecrets - } - if !IsNil(o.IsPreconfigured) { - toSerialize["isPreconfigured"] = o.IsPreconfigured - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - return toSerialize, nil -} - -type NullableActionResponseProperties struct { - value *ActionResponseProperties - isSet bool -} - -func (v NullableActionResponseProperties) Get() *ActionResponseProperties { - return v.value -} - -func (v *NullableActionResponseProperties) Set(val *ActionResponseProperties) { - v.value = val - v.isSet = true -} - -func (v NullableActionResponseProperties) IsSet() bool { - return v.isSet -} - -func (v *NullableActionResponseProperties) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableActionResponseProperties(val *ActionResponseProperties) *NullableActionResponseProperties { - return &NullableActionResponseProperties{value: val, isSet: true} -} - -func (v NullableActionResponseProperties) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableActionResponseProperties) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + IsPreconfigured bool `json:"isPreconfigured,omitempty"` + Name string `json:"name,omitempty"` } diff --git a/generated/kibanaactions/model_alert_identifier_mapping.go b/generated/kibanaactions/model_alert_identifier_mapping.go index 34711268e..5f2204e4e 100644 --- a/generated/kibanaactions/model_alert_identifier_mapping.go +++ b/generated/kibanaactions/model_alert_identifier_mapping.go @@ -1,23 +1,14 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the AlertIdentifierMapping type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AlertIdentifierMapping{} - -// AlertIdentifierMapping Mapping for the alert ID. +// Mapping for the alert ID. type AlertIdentifierMapping struct { // The type of field in Swimlane. FieldType string `json:"fieldType"` @@ -28,173 +19,3 @@ type AlertIdentifierMapping struct { // The name of the field in Swimlane. Name string `json:"name"` } - -// NewAlertIdentifierMapping instantiates a new AlertIdentifierMapping object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAlertIdentifierMapping(fieldType string, id string, key string, name string) *AlertIdentifierMapping { - this := AlertIdentifierMapping{} - this.FieldType = fieldType - this.Id = id - this.Key = key - this.Name = name - return &this -} - -// NewAlertIdentifierMappingWithDefaults instantiates a new AlertIdentifierMapping object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAlertIdentifierMappingWithDefaults() *AlertIdentifierMapping { - this := AlertIdentifierMapping{} - return &this -} - -// GetFieldType returns the FieldType field value -func (o *AlertIdentifierMapping) GetFieldType() string { - if o == nil { - var ret string - return ret - } - - return o.FieldType -} - -// GetFieldTypeOk returns a tuple with the FieldType field value -// and a boolean to check if the value has been set. -func (o *AlertIdentifierMapping) GetFieldTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FieldType, true -} - -// SetFieldType sets field value -func (o *AlertIdentifierMapping) SetFieldType(v string) { - o.FieldType = v -} - -// GetId returns the Id field value -func (o *AlertIdentifierMapping) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *AlertIdentifierMapping) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *AlertIdentifierMapping) SetId(v string) { - o.Id = v -} - -// GetKey returns the Key field value -func (o *AlertIdentifierMapping) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *AlertIdentifierMapping) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *AlertIdentifierMapping) SetKey(v string) { - o.Key = v -} - -// GetName returns the Name field value -func (o *AlertIdentifierMapping) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *AlertIdentifierMapping) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *AlertIdentifierMapping) SetName(v string) { - o.Name = v -} - -func (o AlertIdentifierMapping) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AlertIdentifierMapping) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["fieldType"] = o.FieldType - toSerialize["id"] = o.Id - toSerialize["key"] = o.Key - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableAlertIdentifierMapping struct { - value *AlertIdentifierMapping - isSet bool -} - -func (v NullableAlertIdentifierMapping) Get() *AlertIdentifierMapping { - return v.value -} - -func (v *NullableAlertIdentifierMapping) Set(val *AlertIdentifierMapping) { - v.value = val - v.isSet = true -} - -func (v NullableAlertIdentifierMapping) IsSet() bool { - return v.isSet -} - -func (v *NullableAlertIdentifierMapping) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAlertIdentifierMapping(val *AlertIdentifierMapping) *NullableAlertIdentifierMapping { - return &NullableAlertIdentifierMapping{value: val, isSet: true} -} - -func (v NullableAlertIdentifierMapping) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAlertIdentifierMapping) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_case_comment_mapping.go b/generated/kibanaactions/model_case_comment_mapping.go index 0cccbf690..cfc12c7b3 100644 --- a/generated/kibanaactions/model_case_comment_mapping.go +++ b/generated/kibanaactions/model_case_comment_mapping.go @@ -1,23 +1,14 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CaseCommentMapping type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CaseCommentMapping{} - -// CaseCommentMapping Mapping for the case comments. +// Mapping for the case comments. type CaseCommentMapping struct { // The type of field in Swimlane. FieldType string `json:"fieldType"` @@ -28,173 +19,3 @@ type CaseCommentMapping struct { // The name of the field in Swimlane. Name string `json:"name"` } - -// NewCaseCommentMapping instantiates a new CaseCommentMapping object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCaseCommentMapping(fieldType string, id string, key string, name string) *CaseCommentMapping { - this := CaseCommentMapping{} - this.FieldType = fieldType - this.Id = id - this.Key = key - this.Name = name - return &this -} - -// NewCaseCommentMappingWithDefaults instantiates a new CaseCommentMapping object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCaseCommentMappingWithDefaults() *CaseCommentMapping { - this := CaseCommentMapping{} - return &this -} - -// GetFieldType returns the FieldType field value -func (o *CaseCommentMapping) GetFieldType() string { - if o == nil { - var ret string - return ret - } - - return o.FieldType -} - -// GetFieldTypeOk returns a tuple with the FieldType field value -// and a boolean to check if the value has been set. -func (o *CaseCommentMapping) GetFieldTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FieldType, true -} - -// SetFieldType sets field value -func (o *CaseCommentMapping) SetFieldType(v string) { - o.FieldType = v -} - -// GetId returns the Id field value -func (o *CaseCommentMapping) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *CaseCommentMapping) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *CaseCommentMapping) SetId(v string) { - o.Id = v -} - -// GetKey returns the Key field value -func (o *CaseCommentMapping) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *CaseCommentMapping) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *CaseCommentMapping) SetKey(v string) { - o.Key = v -} - -// GetName returns the Name field value -func (o *CaseCommentMapping) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CaseCommentMapping) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CaseCommentMapping) SetName(v string) { - o.Name = v -} - -func (o CaseCommentMapping) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CaseCommentMapping) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["fieldType"] = o.FieldType - toSerialize["id"] = o.Id - toSerialize["key"] = o.Key - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableCaseCommentMapping struct { - value *CaseCommentMapping - isSet bool -} - -func (v NullableCaseCommentMapping) Get() *CaseCommentMapping { - return v.value -} - -func (v *NullableCaseCommentMapping) Set(val *CaseCommentMapping) { - v.value = val - v.isSet = true -} - -func (v NullableCaseCommentMapping) IsSet() bool { - return v.isSet -} - -func (v *NullableCaseCommentMapping) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCaseCommentMapping(val *CaseCommentMapping) *NullableCaseCommentMapping { - return &NullableCaseCommentMapping{value: val, isSet: true} -} - -func (v NullableCaseCommentMapping) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCaseCommentMapping) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_case_description_mapping.go b/generated/kibanaactions/model_case_description_mapping.go index 67f9c3b3b..5df4986f1 100644 --- a/generated/kibanaactions/model_case_description_mapping.go +++ b/generated/kibanaactions/model_case_description_mapping.go @@ -1,23 +1,14 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CaseDescriptionMapping type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CaseDescriptionMapping{} - -// CaseDescriptionMapping Mapping for the case description. +// Mapping for the case description. type CaseDescriptionMapping struct { // The type of field in Swimlane. FieldType string `json:"fieldType"` @@ -28,173 +19,3 @@ type CaseDescriptionMapping struct { // The name of the field in Swimlane. Name string `json:"name"` } - -// NewCaseDescriptionMapping instantiates a new CaseDescriptionMapping object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCaseDescriptionMapping(fieldType string, id string, key string, name string) *CaseDescriptionMapping { - this := CaseDescriptionMapping{} - this.FieldType = fieldType - this.Id = id - this.Key = key - this.Name = name - return &this -} - -// NewCaseDescriptionMappingWithDefaults instantiates a new CaseDescriptionMapping object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCaseDescriptionMappingWithDefaults() *CaseDescriptionMapping { - this := CaseDescriptionMapping{} - return &this -} - -// GetFieldType returns the FieldType field value -func (o *CaseDescriptionMapping) GetFieldType() string { - if o == nil { - var ret string - return ret - } - - return o.FieldType -} - -// GetFieldTypeOk returns a tuple with the FieldType field value -// and a boolean to check if the value has been set. -func (o *CaseDescriptionMapping) GetFieldTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FieldType, true -} - -// SetFieldType sets field value -func (o *CaseDescriptionMapping) SetFieldType(v string) { - o.FieldType = v -} - -// GetId returns the Id field value -func (o *CaseDescriptionMapping) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *CaseDescriptionMapping) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *CaseDescriptionMapping) SetId(v string) { - o.Id = v -} - -// GetKey returns the Key field value -func (o *CaseDescriptionMapping) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *CaseDescriptionMapping) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *CaseDescriptionMapping) SetKey(v string) { - o.Key = v -} - -// GetName returns the Name field value -func (o *CaseDescriptionMapping) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CaseDescriptionMapping) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CaseDescriptionMapping) SetName(v string) { - o.Name = v -} - -func (o CaseDescriptionMapping) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CaseDescriptionMapping) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["fieldType"] = o.FieldType - toSerialize["id"] = o.Id - toSerialize["key"] = o.Key - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableCaseDescriptionMapping struct { - value *CaseDescriptionMapping - isSet bool -} - -func (v NullableCaseDescriptionMapping) Get() *CaseDescriptionMapping { - return v.value -} - -func (v *NullableCaseDescriptionMapping) Set(val *CaseDescriptionMapping) { - v.value = val - v.isSet = true -} - -func (v NullableCaseDescriptionMapping) IsSet() bool { - return v.isSet -} - -func (v *NullableCaseDescriptionMapping) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCaseDescriptionMapping(val *CaseDescriptionMapping) *NullableCaseDescriptionMapping { - return &NullableCaseDescriptionMapping{value: val, isSet: true} -} - -func (v NullableCaseDescriptionMapping) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCaseDescriptionMapping) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_case_identifier_mapping.go b/generated/kibanaactions/model_case_identifier_mapping.go index 82616eb7c..f8f745351 100644 --- a/generated/kibanaactions/model_case_identifier_mapping.go +++ b/generated/kibanaactions/model_case_identifier_mapping.go @@ -1,23 +1,14 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CaseIdentifierMapping type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CaseIdentifierMapping{} - -// CaseIdentifierMapping Mapping for the case ID. +// Mapping for the case ID. type CaseIdentifierMapping struct { // The type of field in Swimlane. FieldType string `json:"fieldType"` @@ -28,173 +19,3 @@ type CaseIdentifierMapping struct { // The name of the field in Swimlane. Name string `json:"name"` } - -// NewCaseIdentifierMapping instantiates a new CaseIdentifierMapping object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCaseIdentifierMapping(fieldType string, id string, key string, name string) *CaseIdentifierMapping { - this := CaseIdentifierMapping{} - this.FieldType = fieldType - this.Id = id - this.Key = key - this.Name = name - return &this -} - -// NewCaseIdentifierMappingWithDefaults instantiates a new CaseIdentifierMapping object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCaseIdentifierMappingWithDefaults() *CaseIdentifierMapping { - this := CaseIdentifierMapping{} - return &this -} - -// GetFieldType returns the FieldType field value -func (o *CaseIdentifierMapping) GetFieldType() string { - if o == nil { - var ret string - return ret - } - - return o.FieldType -} - -// GetFieldTypeOk returns a tuple with the FieldType field value -// and a boolean to check if the value has been set. -func (o *CaseIdentifierMapping) GetFieldTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FieldType, true -} - -// SetFieldType sets field value -func (o *CaseIdentifierMapping) SetFieldType(v string) { - o.FieldType = v -} - -// GetId returns the Id field value -func (o *CaseIdentifierMapping) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *CaseIdentifierMapping) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *CaseIdentifierMapping) SetId(v string) { - o.Id = v -} - -// GetKey returns the Key field value -func (o *CaseIdentifierMapping) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *CaseIdentifierMapping) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *CaseIdentifierMapping) SetKey(v string) { - o.Key = v -} - -// GetName returns the Name field value -func (o *CaseIdentifierMapping) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CaseIdentifierMapping) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CaseIdentifierMapping) SetName(v string) { - o.Name = v -} - -func (o CaseIdentifierMapping) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CaseIdentifierMapping) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["fieldType"] = o.FieldType - toSerialize["id"] = o.Id - toSerialize["key"] = o.Key - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableCaseIdentifierMapping struct { - value *CaseIdentifierMapping - isSet bool -} - -func (v NullableCaseIdentifierMapping) Get() *CaseIdentifierMapping { - return v.value -} - -func (v *NullableCaseIdentifierMapping) Set(val *CaseIdentifierMapping) { - v.value = val - v.isSet = true -} - -func (v NullableCaseIdentifierMapping) IsSet() bool { - return v.isSet -} - -func (v *NullableCaseIdentifierMapping) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCaseIdentifierMapping(val *CaseIdentifierMapping) *NullableCaseIdentifierMapping { - return &NullableCaseIdentifierMapping{value: val, isSet: true} -} - -func (v NullableCaseIdentifierMapping) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCaseIdentifierMapping) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_case_name_mapping.go b/generated/kibanaactions/model_case_name_mapping.go index 27ccc4cc4..23f3ed840 100644 --- a/generated/kibanaactions/model_case_name_mapping.go +++ b/generated/kibanaactions/model_case_name_mapping.go @@ -1,23 +1,14 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CaseNameMapping type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CaseNameMapping{} - -// CaseNameMapping Mapping for the case name. +// Mapping for the case name. type CaseNameMapping struct { // The type of field in Swimlane. FieldType string `json:"fieldType"` @@ -28,173 +19,3 @@ type CaseNameMapping struct { // The name of the field in Swimlane. Name string `json:"name"` } - -// NewCaseNameMapping instantiates a new CaseNameMapping object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCaseNameMapping(fieldType string, id string, key string, name string) *CaseNameMapping { - this := CaseNameMapping{} - this.FieldType = fieldType - this.Id = id - this.Key = key - this.Name = name - return &this -} - -// NewCaseNameMappingWithDefaults instantiates a new CaseNameMapping object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCaseNameMappingWithDefaults() *CaseNameMapping { - this := CaseNameMapping{} - return &this -} - -// GetFieldType returns the FieldType field value -func (o *CaseNameMapping) GetFieldType() string { - if o == nil { - var ret string - return ret - } - - return o.FieldType -} - -// GetFieldTypeOk returns a tuple with the FieldType field value -// and a boolean to check if the value has been set. -func (o *CaseNameMapping) GetFieldTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FieldType, true -} - -// SetFieldType sets field value -func (o *CaseNameMapping) SetFieldType(v string) { - o.FieldType = v -} - -// GetId returns the Id field value -func (o *CaseNameMapping) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *CaseNameMapping) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *CaseNameMapping) SetId(v string) { - o.Id = v -} - -// GetKey returns the Key field value -func (o *CaseNameMapping) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *CaseNameMapping) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *CaseNameMapping) SetKey(v string) { - o.Key = v -} - -// GetName returns the Name field value -func (o *CaseNameMapping) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CaseNameMapping) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CaseNameMapping) SetName(v string) { - o.Name = v -} - -func (o CaseNameMapping) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CaseNameMapping) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["fieldType"] = o.FieldType - toSerialize["id"] = o.Id - toSerialize["key"] = o.Key - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableCaseNameMapping struct { - value *CaseNameMapping - isSet bool -} - -func (v NullableCaseNameMapping) Get() *CaseNameMapping { - return v.value -} - -func (v *NullableCaseNameMapping) Set(val *CaseNameMapping) { - v.value = val - v.isSet = true -} - -func (v NullableCaseNameMapping) IsSet() bool { - return v.isSet -} - -func (v *NullableCaseNameMapping) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCaseNameMapping(val *CaseNameMapping) *NullableCaseNameMapping { - return &NullableCaseNameMapping{value: val, isSet: true} -} - -func (v NullableCaseNameMapping) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCaseNameMapping) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_config_properties_cases_webhook.go b/generated/kibanaactions/model_config_properties_cases_webhook.go index b11fdae41..92c2b0e13 100644 --- a/generated/kibanaactions/model_config_properties_cases_webhook.go +++ b/generated/kibanaactions/model_config_properties_cases_webhook.go @@ -1,34 +1,25 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConfigPropertiesCasesWebhook type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConfigPropertiesCasesWebhook{} - -// ConfigPropertiesCasesWebhook Defines properties for connectors when type is `.cases-webhook`. +// Defines properties for connectors when type is `.cases-webhook`. type ConfigPropertiesCasesWebhook struct { // A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. - CreateCommentJson *string `json:"createCommentJson,omitempty"` + CreateCommentJson string `json:"createCommentJson,omitempty"` // The REST API HTTP request method to create a case comment in the third-party system. Valid values are `patch`, `post`, and `put`. - CreateCommentMethod *string `json:"createCommentMethod,omitempty"` + CreateCommentMethod string `json:"createCommentMethod,omitempty"` // The REST API URL to create a case comment by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts setting`, add the hostname to the allowed hosts. - CreateCommentUrl *string `json:"createCommentUrl,omitempty"` + CreateCommentUrl string `json:"createCommentUrl,omitempty"` // A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. CreateIncidentJson string `json:"createIncidentJson"` // The REST API HTTP request method to create a case in the third-party system. Valid values are `patch`, `post`, and `put`. - CreateIncidentMethod *string `json:"createIncidentMethod,omitempty"` + CreateIncidentMethod string `json:"createIncidentMethod,omitempty"` // The JSON key in the create case response that contains the external case ID. CreateIncidentResponseKey string `json:"createIncidentResponseKey"` // The REST API URL to create a case in the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. @@ -38,550 +29,15 @@ type ConfigPropertiesCasesWebhook struct { // The REST API URL to get the case by ID from the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. You can use a variable to add the external system ID to the URL. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. GetIncidentUrl string `json:"getIncidentUrl"` // If true, a username and password for login type authentication must be provided. - HasAuth *bool `json:"hasAuth,omitempty"` + HasAuth bool `json:"hasAuth,omitempty"` // A set of key-value pairs sent as headers with the request URLs for the create case, update case, get case, and create comment methods. - Headers *string `json:"headers,omitempty"` + Headers string `json:"headers,omitempty"` // The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. UpdateIncidentJson string `json:"updateIncidentJson"` // The REST API HTTP request method to update the case in the third-party system. Valid values are `patch`, `post`, and `put`. - UpdateIncidentMethod *string `json:"updateIncidentMethod,omitempty"` + UpdateIncidentMethod string `json:"updateIncidentMethod,omitempty"` // The REST API URL to update the case by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. UpdateIncidentUrl string `json:"updateIncidentUrl"` // The URL to view the case in the external system. You can use variables to add the external system ID or external system title to the URL. ViewIncidentUrl string `json:"viewIncidentUrl"` } - -// NewConfigPropertiesCasesWebhook instantiates a new ConfigPropertiesCasesWebhook object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConfigPropertiesCasesWebhook(createIncidentJson string, createIncidentResponseKey string, createIncidentUrl string, getIncidentResponseExternalTitleKey string, getIncidentUrl string, updateIncidentJson string, updateIncidentUrl string, viewIncidentUrl string) *ConfigPropertiesCasesWebhook { - this := ConfigPropertiesCasesWebhook{} - var createCommentMethod string = "put" - this.CreateCommentMethod = &createCommentMethod - this.CreateIncidentJson = createIncidentJson - var createIncidentMethod string = "post" - this.CreateIncidentMethod = &createIncidentMethod - this.CreateIncidentResponseKey = createIncidentResponseKey - this.CreateIncidentUrl = createIncidentUrl - this.GetIncidentResponseExternalTitleKey = getIncidentResponseExternalTitleKey - this.GetIncidentUrl = getIncidentUrl - var hasAuth bool = true - this.HasAuth = &hasAuth - this.UpdateIncidentJson = updateIncidentJson - var updateIncidentMethod string = "put" - this.UpdateIncidentMethod = &updateIncidentMethod - this.UpdateIncidentUrl = updateIncidentUrl - this.ViewIncidentUrl = viewIncidentUrl - return &this -} - -// NewConfigPropertiesCasesWebhookWithDefaults instantiates a new ConfigPropertiesCasesWebhook object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConfigPropertiesCasesWebhookWithDefaults() *ConfigPropertiesCasesWebhook { - this := ConfigPropertiesCasesWebhook{} - var createCommentMethod string = "put" - this.CreateCommentMethod = &createCommentMethod - var createIncidentMethod string = "post" - this.CreateIncidentMethod = &createIncidentMethod - var hasAuth bool = true - this.HasAuth = &hasAuth - var updateIncidentMethod string = "put" - this.UpdateIncidentMethod = &updateIncidentMethod - return &this -} - -// GetCreateCommentJson returns the CreateCommentJson field value if set, zero value otherwise. -func (o *ConfigPropertiesCasesWebhook) GetCreateCommentJson() string { - if o == nil || IsNil(o.CreateCommentJson) { - var ret string - return ret - } - return *o.CreateCommentJson -} - -// GetCreateCommentJsonOk returns a tuple with the CreateCommentJson field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesCasesWebhook) GetCreateCommentJsonOk() (*string, bool) { - if o == nil || IsNil(o.CreateCommentJson) { - return nil, false - } - return o.CreateCommentJson, true -} - -// HasCreateCommentJson returns a boolean if a field has been set. -func (o *ConfigPropertiesCasesWebhook) HasCreateCommentJson() bool { - if o != nil && !IsNil(o.CreateCommentJson) { - return true - } - - return false -} - -// SetCreateCommentJson gets a reference to the given string and assigns it to the CreateCommentJson field. -func (o *ConfigPropertiesCasesWebhook) SetCreateCommentJson(v string) { - o.CreateCommentJson = &v -} - -// GetCreateCommentMethod returns the CreateCommentMethod field value if set, zero value otherwise. -func (o *ConfigPropertiesCasesWebhook) GetCreateCommentMethod() string { - if o == nil || IsNil(o.CreateCommentMethod) { - var ret string - return ret - } - return *o.CreateCommentMethod -} - -// GetCreateCommentMethodOk returns a tuple with the CreateCommentMethod field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesCasesWebhook) GetCreateCommentMethodOk() (*string, bool) { - if o == nil || IsNil(o.CreateCommentMethod) { - return nil, false - } - return o.CreateCommentMethod, true -} - -// HasCreateCommentMethod returns a boolean if a field has been set. -func (o *ConfigPropertiesCasesWebhook) HasCreateCommentMethod() bool { - if o != nil && !IsNil(o.CreateCommentMethod) { - return true - } - - return false -} - -// SetCreateCommentMethod gets a reference to the given string and assigns it to the CreateCommentMethod field. -func (o *ConfigPropertiesCasesWebhook) SetCreateCommentMethod(v string) { - o.CreateCommentMethod = &v -} - -// GetCreateCommentUrl returns the CreateCommentUrl field value if set, zero value otherwise. -func (o *ConfigPropertiesCasesWebhook) GetCreateCommentUrl() string { - if o == nil || IsNil(o.CreateCommentUrl) { - var ret string - return ret - } - return *o.CreateCommentUrl -} - -// GetCreateCommentUrlOk returns a tuple with the CreateCommentUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesCasesWebhook) GetCreateCommentUrlOk() (*string, bool) { - if o == nil || IsNil(o.CreateCommentUrl) { - return nil, false - } - return o.CreateCommentUrl, true -} - -// HasCreateCommentUrl returns a boolean if a field has been set. -func (o *ConfigPropertiesCasesWebhook) HasCreateCommentUrl() bool { - if o != nil && !IsNil(o.CreateCommentUrl) { - return true - } - - return false -} - -// SetCreateCommentUrl gets a reference to the given string and assigns it to the CreateCommentUrl field. -func (o *ConfigPropertiesCasesWebhook) SetCreateCommentUrl(v string) { - o.CreateCommentUrl = &v -} - -// GetCreateIncidentJson returns the CreateIncidentJson field value -func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentJson() string { - if o == nil { - var ret string - return ret - } - - return o.CreateIncidentJson -} - -// GetCreateIncidentJsonOk returns a tuple with the CreateIncidentJson field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentJsonOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CreateIncidentJson, true -} - -// SetCreateIncidentJson sets field value -func (o *ConfigPropertiesCasesWebhook) SetCreateIncidentJson(v string) { - o.CreateIncidentJson = v -} - -// GetCreateIncidentMethod returns the CreateIncidentMethod field value if set, zero value otherwise. -func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentMethod() string { - if o == nil || IsNil(o.CreateIncidentMethod) { - var ret string - return ret - } - return *o.CreateIncidentMethod -} - -// GetCreateIncidentMethodOk returns a tuple with the CreateIncidentMethod field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentMethodOk() (*string, bool) { - if o == nil || IsNil(o.CreateIncidentMethod) { - return nil, false - } - return o.CreateIncidentMethod, true -} - -// HasCreateIncidentMethod returns a boolean if a field has been set. -func (o *ConfigPropertiesCasesWebhook) HasCreateIncidentMethod() bool { - if o != nil && !IsNil(o.CreateIncidentMethod) { - return true - } - - return false -} - -// SetCreateIncidentMethod gets a reference to the given string and assigns it to the CreateIncidentMethod field. -func (o *ConfigPropertiesCasesWebhook) SetCreateIncidentMethod(v string) { - o.CreateIncidentMethod = &v -} - -// GetCreateIncidentResponseKey returns the CreateIncidentResponseKey field value -func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentResponseKey() string { - if o == nil { - var ret string - return ret - } - - return o.CreateIncidentResponseKey -} - -// GetCreateIncidentResponseKeyOk returns a tuple with the CreateIncidentResponseKey field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentResponseKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CreateIncidentResponseKey, true -} - -// SetCreateIncidentResponseKey sets field value -func (o *ConfigPropertiesCasesWebhook) SetCreateIncidentResponseKey(v string) { - o.CreateIncidentResponseKey = v -} - -// GetCreateIncidentUrl returns the CreateIncidentUrl field value -func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentUrl() string { - if o == nil { - var ret string - return ret - } - - return o.CreateIncidentUrl -} - -// GetCreateIncidentUrlOk returns a tuple with the CreateIncidentUrl field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesCasesWebhook) GetCreateIncidentUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CreateIncidentUrl, true -} - -// SetCreateIncidentUrl sets field value -func (o *ConfigPropertiesCasesWebhook) SetCreateIncidentUrl(v string) { - o.CreateIncidentUrl = v -} - -// GetGetIncidentResponseExternalTitleKey returns the GetIncidentResponseExternalTitleKey field value -func (o *ConfigPropertiesCasesWebhook) GetGetIncidentResponseExternalTitleKey() string { - if o == nil { - var ret string - return ret - } - - return o.GetIncidentResponseExternalTitleKey -} - -// GetGetIncidentResponseExternalTitleKeyOk returns a tuple with the GetIncidentResponseExternalTitleKey field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesCasesWebhook) GetGetIncidentResponseExternalTitleKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.GetIncidentResponseExternalTitleKey, true -} - -// SetGetIncidentResponseExternalTitleKey sets field value -func (o *ConfigPropertiesCasesWebhook) SetGetIncidentResponseExternalTitleKey(v string) { - o.GetIncidentResponseExternalTitleKey = v -} - -// GetGetIncidentUrl returns the GetIncidentUrl field value -func (o *ConfigPropertiesCasesWebhook) GetGetIncidentUrl() string { - if o == nil { - var ret string - return ret - } - - return o.GetIncidentUrl -} - -// GetGetIncidentUrlOk returns a tuple with the GetIncidentUrl field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesCasesWebhook) GetGetIncidentUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.GetIncidentUrl, true -} - -// SetGetIncidentUrl sets field value -func (o *ConfigPropertiesCasesWebhook) SetGetIncidentUrl(v string) { - o.GetIncidentUrl = v -} - -// GetHasAuth returns the HasAuth field value if set, zero value otherwise. -func (o *ConfigPropertiesCasesWebhook) GetHasAuth() bool { - if o == nil || IsNil(o.HasAuth) { - var ret bool - return ret - } - return *o.HasAuth -} - -// GetHasAuthOk returns a tuple with the HasAuth field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesCasesWebhook) GetHasAuthOk() (*bool, bool) { - if o == nil || IsNil(o.HasAuth) { - return nil, false - } - return o.HasAuth, true -} - -// HasHasAuth returns a boolean if a field has been set. -func (o *ConfigPropertiesCasesWebhook) HasHasAuth() bool { - if o != nil && !IsNil(o.HasAuth) { - return true - } - - return false -} - -// SetHasAuth gets a reference to the given bool and assigns it to the HasAuth field. -func (o *ConfigPropertiesCasesWebhook) SetHasAuth(v bool) { - o.HasAuth = &v -} - -// GetHeaders returns the Headers field value if set, zero value otherwise. -func (o *ConfigPropertiesCasesWebhook) GetHeaders() string { - if o == nil || IsNil(o.Headers) { - var ret string - return ret - } - return *o.Headers -} - -// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesCasesWebhook) GetHeadersOk() (*string, bool) { - if o == nil || IsNil(o.Headers) { - return nil, false - } - return o.Headers, true -} - -// HasHeaders returns a boolean if a field has been set. -func (o *ConfigPropertiesCasesWebhook) HasHeaders() bool { - if o != nil && !IsNil(o.Headers) { - return true - } - - return false -} - -// SetHeaders gets a reference to the given string and assigns it to the Headers field. -func (o *ConfigPropertiesCasesWebhook) SetHeaders(v string) { - o.Headers = &v -} - -// GetUpdateIncidentJson returns the UpdateIncidentJson field value -func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentJson() string { - if o == nil { - var ret string - return ret - } - - return o.UpdateIncidentJson -} - -// GetUpdateIncidentJsonOk returns a tuple with the UpdateIncidentJson field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentJsonOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.UpdateIncidentJson, true -} - -// SetUpdateIncidentJson sets field value -func (o *ConfigPropertiesCasesWebhook) SetUpdateIncidentJson(v string) { - o.UpdateIncidentJson = v -} - -// GetUpdateIncidentMethod returns the UpdateIncidentMethod field value if set, zero value otherwise. -func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentMethod() string { - if o == nil || IsNil(o.UpdateIncidentMethod) { - var ret string - return ret - } - return *o.UpdateIncidentMethod -} - -// GetUpdateIncidentMethodOk returns a tuple with the UpdateIncidentMethod field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentMethodOk() (*string, bool) { - if o == nil || IsNil(o.UpdateIncidentMethod) { - return nil, false - } - return o.UpdateIncidentMethod, true -} - -// HasUpdateIncidentMethod returns a boolean if a field has been set. -func (o *ConfigPropertiesCasesWebhook) HasUpdateIncidentMethod() bool { - if o != nil && !IsNil(o.UpdateIncidentMethod) { - return true - } - - return false -} - -// SetUpdateIncidentMethod gets a reference to the given string and assigns it to the UpdateIncidentMethod field. -func (o *ConfigPropertiesCasesWebhook) SetUpdateIncidentMethod(v string) { - o.UpdateIncidentMethod = &v -} - -// GetUpdateIncidentUrl returns the UpdateIncidentUrl field value -func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentUrl() string { - if o == nil { - var ret string - return ret - } - - return o.UpdateIncidentUrl -} - -// GetUpdateIncidentUrlOk returns a tuple with the UpdateIncidentUrl field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesCasesWebhook) GetUpdateIncidentUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.UpdateIncidentUrl, true -} - -// SetUpdateIncidentUrl sets field value -func (o *ConfigPropertiesCasesWebhook) SetUpdateIncidentUrl(v string) { - o.UpdateIncidentUrl = v -} - -// GetViewIncidentUrl returns the ViewIncidentUrl field value -func (o *ConfigPropertiesCasesWebhook) GetViewIncidentUrl() string { - if o == nil { - var ret string - return ret - } - - return o.ViewIncidentUrl -} - -// GetViewIncidentUrlOk returns a tuple with the ViewIncidentUrl field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesCasesWebhook) GetViewIncidentUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ViewIncidentUrl, true -} - -// SetViewIncidentUrl sets field value -func (o *ConfigPropertiesCasesWebhook) SetViewIncidentUrl(v string) { - o.ViewIncidentUrl = v -} - -func (o ConfigPropertiesCasesWebhook) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConfigPropertiesCasesWebhook) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CreateCommentJson) { - toSerialize["createCommentJson"] = o.CreateCommentJson - } - if !IsNil(o.CreateCommentMethod) { - toSerialize["createCommentMethod"] = o.CreateCommentMethod - } - if !IsNil(o.CreateCommentUrl) { - toSerialize["createCommentUrl"] = o.CreateCommentUrl - } - toSerialize["createIncidentJson"] = o.CreateIncidentJson - if !IsNil(o.CreateIncidentMethod) { - toSerialize["createIncidentMethod"] = o.CreateIncidentMethod - } - toSerialize["createIncidentResponseKey"] = o.CreateIncidentResponseKey - toSerialize["createIncidentUrl"] = o.CreateIncidentUrl - toSerialize["getIncidentResponseExternalTitleKey"] = o.GetIncidentResponseExternalTitleKey - toSerialize["getIncidentUrl"] = o.GetIncidentUrl - if !IsNil(o.HasAuth) { - toSerialize["hasAuth"] = o.HasAuth - } - if !IsNil(o.Headers) { - toSerialize["headers"] = o.Headers - } - toSerialize["updateIncidentJson"] = o.UpdateIncidentJson - if !IsNil(o.UpdateIncidentMethod) { - toSerialize["updateIncidentMethod"] = o.UpdateIncidentMethod - } - toSerialize["updateIncidentUrl"] = o.UpdateIncidentUrl - toSerialize["viewIncidentUrl"] = o.ViewIncidentUrl - return toSerialize, nil -} - -type NullableConfigPropertiesCasesWebhook struct { - value *ConfigPropertiesCasesWebhook - isSet bool -} - -func (v NullableConfigPropertiesCasesWebhook) Get() *ConfigPropertiesCasesWebhook { - return v.value -} - -func (v *NullableConfigPropertiesCasesWebhook) Set(val *ConfigPropertiesCasesWebhook) { - v.value = val - v.isSet = true -} - -func (v NullableConfigPropertiesCasesWebhook) IsSet() bool { - return v.isSet -} - -func (v *NullableConfigPropertiesCasesWebhook) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConfigPropertiesCasesWebhook(val *ConfigPropertiesCasesWebhook) *NullableConfigPropertiesCasesWebhook { - return &NullableConfigPropertiesCasesWebhook{value: val, isSet: true} -} - -func (v NullableConfigPropertiesCasesWebhook) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConfigPropertiesCasesWebhook) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_config_properties_index.go b/generated/kibanaactions/model_config_properties_index.go index 8cbaf5e87..e7ccfffee 100644 --- a/generated/kibanaactions/model_config_properties_index.go +++ b/generated/kibanaactions/model_config_properties_index.go @@ -1,205 +1,19 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConfigPropertiesIndex type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConfigPropertiesIndex{} - -// ConfigPropertiesIndex Defines properties for connectors when type is `.index`. +// Defines properties for connectors when type is `.index`. type ConfigPropertiesIndex struct { // Specifies a field that will contain the time the alert condition was detected. - ExecutionTimeField NullableString `json:"executionTimeField,omitempty"` + ExecutionTimeField string `json:"executionTimeField,omitempty"` // The Elasticsearch index to be written to. Index string `json:"index"` // The refresh policy for the write request, which affects when changes are made visible to search. Refer to the refresh setting for Elasticsearch document APIs. - Refresh *bool `json:"refresh,omitempty"` -} - -// NewConfigPropertiesIndex instantiates a new ConfigPropertiesIndex object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConfigPropertiesIndex(index string) *ConfigPropertiesIndex { - this := ConfigPropertiesIndex{} - this.Index = index - var refresh bool = false - this.Refresh = &refresh - return &this -} - -// NewConfigPropertiesIndexWithDefaults instantiates a new ConfigPropertiesIndex object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConfigPropertiesIndexWithDefaults() *ConfigPropertiesIndex { - this := ConfigPropertiesIndex{} - var refresh bool = false - this.Refresh = &refresh - return &this -} - -// GetExecutionTimeField returns the ExecutionTimeField field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ConfigPropertiesIndex) GetExecutionTimeField() string { - if o == nil || IsNil(o.ExecutionTimeField.Get()) { - var ret string - return ret - } - return *o.ExecutionTimeField.Get() -} - -// GetExecutionTimeFieldOk returns a tuple with the ExecutionTimeField field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ConfigPropertiesIndex) GetExecutionTimeFieldOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ExecutionTimeField.Get(), o.ExecutionTimeField.IsSet() -} - -// HasExecutionTimeField returns a boolean if a field has been set. -func (o *ConfigPropertiesIndex) HasExecutionTimeField() bool { - if o != nil && o.ExecutionTimeField.IsSet() { - return true - } - - return false -} - -// SetExecutionTimeField gets a reference to the given NullableString and assigns it to the ExecutionTimeField field. -func (o *ConfigPropertiesIndex) SetExecutionTimeField(v string) { - o.ExecutionTimeField.Set(&v) -} - -// SetExecutionTimeFieldNil sets the value for ExecutionTimeField to be an explicit nil -func (o *ConfigPropertiesIndex) SetExecutionTimeFieldNil() { - o.ExecutionTimeField.Set(nil) -} - -// UnsetExecutionTimeField ensures that no value is present for ExecutionTimeField, not even an explicit nil -func (o *ConfigPropertiesIndex) UnsetExecutionTimeField() { - o.ExecutionTimeField.Unset() -} - -// GetIndex returns the Index field value -func (o *ConfigPropertiesIndex) GetIndex() string { - if o == nil { - var ret string - return ret - } - - return o.Index -} - -// GetIndexOk returns a tuple with the Index field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesIndex) GetIndexOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Index, true -} - -// SetIndex sets field value -func (o *ConfigPropertiesIndex) SetIndex(v string) { - o.Index = v -} - -// GetRefresh returns the Refresh field value if set, zero value otherwise. -func (o *ConfigPropertiesIndex) GetRefresh() bool { - if o == nil || IsNil(o.Refresh) { - var ret bool - return ret - } - return *o.Refresh -} - -// GetRefreshOk returns a tuple with the Refresh field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesIndex) GetRefreshOk() (*bool, bool) { - if o == nil || IsNil(o.Refresh) { - return nil, false - } - return o.Refresh, true -} - -// HasRefresh returns a boolean if a field has been set. -func (o *ConfigPropertiesIndex) HasRefresh() bool { - if o != nil && !IsNil(o.Refresh) { - return true - } - - return false -} - -// SetRefresh gets a reference to the given bool and assigns it to the Refresh field. -func (o *ConfigPropertiesIndex) SetRefresh(v bool) { - o.Refresh = &v -} - -func (o ConfigPropertiesIndex) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConfigPropertiesIndex) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.ExecutionTimeField.IsSet() { - toSerialize["executionTimeField"] = o.ExecutionTimeField.Get() - } - toSerialize["index"] = o.Index - if !IsNil(o.Refresh) { - toSerialize["refresh"] = o.Refresh - } - return toSerialize, nil -} - -type NullableConfigPropertiesIndex struct { - value *ConfigPropertiesIndex - isSet bool -} - -func (v NullableConfigPropertiesIndex) Get() *ConfigPropertiesIndex { - return v.value -} - -func (v *NullableConfigPropertiesIndex) Set(val *ConfigPropertiesIndex) { - v.value = val - v.isSet = true -} - -func (v NullableConfigPropertiesIndex) IsSet() bool { - return v.isSet -} - -func (v *NullableConfigPropertiesIndex) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConfigPropertiesIndex(val *ConfigPropertiesIndex) *NullableConfigPropertiesIndex { - return &NullableConfigPropertiesIndex{value: val, isSet: true} -} - -func (v NullableConfigPropertiesIndex) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConfigPropertiesIndex) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Refresh bool `json:"refresh,omitempty"` } diff --git a/generated/kibanaactions/model_config_properties_jira.go b/generated/kibanaactions/model_config_properties_jira.go index 5924396ac..097a16ed8 100644 --- a/generated/kibanaactions/model_config_properties_jira.go +++ b/generated/kibanaactions/model_config_properties_jira.go @@ -1,144 +1,17 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConfigPropertiesJira type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConfigPropertiesJira{} - -// ConfigPropertiesJira Defines properties for connectors when type is `.jira`. +// Defines properties for connectors when type is `.jira`. type ConfigPropertiesJira struct { // The Jira instance URL. ApiUrl string `json:"apiUrl"` // The Jira project key. ProjectKey string `json:"projectKey"` } - -// NewConfigPropertiesJira instantiates a new ConfigPropertiesJira object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConfigPropertiesJira(apiUrl string, projectKey string) *ConfigPropertiesJira { - this := ConfigPropertiesJira{} - this.ApiUrl = apiUrl - this.ProjectKey = projectKey - return &this -} - -// NewConfigPropertiesJiraWithDefaults instantiates a new ConfigPropertiesJira object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConfigPropertiesJiraWithDefaults() *ConfigPropertiesJira { - this := ConfigPropertiesJira{} - return &this -} - -// GetApiUrl returns the ApiUrl field value -func (o *ConfigPropertiesJira) GetApiUrl() string { - if o == nil { - var ret string - return ret - } - - return o.ApiUrl -} - -// GetApiUrlOk returns a tuple with the ApiUrl field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesJira) GetApiUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ApiUrl, true -} - -// SetApiUrl sets field value -func (o *ConfigPropertiesJira) SetApiUrl(v string) { - o.ApiUrl = v -} - -// GetProjectKey returns the ProjectKey field value -func (o *ConfigPropertiesJira) GetProjectKey() string { - if o == nil { - var ret string - return ret - } - - return o.ProjectKey -} - -// GetProjectKeyOk returns a tuple with the ProjectKey field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesJira) GetProjectKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ProjectKey, true -} - -// SetProjectKey sets field value -func (o *ConfigPropertiesJira) SetProjectKey(v string) { - o.ProjectKey = v -} - -func (o ConfigPropertiesJira) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConfigPropertiesJira) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["apiUrl"] = o.ApiUrl - toSerialize["projectKey"] = o.ProjectKey - return toSerialize, nil -} - -type NullableConfigPropertiesJira struct { - value *ConfigPropertiesJira - isSet bool -} - -func (v NullableConfigPropertiesJira) Get() *ConfigPropertiesJira { - return v.value -} - -func (v *NullableConfigPropertiesJira) Set(val *ConfigPropertiesJira) { - v.value = val - v.isSet = true -} - -func (v NullableConfigPropertiesJira) IsSet() bool { - return v.isSet -} - -func (v *NullableConfigPropertiesJira) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConfigPropertiesJira(val *ConfigPropertiesJira) *NullableConfigPropertiesJira { - return &NullableConfigPropertiesJira{value: val, isSet: true} -} - -func (v NullableConfigPropertiesJira) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConfigPropertiesJira) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_config_properties_opsgenie.go b/generated/kibanaactions/model_config_properties_opsgenie.go index 37bfde227..dce830650 100644 --- a/generated/kibanaactions/model_config_properties_opsgenie.go +++ b/generated/kibanaactions/model_config_properties_opsgenie.go @@ -1,116 +1,15 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConfigPropertiesOpsgenie type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConfigPropertiesOpsgenie{} - -// ConfigPropertiesOpsgenie Defines properties for connectors when type is `.opsgenie`. +// Defines properties for connectors when type is `.opsgenie`. type ConfigPropertiesOpsgenie struct { // The Opsgenie URL. For example, `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. ApiUrl string `json:"apiUrl"` } - -// NewConfigPropertiesOpsgenie instantiates a new ConfigPropertiesOpsgenie object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConfigPropertiesOpsgenie(apiUrl string) *ConfigPropertiesOpsgenie { - this := ConfigPropertiesOpsgenie{} - this.ApiUrl = apiUrl - return &this -} - -// NewConfigPropertiesOpsgenieWithDefaults instantiates a new ConfigPropertiesOpsgenie object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConfigPropertiesOpsgenieWithDefaults() *ConfigPropertiesOpsgenie { - this := ConfigPropertiesOpsgenie{} - return &this -} - -// GetApiUrl returns the ApiUrl field value -func (o *ConfigPropertiesOpsgenie) GetApiUrl() string { - if o == nil { - var ret string - return ret - } - - return o.ApiUrl -} - -// GetApiUrlOk returns a tuple with the ApiUrl field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesOpsgenie) GetApiUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ApiUrl, true -} - -// SetApiUrl sets field value -func (o *ConfigPropertiesOpsgenie) SetApiUrl(v string) { - o.ApiUrl = v -} - -func (o ConfigPropertiesOpsgenie) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConfigPropertiesOpsgenie) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["apiUrl"] = o.ApiUrl - return toSerialize, nil -} - -type NullableConfigPropertiesOpsgenie struct { - value *ConfigPropertiesOpsgenie - isSet bool -} - -func (v NullableConfigPropertiesOpsgenie) Get() *ConfigPropertiesOpsgenie { - return v.value -} - -func (v *NullableConfigPropertiesOpsgenie) Set(val *ConfigPropertiesOpsgenie) { - v.value = val - v.isSet = true -} - -func (v NullableConfigPropertiesOpsgenie) IsSet() bool { - return v.isSet -} - -func (v *NullableConfigPropertiesOpsgenie) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConfigPropertiesOpsgenie(val *ConfigPropertiesOpsgenie) *NullableConfigPropertiesOpsgenie { - return &NullableConfigPropertiesOpsgenie{value: val, isSet: true} -} - -func (v NullableConfigPropertiesOpsgenie) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConfigPropertiesOpsgenie) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_config_properties_resilient.go b/generated/kibanaactions/model_config_properties_resilient.go index 963cb6472..a71373a2d 100644 --- a/generated/kibanaactions/model_config_properties_resilient.go +++ b/generated/kibanaactions/model_config_properties_resilient.go @@ -1,144 +1,17 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConfigPropertiesResilient type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConfigPropertiesResilient{} - -// ConfigPropertiesResilient Defines properties for connectors when type is `.resilient`. +// Defines properties for connectors when type is `.resilient`. type ConfigPropertiesResilient struct { // The IBM Resilient instance URL. ApiUrl string `json:"apiUrl"` // The IBM Resilient organization ID. OrgId string `json:"orgId"` } - -// NewConfigPropertiesResilient instantiates a new ConfigPropertiesResilient object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConfigPropertiesResilient(apiUrl string, orgId string) *ConfigPropertiesResilient { - this := ConfigPropertiesResilient{} - this.ApiUrl = apiUrl - this.OrgId = orgId - return &this -} - -// NewConfigPropertiesResilientWithDefaults instantiates a new ConfigPropertiesResilient object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConfigPropertiesResilientWithDefaults() *ConfigPropertiesResilient { - this := ConfigPropertiesResilient{} - return &this -} - -// GetApiUrl returns the ApiUrl field value -func (o *ConfigPropertiesResilient) GetApiUrl() string { - if o == nil { - var ret string - return ret - } - - return o.ApiUrl -} - -// GetApiUrlOk returns a tuple with the ApiUrl field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesResilient) GetApiUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ApiUrl, true -} - -// SetApiUrl sets field value -func (o *ConfigPropertiesResilient) SetApiUrl(v string) { - o.ApiUrl = v -} - -// GetOrgId returns the OrgId field value -func (o *ConfigPropertiesResilient) GetOrgId() string { - if o == nil { - var ret string - return ret - } - - return o.OrgId -} - -// GetOrgIdOk returns a tuple with the OrgId field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesResilient) GetOrgIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OrgId, true -} - -// SetOrgId sets field value -func (o *ConfigPropertiesResilient) SetOrgId(v string) { - o.OrgId = v -} - -func (o ConfigPropertiesResilient) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConfigPropertiesResilient) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["apiUrl"] = o.ApiUrl - toSerialize["orgId"] = o.OrgId - return toSerialize, nil -} - -type NullableConfigPropertiesResilient struct { - value *ConfigPropertiesResilient - isSet bool -} - -func (v NullableConfigPropertiesResilient) Get() *ConfigPropertiesResilient { - return v.value -} - -func (v *NullableConfigPropertiesResilient) Set(val *ConfigPropertiesResilient) { - v.value = val - v.isSet = true -} - -func (v NullableConfigPropertiesResilient) IsSet() bool { - return v.isSet -} - -func (v *NullableConfigPropertiesResilient) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConfigPropertiesResilient(val *ConfigPropertiesResilient) *NullableConfigPropertiesResilient { - return &NullableConfigPropertiesResilient{value: val, isSet: true} -} - -func (v NullableConfigPropertiesResilient) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConfigPropertiesResilient) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_config_properties_servicenow.go b/generated/kibanaactions/model_config_properties_servicenow.go index 75be2f2e3..ca6224883 100644 --- a/generated/kibanaactions/model_config_properties_servicenow.go +++ b/generated/kibanaactions/model_config_properties_servicenow.go @@ -1,309 +1,25 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConfigPropertiesServicenow type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConfigPropertiesServicenow{} - -// ConfigPropertiesServicenow Defines properties for connectors when type is `.servicenow`. +// Defines properties for connectors when type is `.servicenow`. type ConfigPropertiesServicenow struct { // The ServiceNow instance URL. ApiUrl string `json:"apiUrl"` // The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. - ClientId *string `json:"clientId,omitempty"` + ClientId string `json:"clientId,omitempty"` // The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). - IsOAuth *bool `json:"isOAuth,omitempty"` + IsOAuth bool `json:"isOAuth,omitempty"` // The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. - JwtKeyId *string `json:"jwtKeyId,omitempty"` + JwtKeyId string `json:"jwtKeyId,omitempty"` // The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. - UserIdentifierValue *string `json:"userIdentifierValue,omitempty"` + UserIdentifierValue string `json:"userIdentifierValue,omitempty"` // Determines whether the connector uses the Table API or the Import Set API. This property is supported only for ServiceNow ITSM and ServiceNow SecOps connectors. NOTE: If this property is set to `false`, the Elastic application should be installed in ServiceNow. - UsesTableApi *bool `json:"usesTableApi,omitempty"` -} - -// NewConfigPropertiesServicenow instantiates a new ConfigPropertiesServicenow object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConfigPropertiesServicenow(apiUrl string) *ConfigPropertiesServicenow { - this := ConfigPropertiesServicenow{} - this.ApiUrl = apiUrl - var isOAuth bool = false - this.IsOAuth = &isOAuth - var usesTableApi bool = true - this.UsesTableApi = &usesTableApi - return &this -} - -// NewConfigPropertiesServicenowWithDefaults instantiates a new ConfigPropertiesServicenow object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConfigPropertiesServicenowWithDefaults() *ConfigPropertiesServicenow { - this := ConfigPropertiesServicenow{} - var isOAuth bool = false - this.IsOAuth = &isOAuth - var usesTableApi bool = true - this.UsesTableApi = &usesTableApi - return &this -} - -// GetApiUrl returns the ApiUrl field value -func (o *ConfigPropertiesServicenow) GetApiUrl() string { - if o == nil { - var ret string - return ret - } - - return o.ApiUrl -} - -// GetApiUrlOk returns a tuple with the ApiUrl field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesServicenow) GetApiUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ApiUrl, true -} - -// SetApiUrl sets field value -func (o *ConfigPropertiesServicenow) SetApiUrl(v string) { - o.ApiUrl = v -} - -// GetClientId returns the ClientId field value if set, zero value otherwise. -func (o *ConfigPropertiesServicenow) GetClientId() string { - if o == nil || IsNil(o.ClientId) { - var ret string - return ret - } - return *o.ClientId -} - -// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesServicenow) GetClientIdOk() (*string, bool) { - if o == nil || IsNil(o.ClientId) { - return nil, false - } - return o.ClientId, true -} - -// HasClientId returns a boolean if a field has been set. -func (o *ConfigPropertiesServicenow) HasClientId() bool { - if o != nil && !IsNil(o.ClientId) { - return true - } - - return false -} - -// SetClientId gets a reference to the given string and assigns it to the ClientId field. -func (o *ConfigPropertiesServicenow) SetClientId(v string) { - o.ClientId = &v -} - -// GetIsOAuth returns the IsOAuth field value if set, zero value otherwise. -func (o *ConfigPropertiesServicenow) GetIsOAuth() bool { - if o == nil || IsNil(o.IsOAuth) { - var ret bool - return ret - } - return *o.IsOAuth -} - -// GetIsOAuthOk returns a tuple with the IsOAuth field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesServicenow) GetIsOAuthOk() (*bool, bool) { - if o == nil || IsNil(o.IsOAuth) { - return nil, false - } - return o.IsOAuth, true -} - -// HasIsOAuth returns a boolean if a field has been set. -func (o *ConfigPropertiesServicenow) HasIsOAuth() bool { - if o != nil && !IsNil(o.IsOAuth) { - return true - } - - return false -} - -// SetIsOAuth gets a reference to the given bool and assigns it to the IsOAuth field. -func (o *ConfigPropertiesServicenow) SetIsOAuth(v bool) { - o.IsOAuth = &v -} - -// GetJwtKeyId returns the JwtKeyId field value if set, zero value otherwise. -func (o *ConfigPropertiesServicenow) GetJwtKeyId() string { - if o == nil || IsNil(o.JwtKeyId) { - var ret string - return ret - } - return *o.JwtKeyId -} - -// GetJwtKeyIdOk returns a tuple with the JwtKeyId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesServicenow) GetJwtKeyIdOk() (*string, bool) { - if o == nil || IsNil(o.JwtKeyId) { - return nil, false - } - return o.JwtKeyId, true -} - -// HasJwtKeyId returns a boolean if a field has been set. -func (o *ConfigPropertiesServicenow) HasJwtKeyId() bool { - if o != nil && !IsNil(o.JwtKeyId) { - return true - } - - return false -} - -// SetJwtKeyId gets a reference to the given string and assigns it to the JwtKeyId field. -func (o *ConfigPropertiesServicenow) SetJwtKeyId(v string) { - o.JwtKeyId = &v -} - -// GetUserIdentifierValue returns the UserIdentifierValue field value if set, zero value otherwise. -func (o *ConfigPropertiesServicenow) GetUserIdentifierValue() string { - if o == nil || IsNil(o.UserIdentifierValue) { - var ret string - return ret - } - return *o.UserIdentifierValue -} - -// GetUserIdentifierValueOk returns a tuple with the UserIdentifierValue field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesServicenow) GetUserIdentifierValueOk() (*string, bool) { - if o == nil || IsNil(o.UserIdentifierValue) { - return nil, false - } - return o.UserIdentifierValue, true -} - -// HasUserIdentifierValue returns a boolean if a field has been set. -func (o *ConfigPropertiesServicenow) HasUserIdentifierValue() bool { - if o != nil && !IsNil(o.UserIdentifierValue) { - return true - } - - return false -} - -// SetUserIdentifierValue gets a reference to the given string and assigns it to the UserIdentifierValue field. -func (o *ConfigPropertiesServicenow) SetUserIdentifierValue(v string) { - o.UserIdentifierValue = &v -} - -// GetUsesTableApi returns the UsesTableApi field value if set, zero value otherwise. -func (o *ConfigPropertiesServicenow) GetUsesTableApi() bool { - if o == nil || IsNil(o.UsesTableApi) { - var ret bool - return ret - } - return *o.UsesTableApi -} - -// GetUsesTableApiOk returns a tuple with the UsesTableApi field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesServicenow) GetUsesTableApiOk() (*bool, bool) { - if o == nil || IsNil(o.UsesTableApi) { - return nil, false - } - return o.UsesTableApi, true -} - -// HasUsesTableApi returns a boolean if a field has been set. -func (o *ConfigPropertiesServicenow) HasUsesTableApi() bool { - if o != nil && !IsNil(o.UsesTableApi) { - return true - } - - return false -} - -// SetUsesTableApi gets a reference to the given bool and assigns it to the UsesTableApi field. -func (o *ConfigPropertiesServicenow) SetUsesTableApi(v bool) { - o.UsesTableApi = &v -} - -func (o ConfigPropertiesServicenow) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConfigPropertiesServicenow) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["apiUrl"] = o.ApiUrl - if !IsNil(o.ClientId) { - toSerialize["clientId"] = o.ClientId - } - if !IsNil(o.IsOAuth) { - toSerialize["isOAuth"] = o.IsOAuth - } - if !IsNil(o.JwtKeyId) { - toSerialize["jwtKeyId"] = o.JwtKeyId - } - if !IsNil(o.UserIdentifierValue) { - toSerialize["userIdentifierValue"] = o.UserIdentifierValue - } - if !IsNil(o.UsesTableApi) { - toSerialize["usesTableApi"] = o.UsesTableApi - } - return toSerialize, nil -} - -type NullableConfigPropertiesServicenow struct { - value *ConfigPropertiesServicenow - isSet bool -} - -func (v NullableConfigPropertiesServicenow) Get() *ConfigPropertiesServicenow { - return v.value -} - -func (v *NullableConfigPropertiesServicenow) Set(val *ConfigPropertiesServicenow) { - v.value = val - v.isSet = true -} - -func (v NullableConfigPropertiesServicenow) IsSet() bool { - return v.isSet -} - -func (v *NullableConfigPropertiesServicenow) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConfigPropertiesServicenow(val *ConfigPropertiesServicenow) *NullableConfigPropertiesServicenow { - return &NullableConfigPropertiesServicenow{value: val, isSet: true} -} - -func (v NullableConfigPropertiesServicenow) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConfigPropertiesServicenow) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + UsesTableApi bool `json:"usesTableApi,omitempty"` } diff --git a/generated/kibanaactions/model_config_properties_servicenow_itom.go b/generated/kibanaactions/model_config_properties_servicenow_itom.go index 7fcb061b0..d2539bf75 100644 --- a/generated/kibanaactions/model_config_properties_servicenow_itom.go +++ b/generated/kibanaactions/model_config_properties_servicenow_itom.go @@ -1,268 +1,23 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConfigPropertiesServicenowItom type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConfigPropertiesServicenowItom{} - -// ConfigPropertiesServicenowItom Defines properties for connectors when type is `.servicenow`. +// Defines properties for connectors when type is `.servicenow`. type ConfigPropertiesServicenowItom struct { // The ServiceNow instance URL. ApiUrl string `json:"apiUrl"` // The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. - ClientId *string `json:"clientId,omitempty"` + ClientId string `json:"clientId,omitempty"` // The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). - IsOAuth *bool `json:"isOAuth,omitempty"` + IsOAuth bool `json:"isOAuth,omitempty"` // The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. - JwtKeyId *string `json:"jwtKeyId,omitempty"` + JwtKeyId string `json:"jwtKeyId,omitempty"` // The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. - UserIdentifierValue *string `json:"userIdentifierValue,omitempty"` -} - -// NewConfigPropertiesServicenowItom instantiates a new ConfigPropertiesServicenowItom object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConfigPropertiesServicenowItom(apiUrl string) *ConfigPropertiesServicenowItom { - this := ConfigPropertiesServicenowItom{} - this.ApiUrl = apiUrl - var isOAuth bool = false - this.IsOAuth = &isOAuth - return &this -} - -// NewConfigPropertiesServicenowItomWithDefaults instantiates a new ConfigPropertiesServicenowItom object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConfigPropertiesServicenowItomWithDefaults() *ConfigPropertiesServicenowItom { - this := ConfigPropertiesServicenowItom{} - var isOAuth bool = false - this.IsOAuth = &isOAuth - return &this -} - -// GetApiUrl returns the ApiUrl field value -func (o *ConfigPropertiesServicenowItom) GetApiUrl() string { - if o == nil { - var ret string - return ret - } - - return o.ApiUrl -} - -// GetApiUrlOk returns a tuple with the ApiUrl field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesServicenowItom) GetApiUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ApiUrl, true -} - -// SetApiUrl sets field value -func (o *ConfigPropertiesServicenowItom) SetApiUrl(v string) { - o.ApiUrl = v -} - -// GetClientId returns the ClientId field value if set, zero value otherwise. -func (o *ConfigPropertiesServicenowItom) GetClientId() string { - if o == nil || IsNil(o.ClientId) { - var ret string - return ret - } - return *o.ClientId -} - -// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesServicenowItom) GetClientIdOk() (*string, bool) { - if o == nil || IsNil(o.ClientId) { - return nil, false - } - return o.ClientId, true -} - -// HasClientId returns a boolean if a field has been set. -func (o *ConfigPropertiesServicenowItom) HasClientId() bool { - if o != nil && !IsNil(o.ClientId) { - return true - } - - return false -} - -// SetClientId gets a reference to the given string and assigns it to the ClientId field. -func (o *ConfigPropertiesServicenowItom) SetClientId(v string) { - o.ClientId = &v -} - -// GetIsOAuth returns the IsOAuth field value if set, zero value otherwise. -func (o *ConfigPropertiesServicenowItom) GetIsOAuth() bool { - if o == nil || IsNil(o.IsOAuth) { - var ret bool - return ret - } - return *o.IsOAuth -} - -// GetIsOAuthOk returns a tuple with the IsOAuth field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesServicenowItom) GetIsOAuthOk() (*bool, bool) { - if o == nil || IsNil(o.IsOAuth) { - return nil, false - } - return o.IsOAuth, true -} - -// HasIsOAuth returns a boolean if a field has been set. -func (o *ConfigPropertiesServicenowItom) HasIsOAuth() bool { - if o != nil && !IsNil(o.IsOAuth) { - return true - } - - return false -} - -// SetIsOAuth gets a reference to the given bool and assigns it to the IsOAuth field. -func (o *ConfigPropertiesServicenowItom) SetIsOAuth(v bool) { - o.IsOAuth = &v -} - -// GetJwtKeyId returns the JwtKeyId field value if set, zero value otherwise. -func (o *ConfigPropertiesServicenowItom) GetJwtKeyId() string { - if o == nil || IsNil(o.JwtKeyId) { - var ret string - return ret - } - return *o.JwtKeyId -} - -// GetJwtKeyIdOk returns a tuple with the JwtKeyId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesServicenowItom) GetJwtKeyIdOk() (*string, bool) { - if o == nil || IsNil(o.JwtKeyId) { - return nil, false - } - return o.JwtKeyId, true -} - -// HasJwtKeyId returns a boolean if a field has been set. -func (o *ConfigPropertiesServicenowItom) HasJwtKeyId() bool { - if o != nil && !IsNil(o.JwtKeyId) { - return true - } - - return false -} - -// SetJwtKeyId gets a reference to the given string and assigns it to the JwtKeyId field. -func (o *ConfigPropertiesServicenowItom) SetJwtKeyId(v string) { - o.JwtKeyId = &v -} - -// GetUserIdentifierValue returns the UserIdentifierValue field value if set, zero value otherwise. -func (o *ConfigPropertiesServicenowItom) GetUserIdentifierValue() string { - if o == nil || IsNil(o.UserIdentifierValue) { - var ret string - return ret - } - return *o.UserIdentifierValue -} - -// GetUserIdentifierValueOk returns a tuple with the UserIdentifierValue field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesServicenowItom) GetUserIdentifierValueOk() (*string, bool) { - if o == nil || IsNil(o.UserIdentifierValue) { - return nil, false - } - return o.UserIdentifierValue, true -} - -// HasUserIdentifierValue returns a boolean if a field has been set. -func (o *ConfigPropertiesServicenowItom) HasUserIdentifierValue() bool { - if o != nil && !IsNil(o.UserIdentifierValue) { - return true - } - - return false -} - -// SetUserIdentifierValue gets a reference to the given string and assigns it to the UserIdentifierValue field. -func (o *ConfigPropertiesServicenowItom) SetUserIdentifierValue(v string) { - o.UserIdentifierValue = &v -} - -func (o ConfigPropertiesServicenowItom) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConfigPropertiesServicenowItom) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["apiUrl"] = o.ApiUrl - if !IsNil(o.ClientId) { - toSerialize["clientId"] = o.ClientId - } - if !IsNil(o.IsOAuth) { - toSerialize["isOAuth"] = o.IsOAuth - } - if !IsNil(o.JwtKeyId) { - toSerialize["jwtKeyId"] = o.JwtKeyId - } - if !IsNil(o.UserIdentifierValue) { - toSerialize["userIdentifierValue"] = o.UserIdentifierValue - } - return toSerialize, nil -} - -type NullableConfigPropertiesServicenowItom struct { - value *ConfigPropertiesServicenowItom - isSet bool -} - -func (v NullableConfigPropertiesServicenowItom) Get() *ConfigPropertiesServicenowItom { - return v.value -} - -func (v *NullableConfigPropertiesServicenowItom) Set(val *ConfigPropertiesServicenowItom) { - v.value = val - v.isSet = true -} - -func (v NullableConfigPropertiesServicenowItom) IsSet() bool { - return v.isSet -} - -func (v *NullableConfigPropertiesServicenowItom) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConfigPropertiesServicenowItom(val *ConfigPropertiesServicenowItom) *NullableConfigPropertiesServicenowItom { - return &NullableConfigPropertiesServicenowItom{value: val, isSet: true} -} - -func (v NullableConfigPropertiesServicenowItom) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConfigPropertiesServicenowItom) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + UserIdentifierValue string `json:"userIdentifierValue,omitempty"` } diff --git a/generated/kibanaactions/model_config_properties_swimlane.go b/generated/kibanaactions/model_config_properties_swimlane.go index 5f7e80cae..930e787e5 100644 --- a/generated/kibanaactions/model_config_properties_swimlane.go +++ b/generated/kibanaactions/model_config_properties_swimlane.go @@ -1,23 +1,14 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConfigPropertiesSwimlane type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConfigPropertiesSwimlane{} - -// ConfigPropertiesSwimlane Defines properties for connectors when type is `.swimlane`. +// Defines properties for connectors when type is `.swimlane`. type ConfigPropertiesSwimlane struct { // The Swimlane instance URL. ApiUrl string `json:"apiUrl"` @@ -27,182 +18,3 @@ type ConfigPropertiesSwimlane struct { ConnectorType string `json:"connectorType"` Mappings *ConnectorMappingsPropertiesForASwimlaneConnector `json:"mappings,omitempty"` } - -// NewConfigPropertiesSwimlane instantiates a new ConfigPropertiesSwimlane object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConfigPropertiesSwimlane(apiUrl string, appId string, connectorType string) *ConfigPropertiesSwimlane { - this := ConfigPropertiesSwimlane{} - this.ApiUrl = apiUrl - this.AppId = appId - this.ConnectorType = connectorType - return &this -} - -// NewConfigPropertiesSwimlaneWithDefaults instantiates a new ConfigPropertiesSwimlane object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConfigPropertiesSwimlaneWithDefaults() *ConfigPropertiesSwimlane { - this := ConfigPropertiesSwimlane{} - return &this -} - -// GetApiUrl returns the ApiUrl field value -func (o *ConfigPropertiesSwimlane) GetApiUrl() string { - if o == nil { - var ret string - return ret - } - - return o.ApiUrl -} - -// GetApiUrlOk returns a tuple with the ApiUrl field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesSwimlane) GetApiUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ApiUrl, true -} - -// SetApiUrl sets field value -func (o *ConfigPropertiesSwimlane) SetApiUrl(v string) { - o.ApiUrl = v -} - -// GetAppId returns the AppId field value -func (o *ConfigPropertiesSwimlane) GetAppId() string { - if o == nil { - var ret string - return ret - } - - return o.AppId -} - -// GetAppIdOk returns a tuple with the AppId field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesSwimlane) GetAppIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AppId, true -} - -// SetAppId sets field value -func (o *ConfigPropertiesSwimlane) SetAppId(v string) { - o.AppId = v -} - -// GetConnectorType returns the ConnectorType field value -func (o *ConfigPropertiesSwimlane) GetConnectorType() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorType -} - -// GetConnectorTypeOk returns a tuple with the ConnectorType field value -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesSwimlane) GetConnectorTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorType, true -} - -// SetConnectorType sets field value -func (o *ConfigPropertiesSwimlane) SetConnectorType(v string) { - o.ConnectorType = v -} - -// GetMappings returns the Mappings field value if set, zero value otherwise. -func (o *ConfigPropertiesSwimlane) GetMappings() ConnectorMappingsPropertiesForASwimlaneConnector { - if o == nil || IsNil(o.Mappings) { - var ret ConnectorMappingsPropertiesForASwimlaneConnector - return ret - } - return *o.Mappings -} - -// GetMappingsOk returns a tuple with the Mappings field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConfigPropertiesSwimlane) GetMappingsOk() (*ConnectorMappingsPropertiesForASwimlaneConnector, bool) { - if o == nil || IsNil(o.Mappings) { - return nil, false - } - return o.Mappings, true -} - -// HasMappings returns a boolean if a field has been set. -func (o *ConfigPropertiesSwimlane) HasMappings() bool { - if o != nil && !IsNil(o.Mappings) { - return true - } - - return false -} - -// SetMappings gets a reference to the given ConnectorMappingsPropertiesForASwimlaneConnector and assigns it to the Mappings field. -func (o *ConfigPropertiesSwimlane) SetMappings(v ConnectorMappingsPropertiesForASwimlaneConnector) { - o.Mappings = &v -} - -func (o ConfigPropertiesSwimlane) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConfigPropertiesSwimlane) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["apiUrl"] = o.ApiUrl - toSerialize["appId"] = o.AppId - toSerialize["connectorType"] = o.ConnectorType - if !IsNil(o.Mappings) { - toSerialize["mappings"] = o.Mappings - } - return toSerialize, nil -} - -type NullableConfigPropertiesSwimlane struct { - value *ConfigPropertiesSwimlane - isSet bool -} - -func (v NullableConfigPropertiesSwimlane) Get() *ConfigPropertiesSwimlane { - return v.value -} - -func (v *NullableConfigPropertiesSwimlane) Set(val *ConfigPropertiesSwimlane) { - v.value = val - v.isSet = true -} - -func (v NullableConfigPropertiesSwimlane) IsSet() bool { - return v.isSet -} - -func (v *NullableConfigPropertiesSwimlane) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConfigPropertiesSwimlane(val *ConfigPropertiesSwimlane) *NullableConfigPropertiesSwimlane { - return &NullableConfigPropertiesSwimlane{value: val, isSet: true} -} - -func (v NullableConfigPropertiesSwimlane) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConfigPropertiesSwimlane) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_mappings_properties_for_a_swimlane_connector.go b/generated/kibanaactions/model_connector_mappings_properties_for_a_swimlane_connector.go index c5f624a25..a9e67f650 100644 --- a/generated/kibanaactions/model_connector_mappings_properties_for_a_swimlane_connector.go +++ b/generated/kibanaactions/model_connector_mappings_properties_for_a_swimlane_connector.go @@ -1,23 +1,14 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConnectorMappingsPropertiesForASwimlaneConnector type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectorMappingsPropertiesForASwimlaneConnector{} - -// ConnectorMappingsPropertiesForASwimlaneConnector The field mapping. +// The field mapping. type ConnectorMappingsPropertiesForASwimlaneConnector struct { AlertIdConfig *AlertIdentifierMapping `json:"alertIdConfig,omitempty"` CaseIdConfig *CaseIdentifierMapping `json:"caseIdConfig,omitempty"` @@ -27,314 +18,3 @@ type ConnectorMappingsPropertiesForASwimlaneConnector struct { RuleNameConfig *RuleNameMapping `json:"ruleNameConfig,omitempty"` SeverityConfig *SeverityMapping `json:"severityConfig,omitempty"` } - -// NewConnectorMappingsPropertiesForASwimlaneConnector instantiates a new ConnectorMappingsPropertiesForASwimlaneConnector object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectorMappingsPropertiesForASwimlaneConnector() *ConnectorMappingsPropertiesForASwimlaneConnector { - this := ConnectorMappingsPropertiesForASwimlaneConnector{} - return &this -} - -// NewConnectorMappingsPropertiesForASwimlaneConnectorWithDefaults instantiates a new ConnectorMappingsPropertiesForASwimlaneConnector object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectorMappingsPropertiesForASwimlaneConnectorWithDefaults() *ConnectorMappingsPropertiesForASwimlaneConnector { - this := ConnectorMappingsPropertiesForASwimlaneConnector{} - return &this -} - -// GetAlertIdConfig returns the AlertIdConfig field value if set, zero value otherwise. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetAlertIdConfig() AlertIdentifierMapping { - if o == nil || IsNil(o.AlertIdConfig) { - var ret AlertIdentifierMapping - return ret - } - return *o.AlertIdConfig -} - -// GetAlertIdConfigOk returns a tuple with the AlertIdConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetAlertIdConfigOk() (*AlertIdentifierMapping, bool) { - if o == nil || IsNil(o.AlertIdConfig) { - return nil, false - } - return o.AlertIdConfig, true -} - -// HasAlertIdConfig returns a boolean if a field has been set. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasAlertIdConfig() bool { - if o != nil && !IsNil(o.AlertIdConfig) { - return true - } - - return false -} - -// SetAlertIdConfig gets a reference to the given AlertIdentifierMapping and assigns it to the AlertIdConfig field. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetAlertIdConfig(v AlertIdentifierMapping) { - o.AlertIdConfig = &v -} - -// GetCaseIdConfig returns the CaseIdConfig field value if set, zero value otherwise. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCaseIdConfig() CaseIdentifierMapping { - if o == nil || IsNil(o.CaseIdConfig) { - var ret CaseIdentifierMapping - return ret - } - return *o.CaseIdConfig -} - -// GetCaseIdConfigOk returns a tuple with the CaseIdConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCaseIdConfigOk() (*CaseIdentifierMapping, bool) { - if o == nil || IsNil(o.CaseIdConfig) { - return nil, false - } - return o.CaseIdConfig, true -} - -// HasCaseIdConfig returns a boolean if a field has been set. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasCaseIdConfig() bool { - if o != nil && !IsNil(o.CaseIdConfig) { - return true - } - - return false -} - -// SetCaseIdConfig gets a reference to the given CaseIdentifierMapping and assigns it to the CaseIdConfig field. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetCaseIdConfig(v CaseIdentifierMapping) { - o.CaseIdConfig = &v -} - -// GetCaseNameConfig returns the CaseNameConfig field value if set, zero value otherwise. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCaseNameConfig() CaseNameMapping { - if o == nil || IsNil(o.CaseNameConfig) { - var ret CaseNameMapping - return ret - } - return *o.CaseNameConfig -} - -// GetCaseNameConfigOk returns a tuple with the CaseNameConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCaseNameConfigOk() (*CaseNameMapping, bool) { - if o == nil || IsNil(o.CaseNameConfig) { - return nil, false - } - return o.CaseNameConfig, true -} - -// HasCaseNameConfig returns a boolean if a field has been set. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasCaseNameConfig() bool { - if o != nil && !IsNil(o.CaseNameConfig) { - return true - } - - return false -} - -// SetCaseNameConfig gets a reference to the given CaseNameMapping and assigns it to the CaseNameConfig field. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetCaseNameConfig(v CaseNameMapping) { - o.CaseNameConfig = &v -} - -// GetCommentsConfig returns the CommentsConfig field value if set, zero value otherwise. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCommentsConfig() CaseCommentMapping { - if o == nil || IsNil(o.CommentsConfig) { - var ret CaseCommentMapping - return ret - } - return *o.CommentsConfig -} - -// GetCommentsConfigOk returns a tuple with the CommentsConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetCommentsConfigOk() (*CaseCommentMapping, bool) { - if o == nil || IsNil(o.CommentsConfig) { - return nil, false - } - return o.CommentsConfig, true -} - -// HasCommentsConfig returns a boolean if a field has been set. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasCommentsConfig() bool { - if o != nil && !IsNil(o.CommentsConfig) { - return true - } - - return false -} - -// SetCommentsConfig gets a reference to the given CaseCommentMapping and assigns it to the CommentsConfig field. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetCommentsConfig(v CaseCommentMapping) { - o.CommentsConfig = &v -} - -// GetDescriptionConfig returns the DescriptionConfig field value if set, zero value otherwise. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetDescriptionConfig() CaseDescriptionMapping { - if o == nil || IsNil(o.DescriptionConfig) { - var ret CaseDescriptionMapping - return ret - } - return *o.DescriptionConfig -} - -// GetDescriptionConfigOk returns a tuple with the DescriptionConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetDescriptionConfigOk() (*CaseDescriptionMapping, bool) { - if o == nil || IsNil(o.DescriptionConfig) { - return nil, false - } - return o.DescriptionConfig, true -} - -// HasDescriptionConfig returns a boolean if a field has been set. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasDescriptionConfig() bool { - if o != nil && !IsNil(o.DescriptionConfig) { - return true - } - - return false -} - -// SetDescriptionConfig gets a reference to the given CaseDescriptionMapping and assigns it to the DescriptionConfig field. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetDescriptionConfig(v CaseDescriptionMapping) { - o.DescriptionConfig = &v -} - -// GetRuleNameConfig returns the RuleNameConfig field value if set, zero value otherwise. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetRuleNameConfig() RuleNameMapping { - if o == nil || IsNil(o.RuleNameConfig) { - var ret RuleNameMapping - return ret - } - return *o.RuleNameConfig -} - -// GetRuleNameConfigOk returns a tuple with the RuleNameConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetRuleNameConfigOk() (*RuleNameMapping, bool) { - if o == nil || IsNil(o.RuleNameConfig) { - return nil, false - } - return o.RuleNameConfig, true -} - -// HasRuleNameConfig returns a boolean if a field has been set. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasRuleNameConfig() bool { - if o != nil && !IsNil(o.RuleNameConfig) { - return true - } - - return false -} - -// SetRuleNameConfig gets a reference to the given RuleNameMapping and assigns it to the RuleNameConfig field. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetRuleNameConfig(v RuleNameMapping) { - o.RuleNameConfig = &v -} - -// GetSeverityConfig returns the SeverityConfig field value if set, zero value otherwise. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetSeverityConfig() SeverityMapping { - if o == nil || IsNil(o.SeverityConfig) { - var ret SeverityMapping - return ret - } - return *o.SeverityConfig -} - -// GetSeverityConfigOk returns a tuple with the SeverityConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) GetSeverityConfigOk() (*SeverityMapping, bool) { - if o == nil || IsNil(o.SeverityConfig) { - return nil, false - } - return o.SeverityConfig, true -} - -// HasSeverityConfig returns a boolean if a field has been set. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) HasSeverityConfig() bool { - if o != nil && !IsNil(o.SeverityConfig) { - return true - } - - return false -} - -// SetSeverityConfig gets a reference to the given SeverityMapping and assigns it to the SeverityConfig field. -func (o *ConnectorMappingsPropertiesForASwimlaneConnector) SetSeverityConfig(v SeverityMapping) { - o.SeverityConfig = &v -} - -func (o ConnectorMappingsPropertiesForASwimlaneConnector) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectorMappingsPropertiesForASwimlaneConnector) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.AlertIdConfig) { - toSerialize["alertIdConfig"] = o.AlertIdConfig - } - if !IsNil(o.CaseIdConfig) { - toSerialize["caseIdConfig"] = o.CaseIdConfig - } - if !IsNil(o.CaseNameConfig) { - toSerialize["caseNameConfig"] = o.CaseNameConfig - } - if !IsNil(o.CommentsConfig) { - toSerialize["commentsConfig"] = o.CommentsConfig - } - if !IsNil(o.DescriptionConfig) { - toSerialize["descriptionConfig"] = o.DescriptionConfig - } - if !IsNil(o.RuleNameConfig) { - toSerialize["ruleNameConfig"] = o.RuleNameConfig - } - if !IsNil(o.SeverityConfig) { - toSerialize["severityConfig"] = o.SeverityConfig - } - return toSerialize, nil -} - -type NullableConnectorMappingsPropertiesForASwimlaneConnector struct { - value *ConnectorMappingsPropertiesForASwimlaneConnector - isSet bool -} - -func (v NullableConnectorMappingsPropertiesForASwimlaneConnector) Get() *ConnectorMappingsPropertiesForASwimlaneConnector { - return v.value -} - -func (v *NullableConnectorMappingsPropertiesForASwimlaneConnector) Set(val *ConnectorMappingsPropertiesForASwimlaneConnector) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorMappingsPropertiesForASwimlaneConnector) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorMappingsPropertiesForASwimlaneConnector) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorMappingsPropertiesForASwimlaneConnector(val *ConnectorMappingsPropertiesForASwimlaneConnector) *NullableConnectorMappingsPropertiesForASwimlaneConnector { - return &NullableConnectorMappingsPropertiesForASwimlaneConnector{value: val, isSet: true} -} - -func (v NullableConnectorMappingsPropertiesForASwimlaneConnector) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorMappingsPropertiesForASwimlaneConnector) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_response_properties.go b/generated/kibanaactions/model_connector_response_properties.go index 6a218a330..e95207266 100644 --- a/generated/kibanaactions/model_connector_response_properties.go +++ b/generated/kibanaactions/model_connector_response_properties.go @@ -1,559 +1,30 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" - "fmt" -) - -// ConnectorResponseProperties - The properties vary depending on the connector type. +// The properties vary depending on the connector type. type ConnectorResponseProperties struct { - ConnectorResponsePropertiesCasesWebhook *ConnectorResponsePropertiesCasesWebhook - ConnectorResponsePropertiesEmail *ConnectorResponsePropertiesEmail - ConnectorResponsePropertiesIndex *ConnectorResponsePropertiesIndex - ConnectorResponsePropertiesJira *ConnectorResponsePropertiesJira - ConnectorResponsePropertiesOpsgenie *ConnectorResponsePropertiesOpsgenie - ConnectorResponsePropertiesPagerduty *ConnectorResponsePropertiesPagerduty - ConnectorResponsePropertiesResilient *ConnectorResponsePropertiesResilient - ConnectorResponsePropertiesServerlog *ConnectorResponsePropertiesServerlog - ConnectorResponsePropertiesServicenow *ConnectorResponsePropertiesServicenow - ConnectorResponsePropertiesServicenowItom *ConnectorResponsePropertiesServicenowItom - ConnectorResponsePropertiesServicenowSir *ConnectorResponsePropertiesServicenowSir - ConnectorResponsePropertiesSlack *ConnectorResponsePropertiesSlack - ConnectorResponsePropertiesSwimlane *ConnectorResponsePropertiesSwimlane - ConnectorResponsePropertiesTeams *ConnectorResponsePropertiesTeams - ConnectorResponsePropertiesTines *ConnectorResponsePropertiesTines - ConnectorResponsePropertiesWebhook *ConnectorResponsePropertiesWebhook - ConnectorResponsePropertiesXmatters *ConnectorResponsePropertiesXmatters -} - -// ConnectorResponsePropertiesCasesWebhookAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesCasesWebhook wrapped in ConnectorResponseProperties -func ConnectorResponsePropertiesCasesWebhookAsConnectorResponseProperties(v *ConnectorResponsePropertiesCasesWebhook) ConnectorResponseProperties { - return ConnectorResponseProperties{ - ConnectorResponsePropertiesCasesWebhook: v, - } -} - -// ConnectorResponsePropertiesEmailAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesEmail wrapped in ConnectorResponseProperties -func ConnectorResponsePropertiesEmailAsConnectorResponseProperties(v *ConnectorResponsePropertiesEmail) ConnectorResponseProperties { - return ConnectorResponseProperties{ - ConnectorResponsePropertiesEmail: v, - } -} - -// ConnectorResponsePropertiesIndexAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesIndex wrapped in ConnectorResponseProperties -func ConnectorResponsePropertiesIndexAsConnectorResponseProperties(v *ConnectorResponsePropertiesIndex) ConnectorResponseProperties { - return ConnectorResponseProperties{ - ConnectorResponsePropertiesIndex: v, - } -} - -// ConnectorResponsePropertiesJiraAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesJira wrapped in ConnectorResponseProperties -func ConnectorResponsePropertiesJiraAsConnectorResponseProperties(v *ConnectorResponsePropertiesJira) ConnectorResponseProperties { - return ConnectorResponseProperties{ - ConnectorResponsePropertiesJira: v, - } -} - -// ConnectorResponsePropertiesOpsgenieAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesOpsgenie wrapped in ConnectorResponseProperties -func ConnectorResponsePropertiesOpsgenieAsConnectorResponseProperties(v *ConnectorResponsePropertiesOpsgenie) ConnectorResponseProperties { - return ConnectorResponseProperties{ - ConnectorResponsePropertiesOpsgenie: v, - } -} - -// ConnectorResponsePropertiesPagerdutyAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesPagerduty wrapped in ConnectorResponseProperties -func ConnectorResponsePropertiesPagerdutyAsConnectorResponseProperties(v *ConnectorResponsePropertiesPagerduty) ConnectorResponseProperties { - return ConnectorResponseProperties{ - ConnectorResponsePropertiesPagerduty: v, - } -} - -// ConnectorResponsePropertiesResilientAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesResilient wrapped in ConnectorResponseProperties -func ConnectorResponsePropertiesResilientAsConnectorResponseProperties(v *ConnectorResponsePropertiesResilient) ConnectorResponseProperties { - return ConnectorResponseProperties{ - ConnectorResponsePropertiesResilient: v, - } -} - -// ConnectorResponsePropertiesServerlogAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesServerlog wrapped in ConnectorResponseProperties -func ConnectorResponsePropertiesServerlogAsConnectorResponseProperties(v *ConnectorResponsePropertiesServerlog) ConnectorResponseProperties { - return ConnectorResponseProperties{ - ConnectorResponsePropertiesServerlog: v, - } -} - -// ConnectorResponsePropertiesServicenowAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesServicenow wrapped in ConnectorResponseProperties -func ConnectorResponsePropertiesServicenowAsConnectorResponseProperties(v *ConnectorResponsePropertiesServicenow) ConnectorResponseProperties { - return ConnectorResponseProperties{ - ConnectorResponsePropertiesServicenow: v, - } -} - -// ConnectorResponsePropertiesServicenowItomAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesServicenowItom wrapped in ConnectorResponseProperties -func ConnectorResponsePropertiesServicenowItomAsConnectorResponseProperties(v *ConnectorResponsePropertiesServicenowItom) ConnectorResponseProperties { - return ConnectorResponseProperties{ - ConnectorResponsePropertiesServicenowItom: v, - } -} - -// ConnectorResponsePropertiesServicenowSirAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesServicenowSir wrapped in ConnectorResponseProperties -func ConnectorResponsePropertiesServicenowSirAsConnectorResponseProperties(v *ConnectorResponsePropertiesServicenowSir) ConnectorResponseProperties { - return ConnectorResponseProperties{ - ConnectorResponsePropertiesServicenowSir: v, - } -} - -// ConnectorResponsePropertiesSlackAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesSlack wrapped in ConnectorResponseProperties -func ConnectorResponsePropertiesSlackAsConnectorResponseProperties(v *ConnectorResponsePropertiesSlack) ConnectorResponseProperties { - return ConnectorResponseProperties{ - ConnectorResponsePropertiesSlack: v, - } -} - -// ConnectorResponsePropertiesSwimlaneAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesSwimlane wrapped in ConnectorResponseProperties -func ConnectorResponsePropertiesSwimlaneAsConnectorResponseProperties(v *ConnectorResponsePropertiesSwimlane) ConnectorResponseProperties { - return ConnectorResponseProperties{ - ConnectorResponsePropertiesSwimlane: v, - } -} - -// ConnectorResponsePropertiesTeamsAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesTeams wrapped in ConnectorResponseProperties -func ConnectorResponsePropertiesTeamsAsConnectorResponseProperties(v *ConnectorResponsePropertiesTeams) ConnectorResponseProperties { - return ConnectorResponseProperties{ - ConnectorResponsePropertiesTeams: v, - } -} - -// ConnectorResponsePropertiesTinesAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesTines wrapped in ConnectorResponseProperties -func ConnectorResponsePropertiesTinesAsConnectorResponseProperties(v *ConnectorResponsePropertiesTines) ConnectorResponseProperties { - return ConnectorResponseProperties{ - ConnectorResponsePropertiesTines: v, - } -} - -// ConnectorResponsePropertiesWebhookAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesWebhook wrapped in ConnectorResponseProperties -func ConnectorResponsePropertiesWebhookAsConnectorResponseProperties(v *ConnectorResponsePropertiesWebhook) ConnectorResponseProperties { - return ConnectorResponseProperties{ - ConnectorResponsePropertiesWebhook: v, - } -} - -// ConnectorResponsePropertiesXmattersAsConnectorResponseProperties is a convenience function that returns ConnectorResponsePropertiesXmatters wrapped in ConnectorResponseProperties -func ConnectorResponsePropertiesXmattersAsConnectorResponseProperties(v *ConnectorResponsePropertiesXmatters) ConnectorResponseProperties { - return ConnectorResponseProperties{ - ConnectorResponsePropertiesXmatters: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *ConnectorResponseProperties) UnmarshalJSON(data []byte) error { - var err error - // use discriminator value to speed up the lookup - var jsonDict map[string]interface{} - err = newStrictDecoder(data).Decode(&jsonDict) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") - } - - // check if the discriminator value is 'connector_response_properties_cases_webhook' - if jsonDict["connector_type_id"] == "connector_response_properties_cases_webhook" { - // try to unmarshal JSON data into ConnectorResponsePropertiesCasesWebhook - err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesCasesWebhook) - if err == nil { - return nil // data stored in dst.ConnectorResponsePropertiesCasesWebhook, return on the first match - } else { - dst.ConnectorResponsePropertiesCasesWebhook = nil - return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesCasesWebhook: %s", err.Error()) - } - } - - // check if the discriminator value is 'connector_response_properties_email' - if jsonDict["connector_type_id"] == "connector_response_properties_email" { - // try to unmarshal JSON data into ConnectorResponsePropertiesEmail - err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesEmail) - if err == nil { - return nil // data stored in dst.ConnectorResponsePropertiesEmail, return on the first match - } else { - dst.ConnectorResponsePropertiesEmail = nil - return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesEmail: %s", err.Error()) - } - } - - // check if the discriminator value is 'connector_response_properties_index' - if jsonDict["connector_type_id"] == "connector_response_properties_index" { - // try to unmarshal JSON data into ConnectorResponsePropertiesIndex - err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesIndex) - if err == nil { - return nil // data stored in dst.ConnectorResponsePropertiesIndex, return on the first match - } else { - dst.ConnectorResponsePropertiesIndex = nil - return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesIndex: %s", err.Error()) - } - } - - // check if the discriminator value is 'connector_response_properties_jira' - if jsonDict["connector_type_id"] == "connector_response_properties_jira" { - // try to unmarshal JSON data into ConnectorResponsePropertiesJira - err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesJira) - if err == nil { - return nil // data stored in dst.ConnectorResponsePropertiesJira, return on the first match - } else { - dst.ConnectorResponsePropertiesJira = nil - return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesJira: %s", err.Error()) - } - } - - // check if the discriminator value is 'connector_response_properties_opsgenie' - if jsonDict["connector_type_id"] == "connector_response_properties_opsgenie" { - // try to unmarshal JSON data into ConnectorResponsePropertiesOpsgenie - err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesOpsgenie) - if err == nil { - return nil // data stored in dst.ConnectorResponsePropertiesOpsgenie, return on the first match - } else { - dst.ConnectorResponsePropertiesOpsgenie = nil - return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesOpsgenie: %s", err.Error()) - } - } - - // check if the discriminator value is 'connector_response_properties_pagerduty' - if jsonDict["connector_type_id"] == "connector_response_properties_pagerduty" { - // try to unmarshal JSON data into ConnectorResponsePropertiesPagerduty - err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesPagerduty) - if err == nil { - return nil // data stored in dst.ConnectorResponsePropertiesPagerduty, return on the first match - } else { - dst.ConnectorResponsePropertiesPagerduty = nil - return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesPagerduty: %s", err.Error()) - } - } - - // check if the discriminator value is 'connector_response_properties_resilient' - if jsonDict["connector_type_id"] == "connector_response_properties_resilient" { - // try to unmarshal JSON data into ConnectorResponsePropertiesResilient - err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesResilient) - if err == nil { - return nil // data stored in dst.ConnectorResponsePropertiesResilient, return on the first match - } else { - dst.ConnectorResponsePropertiesResilient = nil - return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesResilient: %s", err.Error()) - } - } - - // check if the discriminator value is 'connector_response_properties_serverlog' - if jsonDict["connector_type_id"] == "connector_response_properties_serverlog" { - // try to unmarshal JSON data into ConnectorResponsePropertiesServerlog - err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesServerlog) - if err == nil { - return nil // data stored in dst.ConnectorResponsePropertiesServerlog, return on the first match - } else { - dst.ConnectorResponsePropertiesServerlog = nil - return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesServerlog: %s", err.Error()) - } - } - - // check if the discriminator value is 'connector_response_properties_servicenow' - if jsonDict["connector_type_id"] == "connector_response_properties_servicenow" { - // try to unmarshal JSON data into ConnectorResponsePropertiesServicenow - err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesServicenow) - if err == nil { - return nil // data stored in dst.ConnectorResponsePropertiesServicenow, return on the first match - } else { - dst.ConnectorResponsePropertiesServicenow = nil - return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesServicenow: %s", err.Error()) - } - } - - // check if the discriminator value is 'connector_response_properties_servicenow_itom' - if jsonDict["connector_type_id"] == "connector_response_properties_servicenow_itom" { - // try to unmarshal JSON data into ConnectorResponsePropertiesServicenowItom - err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesServicenowItom) - if err == nil { - return nil // data stored in dst.ConnectorResponsePropertiesServicenowItom, return on the first match - } else { - dst.ConnectorResponsePropertiesServicenowItom = nil - return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesServicenowItom: %s", err.Error()) - } - } - - // check if the discriminator value is 'connector_response_properties_servicenow_sir' - if jsonDict["connector_type_id"] == "connector_response_properties_servicenow_sir" { - // try to unmarshal JSON data into ConnectorResponsePropertiesServicenowSir - err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesServicenowSir) - if err == nil { - return nil // data stored in dst.ConnectorResponsePropertiesServicenowSir, return on the first match - } else { - dst.ConnectorResponsePropertiesServicenowSir = nil - return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesServicenowSir: %s", err.Error()) - } - } - - // check if the discriminator value is 'connector_response_properties_slack' - if jsonDict["connector_type_id"] == "connector_response_properties_slack" { - // try to unmarshal JSON data into ConnectorResponsePropertiesSlack - err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesSlack) - if err == nil { - return nil // data stored in dst.ConnectorResponsePropertiesSlack, return on the first match - } else { - dst.ConnectorResponsePropertiesSlack = nil - return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesSlack: %s", err.Error()) - } - } - - // check if the discriminator value is 'connector_response_properties_swimlane' - if jsonDict["connector_type_id"] == "connector_response_properties_swimlane" { - // try to unmarshal JSON data into ConnectorResponsePropertiesSwimlane - err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesSwimlane) - if err == nil { - return nil // data stored in dst.ConnectorResponsePropertiesSwimlane, return on the first match - } else { - dst.ConnectorResponsePropertiesSwimlane = nil - return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesSwimlane: %s", err.Error()) - } - } - - // check if the discriminator value is 'connector_response_properties_teams' - if jsonDict["connector_type_id"] == "connector_response_properties_teams" { - // try to unmarshal JSON data into ConnectorResponsePropertiesTeams - err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesTeams) - if err == nil { - return nil // data stored in dst.ConnectorResponsePropertiesTeams, return on the first match - } else { - dst.ConnectorResponsePropertiesTeams = nil - return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesTeams: %s", err.Error()) - } - } - - // check if the discriminator value is 'connector_response_properties_tines' - if jsonDict["connector_type_id"] == "connector_response_properties_tines" { - // try to unmarshal JSON data into ConnectorResponsePropertiesTines - err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesTines) - if err == nil { - return nil // data stored in dst.ConnectorResponsePropertiesTines, return on the first match - } else { - dst.ConnectorResponsePropertiesTines = nil - return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesTines: %s", err.Error()) - } - } - - // check if the discriminator value is 'connector_response_properties_webhook' - if jsonDict["connector_type_id"] == "connector_response_properties_webhook" { - // try to unmarshal JSON data into ConnectorResponsePropertiesWebhook - err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesWebhook) - if err == nil { - return nil // data stored in dst.ConnectorResponsePropertiesWebhook, return on the first match - } else { - dst.ConnectorResponsePropertiesWebhook = nil - return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesWebhook: %s", err.Error()) - } - } - - // check if the discriminator value is 'connector_response_properties_xmatters' - if jsonDict["connector_type_id"] == "connector_response_properties_xmatters" { - // try to unmarshal JSON data into ConnectorResponsePropertiesXmatters - err = json.Unmarshal(data, &dst.ConnectorResponsePropertiesXmatters) - if err == nil { - return nil // data stored in dst.ConnectorResponsePropertiesXmatters, return on the first match - } else { - dst.ConnectorResponsePropertiesXmatters = nil - return fmt.Errorf("failed to unmarshal ConnectorResponseProperties as ConnectorResponsePropertiesXmatters: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src ConnectorResponseProperties) MarshalJSON() ([]byte, error) { - if src.ConnectorResponsePropertiesCasesWebhook != nil { - return json.Marshal(&src.ConnectorResponsePropertiesCasesWebhook) - } - - if src.ConnectorResponsePropertiesEmail != nil { - return json.Marshal(&src.ConnectorResponsePropertiesEmail) - } - - if src.ConnectorResponsePropertiesIndex != nil { - return json.Marshal(&src.ConnectorResponsePropertiesIndex) - } - - if src.ConnectorResponsePropertiesJira != nil { - return json.Marshal(&src.ConnectorResponsePropertiesJira) - } - - if src.ConnectorResponsePropertiesOpsgenie != nil { - return json.Marshal(&src.ConnectorResponsePropertiesOpsgenie) - } - - if src.ConnectorResponsePropertiesPagerduty != nil { - return json.Marshal(&src.ConnectorResponsePropertiesPagerduty) - } - - if src.ConnectorResponsePropertiesResilient != nil { - return json.Marshal(&src.ConnectorResponsePropertiesResilient) - } - - if src.ConnectorResponsePropertiesServerlog != nil { - return json.Marshal(&src.ConnectorResponsePropertiesServerlog) - } - - if src.ConnectorResponsePropertiesServicenow != nil { - return json.Marshal(&src.ConnectorResponsePropertiesServicenow) - } - - if src.ConnectorResponsePropertiesServicenowItom != nil { - return json.Marshal(&src.ConnectorResponsePropertiesServicenowItom) - } - - if src.ConnectorResponsePropertiesServicenowSir != nil { - return json.Marshal(&src.ConnectorResponsePropertiesServicenowSir) - } - - if src.ConnectorResponsePropertiesSlack != nil { - return json.Marshal(&src.ConnectorResponsePropertiesSlack) - } - - if src.ConnectorResponsePropertiesSwimlane != nil { - return json.Marshal(&src.ConnectorResponsePropertiesSwimlane) - } - - if src.ConnectorResponsePropertiesTeams != nil { - return json.Marshal(&src.ConnectorResponsePropertiesTeams) - } - - if src.ConnectorResponsePropertiesTines != nil { - return json.Marshal(&src.ConnectorResponsePropertiesTines) - } - - if src.ConnectorResponsePropertiesWebhook != nil { - return json.Marshal(&src.ConnectorResponsePropertiesWebhook) - } - - if src.ConnectorResponsePropertiesXmatters != nil { - return json.Marshal(&src.ConnectorResponsePropertiesXmatters) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *ConnectorResponseProperties) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.ConnectorResponsePropertiesCasesWebhook != nil { - return obj.ConnectorResponsePropertiesCasesWebhook - } - - if obj.ConnectorResponsePropertiesEmail != nil { - return obj.ConnectorResponsePropertiesEmail - } - - if obj.ConnectorResponsePropertiesIndex != nil { - return obj.ConnectorResponsePropertiesIndex - } - - if obj.ConnectorResponsePropertiesJira != nil { - return obj.ConnectorResponsePropertiesJira - } - - if obj.ConnectorResponsePropertiesOpsgenie != nil { - return obj.ConnectorResponsePropertiesOpsgenie - } - - if obj.ConnectorResponsePropertiesPagerduty != nil { - return obj.ConnectorResponsePropertiesPagerduty - } - - if obj.ConnectorResponsePropertiesResilient != nil { - return obj.ConnectorResponsePropertiesResilient - } - - if obj.ConnectorResponsePropertiesServerlog != nil { - return obj.ConnectorResponsePropertiesServerlog - } - - if obj.ConnectorResponsePropertiesServicenow != nil { - return obj.ConnectorResponsePropertiesServicenow - } - - if obj.ConnectorResponsePropertiesServicenowItom != nil { - return obj.ConnectorResponsePropertiesServicenowItom - } - - if obj.ConnectorResponsePropertiesServicenowSir != nil { - return obj.ConnectorResponsePropertiesServicenowSir - } - - if obj.ConnectorResponsePropertiesSlack != nil { - return obj.ConnectorResponsePropertiesSlack - } - - if obj.ConnectorResponsePropertiesSwimlane != nil { - return obj.ConnectorResponsePropertiesSwimlane - } - - if obj.ConnectorResponsePropertiesTeams != nil { - return obj.ConnectorResponsePropertiesTeams - } - - if obj.ConnectorResponsePropertiesTines != nil { - return obj.ConnectorResponsePropertiesTines - } - - if obj.ConnectorResponsePropertiesWebhook != nil { - return obj.ConnectorResponsePropertiesWebhook - } - - if obj.ConnectorResponsePropertiesXmatters != nil { - return obj.ConnectorResponsePropertiesXmatters - } - - // all schemas are nil - return nil -} - -type NullableConnectorResponseProperties struct { - value *ConnectorResponseProperties - isSet bool -} - -func (v NullableConnectorResponseProperties) Get() *ConnectorResponseProperties { - return v.value -} - -func (v *NullableConnectorResponseProperties) Set(val *ConnectorResponseProperties) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorResponseProperties) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorResponseProperties) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorResponseProperties(val *ConnectorResponseProperties) *NullableConnectorResponseProperties { - return &NullableConnectorResponseProperties{value: val, isSet: true} -} - -func (v NullableConnectorResponseProperties) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorResponseProperties) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + ConnectorResponsePropertiesCasesWebhook + ConnectorResponsePropertiesEmail + ConnectorResponsePropertiesIndex + ConnectorResponsePropertiesJira + ConnectorResponsePropertiesOpsgenie + ConnectorResponsePropertiesPagerduty + ConnectorResponsePropertiesResilient + ConnectorResponsePropertiesServerlog + ConnectorResponsePropertiesServicenow + ConnectorResponsePropertiesServicenowItom + ConnectorResponsePropertiesServicenowSir + ConnectorResponsePropertiesSlack + ConnectorResponsePropertiesSwimlane + ConnectorResponsePropertiesTeams + ConnectorResponsePropertiesTines + ConnectorResponsePropertiesWebhook + ConnectorResponsePropertiesXmatters } diff --git a/generated/kibanaactions/model_connector_response_properties_cases_webhook.go b/generated/kibanaactions/model_connector_response_properties_cases_webhook.go index cda33eb29..023c362b9 100644 --- a/generated/kibanaactions/model_connector_response_properties_cases_webhook.go +++ b/generated/kibanaactions/model_connector_response_properties_cases_webhook.go @@ -1,292 +1,22 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConnectorResponsePropertiesCasesWebhook type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectorResponsePropertiesCasesWebhook{} - -// ConnectorResponsePropertiesCasesWebhook struct for ConnectorResponsePropertiesCasesWebhook type ConnectorResponsePropertiesCasesWebhook struct { - Config ConfigPropertiesCasesWebhook `json:"config"` + Config *ConfigPropertiesCasesWebhook `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The identifier for the connector. - Id string `json:"id"` - // Indicates whether the connector type is deprecated. - IsDeprecated bool `json:"is_deprecated"` - // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. - IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` - // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. - IsPreconfigured bool `json:"is_preconfigured"` + Id string `json:"id"` + IsDeprecated bool `json:"is_deprecated"` + IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` + IsPreconfigured bool `json:"is_preconfigured"` // The display name for the connector. Name string `json:"name"` } - -// NewConnectorResponsePropertiesCasesWebhook instantiates a new ConnectorResponsePropertiesCasesWebhook object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectorResponsePropertiesCasesWebhook(config ConfigPropertiesCasesWebhook, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesCasesWebhook { - this := ConnectorResponsePropertiesCasesWebhook{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Id = id - this.IsDeprecated = isDeprecated - this.IsPreconfigured = isPreconfigured - this.Name = name - return &this -} - -// NewConnectorResponsePropertiesCasesWebhookWithDefaults instantiates a new ConnectorResponsePropertiesCasesWebhook object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectorResponsePropertiesCasesWebhookWithDefaults() *ConnectorResponsePropertiesCasesWebhook { - this := ConnectorResponsePropertiesCasesWebhook{} - return &this -} - -// GetConfig returns the Config field value -func (o *ConnectorResponsePropertiesCasesWebhook) GetConfig() ConfigPropertiesCasesWebhook { - if o == nil { - var ret ConfigPropertiesCasesWebhook - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesCasesWebhook) GetConfigOk() (*ConfigPropertiesCasesWebhook, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *ConnectorResponsePropertiesCasesWebhook) SetConfig(v ConfigPropertiesCasesWebhook) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *ConnectorResponsePropertiesCasesWebhook) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesCasesWebhook) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *ConnectorResponsePropertiesCasesWebhook) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetId returns the Id field value -func (o *ConnectorResponsePropertiesCasesWebhook) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesCasesWebhook) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ConnectorResponsePropertiesCasesWebhook) SetId(v string) { - o.Id = v -} - -// GetIsDeprecated returns the IsDeprecated field value -func (o *ConnectorResponsePropertiesCasesWebhook) GetIsDeprecated() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesCasesWebhook) GetIsDeprecatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsDeprecated, true -} - -// SetIsDeprecated sets field value -func (o *ConnectorResponsePropertiesCasesWebhook) SetIsDeprecated(v bool) { - o.IsDeprecated = v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *ConnectorResponsePropertiesCasesWebhook) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesCasesWebhook) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *ConnectorResponsePropertiesCasesWebhook) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *ConnectorResponsePropertiesCasesWebhook) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value -func (o *ConnectorResponsePropertiesCasesWebhook) GetIsPreconfigured() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesCasesWebhook) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPreconfigured, true -} - -// SetIsPreconfigured sets field value -func (o *ConnectorResponsePropertiesCasesWebhook) SetIsPreconfigured(v bool) { - o.IsPreconfigured = v -} - -// GetName returns the Name field value -func (o *ConnectorResponsePropertiesCasesWebhook) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesCasesWebhook) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ConnectorResponsePropertiesCasesWebhook) SetName(v string) { - o.Name = v -} - -func (o ConnectorResponsePropertiesCasesWebhook) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectorResponsePropertiesCasesWebhook) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["id"] = o.Id - toSerialize["is_deprecated"] = o.IsDeprecated - if !IsNil(o.IsMissingSecrets) { - toSerialize["is_missing_secrets"] = o.IsMissingSecrets - } - toSerialize["is_preconfigured"] = o.IsPreconfigured - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableConnectorResponsePropertiesCasesWebhook struct { - value *ConnectorResponsePropertiesCasesWebhook - isSet bool -} - -func (v NullableConnectorResponsePropertiesCasesWebhook) Get() *ConnectorResponsePropertiesCasesWebhook { - return v.value -} - -func (v *NullableConnectorResponsePropertiesCasesWebhook) Set(val *ConnectorResponsePropertiesCasesWebhook) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorResponsePropertiesCasesWebhook) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorResponsePropertiesCasesWebhook) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorResponsePropertiesCasesWebhook(val *ConnectorResponsePropertiesCasesWebhook) *NullableConnectorResponsePropertiesCasesWebhook { - return &NullableConnectorResponsePropertiesCasesWebhook{value: val, isSet: true} -} - -func (v NullableConnectorResponsePropertiesCasesWebhook) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorResponsePropertiesCasesWebhook) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_response_properties_email.go b/generated/kibanaactions/model_connector_response_properties_email.go index 3bca15cc6..df68b0e32 100644 --- a/generated/kibanaactions/model_connector_response_properties_email.go +++ b/generated/kibanaactions/model_connector_response_properties_email.go @@ -1,293 +1,22 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConnectorResponsePropertiesEmail type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectorResponsePropertiesEmail{} - -// ConnectorResponsePropertiesEmail struct for ConnectorResponsePropertiesEmail type ConnectorResponsePropertiesEmail struct { - // Defines properties for connectors when type is `.email`. - Config map[string]interface{} `json:"config"` + Config *ModelMap `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The identifier for the connector. - Id string `json:"id"` - // Indicates whether the connector type is deprecated. - IsDeprecated bool `json:"is_deprecated"` - // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. - IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` - // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. - IsPreconfigured bool `json:"is_preconfigured"` + Id string `json:"id"` + IsDeprecated bool `json:"is_deprecated"` + IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` + IsPreconfigured bool `json:"is_preconfigured"` // The display name for the connector. Name string `json:"name"` } - -// NewConnectorResponsePropertiesEmail instantiates a new ConnectorResponsePropertiesEmail object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectorResponsePropertiesEmail(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesEmail { - this := ConnectorResponsePropertiesEmail{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Id = id - this.IsDeprecated = isDeprecated - this.IsPreconfigured = isPreconfigured - this.Name = name - return &this -} - -// NewConnectorResponsePropertiesEmailWithDefaults instantiates a new ConnectorResponsePropertiesEmail object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectorResponsePropertiesEmailWithDefaults() *ConnectorResponsePropertiesEmail { - this := ConnectorResponsePropertiesEmail{} - return &this -} - -// GetConfig returns the Config field value -func (o *ConnectorResponsePropertiesEmail) GetConfig() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesEmail) GetConfigOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Config, true -} - -// SetConfig sets field value -func (o *ConnectorResponsePropertiesEmail) SetConfig(v map[string]interface{}) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *ConnectorResponsePropertiesEmail) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesEmail) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *ConnectorResponsePropertiesEmail) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetId returns the Id field value -func (o *ConnectorResponsePropertiesEmail) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesEmail) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ConnectorResponsePropertiesEmail) SetId(v string) { - o.Id = v -} - -// GetIsDeprecated returns the IsDeprecated field value -func (o *ConnectorResponsePropertiesEmail) GetIsDeprecated() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesEmail) GetIsDeprecatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsDeprecated, true -} - -// SetIsDeprecated sets field value -func (o *ConnectorResponsePropertiesEmail) SetIsDeprecated(v bool) { - o.IsDeprecated = v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *ConnectorResponsePropertiesEmail) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesEmail) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *ConnectorResponsePropertiesEmail) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *ConnectorResponsePropertiesEmail) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value -func (o *ConnectorResponsePropertiesEmail) GetIsPreconfigured() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesEmail) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPreconfigured, true -} - -// SetIsPreconfigured sets field value -func (o *ConnectorResponsePropertiesEmail) SetIsPreconfigured(v bool) { - o.IsPreconfigured = v -} - -// GetName returns the Name field value -func (o *ConnectorResponsePropertiesEmail) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesEmail) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ConnectorResponsePropertiesEmail) SetName(v string) { - o.Name = v -} - -func (o ConnectorResponsePropertiesEmail) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectorResponsePropertiesEmail) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["id"] = o.Id - toSerialize["is_deprecated"] = o.IsDeprecated - if !IsNil(o.IsMissingSecrets) { - toSerialize["is_missing_secrets"] = o.IsMissingSecrets - } - toSerialize["is_preconfigured"] = o.IsPreconfigured - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableConnectorResponsePropertiesEmail struct { - value *ConnectorResponsePropertiesEmail - isSet bool -} - -func (v NullableConnectorResponsePropertiesEmail) Get() *ConnectorResponsePropertiesEmail { - return v.value -} - -func (v *NullableConnectorResponsePropertiesEmail) Set(val *ConnectorResponsePropertiesEmail) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorResponsePropertiesEmail) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorResponsePropertiesEmail) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorResponsePropertiesEmail(val *ConnectorResponsePropertiesEmail) *NullableConnectorResponsePropertiesEmail { - return &NullableConnectorResponsePropertiesEmail{value: val, isSet: true} -} - -func (v NullableConnectorResponsePropertiesEmail) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorResponsePropertiesEmail) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_response_properties_index.go b/generated/kibanaactions/model_connector_response_properties_index.go index b02b655a0..6c9f1a548 100644 --- a/generated/kibanaactions/model_connector_response_properties_index.go +++ b/generated/kibanaactions/model_connector_response_properties_index.go @@ -1,292 +1,22 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConnectorResponsePropertiesIndex type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectorResponsePropertiesIndex{} - -// ConnectorResponsePropertiesIndex struct for ConnectorResponsePropertiesIndex type ConnectorResponsePropertiesIndex struct { - Config ConfigPropertiesIndex `json:"config"` + Config *ConfigPropertiesIndex `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The identifier for the connector. - Id string `json:"id"` - // Indicates whether the connector type is deprecated. - IsDeprecated bool `json:"is_deprecated"` - // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. - IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` - // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. - IsPreconfigured bool `json:"is_preconfigured"` + Id string `json:"id"` + IsDeprecated bool `json:"is_deprecated"` + IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` + IsPreconfigured bool `json:"is_preconfigured"` // The display name for the connector. Name string `json:"name"` } - -// NewConnectorResponsePropertiesIndex instantiates a new ConnectorResponsePropertiesIndex object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectorResponsePropertiesIndex(config ConfigPropertiesIndex, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesIndex { - this := ConnectorResponsePropertiesIndex{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Id = id - this.IsDeprecated = isDeprecated - this.IsPreconfigured = isPreconfigured - this.Name = name - return &this -} - -// NewConnectorResponsePropertiesIndexWithDefaults instantiates a new ConnectorResponsePropertiesIndex object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectorResponsePropertiesIndexWithDefaults() *ConnectorResponsePropertiesIndex { - this := ConnectorResponsePropertiesIndex{} - return &this -} - -// GetConfig returns the Config field value -func (o *ConnectorResponsePropertiesIndex) GetConfig() ConfigPropertiesIndex { - if o == nil { - var ret ConfigPropertiesIndex - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesIndex) GetConfigOk() (*ConfigPropertiesIndex, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *ConnectorResponsePropertiesIndex) SetConfig(v ConfigPropertiesIndex) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *ConnectorResponsePropertiesIndex) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesIndex) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *ConnectorResponsePropertiesIndex) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetId returns the Id field value -func (o *ConnectorResponsePropertiesIndex) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesIndex) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ConnectorResponsePropertiesIndex) SetId(v string) { - o.Id = v -} - -// GetIsDeprecated returns the IsDeprecated field value -func (o *ConnectorResponsePropertiesIndex) GetIsDeprecated() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesIndex) GetIsDeprecatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsDeprecated, true -} - -// SetIsDeprecated sets field value -func (o *ConnectorResponsePropertiesIndex) SetIsDeprecated(v bool) { - o.IsDeprecated = v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *ConnectorResponsePropertiesIndex) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesIndex) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *ConnectorResponsePropertiesIndex) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *ConnectorResponsePropertiesIndex) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value -func (o *ConnectorResponsePropertiesIndex) GetIsPreconfigured() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesIndex) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPreconfigured, true -} - -// SetIsPreconfigured sets field value -func (o *ConnectorResponsePropertiesIndex) SetIsPreconfigured(v bool) { - o.IsPreconfigured = v -} - -// GetName returns the Name field value -func (o *ConnectorResponsePropertiesIndex) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesIndex) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ConnectorResponsePropertiesIndex) SetName(v string) { - o.Name = v -} - -func (o ConnectorResponsePropertiesIndex) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectorResponsePropertiesIndex) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["id"] = o.Id - toSerialize["is_deprecated"] = o.IsDeprecated - if !IsNil(o.IsMissingSecrets) { - toSerialize["is_missing_secrets"] = o.IsMissingSecrets - } - toSerialize["is_preconfigured"] = o.IsPreconfigured - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableConnectorResponsePropertiesIndex struct { - value *ConnectorResponsePropertiesIndex - isSet bool -} - -func (v NullableConnectorResponsePropertiesIndex) Get() *ConnectorResponsePropertiesIndex { - return v.value -} - -func (v *NullableConnectorResponsePropertiesIndex) Set(val *ConnectorResponsePropertiesIndex) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorResponsePropertiesIndex) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorResponsePropertiesIndex) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorResponsePropertiesIndex(val *ConnectorResponsePropertiesIndex) *NullableConnectorResponsePropertiesIndex { - return &NullableConnectorResponsePropertiesIndex{value: val, isSet: true} -} - -func (v NullableConnectorResponsePropertiesIndex) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorResponsePropertiesIndex) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_response_properties_jira.go b/generated/kibanaactions/model_connector_response_properties_jira.go index fe00c61b1..c0efcb5bf 100644 --- a/generated/kibanaactions/model_connector_response_properties_jira.go +++ b/generated/kibanaactions/model_connector_response_properties_jira.go @@ -1,292 +1,22 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConnectorResponsePropertiesJira type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectorResponsePropertiesJira{} - -// ConnectorResponsePropertiesJira struct for ConnectorResponsePropertiesJira type ConnectorResponsePropertiesJira struct { - Config ConfigPropertiesJira `json:"config"` + Config *ConfigPropertiesJira `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The identifier for the connector. - Id string `json:"id"` - // Indicates whether the connector type is deprecated. - IsDeprecated bool `json:"is_deprecated"` - // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. - IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` - // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. - IsPreconfigured bool `json:"is_preconfigured"` + Id string `json:"id"` + IsDeprecated bool `json:"is_deprecated"` + IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` + IsPreconfigured bool `json:"is_preconfigured"` // The display name for the connector. Name string `json:"name"` } - -// NewConnectorResponsePropertiesJira instantiates a new ConnectorResponsePropertiesJira object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectorResponsePropertiesJira(config ConfigPropertiesJira, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesJira { - this := ConnectorResponsePropertiesJira{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Id = id - this.IsDeprecated = isDeprecated - this.IsPreconfigured = isPreconfigured - this.Name = name - return &this -} - -// NewConnectorResponsePropertiesJiraWithDefaults instantiates a new ConnectorResponsePropertiesJira object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectorResponsePropertiesJiraWithDefaults() *ConnectorResponsePropertiesJira { - this := ConnectorResponsePropertiesJira{} - return &this -} - -// GetConfig returns the Config field value -func (o *ConnectorResponsePropertiesJira) GetConfig() ConfigPropertiesJira { - if o == nil { - var ret ConfigPropertiesJira - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesJira) GetConfigOk() (*ConfigPropertiesJira, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *ConnectorResponsePropertiesJira) SetConfig(v ConfigPropertiesJira) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *ConnectorResponsePropertiesJira) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesJira) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *ConnectorResponsePropertiesJira) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetId returns the Id field value -func (o *ConnectorResponsePropertiesJira) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesJira) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ConnectorResponsePropertiesJira) SetId(v string) { - o.Id = v -} - -// GetIsDeprecated returns the IsDeprecated field value -func (o *ConnectorResponsePropertiesJira) GetIsDeprecated() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesJira) GetIsDeprecatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsDeprecated, true -} - -// SetIsDeprecated sets field value -func (o *ConnectorResponsePropertiesJira) SetIsDeprecated(v bool) { - o.IsDeprecated = v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *ConnectorResponsePropertiesJira) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesJira) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *ConnectorResponsePropertiesJira) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *ConnectorResponsePropertiesJira) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value -func (o *ConnectorResponsePropertiesJira) GetIsPreconfigured() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesJira) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPreconfigured, true -} - -// SetIsPreconfigured sets field value -func (o *ConnectorResponsePropertiesJira) SetIsPreconfigured(v bool) { - o.IsPreconfigured = v -} - -// GetName returns the Name field value -func (o *ConnectorResponsePropertiesJira) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesJira) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ConnectorResponsePropertiesJira) SetName(v string) { - o.Name = v -} - -func (o ConnectorResponsePropertiesJira) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectorResponsePropertiesJira) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["id"] = o.Id - toSerialize["is_deprecated"] = o.IsDeprecated - if !IsNil(o.IsMissingSecrets) { - toSerialize["is_missing_secrets"] = o.IsMissingSecrets - } - toSerialize["is_preconfigured"] = o.IsPreconfigured - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableConnectorResponsePropertiesJira struct { - value *ConnectorResponsePropertiesJira - isSet bool -} - -func (v NullableConnectorResponsePropertiesJira) Get() *ConnectorResponsePropertiesJira { - return v.value -} - -func (v *NullableConnectorResponsePropertiesJira) Set(val *ConnectorResponsePropertiesJira) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorResponsePropertiesJira) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorResponsePropertiesJira) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorResponsePropertiesJira(val *ConnectorResponsePropertiesJira) *NullableConnectorResponsePropertiesJira { - return &NullableConnectorResponsePropertiesJira{value: val, isSet: true} -} - -func (v NullableConnectorResponsePropertiesJira) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorResponsePropertiesJira) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_response_properties_opsgenie.go b/generated/kibanaactions/model_connector_response_properties_opsgenie.go index 476a42867..7e4dc042a 100644 --- a/generated/kibanaactions/model_connector_response_properties_opsgenie.go +++ b/generated/kibanaactions/model_connector_response_properties_opsgenie.go @@ -1,292 +1,22 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConnectorResponsePropertiesOpsgenie type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectorResponsePropertiesOpsgenie{} - -// ConnectorResponsePropertiesOpsgenie struct for ConnectorResponsePropertiesOpsgenie type ConnectorResponsePropertiesOpsgenie struct { - Config ConfigPropertiesOpsgenie `json:"config"` + Config *ConfigPropertiesOpsgenie `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The identifier for the connector. - Id string `json:"id"` - // Indicates whether the connector type is deprecated. - IsDeprecated bool `json:"is_deprecated"` - // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. - IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` - // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. - IsPreconfigured bool `json:"is_preconfigured"` + Id string `json:"id"` + IsDeprecated bool `json:"is_deprecated"` + IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` + IsPreconfigured bool `json:"is_preconfigured"` // The display name for the connector. Name string `json:"name"` } - -// NewConnectorResponsePropertiesOpsgenie instantiates a new ConnectorResponsePropertiesOpsgenie object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectorResponsePropertiesOpsgenie(config ConfigPropertiesOpsgenie, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesOpsgenie { - this := ConnectorResponsePropertiesOpsgenie{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Id = id - this.IsDeprecated = isDeprecated - this.IsPreconfigured = isPreconfigured - this.Name = name - return &this -} - -// NewConnectorResponsePropertiesOpsgenieWithDefaults instantiates a new ConnectorResponsePropertiesOpsgenie object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectorResponsePropertiesOpsgenieWithDefaults() *ConnectorResponsePropertiesOpsgenie { - this := ConnectorResponsePropertiesOpsgenie{} - return &this -} - -// GetConfig returns the Config field value -func (o *ConnectorResponsePropertiesOpsgenie) GetConfig() ConfigPropertiesOpsgenie { - if o == nil { - var ret ConfigPropertiesOpsgenie - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesOpsgenie) GetConfigOk() (*ConfigPropertiesOpsgenie, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *ConnectorResponsePropertiesOpsgenie) SetConfig(v ConfigPropertiesOpsgenie) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *ConnectorResponsePropertiesOpsgenie) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesOpsgenie) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *ConnectorResponsePropertiesOpsgenie) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetId returns the Id field value -func (o *ConnectorResponsePropertiesOpsgenie) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesOpsgenie) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ConnectorResponsePropertiesOpsgenie) SetId(v string) { - o.Id = v -} - -// GetIsDeprecated returns the IsDeprecated field value -func (o *ConnectorResponsePropertiesOpsgenie) GetIsDeprecated() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesOpsgenie) GetIsDeprecatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsDeprecated, true -} - -// SetIsDeprecated sets field value -func (o *ConnectorResponsePropertiesOpsgenie) SetIsDeprecated(v bool) { - o.IsDeprecated = v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *ConnectorResponsePropertiesOpsgenie) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesOpsgenie) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *ConnectorResponsePropertiesOpsgenie) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *ConnectorResponsePropertiesOpsgenie) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value -func (o *ConnectorResponsePropertiesOpsgenie) GetIsPreconfigured() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesOpsgenie) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPreconfigured, true -} - -// SetIsPreconfigured sets field value -func (o *ConnectorResponsePropertiesOpsgenie) SetIsPreconfigured(v bool) { - o.IsPreconfigured = v -} - -// GetName returns the Name field value -func (o *ConnectorResponsePropertiesOpsgenie) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesOpsgenie) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ConnectorResponsePropertiesOpsgenie) SetName(v string) { - o.Name = v -} - -func (o ConnectorResponsePropertiesOpsgenie) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectorResponsePropertiesOpsgenie) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["id"] = o.Id - toSerialize["is_deprecated"] = o.IsDeprecated - if !IsNil(o.IsMissingSecrets) { - toSerialize["is_missing_secrets"] = o.IsMissingSecrets - } - toSerialize["is_preconfigured"] = o.IsPreconfigured - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableConnectorResponsePropertiesOpsgenie struct { - value *ConnectorResponsePropertiesOpsgenie - isSet bool -} - -func (v NullableConnectorResponsePropertiesOpsgenie) Get() *ConnectorResponsePropertiesOpsgenie { - return v.value -} - -func (v *NullableConnectorResponsePropertiesOpsgenie) Set(val *ConnectorResponsePropertiesOpsgenie) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorResponsePropertiesOpsgenie) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorResponsePropertiesOpsgenie) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorResponsePropertiesOpsgenie(val *ConnectorResponsePropertiesOpsgenie) *NullableConnectorResponsePropertiesOpsgenie { - return &NullableConnectorResponsePropertiesOpsgenie{value: val, isSet: true} -} - -func (v NullableConnectorResponsePropertiesOpsgenie) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorResponsePropertiesOpsgenie) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_response_properties_pagerduty.go b/generated/kibanaactions/model_connector_response_properties_pagerduty.go index 101dfbf60..a737f1256 100644 --- a/generated/kibanaactions/model_connector_response_properties_pagerduty.go +++ b/generated/kibanaactions/model_connector_response_properties_pagerduty.go @@ -1,293 +1,22 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConnectorResponsePropertiesPagerduty type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectorResponsePropertiesPagerduty{} - -// ConnectorResponsePropertiesPagerduty struct for ConnectorResponsePropertiesPagerduty type ConnectorResponsePropertiesPagerduty struct { - // Defines properties for connectors when type is `.pagerduty`. - Config map[string]interface{} `json:"config"` + Config *ModelMap `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The identifier for the connector. - Id string `json:"id"` - // Indicates whether the connector type is deprecated. - IsDeprecated bool `json:"is_deprecated"` - // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. - IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` - // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. - IsPreconfigured bool `json:"is_preconfigured"` + Id string `json:"id"` + IsDeprecated bool `json:"is_deprecated"` + IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` + IsPreconfigured bool `json:"is_preconfigured"` // The display name for the connector. Name string `json:"name"` } - -// NewConnectorResponsePropertiesPagerduty instantiates a new ConnectorResponsePropertiesPagerduty object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectorResponsePropertiesPagerduty(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesPagerduty { - this := ConnectorResponsePropertiesPagerduty{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Id = id - this.IsDeprecated = isDeprecated - this.IsPreconfigured = isPreconfigured - this.Name = name - return &this -} - -// NewConnectorResponsePropertiesPagerdutyWithDefaults instantiates a new ConnectorResponsePropertiesPagerduty object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectorResponsePropertiesPagerdutyWithDefaults() *ConnectorResponsePropertiesPagerduty { - this := ConnectorResponsePropertiesPagerduty{} - return &this -} - -// GetConfig returns the Config field value -func (o *ConnectorResponsePropertiesPagerduty) GetConfig() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesPagerduty) GetConfigOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Config, true -} - -// SetConfig sets field value -func (o *ConnectorResponsePropertiesPagerduty) SetConfig(v map[string]interface{}) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *ConnectorResponsePropertiesPagerduty) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesPagerduty) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *ConnectorResponsePropertiesPagerduty) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetId returns the Id field value -func (o *ConnectorResponsePropertiesPagerduty) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesPagerduty) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ConnectorResponsePropertiesPagerduty) SetId(v string) { - o.Id = v -} - -// GetIsDeprecated returns the IsDeprecated field value -func (o *ConnectorResponsePropertiesPagerduty) GetIsDeprecated() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesPagerduty) GetIsDeprecatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsDeprecated, true -} - -// SetIsDeprecated sets field value -func (o *ConnectorResponsePropertiesPagerduty) SetIsDeprecated(v bool) { - o.IsDeprecated = v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *ConnectorResponsePropertiesPagerduty) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesPagerduty) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *ConnectorResponsePropertiesPagerduty) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *ConnectorResponsePropertiesPagerduty) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value -func (o *ConnectorResponsePropertiesPagerduty) GetIsPreconfigured() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesPagerduty) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPreconfigured, true -} - -// SetIsPreconfigured sets field value -func (o *ConnectorResponsePropertiesPagerduty) SetIsPreconfigured(v bool) { - o.IsPreconfigured = v -} - -// GetName returns the Name field value -func (o *ConnectorResponsePropertiesPagerduty) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesPagerduty) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ConnectorResponsePropertiesPagerduty) SetName(v string) { - o.Name = v -} - -func (o ConnectorResponsePropertiesPagerduty) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectorResponsePropertiesPagerduty) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["id"] = o.Id - toSerialize["is_deprecated"] = o.IsDeprecated - if !IsNil(o.IsMissingSecrets) { - toSerialize["is_missing_secrets"] = o.IsMissingSecrets - } - toSerialize["is_preconfigured"] = o.IsPreconfigured - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableConnectorResponsePropertiesPagerduty struct { - value *ConnectorResponsePropertiesPagerduty - isSet bool -} - -func (v NullableConnectorResponsePropertiesPagerduty) Get() *ConnectorResponsePropertiesPagerduty { - return v.value -} - -func (v *NullableConnectorResponsePropertiesPagerduty) Set(val *ConnectorResponsePropertiesPagerduty) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorResponsePropertiesPagerduty) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorResponsePropertiesPagerduty) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorResponsePropertiesPagerduty(val *ConnectorResponsePropertiesPagerduty) *NullableConnectorResponsePropertiesPagerduty { - return &NullableConnectorResponsePropertiesPagerduty{value: val, isSet: true} -} - -func (v NullableConnectorResponsePropertiesPagerduty) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorResponsePropertiesPagerduty) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_response_properties_resilient.go b/generated/kibanaactions/model_connector_response_properties_resilient.go index de9ebb696..7f158ad2f 100644 --- a/generated/kibanaactions/model_connector_response_properties_resilient.go +++ b/generated/kibanaactions/model_connector_response_properties_resilient.go @@ -1,292 +1,22 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConnectorResponsePropertiesResilient type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectorResponsePropertiesResilient{} - -// ConnectorResponsePropertiesResilient struct for ConnectorResponsePropertiesResilient type ConnectorResponsePropertiesResilient struct { - Config ConfigPropertiesResilient `json:"config"` + Config *ConfigPropertiesResilient `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The identifier for the connector. - Id string `json:"id"` - // Indicates whether the connector type is deprecated. - IsDeprecated bool `json:"is_deprecated"` - // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. - IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` - // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. - IsPreconfigured bool `json:"is_preconfigured"` + Id string `json:"id"` + IsDeprecated bool `json:"is_deprecated"` + IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` + IsPreconfigured bool `json:"is_preconfigured"` // The display name for the connector. Name string `json:"name"` } - -// NewConnectorResponsePropertiesResilient instantiates a new ConnectorResponsePropertiesResilient object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectorResponsePropertiesResilient(config ConfigPropertiesResilient, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesResilient { - this := ConnectorResponsePropertiesResilient{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Id = id - this.IsDeprecated = isDeprecated - this.IsPreconfigured = isPreconfigured - this.Name = name - return &this -} - -// NewConnectorResponsePropertiesResilientWithDefaults instantiates a new ConnectorResponsePropertiesResilient object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectorResponsePropertiesResilientWithDefaults() *ConnectorResponsePropertiesResilient { - this := ConnectorResponsePropertiesResilient{} - return &this -} - -// GetConfig returns the Config field value -func (o *ConnectorResponsePropertiesResilient) GetConfig() ConfigPropertiesResilient { - if o == nil { - var ret ConfigPropertiesResilient - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesResilient) GetConfigOk() (*ConfigPropertiesResilient, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *ConnectorResponsePropertiesResilient) SetConfig(v ConfigPropertiesResilient) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *ConnectorResponsePropertiesResilient) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesResilient) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *ConnectorResponsePropertiesResilient) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetId returns the Id field value -func (o *ConnectorResponsePropertiesResilient) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesResilient) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ConnectorResponsePropertiesResilient) SetId(v string) { - o.Id = v -} - -// GetIsDeprecated returns the IsDeprecated field value -func (o *ConnectorResponsePropertiesResilient) GetIsDeprecated() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesResilient) GetIsDeprecatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsDeprecated, true -} - -// SetIsDeprecated sets field value -func (o *ConnectorResponsePropertiesResilient) SetIsDeprecated(v bool) { - o.IsDeprecated = v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *ConnectorResponsePropertiesResilient) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesResilient) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *ConnectorResponsePropertiesResilient) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *ConnectorResponsePropertiesResilient) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value -func (o *ConnectorResponsePropertiesResilient) GetIsPreconfigured() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesResilient) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPreconfigured, true -} - -// SetIsPreconfigured sets field value -func (o *ConnectorResponsePropertiesResilient) SetIsPreconfigured(v bool) { - o.IsPreconfigured = v -} - -// GetName returns the Name field value -func (o *ConnectorResponsePropertiesResilient) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesResilient) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ConnectorResponsePropertiesResilient) SetName(v string) { - o.Name = v -} - -func (o ConnectorResponsePropertiesResilient) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectorResponsePropertiesResilient) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["id"] = o.Id - toSerialize["is_deprecated"] = o.IsDeprecated - if !IsNil(o.IsMissingSecrets) { - toSerialize["is_missing_secrets"] = o.IsMissingSecrets - } - toSerialize["is_preconfigured"] = o.IsPreconfigured - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableConnectorResponsePropertiesResilient struct { - value *ConnectorResponsePropertiesResilient - isSet bool -} - -func (v NullableConnectorResponsePropertiesResilient) Get() *ConnectorResponsePropertiesResilient { - return v.value -} - -func (v *NullableConnectorResponsePropertiesResilient) Set(val *ConnectorResponsePropertiesResilient) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorResponsePropertiesResilient) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorResponsePropertiesResilient) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorResponsePropertiesResilient(val *ConnectorResponsePropertiesResilient) *NullableConnectorResponsePropertiesResilient { - return &NullableConnectorResponsePropertiesResilient{value: val, isSet: true} -} - -func (v NullableConnectorResponsePropertiesResilient) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorResponsePropertiesResilient) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_response_properties_serverlog.go b/generated/kibanaactions/model_connector_response_properties_serverlog.go index 9c0be92e1..1a25b50a6 100644 --- a/generated/kibanaactions/model_connector_response_properties_serverlog.go +++ b/generated/kibanaactions/model_connector_response_properties_serverlog.go @@ -1,296 +1,22 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConnectorResponsePropertiesServerlog type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectorResponsePropertiesServerlog{} - -// ConnectorResponsePropertiesServerlog struct for ConnectorResponsePropertiesServerlog type ConnectorResponsePropertiesServerlog struct { - Config map[string]interface{} `json:"config"` + Config *interface{} `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The identifier for the connector. - Id string `json:"id"` - // Indicates whether the connector type is deprecated. - IsDeprecated bool `json:"is_deprecated"` - // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. - IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` - // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. - IsPreconfigured bool `json:"is_preconfigured"` + Id string `json:"id"` + IsDeprecated bool `json:"is_deprecated"` + IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` + IsPreconfigured bool `json:"is_preconfigured"` // The display name for the connector. Name string `json:"name"` } - -// NewConnectorResponsePropertiesServerlog instantiates a new ConnectorResponsePropertiesServerlog object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectorResponsePropertiesServerlog(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesServerlog { - this := ConnectorResponsePropertiesServerlog{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Id = id - this.IsDeprecated = isDeprecated - this.IsPreconfigured = isPreconfigured - this.Name = name - return &this -} - -// NewConnectorResponsePropertiesServerlogWithDefaults instantiates a new ConnectorResponsePropertiesServerlog object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectorResponsePropertiesServerlogWithDefaults() *ConnectorResponsePropertiesServerlog { - this := ConnectorResponsePropertiesServerlog{} - return &this -} - -// GetConfig returns the Config field value -// If the value is explicit nil, the zero value for map[string]interface{} will be returned -func (o *ConnectorResponsePropertiesServerlog) GetConfig() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ConnectorResponsePropertiesServerlog) GetConfigOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Config) { - return map[string]interface{}{}, false - } - return o.Config, true -} - -// SetConfig sets field value -func (o *ConnectorResponsePropertiesServerlog) SetConfig(v map[string]interface{}) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *ConnectorResponsePropertiesServerlog) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServerlog) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *ConnectorResponsePropertiesServerlog) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetId returns the Id field value -func (o *ConnectorResponsePropertiesServerlog) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServerlog) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ConnectorResponsePropertiesServerlog) SetId(v string) { - o.Id = v -} - -// GetIsDeprecated returns the IsDeprecated field value -func (o *ConnectorResponsePropertiesServerlog) GetIsDeprecated() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServerlog) GetIsDeprecatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsDeprecated, true -} - -// SetIsDeprecated sets field value -func (o *ConnectorResponsePropertiesServerlog) SetIsDeprecated(v bool) { - o.IsDeprecated = v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *ConnectorResponsePropertiesServerlog) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServerlog) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *ConnectorResponsePropertiesServerlog) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *ConnectorResponsePropertiesServerlog) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value -func (o *ConnectorResponsePropertiesServerlog) GetIsPreconfigured() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServerlog) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPreconfigured, true -} - -// SetIsPreconfigured sets field value -func (o *ConnectorResponsePropertiesServerlog) SetIsPreconfigured(v bool) { - o.IsPreconfigured = v -} - -// GetName returns the Name field value -func (o *ConnectorResponsePropertiesServerlog) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServerlog) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ConnectorResponsePropertiesServerlog) SetName(v string) { - o.Name = v -} - -func (o ConnectorResponsePropertiesServerlog) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectorResponsePropertiesServerlog) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Config != nil { - toSerialize["config"] = o.Config - } - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["id"] = o.Id - toSerialize["is_deprecated"] = o.IsDeprecated - if !IsNil(o.IsMissingSecrets) { - toSerialize["is_missing_secrets"] = o.IsMissingSecrets - } - toSerialize["is_preconfigured"] = o.IsPreconfigured - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableConnectorResponsePropertiesServerlog struct { - value *ConnectorResponsePropertiesServerlog - isSet bool -} - -func (v NullableConnectorResponsePropertiesServerlog) Get() *ConnectorResponsePropertiesServerlog { - return v.value -} - -func (v *NullableConnectorResponsePropertiesServerlog) Set(val *ConnectorResponsePropertiesServerlog) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorResponsePropertiesServerlog) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorResponsePropertiesServerlog) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorResponsePropertiesServerlog(val *ConnectorResponsePropertiesServerlog) *NullableConnectorResponsePropertiesServerlog { - return &NullableConnectorResponsePropertiesServerlog{value: val, isSet: true} -} - -func (v NullableConnectorResponsePropertiesServerlog) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorResponsePropertiesServerlog) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_response_properties_servicenow.go b/generated/kibanaactions/model_connector_response_properties_servicenow.go index d1dab1332..d6ac6d374 100644 --- a/generated/kibanaactions/model_connector_response_properties_servicenow.go +++ b/generated/kibanaactions/model_connector_response_properties_servicenow.go @@ -1,292 +1,22 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConnectorResponsePropertiesServicenow type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectorResponsePropertiesServicenow{} - -// ConnectorResponsePropertiesServicenow struct for ConnectorResponsePropertiesServicenow type ConnectorResponsePropertiesServicenow struct { - Config ConfigPropertiesServicenow `json:"config"` + Config *ConfigPropertiesServicenow `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The identifier for the connector. - Id string `json:"id"` - // Indicates whether the connector type is deprecated. - IsDeprecated bool `json:"is_deprecated"` - // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. - IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` - // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. - IsPreconfigured bool `json:"is_preconfigured"` + Id string `json:"id"` + IsDeprecated bool `json:"is_deprecated"` + IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` + IsPreconfigured bool `json:"is_preconfigured"` // The display name for the connector. Name string `json:"name"` } - -// NewConnectorResponsePropertiesServicenow instantiates a new ConnectorResponsePropertiesServicenow object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectorResponsePropertiesServicenow(config ConfigPropertiesServicenow, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesServicenow { - this := ConnectorResponsePropertiesServicenow{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Id = id - this.IsDeprecated = isDeprecated - this.IsPreconfigured = isPreconfigured - this.Name = name - return &this -} - -// NewConnectorResponsePropertiesServicenowWithDefaults instantiates a new ConnectorResponsePropertiesServicenow object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectorResponsePropertiesServicenowWithDefaults() *ConnectorResponsePropertiesServicenow { - this := ConnectorResponsePropertiesServicenow{} - return &this -} - -// GetConfig returns the Config field value -func (o *ConnectorResponsePropertiesServicenow) GetConfig() ConfigPropertiesServicenow { - if o == nil { - var ret ConfigPropertiesServicenow - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenow) GetConfigOk() (*ConfigPropertiesServicenow, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *ConnectorResponsePropertiesServicenow) SetConfig(v ConfigPropertiesServicenow) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *ConnectorResponsePropertiesServicenow) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenow) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *ConnectorResponsePropertiesServicenow) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetId returns the Id field value -func (o *ConnectorResponsePropertiesServicenow) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenow) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ConnectorResponsePropertiesServicenow) SetId(v string) { - o.Id = v -} - -// GetIsDeprecated returns the IsDeprecated field value -func (o *ConnectorResponsePropertiesServicenow) GetIsDeprecated() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenow) GetIsDeprecatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsDeprecated, true -} - -// SetIsDeprecated sets field value -func (o *ConnectorResponsePropertiesServicenow) SetIsDeprecated(v bool) { - o.IsDeprecated = v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *ConnectorResponsePropertiesServicenow) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenow) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *ConnectorResponsePropertiesServicenow) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *ConnectorResponsePropertiesServicenow) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value -func (o *ConnectorResponsePropertiesServicenow) GetIsPreconfigured() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenow) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPreconfigured, true -} - -// SetIsPreconfigured sets field value -func (o *ConnectorResponsePropertiesServicenow) SetIsPreconfigured(v bool) { - o.IsPreconfigured = v -} - -// GetName returns the Name field value -func (o *ConnectorResponsePropertiesServicenow) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenow) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ConnectorResponsePropertiesServicenow) SetName(v string) { - o.Name = v -} - -func (o ConnectorResponsePropertiesServicenow) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectorResponsePropertiesServicenow) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["id"] = o.Id - toSerialize["is_deprecated"] = o.IsDeprecated - if !IsNil(o.IsMissingSecrets) { - toSerialize["is_missing_secrets"] = o.IsMissingSecrets - } - toSerialize["is_preconfigured"] = o.IsPreconfigured - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableConnectorResponsePropertiesServicenow struct { - value *ConnectorResponsePropertiesServicenow - isSet bool -} - -func (v NullableConnectorResponsePropertiesServicenow) Get() *ConnectorResponsePropertiesServicenow { - return v.value -} - -func (v *NullableConnectorResponsePropertiesServicenow) Set(val *ConnectorResponsePropertiesServicenow) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorResponsePropertiesServicenow) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorResponsePropertiesServicenow) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorResponsePropertiesServicenow(val *ConnectorResponsePropertiesServicenow) *NullableConnectorResponsePropertiesServicenow { - return &NullableConnectorResponsePropertiesServicenow{value: val, isSet: true} -} - -func (v NullableConnectorResponsePropertiesServicenow) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorResponsePropertiesServicenow) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_response_properties_servicenow_itom.go b/generated/kibanaactions/model_connector_response_properties_servicenow_itom.go index fffdfa152..1b2187845 100644 --- a/generated/kibanaactions/model_connector_response_properties_servicenow_itom.go +++ b/generated/kibanaactions/model_connector_response_properties_servicenow_itom.go @@ -1,292 +1,22 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConnectorResponsePropertiesServicenowItom type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectorResponsePropertiesServicenowItom{} - -// ConnectorResponsePropertiesServicenowItom struct for ConnectorResponsePropertiesServicenowItom type ConnectorResponsePropertiesServicenowItom struct { - Config ConfigPropertiesServicenowItom `json:"config"` + Config *ConfigPropertiesServicenowItom `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The identifier for the connector. - Id string `json:"id"` - // Indicates whether the connector type is deprecated. - IsDeprecated bool `json:"is_deprecated"` - // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. - IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` - // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. - IsPreconfigured bool `json:"is_preconfigured"` + Id string `json:"id"` + IsDeprecated bool `json:"is_deprecated"` + IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` + IsPreconfigured bool `json:"is_preconfigured"` // The display name for the connector. Name string `json:"name"` } - -// NewConnectorResponsePropertiesServicenowItom instantiates a new ConnectorResponsePropertiesServicenowItom object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectorResponsePropertiesServicenowItom(config ConfigPropertiesServicenowItom, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesServicenowItom { - this := ConnectorResponsePropertiesServicenowItom{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Id = id - this.IsDeprecated = isDeprecated - this.IsPreconfigured = isPreconfigured - this.Name = name - return &this -} - -// NewConnectorResponsePropertiesServicenowItomWithDefaults instantiates a new ConnectorResponsePropertiesServicenowItom object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectorResponsePropertiesServicenowItomWithDefaults() *ConnectorResponsePropertiesServicenowItom { - this := ConnectorResponsePropertiesServicenowItom{} - return &this -} - -// GetConfig returns the Config field value -func (o *ConnectorResponsePropertiesServicenowItom) GetConfig() ConfigPropertiesServicenowItom { - if o == nil { - var ret ConfigPropertiesServicenowItom - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenowItom) GetConfigOk() (*ConfigPropertiesServicenowItom, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *ConnectorResponsePropertiesServicenowItom) SetConfig(v ConfigPropertiesServicenowItom) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *ConnectorResponsePropertiesServicenowItom) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenowItom) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *ConnectorResponsePropertiesServicenowItom) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetId returns the Id field value -func (o *ConnectorResponsePropertiesServicenowItom) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenowItom) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ConnectorResponsePropertiesServicenowItom) SetId(v string) { - o.Id = v -} - -// GetIsDeprecated returns the IsDeprecated field value -func (o *ConnectorResponsePropertiesServicenowItom) GetIsDeprecated() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenowItom) GetIsDeprecatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsDeprecated, true -} - -// SetIsDeprecated sets field value -func (o *ConnectorResponsePropertiesServicenowItom) SetIsDeprecated(v bool) { - o.IsDeprecated = v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *ConnectorResponsePropertiesServicenowItom) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenowItom) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *ConnectorResponsePropertiesServicenowItom) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *ConnectorResponsePropertiesServicenowItom) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value -func (o *ConnectorResponsePropertiesServicenowItom) GetIsPreconfigured() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenowItom) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPreconfigured, true -} - -// SetIsPreconfigured sets field value -func (o *ConnectorResponsePropertiesServicenowItom) SetIsPreconfigured(v bool) { - o.IsPreconfigured = v -} - -// GetName returns the Name field value -func (o *ConnectorResponsePropertiesServicenowItom) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenowItom) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ConnectorResponsePropertiesServicenowItom) SetName(v string) { - o.Name = v -} - -func (o ConnectorResponsePropertiesServicenowItom) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectorResponsePropertiesServicenowItom) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["id"] = o.Id - toSerialize["is_deprecated"] = o.IsDeprecated - if !IsNil(o.IsMissingSecrets) { - toSerialize["is_missing_secrets"] = o.IsMissingSecrets - } - toSerialize["is_preconfigured"] = o.IsPreconfigured - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableConnectorResponsePropertiesServicenowItom struct { - value *ConnectorResponsePropertiesServicenowItom - isSet bool -} - -func (v NullableConnectorResponsePropertiesServicenowItom) Get() *ConnectorResponsePropertiesServicenowItom { - return v.value -} - -func (v *NullableConnectorResponsePropertiesServicenowItom) Set(val *ConnectorResponsePropertiesServicenowItom) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorResponsePropertiesServicenowItom) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorResponsePropertiesServicenowItom) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorResponsePropertiesServicenowItom(val *ConnectorResponsePropertiesServicenowItom) *NullableConnectorResponsePropertiesServicenowItom { - return &NullableConnectorResponsePropertiesServicenowItom{value: val, isSet: true} -} - -func (v NullableConnectorResponsePropertiesServicenowItom) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorResponsePropertiesServicenowItom) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_response_properties_servicenow_sir.go b/generated/kibanaactions/model_connector_response_properties_servicenow_sir.go index 544f20cf6..3810c54ab 100644 --- a/generated/kibanaactions/model_connector_response_properties_servicenow_sir.go +++ b/generated/kibanaactions/model_connector_response_properties_servicenow_sir.go @@ -1,292 +1,22 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConnectorResponsePropertiesServicenowSir type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectorResponsePropertiesServicenowSir{} - -// ConnectorResponsePropertiesServicenowSir struct for ConnectorResponsePropertiesServicenowSir type ConnectorResponsePropertiesServicenowSir struct { - Config ConfigPropertiesServicenow `json:"config"` + Config *ConfigPropertiesServicenow `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The identifier for the connector. - Id string `json:"id"` - // Indicates whether the connector type is deprecated. - IsDeprecated bool `json:"is_deprecated"` - // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. - IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` - // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. - IsPreconfigured bool `json:"is_preconfigured"` + Id string `json:"id"` + IsDeprecated bool `json:"is_deprecated"` + IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` + IsPreconfigured bool `json:"is_preconfigured"` // The display name for the connector. Name string `json:"name"` } - -// NewConnectorResponsePropertiesServicenowSir instantiates a new ConnectorResponsePropertiesServicenowSir object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectorResponsePropertiesServicenowSir(config ConfigPropertiesServicenow, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesServicenowSir { - this := ConnectorResponsePropertiesServicenowSir{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Id = id - this.IsDeprecated = isDeprecated - this.IsPreconfigured = isPreconfigured - this.Name = name - return &this -} - -// NewConnectorResponsePropertiesServicenowSirWithDefaults instantiates a new ConnectorResponsePropertiesServicenowSir object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectorResponsePropertiesServicenowSirWithDefaults() *ConnectorResponsePropertiesServicenowSir { - this := ConnectorResponsePropertiesServicenowSir{} - return &this -} - -// GetConfig returns the Config field value -func (o *ConnectorResponsePropertiesServicenowSir) GetConfig() ConfigPropertiesServicenow { - if o == nil { - var ret ConfigPropertiesServicenow - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenowSir) GetConfigOk() (*ConfigPropertiesServicenow, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *ConnectorResponsePropertiesServicenowSir) SetConfig(v ConfigPropertiesServicenow) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *ConnectorResponsePropertiesServicenowSir) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenowSir) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *ConnectorResponsePropertiesServicenowSir) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetId returns the Id field value -func (o *ConnectorResponsePropertiesServicenowSir) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenowSir) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ConnectorResponsePropertiesServicenowSir) SetId(v string) { - o.Id = v -} - -// GetIsDeprecated returns the IsDeprecated field value -func (o *ConnectorResponsePropertiesServicenowSir) GetIsDeprecated() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenowSir) GetIsDeprecatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsDeprecated, true -} - -// SetIsDeprecated sets field value -func (o *ConnectorResponsePropertiesServicenowSir) SetIsDeprecated(v bool) { - o.IsDeprecated = v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *ConnectorResponsePropertiesServicenowSir) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenowSir) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *ConnectorResponsePropertiesServicenowSir) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *ConnectorResponsePropertiesServicenowSir) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value -func (o *ConnectorResponsePropertiesServicenowSir) GetIsPreconfigured() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenowSir) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPreconfigured, true -} - -// SetIsPreconfigured sets field value -func (o *ConnectorResponsePropertiesServicenowSir) SetIsPreconfigured(v bool) { - o.IsPreconfigured = v -} - -// GetName returns the Name field value -func (o *ConnectorResponsePropertiesServicenowSir) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesServicenowSir) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ConnectorResponsePropertiesServicenowSir) SetName(v string) { - o.Name = v -} - -func (o ConnectorResponsePropertiesServicenowSir) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectorResponsePropertiesServicenowSir) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["id"] = o.Id - toSerialize["is_deprecated"] = o.IsDeprecated - if !IsNil(o.IsMissingSecrets) { - toSerialize["is_missing_secrets"] = o.IsMissingSecrets - } - toSerialize["is_preconfigured"] = o.IsPreconfigured - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableConnectorResponsePropertiesServicenowSir struct { - value *ConnectorResponsePropertiesServicenowSir - isSet bool -} - -func (v NullableConnectorResponsePropertiesServicenowSir) Get() *ConnectorResponsePropertiesServicenowSir { - return v.value -} - -func (v *NullableConnectorResponsePropertiesServicenowSir) Set(val *ConnectorResponsePropertiesServicenowSir) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorResponsePropertiesServicenowSir) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorResponsePropertiesServicenowSir) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorResponsePropertiesServicenowSir(val *ConnectorResponsePropertiesServicenowSir) *NullableConnectorResponsePropertiesServicenowSir { - return &NullableConnectorResponsePropertiesServicenowSir{value: val, isSet: true} -} - -func (v NullableConnectorResponsePropertiesServicenowSir) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorResponsePropertiesServicenowSir) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_response_properties_slack.go b/generated/kibanaactions/model_connector_response_properties_slack.go index 340c2b385..431494588 100644 --- a/generated/kibanaactions/model_connector_response_properties_slack.go +++ b/generated/kibanaactions/model_connector_response_properties_slack.go @@ -1,265 +1,21 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConnectorResponsePropertiesSlack type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectorResponsePropertiesSlack{} - -// ConnectorResponsePropertiesSlack struct for ConnectorResponsePropertiesSlack type ConnectorResponsePropertiesSlack struct { // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The identifier for the connector. - Id string `json:"id"` - // Indicates whether the connector type is deprecated. - IsDeprecated bool `json:"is_deprecated"` - // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. - IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` - // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. - IsPreconfigured bool `json:"is_preconfigured"` + Id string `json:"id"` + IsDeprecated bool `json:"is_deprecated"` + IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` + IsPreconfigured bool `json:"is_preconfigured"` // The display name for the connector. Name string `json:"name"` } - -// NewConnectorResponsePropertiesSlack instantiates a new ConnectorResponsePropertiesSlack object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectorResponsePropertiesSlack(connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesSlack { - this := ConnectorResponsePropertiesSlack{} - this.ConnectorTypeId = connectorTypeId - this.Id = id - this.IsDeprecated = isDeprecated - this.IsPreconfigured = isPreconfigured - this.Name = name - return &this -} - -// NewConnectorResponsePropertiesSlackWithDefaults instantiates a new ConnectorResponsePropertiesSlack object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectorResponsePropertiesSlackWithDefaults() *ConnectorResponsePropertiesSlack { - this := ConnectorResponsePropertiesSlack{} - return &this -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *ConnectorResponsePropertiesSlack) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesSlack) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *ConnectorResponsePropertiesSlack) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetId returns the Id field value -func (o *ConnectorResponsePropertiesSlack) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesSlack) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ConnectorResponsePropertiesSlack) SetId(v string) { - o.Id = v -} - -// GetIsDeprecated returns the IsDeprecated field value -func (o *ConnectorResponsePropertiesSlack) GetIsDeprecated() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesSlack) GetIsDeprecatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsDeprecated, true -} - -// SetIsDeprecated sets field value -func (o *ConnectorResponsePropertiesSlack) SetIsDeprecated(v bool) { - o.IsDeprecated = v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *ConnectorResponsePropertiesSlack) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesSlack) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *ConnectorResponsePropertiesSlack) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *ConnectorResponsePropertiesSlack) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value -func (o *ConnectorResponsePropertiesSlack) GetIsPreconfigured() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesSlack) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPreconfigured, true -} - -// SetIsPreconfigured sets field value -func (o *ConnectorResponsePropertiesSlack) SetIsPreconfigured(v bool) { - o.IsPreconfigured = v -} - -// GetName returns the Name field value -func (o *ConnectorResponsePropertiesSlack) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesSlack) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ConnectorResponsePropertiesSlack) SetName(v string) { - o.Name = v -} - -func (o ConnectorResponsePropertiesSlack) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectorResponsePropertiesSlack) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["id"] = o.Id - toSerialize["is_deprecated"] = o.IsDeprecated - if !IsNil(o.IsMissingSecrets) { - toSerialize["is_missing_secrets"] = o.IsMissingSecrets - } - toSerialize["is_preconfigured"] = o.IsPreconfigured - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableConnectorResponsePropertiesSlack struct { - value *ConnectorResponsePropertiesSlack - isSet bool -} - -func (v NullableConnectorResponsePropertiesSlack) Get() *ConnectorResponsePropertiesSlack { - return v.value -} - -func (v *NullableConnectorResponsePropertiesSlack) Set(val *ConnectorResponsePropertiesSlack) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorResponsePropertiesSlack) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorResponsePropertiesSlack) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorResponsePropertiesSlack(val *ConnectorResponsePropertiesSlack) *NullableConnectorResponsePropertiesSlack { - return &NullableConnectorResponsePropertiesSlack{value: val, isSet: true} -} - -func (v NullableConnectorResponsePropertiesSlack) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorResponsePropertiesSlack) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_response_properties_swimlane.go b/generated/kibanaactions/model_connector_response_properties_swimlane.go index aea61e63d..df523fb12 100644 --- a/generated/kibanaactions/model_connector_response_properties_swimlane.go +++ b/generated/kibanaactions/model_connector_response_properties_swimlane.go @@ -1,292 +1,22 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConnectorResponsePropertiesSwimlane type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectorResponsePropertiesSwimlane{} - -// ConnectorResponsePropertiesSwimlane struct for ConnectorResponsePropertiesSwimlane type ConnectorResponsePropertiesSwimlane struct { - Config ConfigPropertiesSwimlane `json:"config"` + Config *ConfigPropertiesSwimlane `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The identifier for the connector. - Id string `json:"id"` - // Indicates whether the connector type is deprecated. - IsDeprecated bool `json:"is_deprecated"` - // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. - IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` - // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. - IsPreconfigured bool `json:"is_preconfigured"` + Id string `json:"id"` + IsDeprecated bool `json:"is_deprecated"` + IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` + IsPreconfigured bool `json:"is_preconfigured"` // The display name for the connector. Name string `json:"name"` } - -// NewConnectorResponsePropertiesSwimlane instantiates a new ConnectorResponsePropertiesSwimlane object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectorResponsePropertiesSwimlane(config ConfigPropertiesSwimlane, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesSwimlane { - this := ConnectorResponsePropertiesSwimlane{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Id = id - this.IsDeprecated = isDeprecated - this.IsPreconfigured = isPreconfigured - this.Name = name - return &this -} - -// NewConnectorResponsePropertiesSwimlaneWithDefaults instantiates a new ConnectorResponsePropertiesSwimlane object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectorResponsePropertiesSwimlaneWithDefaults() *ConnectorResponsePropertiesSwimlane { - this := ConnectorResponsePropertiesSwimlane{} - return &this -} - -// GetConfig returns the Config field value -func (o *ConnectorResponsePropertiesSwimlane) GetConfig() ConfigPropertiesSwimlane { - if o == nil { - var ret ConfigPropertiesSwimlane - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesSwimlane) GetConfigOk() (*ConfigPropertiesSwimlane, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *ConnectorResponsePropertiesSwimlane) SetConfig(v ConfigPropertiesSwimlane) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *ConnectorResponsePropertiesSwimlane) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesSwimlane) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *ConnectorResponsePropertiesSwimlane) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetId returns the Id field value -func (o *ConnectorResponsePropertiesSwimlane) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesSwimlane) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ConnectorResponsePropertiesSwimlane) SetId(v string) { - o.Id = v -} - -// GetIsDeprecated returns the IsDeprecated field value -func (o *ConnectorResponsePropertiesSwimlane) GetIsDeprecated() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesSwimlane) GetIsDeprecatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsDeprecated, true -} - -// SetIsDeprecated sets field value -func (o *ConnectorResponsePropertiesSwimlane) SetIsDeprecated(v bool) { - o.IsDeprecated = v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *ConnectorResponsePropertiesSwimlane) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesSwimlane) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *ConnectorResponsePropertiesSwimlane) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *ConnectorResponsePropertiesSwimlane) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value -func (o *ConnectorResponsePropertiesSwimlane) GetIsPreconfigured() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesSwimlane) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPreconfigured, true -} - -// SetIsPreconfigured sets field value -func (o *ConnectorResponsePropertiesSwimlane) SetIsPreconfigured(v bool) { - o.IsPreconfigured = v -} - -// GetName returns the Name field value -func (o *ConnectorResponsePropertiesSwimlane) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesSwimlane) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ConnectorResponsePropertiesSwimlane) SetName(v string) { - o.Name = v -} - -func (o ConnectorResponsePropertiesSwimlane) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectorResponsePropertiesSwimlane) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["id"] = o.Id - toSerialize["is_deprecated"] = o.IsDeprecated - if !IsNil(o.IsMissingSecrets) { - toSerialize["is_missing_secrets"] = o.IsMissingSecrets - } - toSerialize["is_preconfigured"] = o.IsPreconfigured - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableConnectorResponsePropertiesSwimlane struct { - value *ConnectorResponsePropertiesSwimlane - isSet bool -} - -func (v NullableConnectorResponsePropertiesSwimlane) Get() *ConnectorResponsePropertiesSwimlane { - return v.value -} - -func (v *NullableConnectorResponsePropertiesSwimlane) Set(val *ConnectorResponsePropertiesSwimlane) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorResponsePropertiesSwimlane) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorResponsePropertiesSwimlane) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorResponsePropertiesSwimlane(val *ConnectorResponsePropertiesSwimlane) *NullableConnectorResponsePropertiesSwimlane { - return &NullableConnectorResponsePropertiesSwimlane{value: val, isSet: true} -} - -func (v NullableConnectorResponsePropertiesSwimlane) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorResponsePropertiesSwimlane) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_response_properties_teams.go b/generated/kibanaactions/model_connector_response_properties_teams.go index 10c2c2f18..0f274a0e7 100644 --- a/generated/kibanaactions/model_connector_response_properties_teams.go +++ b/generated/kibanaactions/model_connector_response_properties_teams.go @@ -1,265 +1,21 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConnectorResponsePropertiesTeams type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectorResponsePropertiesTeams{} - -// ConnectorResponsePropertiesTeams struct for ConnectorResponsePropertiesTeams type ConnectorResponsePropertiesTeams struct { // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The identifier for the connector. - Id string `json:"id"` - // Indicates whether the connector type is deprecated. - IsDeprecated bool `json:"is_deprecated"` - // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. - IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` - // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. - IsPreconfigured bool `json:"is_preconfigured"` + Id string `json:"id"` + IsDeprecated bool `json:"is_deprecated"` + IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` + IsPreconfigured bool `json:"is_preconfigured"` // The display name for the connector. Name string `json:"name"` } - -// NewConnectorResponsePropertiesTeams instantiates a new ConnectorResponsePropertiesTeams object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectorResponsePropertiesTeams(connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesTeams { - this := ConnectorResponsePropertiesTeams{} - this.ConnectorTypeId = connectorTypeId - this.Id = id - this.IsDeprecated = isDeprecated - this.IsPreconfigured = isPreconfigured - this.Name = name - return &this -} - -// NewConnectorResponsePropertiesTeamsWithDefaults instantiates a new ConnectorResponsePropertiesTeams object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectorResponsePropertiesTeamsWithDefaults() *ConnectorResponsePropertiesTeams { - this := ConnectorResponsePropertiesTeams{} - return &this -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *ConnectorResponsePropertiesTeams) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesTeams) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *ConnectorResponsePropertiesTeams) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetId returns the Id field value -func (o *ConnectorResponsePropertiesTeams) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesTeams) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ConnectorResponsePropertiesTeams) SetId(v string) { - o.Id = v -} - -// GetIsDeprecated returns the IsDeprecated field value -func (o *ConnectorResponsePropertiesTeams) GetIsDeprecated() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesTeams) GetIsDeprecatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsDeprecated, true -} - -// SetIsDeprecated sets field value -func (o *ConnectorResponsePropertiesTeams) SetIsDeprecated(v bool) { - o.IsDeprecated = v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *ConnectorResponsePropertiesTeams) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesTeams) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *ConnectorResponsePropertiesTeams) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *ConnectorResponsePropertiesTeams) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value -func (o *ConnectorResponsePropertiesTeams) GetIsPreconfigured() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesTeams) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPreconfigured, true -} - -// SetIsPreconfigured sets field value -func (o *ConnectorResponsePropertiesTeams) SetIsPreconfigured(v bool) { - o.IsPreconfigured = v -} - -// GetName returns the Name field value -func (o *ConnectorResponsePropertiesTeams) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesTeams) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ConnectorResponsePropertiesTeams) SetName(v string) { - o.Name = v -} - -func (o ConnectorResponsePropertiesTeams) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectorResponsePropertiesTeams) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["id"] = o.Id - toSerialize["is_deprecated"] = o.IsDeprecated - if !IsNil(o.IsMissingSecrets) { - toSerialize["is_missing_secrets"] = o.IsMissingSecrets - } - toSerialize["is_preconfigured"] = o.IsPreconfigured - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableConnectorResponsePropertiesTeams struct { - value *ConnectorResponsePropertiesTeams - isSet bool -} - -func (v NullableConnectorResponsePropertiesTeams) Get() *ConnectorResponsePropertiesTeams { - return v.value -} - -func (v *NullableConnectorResponsePropertiesTeams) Set(val *ConnectorResponsePropertiesTeams) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorResponsePropertiesTeams) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorResponsePropertiesTeams) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorResponsePropertiesTeams(val *ConnectorResponsePropertiesTeams) *NullableConnectorResponsePropertiesTeams { - return &NullableConnectorResponsePropertiesTeams{value: val, isSet: true} -} - -func (v NullableConnectorResponsePropertiesTeams) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorResponsePropertiesTeams) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_response_properties_tines.go b/generated/kibanaactions/model_connector_response_properties_tines.go index 6de1bf76e..c868bf4e1 100644 --- a/generated/kibanaactions/model_connector_response_properties_tines.go +++ b/generated/kibanaactions/model_connector_response_properties_tines.go @@ -1,293 +1,22 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConnectorResponsePropertiesTines type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectorResponsePropertiesTines{} - -// ConnectorResponsePropertiesTines struct for ConnectorResponsePropertiesTines type ConnectorResponsePropertiesTines struct { - // Defines properties for connectors when type is `.tines`. - Config map[string]interface{} `json:"config"` + Config *ModelMap `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The identifier for the connector. - Id string `json:"id"` - // Indicates whether the connector type is deprecated. - IsDeprecated bool `json:"is_deprecated"` - // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. - IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` - // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. - IsPreconfigured bool `json:"is_preconfigured"` + Id string `json:"id"` + IsDeprecated bool `json:"is_deprecated"` + IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` + IsPreconfigured bool `json:"is_preconfigured"` // The display name for the connector. Name string `json:"name"` } - -// NewConnectorResponsePropertiesTines instantiates a new ConnectorResponsePropertiesTines object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectorResponsePropertiesTines(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesTines { - this := ConnectorResponsePropertiesTines{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Id = id - this.IsDeprecated = isDeprecated - this.IsPreconfigured = isPreconfigured - this.Name = name - return &this -} - -// NewConnectorResponsePropertiesTinesWithDefaults instantiates a new ConnectorResponsePropertiesTines object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectorResponsePropertiesTinesWithDefaults() *ConnectorResponsePropertiesTines { - this := ConnectorResponsePropertiesTines{} - return &this -} - -// GetConfig returns the Config field value -func (o *ConnectorResponsePropertiesTines) GetConfig() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesTines) GetConfigOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Config, true -} - -// SetConfig sets field value -func (o *ConnectorResponsePropertiesTines) SetConfig(v map[string]interface{}) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *ConnectorResponsePropertiesTines) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesTines) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *ConnectorResponsePropertiesTines) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetId returns the Id field value -func (o *ConnectorResponsePropertiesTines) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesTines) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ConnectorResponsePropertiesTines) SetId(v string) { - o.Id = v -} - -// GetIsDeprecated returns the IsDeprecated field value -func (o *ConnectorResponsePropertiesTines) GetIsDeprecated() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesTines) GetIsDeprecatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsDeprecated, true -} - -// SetIsDeprecated sets field value -func (o *ConnectorResponsePropertiesTines) SetIsDeprecated(v bool) { - o.IsDeprecated = v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *ConnectorResponsePropertiesTines) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesTines) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *ConnectorResponsePropertiesTines) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *ConnectorResponsePropertiesTines) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value -func (o *ConnectorResponsePropertiesTines) GetIsPreconfigured() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesTines) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPreconfigured, true -} - -// SetIsPreconfigured sets field value -func (o *ConnectorResponsePropertiesTines) SetIsPreconfigured(v bool) { - o.IsPreconfigured = v -} - -// GetName returns the Name field value -func (o *ConnectorResponsePropertiesTines) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesTines) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ConnectorResponsePropertiesTines) SetName(v string) { - o.Name = v -} - -func (o ConnectorResponsePropertiesTines) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectorResponsePropertiesTines) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["id"] = o.Id - toSerialize["is_deprecated"] = o.IsDeprecated - if !IsNil(o.IsMissingSecrets) { - toSerialize["is_missing_secrets"] = o.IsMissingSecrets - } - toSerialize["is_preconfigured"] = o.IsPreconfigured - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableConnectorResponsePropertiesTines struct { - value *ConnectorResponsePropertiesTines - isSet bool -} - -func (v NullableConnectorResponsePropertiesTines) Get() *ConnectorResponsePropertiesTines { - return v.value -} - -func (v *NullableConnectorResponsePropertiesTines) Set(val *ConnectorResponsePropertiesTines) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorResponsePropertiesTines) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorResponsePropertiesTines) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorResponsePropertiesTines(val *ConnectorResponsePropertiesTines) *NullableConnectorResponsePropertiesTines { - return &NullableConnectorResponsePropertiesTines{value: val, isSet: true} -} - -func (v NullableConnectorResponsePropertiesTines) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorResponsePropertiesTines) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_response_properties_webhook.go b/generated/kibanaactions/model_connector_response_properties_webhook.go index 9f64f57c1..ad98587eb 100644 --- a/generated/kibanaactions/model_connector_response_properties_webhook.go +++ b/generated/kibanaactions/model_connector_response_properties_webhook.go @@ -1,293 +1,22 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConnectorResponsePropertiesWebhook type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectorResponsePropertiesWebhook{} - -// ConnectorResponsePropertiesWebhook struct for ConnectorResponsePropertiesWebhook type ConnectorResponsePropertiesWebhook struct { - // Defines properties for connectors when type is `.webhook`. - Config map[string]interface{} `json:"config"` + Config *ModelMap `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The identifier for the connector. - Id string `json:"id"` - // Indicates whether the connector type is deprecated. - IsDeprecated bool `json:"is_deprecated"` - // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. - IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` - // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. - IsPreconfigured bool `json:"is_preconfigured"` + Id string `json:"id"` + IsDeprecated bool `json:"is_deprecated"` + IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` + IsPreconfigured bool `json:"is_preconfigured"` // The display name for the connector. Name string `json:"name"` } - -// NewConnectorResponsePropertiesWebhook instantiates a new ConnectorResponsePropertiesWebhook object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectorResponsePropertiesWebhook(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesWebhook { - this := ConnectorResponsePropertiesWebhook{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Id = id - this.IsDeprecated = isDeprecated - this.IsPreconfigured = isPreconfigured - this.Name = name - return &this -} - -// NewConnectorResponsePropertiesWebhookWithDefaults instantiates a new ConnectorResponsePropertiesWebhook object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectorResponsePropertiesWebhookWithDefaults() *ConnectorResponsePropertiesWebhook { - this := ConnectorResponsePropertiesWebhook{} - return &this -} - -// GetConfig returns the Config field value -func (o *ConnectorResponsePropertiesWebhook) GetConfig() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesWebhook) GetConfigOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Config, true -} - -// SetConfig sets field value -func (o *ConnectorResponsePropertiesWebhook) SetConfig(v map[string]interface{}) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *ConnectorResponsePropertiesWebhook) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesWebhook) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *ConnectorResponsePropertiesWebhook) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetId returns the Id field value -func (o *ConnectorResponsePropertiesWebhook) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesWebhook) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ConnectorResponsePropertiesWebhook) SetId(v string) { - o.Id = v -} - -// GetIsDeprecated returns the IsDeprecated field value -func (o *ConnectorResponsePropertiesWebhook) GetIsDeprecated() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesWebhook) GetIsDeprecatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsDeprecated, true -} - -// SetIsDeprecated sets field value -func (o *ConnectorResponsePropertiesWebhook) SetIsDeprecated(v bool) { - o.IsDeprecated = v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *ConnectorResponsePropertiesWebhook) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesWebhook) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *ConnectorResponsePropertiesWebhook) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *ConnectorResponsePropertiesWebhook) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value -func (o *ConnectorResponsePropertiesWebhook) GetIsPreconfigured() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesWebhook) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPreconfigured, true -} - -// SetIsPreconfigured sets field value -func (o *ConnectorResponsePropertiesWebhook) SetIsPreconfigured(v bool) { - o.IsPreconfigured = v -} - -// GetName returns the Name field value -func (o *ConnectorResponsePropertiesWebhook) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesWebhook) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ConnectorResponsePropertiesWebhook) SetName(v string) { - o.Name = v -} - -func (o ConnectorResponsePropertiesWebhook) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectorResponsePropertiesWebhook) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["id"] = o.Id - toSerialize["is_deprecated"] = o.IsDeprecated - if !IsNil(o.IsMissingSecrets) { - toSerialize["is_missing_secrets"] = o.IsMissingSecrets - } - toSerialize["is_preconfigured"] = o.IsPreconfigured - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableConnectorResponsePropertiesWebhook struct { - value *ConnectorResponsePropertiesWebhook - isSet bool -} - -func (v NullableConnectorResponsePropertiesWebhook) Get() *ConnectorResponsePropertiesWebhook { - return v.value -} - -func (v *NullableConnectorResponsePropertiesWebhook) Set(val *ConnectorResponsePropertiesWebhook) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorResponsePropertiesWebhook) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorResponsePropertiesWebhook) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorResponsePropertiesWebhook(val *ConnectorResponsePropertiesWebhook) *NullableConnectorResponsePropertiesWebhook { - return &NullableConnectorResponsePropertiesWebhook{value: val, isSet: true} -} - -func (v NullableConnectorResponsePropertiesWebhook) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorResponsePropertiesWebhook) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_response_properties_xmatters.go b/generated/kibanaactions/model_connector_response_properties_xmatters.go index 9b3c42e91..7b6db33c1 100644 --- a/generated/kibanaactions/model_connector_response_properties_xmatters.go +++ b/generated/kibanaactions/model_connector_response_properties_xmatters.go @@ -1,293 +1,22 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the ConnectorResponsePropertiesXmatters type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConnectorResponsePropertiesXmatters{} - -// ConnectorResponsePropertiesXmatters struct for ConnectorResponsePropertiesXmatters type ConnectorResponsePropertiesXmatters struct { - // Defines properties for connectors when type is `.xmatters`. - Config map[string]interface{} `json:"config"` + Config *ModelMap `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The identifier for the connector. - Id string `json:"id"` - // Indicates whether the connector type is deprecated. - IsDeprecated bool `json:"is_deprecated"` - // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. - IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` - // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. - IsPreconfigured bool `json:"is_preconfigured"` + Id string `json:"id"` + IsDeprecated bool `json:"is_deprecated"` + IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` + IsPreconfigured bool `json:"is_preconfigured"` // The display name for the connector. Name string `json:"name"` } - -// NewConnectorResponsePropertiesXmatters instantiates a new ConnectorResponsePropertiesXmatters object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConnectorResponsePropertiesXmatters(config map[string]interface{}, connectorTypeId string, id string, isDeprecated bool, isPreconfigured bool, name string) *ConnectorResponsePropertiesXmatters { - this := ConnectorResponsePropertiesXmatters{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Id = id - this.IsDeprecated = isDeprecated - this.IsPreconfigured = isPreconfigured - this.Name = name - return &this -} - -// NewConnectorResponsePropertiesXmattersWithDefaults instantiates a new ConnectorResponsePropertiesXmatters object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConnectorResponsePropertiesXmattersWithDefaults() *ConnectorResponsePropertiesXmatters { - this := ConnectorResponsePropertiesXmatters{} - return &this -} - -// GetConfig returns the Config field value -func (o *ConnectorResponsePropertiesXmatters) GetConfig() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesXmatters) GetConfigOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Config, true -} - -// SetConfig sets field value -func (o *ConnectorResponsePropertiesXmatters) SetConfig(v map[string]interface{}) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *ConnectorResponsePropertiesXmatters) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesXmatters) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *ConnectorResponsePropertiesXmatters) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetId returns the Id field value -func (o *ConnectorResponsePropertiesXmatters) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesXmatters) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ConnectorResponsePropertiesXmatters) SetId(v string) { - o.Id = v -} - -// GetIsDeprecated returns the IsDeprecated field value -func (o *ConnectorResponsePropertiesXmatters) GetIsDeprecated() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesXmatters) GetIsDeprecatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsDeprecated, true -} - -// SetIsDeprecated sets field value -func (o *ConnectorResponsePropertiesXmatters) SetIsDeprecated(v bool) { - o.IsDeprecated = v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *ConnectorResponsePropertiesXmatters) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesXmatters) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *ConnectorResponsePropertiesXmatters) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *ConnectorResponsePropertiesXmatters) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value -func (o *ConnectorResponsePropertiesXmatters) GetIsPreconfigured() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesXmatters) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPreconfigured, true -} - -// SetIsPreconfigured sets field value -func (o *ConnectorResponsePropertiesXmatters) SetIsPreconfigured(v bool) { - o.IsPreconfigured = v -} - -// GetName returns the Name field value -func (o *ConnectorResponsePropertiesXmatters) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ConnectorResponsePropertiesXmatters) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ConnectorResponsePropertiesXmatters) SetName(v string) { - o.Name = v -} - -func (o ConnectorResponsePropertiesXmatters) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConnectorResponsePropertiesXmatters) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["id"] = o.Id - toSerialize["is_deprecated"] = o.IsDeprecated - if !IsNil(o.IsMissingSecrets) { - toSerialize["is_missing_secrets"] = o.IsMissingSecrets - } - toSerialize["is_preconfigured"] = o.IsPreconfigured - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableConnectorResponsePropertiesXmatters struct { - value *ConnectorResponsePropertiesXmatters - isSet bool -} - -func (v NullableConnectorResponsePropertiesXmatters) Get() *ConnectorResponsePropertiesXmatters { - return v.value -} - -func (v *NullableConnectorResponsePropertiesXmatters) Set(val *ConnectorResponsePropertiesXmatters) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorResponsePropertiesXmatters) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorResponsePropertiesXmatters) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorResponsePropertiesXmatters(val *ConnectorResponsePropertiesXmatters) *NullableConnectorResponsePropertiesXmatters { - return &NullableConnectorResponsePropertiesXmatters{value: val, isSet: true} -} - -func (v NullableConnectorResponsePropertiesXmatters) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorResponsePropertiesXmatters) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_connector_types.go b/generated/kibanaactions/model_connector_types.go index e85a4504b..76f691249 100644 --- a/generated/kibanaactions/model_connector_types.go +++ b/generated/kibanaactions/model_connector_types.go @@ -1,140 +1,33 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" - "fmt" -) - -// ConnectorTypes The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`. +// ConnectorTypes : The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`. type ConnectorTypes string // List of connector_types const ( - CASES_WEBHOOK ConnectorTypes = ".cases-webhook" - EMAIL ConnectorTypes = ".email" - INDEX ConnectorTypes = ".index" - JIRA ConnectorTypes = ".jira" - OPSGENIE ConnectorTypes = ".opsgenie" - PAGERDUTY ConnectorTypes = ".pagerduty" - RESILIENT ConnectorTypes = ".resilient" - SERVICENOW ConnectorTypes = ".servicenow" - SERVICENOW_ITOM ConnectorTypes = ".servicenow-itom" - SERVICENOW_SIR ConnectorTypes = ".servicenow-sir" - SERVER_LOG ConnectorTypes = ".server-log" - SLACK ConnectorTypes = ".slack" - SWIMLANE ConnectorTypes = ".swimlane" - TEAMS ConnectorTypes = ".teams" - TINES ConnectorTypes = ".tines" - WEBHOOK ConnectorTypes = ".webhook" - XMATTERS ConnectorTypes = ".xmatters" + CASES_WEBHOOK_ConnectorTypes ConnectorTypes = ".cases-webhook" + EMAIL_ConnectorTypes ConnectorTypes = ".email" + INDEX_ConnectorTypes ConnectorTypes = ".index" + JIRA_ConnectorTypes ConnectorTypes = ".jira" + OPSGENIE_ConnectorTypes ConnectorTypes = ".opsgenie" + PAGERDUTY_ConnectorTypes ConnectorTypes = ".pagerduty" + RESILIENT_ConnectorTypes ConnectorTypes = ".resilient" + SERVICENOW_ConnectorTypes ConnectorTypes = ".servicenow" + SERVICENOW_ITOM_ConnectorTypes ConnectorTypes = ".servicenow-itom" + SERVICENOW_SIR_ConnectorTypes ConnectorTypes = ".servicenow-sir" + SERVER_LOG_ConnectorTypes ConnectorTypes = ".server-log" + SLACK_ConnectorTypes ConnectorTypes = ".slack" + SWIMLANE_ConnectorTypes ConnectorTypes = ".swimlane" + TEAMS_ConnectorTypes ConnectorTypes = ".teams" + TINES_ConnectorTypes ConnectorTypes = ".tines" + WEBHOOK_ConnectorTypes ConnectorTypes = ".webhook" + XMATTERS_ConnectorTypes ConnectorTypes = ".xmatters" ) - -// All allowed values of ConnectorTypes enum -var AllowedConnectorTypesEnumValues = []ConnectorTypes{ - ".cases-webhook", - ".email", - ".index", - ".jira", - ".opsgenie", - ".pagerduty", - ".resilient", - ".servicenow", - ".servicenow-itom", - ".servicenow-sir", - ".server-log", - ".slack", - ".swimlane", - ".teams", - ".tines", - ".webhook", - ".xmatters", -} - -func (v *ConnectorTypes) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := ConnectorTypes(value) - for _, existing := range AllowedConnectorTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid ConnectorTypes", value) -} - -// NewConnectorTypesFromValue returns a pointer to a valid ConnectorTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewConnectorTypesFromValue(v string) (*ConnectorTypes, error) { - ev := ConnectorTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for ConnectorTypes: valid values are %v", v, AllowedConnectorTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v ConnectorTypes) IsValid() bool { - for _, existing := range AllowedConnectorTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to connector_types value -func (v ConnectorTypes) Ptr() *ConnectorTypes { - return &v -} - -type NullableConnectorTypes struct { - value *ConnectorTypes - isSet bool -} - -func (v NullableConnectorTypes) Get() *ConnectorTypes { - return v.value -} - -func (v *NullableConnectorTypes) Set(val *ConnectorTypes) { - v.value = val - v.isSet = true -} - -func (v NullableConnectorTypes) IsSet() bool { - return v.isSet -} - -func (v *NullableConnectorTypes) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnectorTypes(val *ConnectorTypes) *NullableConnectorTypes { - return &NullableConnectorTypes{value: val, isSet: true} -} - -func (v NullableConnectorTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnectorTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_create_connector_request_body_properties.go b/generated/kibanaactions/model_create_connector_request_body_properties.go index 21ff32d88..5d8b9e302 100644 --- a/generated/kibanaactions/model_create_connector_request_body_properties.go +++ b/generated/kibanaactions/model_create_connector_request_body_properties.go @@ -1,559 +1,30 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" - "fmt" -) - -// CreateConnectorRequestBodyProperties - The properties vary depending on the connector type. +// The properties vary depending on the connector type. type CreateConnectorRequestBodyProperties struct { - CreateConnectorRequestCasesWebhook *CreateConnectorRequestCasesWebhook - CreateConnectorRequestEmail *CreateConnectorRequestEmail - CreateConnectorRequestIndex *CreateConnectorRequestIndex - CreateConnectorRequestJira *CreateConnectorRequestJira - CreateConnectorRequestOpsgenie *CreateConnectorRequestOpsgenie - CreateConnectorRequestPagerduty *CreateConnectorRequestPagerduty - CreateConnectorRequestResilient *CreateConnectorRequestResilient - CreateConnectorRequestServerlog *CreateConnectorRequestServerlog - CreateConnectorRequestServicenow *CreateConnectorRequestServicenow - CreateConnectorRequestServicenowItom *CreateConnectorRequestServicenowItom - CreateConnectorRequestServicenowSir *CreateConnectorRequestServicenowSir - CreateConnectorRequestSlack *CreateConnectorRequestSlack - CreateConnectorRequestSwimlane *CreateConnectorRequestSwimlane - CreateConnectorRequestTeams *CreateConnectorRequestTeams - CreateConnectorRequestTines *CreateConnectorRequestTines - CreateConnectorRequestWebhook *CreateConnectorRequestWebhook - CreateConnectorRequestXmatters *CreateConnectorRequestXmatters -} - -// CreateConnectorRequestCasesWebhookAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestCasesWebhook wrapped in CreateConnectorRequestBodyProperties -func CreateConnectorRequestCasesWebhookAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestCasesWebhook) CreateConnectorRequestBodyProperties { - return CreateConnectorRequestBodyProperties{ - CreateConnectorRequestCasesWebhook: v, - } -} - -// CreateConnectorRequestEmailAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestEmail wrapped in CreateConnectorRequestBodyProperties -func CreateConnectorRequestEmailAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestEmail) CreateConnectorRequestBodyProperties { - return CreateConnectorRequestBodyProperties{ - CreateConnectorRequestEmail: v, - } -} - -// CreateConnectorRequestIndexAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestIndex wrapped in CreateConnectorRequestBodyProperties -func CreateConnectorRequestIndexAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestIndex) CreateConnectorRequestBodyProperties { - return CreateConnectorRequestBodyProperties{ - CreateConnectorRequestIndex: v, - } -} - -// CreateConnectorRequestJiraAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestJira wrapped in CreateConnectorRequestBodyProperties -func CreateConnectorRequestJiraAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestJira) CreateConnectorRequestBodyProperties { - return CreateConnectorRequestBodyProperties{ - CreateConnectorRequestJira: v, - } -} - -// CreateConnectorRequestOpsgenieAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestOpsgenie wrapped in CreateConnectorRequestBodyProperties -func CreateConnectorRequestOpsgenieAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestOpsgenie) CreateConnectorRequestBodyProperties { - return CreateConnectorRequestBodyProperties{ - CreateConnectorRequestOpsgenie: v, - } -} - -// CreateConnectorRequestPagerdutyAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestPagerduty wrapped in CreateConnectorRequestBodyProperties -func CreateConnectorRequestPagerdutyAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestPagerduty) CreateConnectorRequestBodyProperties { - return CreateConnectorRequestBodyProperties{ - CreateConnectorRequestPagerduty: v, - } -} - -// CreateConnectorRequestResilientAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestResilient wrapped in CreateConnectorRequestBodyProperties -func CreateConnectorRequestResilientAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestResilient) CreateConnectorRequestBodyProperties { - return CreateConnectorRequestBodyProperties{ - CreateConnectorRequestResilient: v, - } -} - -// CreateConnectorRequestServerlogAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestServerlog wrapped in CreateConnectorRequestBodyProperties -func CreateConnectorRequestServerlogAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestServerlog) CreateConnectorRequestBodyProperties { - return CreateConnectorRequestBodyProperties{ - CreateConnectorRequestServerlog: v, - } -} - -// CreateConnectorRequestServicenowAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestServicenow wrapped in CreateConnectorRequestBodyProperties -func CreateConnectorRequestServicenowAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestServicenow) CreateConnectorRequestBodyProperties { - return CreateConnectorRequestBodyProperties{ - CreateConnectorRequestServicenow: v, - } -} - -// CreateConnectorRequestServicenowItomAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestServicenowItom wrapped in CreateConnectorRequestBodyProperties -func CreateConnectorRequestServicenowItomAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestServicenowItom) CreateConnectorRequestBodyProperties { - return CreateConnectorRequestBodyProperties{ - CreateConnectorRequestServicenowItom: v, - } -} - -// CreateConnectorRequestServicenowSirAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestServicenowSir wrapped in CreateConnectorRequestBodyProperties -func CreateConnectorRequestServicenowSirAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestServicenowSir) CreateConnectorRequestBodyProperties { - return CreateConnectorRequestBodyProperties{ - CreateConnectorRequestServicenowSir: v, - } -} - -// CreateConnectorRequestSlackAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestSlack wrapped in CreateConnectorRequestBodyProperties -func CreateConnectorRequestSlackAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestSlack) CreateConnectorRequestBodyProperties { - return CreateConnectorRequestBodyProperties{ - CreateConnectorRequestSlack: v, - } -} - -// CreateConnectorRequestSwimlaneAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestSwimlane wrapped in CreateConnectorRequestBodyProperties -func CreateConnectorRequestSwimlaneAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestSwimlane) CreateConnectorRequestBodyProperties { - return CreateConnectorRequestBodyProperties{ - CreateConnectorRequestSwimlane: v, - } -} - -// CreateConnectorRequestTeamsAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestTeams wrapped in CreateConnectorRequestBodyProperties -func CreateConnectorRequestTeamsAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestTeams) CreateConnectorRequestBodyProperties { - return CreateConnectorRequestBodyProperties{ - CreateConnectorRequestTeams: v, - } -} - -// CreateConnectorRequestTinesAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestTines wrapped in CreateConnectorRequestBodyProperties -func CreateConnectorRequestTinesAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestTines) CreateConnectorRequestBodyProperties { - return CreateConnectorRequestBodyProperties{ - CreateConnectorRequestTines: v, - } -} - -// CreateConnectorRequestWebhookAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestWebhook wrapped in CreateConnectorRequestBodyProperties -func CreateConnectorRequestWebhookAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestWebhook) CreateConnectorRequestBodyProperties { - return CreateConnectorRequestBodyProperties{ - CreateConnectorRequestWebhook: v, - } -} - -// CreateConnectorRequestXmattersAsCreateConnectorRequestBodyProperties is a convenience function that returns CreateConnectorRequestXmatters wrapped in CreateConnectorRequestBodyProperties -func CreateConnectorRequestXmattersAsCreateConnectorRequestBodyProperties(v *CreateConnectorRequestXmatters) CreateConnectorRequestBodyProperties { - return CreateConnectorRequestBodyProperties{ - CreateConnectorRequestXmatters: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *CreateConnectorRequestBodyProperties) UnmarshalJSON(data []byte) error { - var err error - // use discriminator value to speed up the lookup - var jsonDict map[string]interface{} - err = newStrictDecoder(data).Decode(&jsonDict) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") - } - - // check if the discriminator value is 'create_connector_request_cases_webhook' - if jsonDict["connector_type_id"] == "create_connector_request_cases_webhook" { - // try to unmarshal JSON data into CreateConnectorRequestCasesWebhook - err = json.Unmarshal(data, &dst.CreateConnectorRequestCasesWebhook) - if err == nil { - return nil // data stored in dst.CreateConnectorRequestCasesWebhook, return on the first match - } else { - dst.CreateConnectorRequestCasesWebhook = nil - return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestCasesWebhook: %s", err.Error()) - } - } - - // check if the discriminator value is 'create_connector_request_email' - if jsonDict["connector_type_id"] == "create_connector_request_email" { - // try to unmarshal JSON data into CreateConnectorRequestEmail - err = json.Unmarshal(data, &dst.CreateConnectorRequestEmail) - if err == nil { - return nil // data stored in dst.CreateConnectorRequestEmail, return on the first match - } else { - dst.CreateConnectorRequestEmail = nil - return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestEmail: %s", err.Error()) - } - } - - // check if the discriminator value is 'create_connector_request_index' - if jsonDict["connector_type_id"] == "create_connector_request_index" { - // try to unmarshal JSON data into CreateConnectorRequestIndex - err = json.Unmarshal(data, &dst.CreateConnectorRequestIndex) - if err == nil { - return nil // data stored in dst.CreateConnectorRequestIndex, return on the first match - } else { - dst.CreateConnectorRequestIndex = nil - return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestIndex: %s", err.Error()) - } - } - - // check if the discriminator value is 'create_connector_request_jira' - if jsonDict["connector_type_id"] == "create_connector_request_jira" { - // try to unmarshal JSON data into CreateConnectorRequestJira - err = json.Unmarshal(data, &dst.CreateConnectorRequestJira) - if err == nil { - return nil // data stored in dst.CreateConnectorRequestJira, return on the first match - } else { - dst.CreateConnectorRequestJira = nil - return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestJira: %s", err.Error()) - } - } - - // check if the discriminator value is 'create_connector_request_opsgenie' - if jsonDict["connector_type_id"] == "create_connector_request_opsgenie" { - // try to unmarshal JSON data into CreateConnectorRequestOpsgenie - err = json.Unmarshal(data, &dst.CreateConnectorRequestOpsgenie) - if err == nil { - return nil // data stored in dst.CreateConnectorRequestOpsgenie, return on the first match - } else { - dst.CreateConnectorRequestOpsgenie = nil - return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestOpsgenie: %s", err.Error()) - } - } - - // check if the discriminator value is 'create_connector_request_pagerduty' - if jsonDict["connector_type_id"] == "create_connector_request_pagerduty" { - // try to unmarshal JSON data into CreateConnectorRequestPagerduty - err = json.Unmarshal(data, &dst.CreateConnectorRequestPagerduty) - if err == nil { - return nil // data stored in dst.CreateConnectorRequestPagerduty, return on the first match - } else { - dst.CreateConnectorRequestPagerduty = nil - return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestPagerduty: %s", err.Error()) - } - } - - // check if the discriminator value is 'create_connector_request_resilient' - if jsonDict["connector_type_id"] == "create_connector_request_resilient" { - // try to unmarshal JSON data into CreateConnectorRequestResilient - err = json.Unmarshal(data, &dst.CreateConnectorRequestResilient) - if err == nil { - return nil // data stored in dst.CreateConnectorRequestResilient, return on the first match - } else { - dst.CreateConnectorRequestResilient = nil - return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestResilient: %s", err.Error()) - } - } - - // check if the discriminator value is 'create_connector_request_serverlog' - if jsonDict["connector_type_id"] == "create_connector_request_serverlog" { - // try to unmarshal JSON data into CreateConnectorRequestServerlog - err = json.Unmarshal(data, &dst.CreateConnectorRequestServerlog) - if err == nil { - return nil // data stored in dst.CreateConnectorRequestServerlog, return on the first match - } else { - dst.CreateConnectorRequestServerlog = nil - return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestServerlog: %s", err.Error()) - } - } - - // check if the discriminator value is 'create_connector_request_servicenow' - if jsonDict["connector_type_id"] == "create_connector_request_servicenow" { - // try to unmarshal JSON data into CreateConnectorRequestServicenow - err = json.Unmarshal(data, &dst.CreateConnectorRequestServicenow) - if err == nil { - return nil // data stored in dst.CreateConnectorRequestServicenow, return on the first match - } else { - dst.CreateConnectorRequestServicenow = nil - return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestServicenow: %s", err.Error()) - } - } - - // check if the discriminator value is 'create_connector_request_servicenow_itom' - if jsonDict["connector_type_id"] == "create_connector_request_servicenow_itom" { - // try to unmarshal JSON data into CreateConnectorRequestServicenowItom - err = json.Unmarshal(data, &dst.CreateConnectorRequestServicenowItom) - if err == nil { - return nil // data stored in dst.CreateConnectorRequestServicenowItom, return on the first match - } else { - dst.CreateConnectorRequestServicenowItom = nil - return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestServicenowItom: %s", err.Error()) - } - } - - // check if the discriminator value is 'create_connector_request_servicenow_sir' - if jsonDict["connector_type_id"] == "create_connector_request_servicenow_sir" { - // try to unmarshal JSON data into CreateConnectorRequestServicenowSir - err = json.Unmarshal(data, &dst.CreateConnectorRequestServicenowSir) - if err == nil { - return nil // data stored in dst.CreateConnectorRequestServicenowSir, return on the first match - } else { - dst.CreateConnectorRequestServicenowSir = nil - return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestServicenowSir: %s", err.Error()) - } - } - - // check if the discriminator value is 'create_connector_request_slack' - if jsonDict["connector_type_id"] == "create_connector_request_slack" { - // try to unmarshal JSON data into CreateConnectorRequestSlack - err = json.Unmarshal(data, &dst.CreateConnectorRequestSlack) - if err == nil { - return nil // data stored in dst.CreateConnectorRequestSlack, return on the first match - } else { - dst.CreateConnectorRequestSlack = nil - return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestSlack: %s", err.Error()) - } - } - - // check if the discriminator value is 'create_connector_request_swimlane' - if jsonDict["connector_type_id"] == "create_connector_request_swimlane" { - // try to unmarshal JSON data into CreateConnectorRequestSwimlane - err = json.Unmarshal(data, &dst.CreateConnectorRequestSwimlane) - if err == nil { - return nil // data stored in dst.CreateConnectorRequestSwimlane, return on the first match - } else { - dst.CreateConnectorRequestSwimlane = nil - return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestSwimlane: %s", err.Error()) - } - } - - // check if the discriminator value is 'create_connector_request_teams' - if jsonDict["connector_type_id"] == "create_connector_request_teams" { - // try to unmarshal JSON data into CreateConnectorRequestTeams - err = json.Unmarshal(data, &dst.CreateConnectorRequestTeams) - if err == nil { - return nil // data stored in dst.CreateConnectorRequestTeams, return on the first match - } else { - dst.CreateConnectorRequestTeams = nil - return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestTeams: %s", err.Error()) - } - } - - // check if the discriminator value is 'create_connector_request_tines' - if jsonDict["connector_type_id"] == "create_connector_request_tines" { - // try to unmarshal JSON data into CreateConnectorRequestTines - err = json.Unmarshal(data, &dst.CreateConnectorRequestTines) - if err == nil { - return nil // data stored in dst.CreateConnectorRequestTines, return on the first match - } else { - dst.CreateConnectorRequestTines = nil - return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestTines: %s", err.Error()) - } - } - - // check if the discriminator value is 'create_connector_request_webhook' - if jsonDict["connector_type_id"] == "create_connector_request_webhook" { - // try to unmarshal JSON data into CreateConnectorRequestWebhook - err = json.Unmarshal(data, &dst.CreateConnectorRequestWebhook) - if err == nil { - return nil // data stored in dst.CreateConnectorRequestWebhook, return on the first match - } else { - dst.CreateConnectorRequestWebhook = nil - return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestWebhook: %s", err.Error()) - } - } - - // check if the discriminator value is 'create_connector_request_xmatters' - if jsonDict["connector_type_id"] == "create_connector_request_xmatters" { - // try to unmarshal JSON data into CreateConnectorRequestXmatters - err = json.Unmarshal(data, &dst.CreateConnectorRequestXmatters) - if err == nil { - return nil // data stored in dst.CreateConnectorRequestXmatters, return on the first match - } else { - dst.CreateConnectorRequestXmatters = nil - return fmt.Errorf("failed to unmarshal CreateConnectorRequestBodyProperties as CreateConnectorRequestXmatters: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src CreateConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { - if src.CreateConnectorRequestCasesWebhook != nil { - return json.Marshal(&src.CreateConnectorRequestCasesWebhook) - } - - if src.CreateConnectorRequestEmail != nil { - return json.Marshal(&src.CreateConnectorRequestEmail) - } - - if src.CreateConnectorRequestIndex != nil { - return json.Marshal(&src.CreateConnectorRequestIndex) - } - - if src.CreateConnectorRequestJira != nil { - return json.Marshal(&src.CreateConnectorRequestJira) - } - - if src.CreateConnectorRequestOpsgenie != nil { - return json.Marshal(&src.CreateConnectorRequestOpsgenie) - } - - if src.CreateConnectorRequestPagerduty != nil { - return json.Marshal(&src.CreateConnectorRequestPagerduty) - } - - if src.CreateConnectorRequestResilient != nil { - return json.Marshal(&src.CreateConnectorRequestResilient) - } - - if src.CreateConnectorRequestServerlog != nil { - return json.Marshal(&src.CreateConnectorRequestServerlog) - } - - if src.CreateConnectorRequestServicenow != nil { - return json.Marshal(&src.CreateConnectorRequestServicenow) - } - - if src.CreateConnectorRequestServicenowItom != nil { - return json.Marshal(&src.CreateConnectorRequestServicenowItom) - } - - if src.CreateConnectorRequestServicenowSir != nil { - return json.Marshal(&src.CreateConnectorRequestServicenowSir) - } - - if src.CreateConnectorRequestSlack != nil { - return json.Marshal(&src.CreateConnectorRequestSlack) - } - - if src.CreateConnectorRequestSwimlane != nil { - return json.Marshal(&src.CreateConnectorRequestSwimlane) - } - - if src.CreateConnectorRequestTeams != nil { - return json.Marshal(&src.CreateConnectorRequestTeams) - } - - if src.CreateConnectorRequestTines != nil { - return json.Marshal(&src.CreateConnectorRequestTines) - } - - if src.CreateConnectorRequestWebhook != nil { - return json.Marshal(&src.CreateConnectorRequestWebhook) - } - - if src.CreateConnectorRequestXmatters != nil { - return json.Marshal(&src.CreateConnectorRequestXmatters) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *CreateConnectorRequestBodyProperties) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.CreateConnectorRequestCasesWebhook != nil { - return obj.CreateConnectorRequestCasesWebhook - } - - if obj.CreateConnectorRequestEmail != nil { - return obj.CreateConnectorRequestEmail - } - - if obj.CreateConnectorRequestIndex != nil { - return obj.CreateConnectorRequestIndex - } - - if obj.CreateConnectorRequestJira != nil { - return obj.CreateConnectorRequestJira - } - - if obj.CreateConnectorRequestOpsgenie != nil { - return obj.CreateConnectorRequestOpsgenie - } - - if obj.CreateConnectorRequestPagerduty != nil { - return obj.CreateConnectorRequestPagerduty - } - - if obj.CreateConnectorRequestResilient != nil { - return obj.CreateConnectorRequestResilient - } - - if obj.CreateConnectorRequestServerlog != nil { - return obj.CreateConnectorRequestServerlog - } - - if obj.CreateConnectorRequestServicenow != nil { - return obj.CreateConnectorRequestServicenow - } - - if obj.CreateConnectorRequestServicenowItom != nil { - return obj.CreateConnectorRequestServicenowItom - } - - if obj.CreateConnectorRequestServicenowSir != nil { - return obj.CreateConnectorRequestServicenowSir - } - - if obj.CreateConnectorRequestSlack != nil { - return obj.CreateConnectorRequestSlack - } - - if obj.CreateConnectorRequestSwimlane != nil { - return obj.CreateConnectorRequestSwimlane - } - - if obj.CreateConnectorRequestTeams != nil { - return obj.CreateConnectorRequestTeams - } - - if obj.CreateConnectorRequestTines != nil { - return obj.CreateConnectorRequestTines - } - - if obj.CreateConnectorRequestWebhook != nil { - return obj.CreateConnectorRequestWebhook - } - - if obj.CreateConnectorRequestXmatters != nil { - return obj.CreateConnectorRequestXmatters - } - - // all schemas are nil - return nil -} - -type NullableCreateConnectorRequestBodyProperties struct { - value *CreateConnectorRequestBodyProperties - isSet bool -} - -func (v NullableCreateConnectorRequestBodyProperties) Get() *CreateConnectorRequestBodyProperties { - return v.value -} - -func (v *NullableCreateConnectorRequestBodyProperties) Set(val *CreateConnectorRequestBodyProperties) { - v.value = val - v.isSet = true -} - -func (v NullableCreateConnectorRequestBodyProperties) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateConnectorRequestBodyProperties) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateConnectorRequestBodyProperties(val *CreateConnectorRequestBodyProperties) *NullableCreateConnectorRequestBodyProperties { - return &NullableCreateConnectorRequestBodyProperties{value: val, isSet: true} -} - -func (v NullableCreateConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateConnectorRequestBodyProperties) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + CreateConnectorRequestCasesWebhook + CreateConnectorRequestEmail + CreateConnectorRequestIndex + CreateConnectorRequestJira + CreateConnectorRequestOpsgenie + CreateConnectorRequestPagerduty + CreateConnectorRequestResilient + CreateConnectorRequestServerlog + CreateConnectorRequestServicenow + CreateConnectorRequestServicenowItom + CreateConnectorRequestServicenowSir + CreateConnectorRequestSlack + CreateConnectorRequestSwimlane + CreateConnectorRequestTeams + CreateConnectorRequestTines + CreateConnectorRequestWebhook + CreateConnectorRequestXmatters } diff --git a/generated/kibanaactions/model_create_connector_request_cases_webhook.go b/generated/kibanaactions/model_create_connector_request_cases_webhook.go index 75903cce2..334908cdc 100644 --- a/generated/kibanaactions/model_create_connector_request_cases_webhook.go +++ b/generated/kibanaactions/model_create_connector_request_cases_webhook.go @@ -1,207 +1,19 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CreateConnectorRequestCasesWebhook type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateConnectorRequestCasesWebhook{} - -// CreateConnectorRequestCasesWebhook The Webhook - Case Management connector uses axios to send POST, PUT, and GET requests to a case management RESTful API web service. +// The Webhook - Case Management connector uses axios to send POST, PUT, and GET requests to a case management RESTful API web service. type CreateConnectorRequestCasesWebhook struct { - Config ConfigPropertiesCasesWebhook `json:"config"` + Config *ConfigPropertiesCasesWebhook `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The display name for the connector. Name string `json:"name"` Secrets *SecretsPropertiesCasesWebhook `json:"secrets,omitempty"` } - -// NewCreateConnectorRequestCasesWebhook instantiates a new CreateConnectorRequestCasesWebhook object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateConnectorRequestCasesWebhook(config ConfigPropertiesCasesWebhook, connectorTypeId string, name string) *CreateConnectorRequestCasesWebhook { - this := CreateConnectorRequestCasesWebhook{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Name = name - return &this -} - -// NewCreateConnectorRequestCasesWebhookWithDefaults instantiates a new CreateConnectorRequestCasesWebhook object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateConnectorRequestCasesWebhookWithDefaults() *CreateConnectorRequestCasesWebhook { - this := CreateConnectorRequestCasesWebhook{} - return &this -} - -// GetConfig returns the Config field value -func (o *CreateConnectorRequestCasesWebhook) GetConfig() ConfigPropertiesCasesWebhook { - if o == nil { - var ret ConfigPropertiesCasesWebhook - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestCasesWebhook) GetConfigOk() (*ConfigPropertiesCasesWebhook, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *CreateConnectorRequestCasesWebhook) SetConfig(v ConfigPropertiesCasesWebhook) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *CreateConnectorRequestCasesWebhook) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestCasesWebhook) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *CreateConnectorRequestCasesWebhook) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetName returns the Name field value -func (o *CreateConnectorRequestCasesWebhook) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestCasesWebhook) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateConnectorRequestCasesWebhook) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value if set, zero value otherwise. -func (o *CreateConnectorRequestCasesWebhook) GetSecrets() SecretsPropertiesCasesWebhook { - if o == nil || IsNil(o.Secrets) { - var ret SecretsPropertiesCasesWebhook - return ret - } - return *o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestCasesWebhook) GetSecretsOk() (*SecretsPropertiesCasesWebhook, bool) { - if o == nil || IsNil(o.Secrets) { - return nil, false - } - return o.Secrets, true -} - -// HasSecrets returns a boolean if a field has been set. -func (o *CreateConnectorRequestCasesWebhook) HasSecrets() bool { - if o != nil && !IsNil(o.Secrets) { - return true - } - - return false -} - -// SetSecrets gets a reference to the given SecretsPropertiesCasesWebhook and assigns it to the Secrets field. -func (o *CreateConnectorRequestCasesWebhook) SetSecrets(v SecretsPropertiesCasesWebhook) { - o.Secrets = &v -} - -func (o CreateConnectorRequestCasesWebhook) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateConnectorRequestCasesWebhook) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["name"] = o.Name - if !IsNil(o.Secrets) { - toSerialize["secrets"] = o.Secrets - } - return toSerialize, nil -} - -type NullableCreateConnectorRequestCasesWebhook struct { - value *CreateConnectorRequestCasesWebhook - isSet bool -} - -func (v NullableCreateConnectorRequestCasesWebhook) Get() *CreateConnectorRequestCasesWebhook { - return v.value -} - -func (v *NullableCreateConnectorRequestCasesWebhook) Set(val *CreateConnectorRequestCasesWebhook) { - v.value = val - v.isSet = true -} - -func (v NullableCreateConnectorRequestCasesWebhook) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateConnectorRequestCasesWebhook) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateConnectorRequestCasesWebhook(val *CreateConnectorRequestCasesWebhook) *NullableCreateConnectorRequestCasesWebhook { - return &NullableCreateConnectorRequestCasesWebhook{value: val, isSet: true} -} - -func (v NullableCreateConnectorRequestCasesWebhook) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateConnectorRequestCasesWebhook) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_create_connector_request_email.go b/generated/kibanaactions/model_create_connector_request_email.go index c5c2a5b66..a1739d0ae 100644 --- a/generated/kibanaactions/model_create_connector_request_email.go +++ b/generated/kibanaactions/model_create_connector_request_email.go @@ -1,200 +1,19 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CreateConnectorRequestEmail type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateConnectorRequestEmail{} - -// CreateConnectorRequestEmail The email connector uses the SMTP protocol to send mail messages, using an integration of Nodemailer. An exception is Microsoft Exchange, which uses HTTP protocol for sending emails, Send mail. Email message text is sent as both plain text and html text. +// The email connector uses the SMTP protocol to send mail messages, using an integration of Nodemailer. An exception is Microsoft Exchange, which uses HTTP protocol for sending emails, Send mail. Email message text is sent as both plain text and html text. type CreateConnectorRequestEmail struct { - // Defines properties for connectors when type is `.email`. - Config map[string]interface{} `json:"config"` + Config *ModelMap `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The display name for the connector. - Name string `json:"name"` - // Defines secrets for connectors when type is `.email`. - Secrets map[string]interface{} `json:"secrets"` -} - -// NewCreateConnectorRequestEmail instantiates a new CreateConnectorRequestEmail object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateConnectorRequestEmail(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}) *CreateConnectorRequestEmail { - this := CreateConnectorRequestEmail{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Name = name - this.Secrets = secrets - return &this -} - -// NewCreateConnectorRequestEmailWithDefaults instantiates a new CreateConnectorRequestEmail object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateConnectorRequestEmailWithDefaults() *CreateConnectorRequestEmail { - this := CreateConnectorRequestEmail{} - return &this -} - -// GetConfig returns the Config field value -func (o *CreateConnectorRequestEmail) GetConfig() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestEmail) GetConfigOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Config, true -} - -// SetConfig sets field value -func (o *CreateConnectorRequestEmail) SetConfig(v map[string]interface{}) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *CreateConnectorRequestEmail) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestEmail) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *CreateConnectorRequestEmail) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetName returns the Name field value -func (o *CreateConnectorRequestEmail) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestEmail) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateConnectorRequestEmail) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *CreateConnectorRequestEmail) GetSecrets() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestEmail) GetSecretsOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Secrets, true -} - -// SetSecrets sets field value -func (o *CreateConnectorRequestEmail) SetSecrets(v map[string]interface{}) { - o.Secrets = v -} - -func (o CreateConnectorRequestEmail) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateConnectorRequestEmail) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableCreateConnectorRequestEmail struct { - value *CreateConnectorRequestEmail - isSet bool -} - -func (v NullableCreateConnectorRequestEmail) Get() *CreateConnectorRequestEmail { - return v.value -} - -func (v *NullableCreateConnectorRequestEmail) Set(val *CreateConnectorRequestEmail) { - v.value = val - v.isSet = true -} - -func (v NullableCreateConnectorRequestEmail) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateConnectorRequestEmail) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateConnectorRequestEmail(val *CreateConnectorRequestEmail) *NullableCreateConnectorRequestEmail { - return &NullableCreateConnectorRequestEmail{value: val, isSet: true} -} - -func (v NullableCreateConnectorRequestEmail) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateConnectorRequestEmail) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *ModelMap `json:"secrets"` } diff --git a/generated/kibanaactions/model_create_connector_request_index.go b/generated/kibanaactions/model_create_connector_request_index.go index 04ed98ab5..97225d8bb 100644 --- a/generated/kibanaactions/model_create_connector_request_index.go +++ b/generated/kibanaactions/model_create_connector_request_index.go @@ -1,171 +1,18 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CreateConnectorRequestIndex type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateConnectorRequestIndex{} - -// CreateConnectorRequestIndex The index connector indexes a document into Elasticsearch. +// The index connector indexes a document into Elasticsearch. type CreateConnectorRequestIndex struct { - Config ConfigPropertiesIndex `json:"config"` + Config *ConfigPropertiesIndex `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The display name for the connector. Name string `json:"name"` } - -// NewCreateConnectorRequestIndex instantiates a new CreateConnectorRequestIndex object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateConnectorRequestIndex(config ConfigPropertiesIndex, connectorTypeId string, name string) *CreateConnectorRequestIndex { - this := CreateConnectorRequestIndex{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Name = name - return &this -} - -// NewCreateConnectorRequestIndexWithDefaults instantiates a new CreateConnectorRequestIndex object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateConnectorRequestIndexWithDefaults() *CreateConnectorRequestIndex { - this := CreateConnectorRequestIndex{} - return &this -} - -// GetConfig returns the Config field value -func (o *CreateConnectorRequestIndex) GetConfig() ConfigPropertiesIndex { - if o == nil { - var ret ConfigPropertiesIndex - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestIndex) GetConfigOk() (*ConfigPropertiesIndex, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *CreateConnectorRequestIndex) SetConfig(v ConfigPropertiesIndex) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *CreateConnectorRequestIndex) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestIndex) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *CreateConnectorRequestIndex) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetName returns the Name field value -func (o *CreateConnectorRequestIndex) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestIndex) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateConnectorRequestIndex) SetName(v string) { - o.Name = v -} - -func (o CreateConnectorRequestIndex) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateConnectorRequestIndex) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableCreateConnectorRequestIndex struct { - value *CreateConnectorRequestIndex - isSet bool -} - -func (v NullableCreateConnectorRequestIndex) Get() *CreateConnectorRequestIndex { - return v.value -} - -func (v *NullableCreateConnectorRequestIndex) Set(val *CreateConnectorRequestIndex) { - v.value = val - v.isSet = true -} - -func (v NullableCreateConnectorRequestIndex) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateConnectorRequestIndex) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateConnectorRequestIndex(val *CreateConnectorRequestIndex) *NullableCreateConnectorRequestIndex { - return &NullableCreateConnectorRequestIndex{value: val, isSet: true} -} - -func (v NullableCreateConnectorRequestIndex) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateConnectorRequestIndex) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_create_connector_request_jira.go b/generated/kibanaactions/model_create_connector_request_jira.go index 6e7884067..899b0cad8 100644 --- a/generated/kibanaactions/model_create_connector_request_jira.go +++ b/generated/kibanaactions/model_create_connector_request_jira.go @@ -1,198 +1,19 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CreateConnectorRequestJira type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateConnectorRequestJira{} - -// CreateConnectorRequestJira The Jira connector uses the REST API v2 to create Jira issues. +// The Jira connector uses the REST API v2 to create Jira issues. type CreateConnectorRequestJira struct { - Config ConfigPropertiesJira `json:"config"` + Config *ConfigPropertiesJira `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesJira `json:"secrets"` -} - -// NewCreateConnectorRequestJira instantiates a new CreateConnectorRequestJira object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateConnectorRequestJira(config ConfigPropertiesJira, connectorTypeId string, name string, secrets SecretsPropertiesJira) *CreateConnectorRequestJira { - this := CreateConnectorRequestJira{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Name = name - this.Secrets = secrets - return &this -} - -// NewCreateConnectorRequestJiraWithDefaults instantiates a new CreateConnectorRequestJira object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateConnectorRequestJiraWithDefaults() *CreateConnectorRequestJira { - this := CreateConnectorRequestJira{} - return &this -} - -// GetConfig returns the Config field value -func (o *CreateConnectorRequestJira) GetConfig() ConfigPropertiesJira { - if o == nil { - var ret ConfigPropertiesJira - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestJira) GetConfigOk() (*ConfigPropertiesJira, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *CreateConnectorRequestJira) SetConfig(v ConfigPropertiesJira) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *CreateConnectorRequestJira) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestJira) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *CreateConnectorRequestJira) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetName returns the Name field value -func (o *CreateConnectorRequestJira) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestJira) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateConnectorRequestJira) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *CreateConnectorRequestJira) GetSecrets() SecretsPropertiesJira { - if o == nil { - var ret SecretsPropertiesJira - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestJira) GetSecretsOk() (*SecretsPropertiesJira, bool) { - if o == nil { - return nil, false - } - return &o.Secrets, true -} - -// SetSecrets sets field value -func (o *CreateConnectorRequestJira) SetSecrets(v SecretsPropertiesJira) { - o.Secrets = v -} - -func (o CreateConnectorRequestJira) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateConnectorRequestJira) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableCreateConnectorRequestJira struct { - value *CreateConnectorRequestJira - isSet bool -} - -func (v NullableCreateConnectorRequestJira) Get() *CreateConnectorRequestJira { - return v.value -} - -func (v *NullableCreateConnectorRequestJira) Set(val *CreateConnectorRequestJira) { - v.value = val - v.isSet = true -} - -func (v NullableCreateConnectorRequestJira) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateConnectorRequestJira) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateConnectorRequestJira(val *CreateConnectorRequestJira) *NullableCreateConnectorRequestJira { - return &NullableCreateConnectorRequestJira{value: val, isSet: true} -} - -func (v NullableCreateConnectorRequestJira) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateConnectorRequestJira) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *SecretsPropertiesJira `json:"secrets"` } diff --git a/generated/kibanaactions/model_create_connector_request_opsgenie.go b/generated/kibanaactions/model_create_connector_request_opsgenie.go index 9cd4631d2..d317c6120 100644 --- a/generated/kibanaactions/model_create_connector_request_opsgenie.go +++ b/generated/kibanaactions/model_create_connector_request_opsgenie.go @@ -1,198 +1,19 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CreateConnectorRequestOpsgenie type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateConnectorRequestOpsgenie{} - -// CreateConnectorRequestOpsgenie The Opsgenie connector uses the Opsgenie alert API. +// The Opsgenie connector uses the Opsgenie alert API. type CreateConnectorRequestOpsgenie struct { - Config ConfigPropertiesOpsgenie `json:"config"` + Config *ConfigPropertiesOpsgenie `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesOpsgenie `json:"secrets"` -} - -// NewCreateConnectorRequestOpsgenie instantiates a new CreateConnectorRequestOpsgenie object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateConnectorRequestOpsgenie(config ConfigPropertiesOpsgenie, connectorTypeId string, name string, secrets SecretsPropertiesOpsgenie) *CreateConnectorRequestOpsgenie { - this := CreateConnectorRequestOpsgenie{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Name = name - this.Secrets = secrets - return &this -} - -// NewCreateConnectorRequestOpsgenieWithDefaults instantiates a new CreateConnectorRequestOpsgenie object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateConnectorRequestOpsgenieWithDefaults() *CreateConnectorRequestOpsgenie { - this := CreateConnectorRequestOpsgenie{} - return &this -} - -// GetConfig returns the Config field value -func (o *CreateConnectorRequestOpsgenie) GetConfig() ConfigPropertiesOpsgenie { - if o == nil { - var ret ConfigPropertiesOpsgenie - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestOpsgenie) GetConfigOk() (*ConfigPropertiesOpsgenie, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *CreateConnectorRequestOpsgenie) SetConfig(v ConfigPropertiesOpsgenie) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *CreateConnectorRequestOpsgenie) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestOpsgenie) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *CreateConnectorRequestOpsgenie) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetName returns the Name field value -func (o *CreateConnectorRequestOpsgenie) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestOpsgenie) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateConnectorRequestOpsgenie) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *CreateConnectorRequestOpsgenie) GetSecrets() SecretsPropertiesOpsgenie { - if o == nil { - var ret SecretsPropertiesOpsgenie - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestOpsgenie) GetSecretsOk() (*SecretsPropertiesOpsgenie, bool) { - if o == nil { - return nil, false - } - return &o.Secrets, true -} - -// SetSecrets sets field value -func (o *CreateConnectorRequestOpsgenie) SetSecrets(v SecretsPropertiesOpsgenie) { - o.Secrets = v -} - -func (o CreateConnectorRequestOpsgenie) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateConnectorRequestOpsgenie) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableCreateConnectorRequestOpsgenie struct { - value *CreateConnectorRequestOpsgenie - isSet bool -} - -func (v NullableCreateConnectorRequestOpsgenie) Get() *CreateConnectorRequestOpsgenie { - return v.value -} - -func (v *NullableCreateConnectorRequestOpsgenie) Set(val *CreateConnectorRequestOpsgenie) { - v.value = val - v.isSet = true -} - -func (v NullableCreateConnectorRequestOpsgenie) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateConnectorRequestOpsgenie) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateConnectorRequestOpsgenie(val *CreateConnectorRequestOpsgenie) *NullableCreateConnectorRequestOpsgenie { - return &NullableCreateConnectorRequestOpsgenie{value: val, isSet: true} -} - -func (v NullableCreateConnectorRequestOpsgenie) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateConnectorRequestOpsgenie) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *SecretsPropertiesOpsgenie `json:"secrets"` } diff --git a/generated/kibanaactions/model_create_connector_request_pagerduty.go b/generated/kibanaactions/model_create_connector_request_pagerduty.go index 3e9518d49..d2873d7b8 100644 --- a/generated/kibanaactions/model_create_connector_request_pagerduty.go +++ b/generated/kibanaactions/model_create_connector_request_pagerduty.go @@ -1,200 +1,19 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CreateConnectorRequestPagerduty type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateConnectorRequestPagerduty{} - -// CreateConnectorRequestPagerduty The PagerDuty connector uses the v2 Events API to trigger, acknowledge, and resolve PagerDuty alerts. +// The PagerDuty connector uses the v2 Events API to trigger, acknowledge, and resolve PagerDuty alerts. type CreateConnectorRequestPagerduty struct { - // Defines properties for connectors when type is `.pagerduty`. - Config map[string]interface{} `json:"config"` + Config *ModelMap `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The display name for the connector. - Name string `json:"name"` - // Defines secrets for connectors when type is `.pagerduty`. - Secrets map[string]interface{} `json:"secrets"` -} - -// NewCreateConnectorRequestPagerduty instantiates a new CreateConnectorRequestPagerduty object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateConnectorRequestPagerduty(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}) *CreateConnectorRequestPagerduty { - this := CreateConnectorRequestPagerduty{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Name = name - this.Secrets = secrets - return &this -} - -// NewCreateConnectorRequestPagerdutyWithDefaults instantiates a new CreateConnectorRequestPagerduty object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateConnectorRequestPagerdutyWithDefaults() *CreateConnectorRequestPagerduty { - this := CreateConnectorRequestPagerduty{} - return &this -} - -// GetConfig returns the Config field value -func (o *CreateConnectorRequestPagerduty) GetConfig() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestPagerduty) GetConfigOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Config, true -} - -// SetConfig sets field value -func (o *CreateConnectorRequestPagerduty) SetConfig(v map[string]interface{}) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *CreateConnectorRequestPagerduty) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestPagerduty) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *CreateConnectorRequestPagerduty) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetName returns the Name field value -func (o *CreateConnectorRequestPagerduty) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestPagerduty) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateConnectorRequestPagerduty) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *CreateConnectorRequestPagerduty) GetSecrets() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestPagerduty) GetSecretsOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Secrets, true -} - -// SetSecrets sets field value -func (o *CreateConnectorRequestPagerduty) SetSecrets(v map[string]interface{}) { - o.Secrets = v -} - -func (o CreateConnectorRequestPagerduty) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateConnectorRequestPagerduty) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableCreateConnectorRequestPagerduty struct { - value *CreateConnectorRequestPagerduty - isSet bool -} - -func (v NullableCreateConnectorRequestPagerduty) Get() *CreateConnectorRequestPagerduty { - return v.value -} - -func (v *NullableCreateConnectorRequestPagerduty) Set(val *CreateConnectorRequestPagerduty) { - v.value = val - v.isSet = true -} - -func (v NullableCreateConnectorRequestPagerduty) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateConnectorRequestPagerduty) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateConnectorRequestPagerduty(val *CreateConnectorRequestPagerduty) *NullableCreateConnectorRequestPagerduty { - return &NullableCreateConnectorRequestPagerduty{value: val, isSet: true} -} - -func (v NullableCreateConnectorRequestPagerduty) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateConnectorRequestPagerduty) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *ModelMap `json:"secrets"` } diff --git a/generated/kibanaactions/model_create_connector_request_resilient.go b/generated/kibanaactions/model_create_connector_request_resilient.go index 4c33b53af..becadeb95 100644 --- a/generated/kibanaactions/model_create_connector_request_resilient.go +++ b/generated/kibanaactions/model_create_connector_request_resilient.go @@ -1,198 +1,19 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CreateConnectorRequestResilient type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateConnectorRequestResilient{} - -// CreateConnectorRequestResilient The IBM Resilient connector uses the RESILIENT REST v2 to create IBM Resilient incidents. +// The IBM Resilient connector uses the RESILIENT REST v2 to create IBM Resilient incidents. type CreateConnectorRequestResilient struct { - Config ConfigPropertiesResilient `json:"config"` + Config *ConfigPropertiesResilient `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesResilient `json:"secrets"` -} - -// NewCreateConnectorRequestResilient instantiates a new CreateConnectorRequestResilient object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateConnectorRequestResilient(config ConfigPropertiesResilient, connectorTypeId string, name string, secrets SecretsPropertiesResilient) *CreateConnectorRequestResilient { - this := CreateConnectorRequestResilient{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Name = name - this.Secrets = secrets - return &this -} - -// NewCreateConnectorRequestResilientWithDefaults instantiates a new CreateConnectorRequestResilient object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateConnectorRequestResilientWithDefaults() *CreateConnectorRequestResilient { - this := CreateConnectorRequestResilient{} - return &this -} - -// GetConfig returns the Config field value -func (o *CreateConnectorRequestResilient) GetConfig() ConfigPropertiesResilient { - if o == nil { - var ret ConfigPropertiesResilient - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestResilient) GetConfigOk() (*ConfigPropertiesResilient, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *CreateConnectorRequestResilient) SetConfig(v ConfigPropertiesResilient) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *CreateConnectorRequestResilient) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestResilient) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *CreateConnectorRequestResilient) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetName returns the Name field value -func (o *CreateConnectorRequestResilient) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestResilient) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateConnectorRequestResilient) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *CreateConnectorRequestResilient) GetSecrets() SecretsPropertiesResilient { - if o == nil { - var ret SecretsPropertiesResilient - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestResilient) GetSecretsOk() (*SecretsPropertiesResilient, bool) { - if o == nil { - return nil, false - } - return &o.Secrets, true -} - -// SetSecrets sets field value -func (o *CreateConnectorRequestResilient) SetSecrets(v SecretsPropertiesResilient) { - o.Secrets = v -} - -func (o CreateConnectorRequestResilient) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateConnectorRequestResilient) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableCreateConnectorRequestResilient struct { - value *CreateConnectorRequestResilient - isSet bool -} - -func (v NullableCreateConnectorRequestResilient) Get() *CreateConnectorRequestResilient { - return v.value -} - -func (v *NullableCreateConnectorRequestResilient) Set(val *CreateConnectorRequestResilient) { - v.value = val - v.isSet = true -} - -func (v NullableCreateConnectorRequestResilient) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateConnectorRequestResilient) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateConnectorRequestResilient(val *CreateConnectorRequestResilient) *NullableCreateConnectorRequestResilient { - return &NullableCreateConnectorRequestResilient{value: val, isSet: true} -} - -func (v NullableCreateConnectorRequestResilient) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateConnectorRequestResilient) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *SecretsPropertiesResilient `json:"secrets"` } diff --git a/generated/kibanaactions/model_create_connector_request_serverlog.go b/generated/kibanaactions/model_create_connector_request_serverlog.go index 7453ae227..5b5cf1e2d 100644 --- a/generated/kibanaactions/model_create_connector_request_serverlog.go +++ b/generated/kibanaactions/model_create_connector_request_serverlog.go @@ -1,144 +1,17 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CreateConnectorRequestServerlog type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateConnectorRequestServerlog{} - -// CreateConnectorRequestServerlog This connector writes an entry to the Kibana server log. +// This connector writes an entry to the Kibana server log. type CreateConnectorRequestServerlog struct { // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The display name for the connector. Name string `json:"name"` } - -// NewCreateConnectorRequestServerlog instantiates a new CreateConnectorRequestServerlog object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateConnectorRequestServerlog(connectorTypeId string, name string) *CreateConnectorRequestServerlog { - this := CreateConnectorRequestServerlog{} - this.ConnectorTypeId = connectorTypeId - this.Name = name - return &this -} - -// NewCreateConnectorRequestServerlogWithDefaults instantiates a new CreateConnectorRequestServerlog object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateConnectorRequestServerlogWithDefaults() *CreateConnectorRequestServerlog { - this := CreateConnectorRequestServerlog{} - return &this -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *CreateConnectorRequestServerlog) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestServerlog) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *CreateConnectorRequestServerlog) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetName returns the Name field value -func (o *CreateConnectorRequestServerlog) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestServerlog) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateConnectorRequestServerlog) SetName(v string) { - o.Name = v -} - -func (o CreateConnectorRequestServerlog) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateConnectorRequestServerlog) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableCreateConnectorRequestServerlog struct { - value *CreateConnectorRequestServerlog - isSet bool -} - -func (v NullableCreateConnectorRequestServerlog) Get() *CreateConnectorRequestServerlog { - return v.value -} - -func (v *NullableCreateConnectorRequestServerlog) Set(val *CreateConnectorRequestServerlog) { - v.value = val - v.isSet = true -} - -func (v NullableCreateConnectorRequestServerlog) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateConnectorRequestServerlog) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateConnectorRequestServerlog(val *CreateConnectorRequestServerlog) *NullableCreateConnectorRequestServerlog { - return &NullableCreateConnectorRequestServerlog{value: val, isSet: true} -} - -func (v NullableCreateConnectorRequestServerlog) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateConnectorRequestServerlog) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_create_connector_request_servicenow.go b/generated/kibanaactions/model_create_connector_request_servicenow.go index 64b5d67b8..d49deef17 100644 --- a/generated/kibanaactions/model_create_connector_request_servicenow.go +++ b/generated/kibanaactions/model_create_connector_request_servicenow.go @@ -1,198 +1,19 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CreateConnectorRequestServicenow type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateConnectorRequestServicenow{} - -// CreateConnectorRequestServicenow The ServiceNow ITSM connector uses the import set API to create ServiceNow incidents. You can use the connector for rule actions and cases. +// The ServiceNow ITSM connector uses the import set API to create ServiceNow incidents. You can use the connector for rule actions and cases. type CreateConnectorRequestServicenow struct { - Config ConfigPropertiesServicenow `json:"config"` + Config *ConfigPropertiesServicenow `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesServicenow `json:"secrets"` -} - -// NewCreateConnectorRequestServicenow instantiates a new CreateConnectorRequestServicenow object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateConnectorRequestServicenow(config ConfigPropertiesServicenow, connectorTypeId string, name string, secrets SecretsPropertiesServicenow) *CreateConnectorRequestServicenow { - this := CreateConnectorRequestServicenow{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Name = name - this.Secrets = secrets - return &this -} - -// NewCreateConnectorRequestServicenowWithDefaults instantiates a new CreateConnectorRequestServicenow object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateConnectorRequestServicenowWithDefaults() *CreateConnectorRequestServicenow { - this := CreateConnectorRequestServicenow{} - return &this -} - -// GetConfig returns the Config field value -func (o *CreateConnectorRequestServicenow) GetConfig() ConfigPropertiesServicenow { - if o == nil { - var ret ConfigPropertiesServicenow - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestServicenow) GetConfigOk() (*ConfigPropertiesServicenow, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *CreateConnectorRequestServicenow) SetConfig(v ConfigPropertiesServicenow) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *CreateConnectorRequestServicenow) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestServicenow) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *CreateConnectorRequestServicenow) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetName returns the Name field value -func (o *CreateConnectorRequestServicenow) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestServicenow) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateConnectorRequestServicenow) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *CreateConnectorRequestServicenow) GetSecrets() SecretsPropertiesServicenow { - if o == nil { - var ret SecretsPropertiesServicenow - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestServicenow) GetSecretsOk() (*SecretsPropertiesServicenow, bool) { - if o == nil { - return nil, false - } - return &o.Secrets, true -} - -// SetSecrets sets field value -func (o *CreateConnectorRequestServicenow) SetSecrets(v SecretsPropertiesServicenow) { - o.Secrets = v -} - -func (o CreateConnectorRequestServicenow) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateConnectorRequestServicenow) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableCreateConnectorRequestServicenow struct { - value *CreateConnectorRequestServicenow - isSet bool -} - -func (v NullableCreateConnectorRequestServicenow) Get() *CreateConnectorRequestServicenow { - return v.value -} - -func (v *NullableCreateConnectorRequestServicenow) Set(val *CreateConnectorRequestServicenow) { - v.value = val - v.isSet = true -} - -func (v NullableCreateConnectorRequestServicenow) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateConnectorRequestServicenow) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateConnectorRequestServicenow(val *CreateConnectorRequestServicenow) *NullableCreateConnectorRequestServicenow { - return &NullableCreateConnectorRequestServicenow{value: val, isSet: true} -} - -func (v NullableCreateConnectorRequestServicenow) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateConnectorRequestServicenow) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *SecretsPropertiesServicenow `json:"secrets"` } diff --git a/generated/kibanaactions/model_create_connector_request_servicenow_itom.go b/generated/kibanaactions/model_create_connector_request_servicenow_itom.go index 7099c44ae..5b692b71b 100644 --- a/generated/kibanaactions/model_create_connector_request_servicenow_itom.go +++ b/generated/kibanaactions/model_create_connector_request_servicenow_itom.go @@ -1,198 +1,19 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CreateConnectorRequestServicenowItom type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateConnectorRequestServicenowItom{} - -// CreateConnectorRequestServicenowItom The ServiceNow ITOM connector uses the event API to create ServiceNow events. You can use the connector for rule actions. +// The ServiceNow ITOM connector uses the event API to create ServiceNow events. You can use the connector for rule actions. type CreateConnectorRequestServicenowItom struct { - Config ConfigPropertiesServicenowItom `json:"config"` + Config *ConfigPropertiesServicenowItom `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesServicenow `json:"secrets"` -} - -// NewCreateConnectorRequestServicenowItom instantiates a new CreateConnectorRequestServicenowItom object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateConnectorRequestServicenowItom(config ConfigPropertiesServicenowItom, connectorTypeId string, name string, secrets SecretsPropertiesServicenow) *CreateConnectorRequestServicenowItom { - this := CreateConnectorRequestServicenowItom{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Name = name - this.Secrets = secrets - return &this -} - -// NewCreateConnectorRequestServicenowItomWithDefaults instantiates a new CreateConnectorRequestServicenowItom object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateConnectorRequestServicenowItomWithDefaults() *CreateConnectorRequestServicenowItom { - this := CreateConnectorRequestServicenowItom{} - return &this -} - -// GetConfig returns the Config field value -func (o *CreateConnectorRequestServicenowItom) GetConfig() ConfigPropertiesServicenowItom { - if o == nil { - var ret ConfigPropertiesServicenowItom - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestServicenowItom) GetConfigOk() (*ConfigPropertiesServicenowItom, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *CreateConnectorRequestServicenowItom) SetConfig(v ConfigPropertiesServicenowItom) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *CreateConnectorRequestServicenowItom) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestServicenowItom) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *CreateConnectorRequestServicenowItom) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetName returns the Name field value -func (o *CreateConnectorRequestServicenowItom) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestServicenowItom) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateConnectorRequestServicenowItom) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *CreateConnectorRequestServicenowItom) GetSecrets() SecretsPropertiesServicenow { - if o == nil { - var ret SecretsPropertiesServicenow - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestServicenowItom) GetSecretsOk() (*SecretsPropertiesServicenow, bool) { - if o == nil { - return nil, false - } - return &o.Secrets, true -} - -// SetSecrets sets field value -func (o *CreateConnectorRequestServicenowItom) SetSecrets(v SecretsPropertiesServicenow) { - o.Secrets = v -} - -func (o CreateConnectorRequestServicenowItom) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateConnectorRequestServicenowItom) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableCreateConnectorRequestServicenowItom struct { - value *CreateConnectorRequestServicenowItom - isSet bool -} - -func (v NullableCreateConnectorRequestServicenowItom) Get() *CreateConnectorRequestServicenowItom { - return v.value -} - -func (v *NullableCreateConnectorRequestServicenowItom) Set(val *CreateConnectorRequestServicenowItom) { - v.value = val - v.isSet = true -} - -func (v NullableCreateConnectorRequestServicenowItom) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateConnectorRequestServicenowItom) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateConnectorRequestServicenowItom(val *CreateConnectorRequestServicenowItom) *NullableCreateConnectorRequestServicenowItom { - return &NullableCreateConnectorRequestServicenowItom{value: val, isSet: true} -} - -func (v NullableCreateConnectorRequestServicenowItom) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateConnectorRequestServicenowItom) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *SecretsPropertiesServicenow `json:"secrets"` } diff --git a/generated/kibanaactions/model_create_connector_request_servicenow_sir.go b/generated/kibanaactions/model_create_connector_request_servicenow_sir.go index b02258539..2e216c2be 100644 --- a/generated/kibanaactions/model_create_connector_request_servicenow_sir.go +++ b/generated/kibanaactions/model_create_connector_request_servicenow_sir.go @@ -1,198 +1,19 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CreateConnectorRequestServicenowSir type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateConnectorRequestServicenowSir{} - -// CreateConnectorRequestServicenowSir The ServiceNow SecOps connector uses the import set API to create ServiceNow security incidents. You can use the connector for rule actions and cases. +// The ServiceNow SecOps connector uses the import set API to create ServiceNow security incidents. You can use the connector for rule actions and cases. type CreateConnectorRequestServicenowSir struct { - Config ConfigPropertiesServicenow `json:"config"` + Config *ConfigPropertiesServicenow `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesServicenow `json:"secrets"` -} - -// NewCreateConnectorRequestServicenowSir instantiates a new CreateConnectorRequestServicenowSir object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateConnectorRequestServicenowSir(config ConfigPropertiesServicenow, connectorTypeId string, name string, secrets SecretsPropertiesServicenow) *CreateConnectorRequestServicenowSir { - this := CreateConnectorRequestServicenowSir{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Name = name - this.Secrets = secrets - return &this -} - -// NewCreateConnectorRequestServicenowSirWithDefaults instantiates a new CreateConnectorRequestServicenowSir object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateConnectorRequestServicenowSirWithDefaults() *CreateConnectorRequestServicenowSir { - this := CreateConnectorRequestServicenowSir{} - return &this -} - -// GetConfig returns the Config field value -func (o *CreateConnectorRequestServicenowSir) GetConfig() ConfigPropertiesServicenow { - if o == nil { - var ret ConfigPropertiesServicenow - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestServicenowSir) GetConfigOk() (*ConfigPropertiesServicenow, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *CreateConnectorRequestServicenowSir) SetConfig(v ConfigPropertiesServicenow) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *CreateConnectorRequestServicenowSir) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestServicenowSir) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *CreateConnectorRequestServicenowSir) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetName returns the Name field value -func (o *CreateConnectorRequestServicenowSir) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestServicenowSir) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateConnectorRequestServicenowSir) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *CreateConnectorRequestServicenowSir) GetSecrets() SecretsPropertiesServicenow { - if o == nil { - var ret SecretsPropertiesServicenow - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestServicenowSir) GetSecretsOk() (*SecretsPropertiesServicenow, bool) { - if o == nil { - return nil, false - } - return &o.Secrets, true -} - -// SetSecrets sets field value -func (o *CreateConnectorRequestServicenowSir) SetSecrets(v SecretsPropertiesServicenow) { - o.Secrets = v -} - -func (o CreateConnectorRequestServicenowSir) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateConnectorRequestServicenowSir) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableCreateConnectorRequestServicenowSir struct { - value *CreateConnectorRequestServicenowSir - isSet bool -} - -func (v NullableCreateConnectorRequestServicenowSir) Get() *CreateConnectorRequestServicenowSir { - return v.value -} - -func (v *NullableCreateConnectorRequestServicenowSir) Set(val *CreateConnectorRequestServicenowSir) { - v.value = val - v.isSet = true -} - -func (v NullableCreateConnectorRequestServicenowSir) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateConnectorRequestServicenowSir) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateConnectorRequestServicenowSir(val *CreateConnectorRequestServicenowSir) *NullableCreateConnectorRequestServicenowSir { - return &NullableCreateConnectorRequestServicenowSir{value: val, isSet: true} -} - -func (v NullableCreateConnectorRequestServicenowSir) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateConnectorRequestServicenowSir) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *SecretsPropertiesServicenow `json:"secrets"` } diff --git a/generated/kibanaactions/model_create_connector_request_slack.go b/generated/kibanaactions/model_create_connector_request_slack.go index db1405ab3..b5ab702c9 100644 --- a/generated/kibanaactions/model_create_connector_request_slack.go +++ b/generated/kibanaactions/model_create_connector_request_slack.go @@ -1,172 +1,18 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CreateConnectorRequestSlack type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateConnectorRequestSlack{} - -// CreateConnectorRequestSlack The Slack connector uses Slack Incoming Webhooks. +// The Slack connector uses Slack Incoming Webhooks. type CreateConnectorRequestSlack struct { // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The display name for the connector. - Name string `json:"name"` - // Defines secrets for connectors when type is `.slack`. - Secrets map[string]interface{} `json:"secrets"` -} - -// NewCreateConnectorRequestSlack instantiates a new CreateConnectorRequestSlack object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateConnectorRequestSlack(connectorTypeId string, name string, secrets map[string]interface{}) *CreateConnectorRequestSlack { - this := CreateConnectorRequestSlack{} - this.ConnectorTypeId = connectorTypeId - this.Name = name - this.Secrets = secrets - return &this -} - -// NewCreateConnectorRequestSlackWithDefaults instantiates a new CreateConnectorRequestSlack object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateConnectorRequestSlackWithDefaults() *CreateConnectorRequestSlack { - this := CreateConnectorRequestSlack{} - return &this -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *CreateConnectorRequestSlack) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestSlack) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *CreateConnectorRequestSlack) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetName returns the Name field value -func (o *CreateConnectorRequestSlack) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestSlack) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateConnectorRequestSlack) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *CreateConnectorRequestSlack) GetSecrets() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestSlack) GetSecretsOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Secrets, true -} - -// SetSecrets sets field value -func (o *CreateConnectorRequestSlack) SetSecrets(v map[string]interface{}) { - o.Secrets = v -} - -func (o CreateConnectorRequestSlack) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateConnectorRequestSlack) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableCreateConnectorRequestSlack struct { - value *CreateConnectorRequestSlack - isSet bool -} - -func (v NullableCreateConnectorRequestSlack) Get() *CreateConnectorRequestSlack { - return v.value -} - -func (v *NullableCreateConnectorRequestSlack) Set(val *CreateConnectorRequestSlack) { - v.value = val - v.isSet = true -} - -func (v NullableCreateConnectorRequestSlack) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateConnectorRequestSlack) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateConnectorRequestSlack(val *CreateConnectorRequestSlack) *NullableCreateConnectorRequestSlack { - return &NullableCreateConnectorRequestSlack{value: val, isSet: true} -} - -func (v NullableCreateConnectorRequestSlack) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateConnectorRequestSlack) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *ModelMap `json:"secrets"` } diff --git a/generated/kibanaactions/model_create_connector_request_swimlane.go b/generated/kibanaactions/model_create_connector_request_swimlane.go index 1db9b1ca8..e6a3ecc9a 100644 --- a/generated/kibanaactions/model_create_connector_request_swimlane.go +++ b/generated/kibanaactions/model_create_connector_request_swimlane.go @@ -1,198 +1,19 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CreateConnectorRequestSwimlane type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateConnectorRequestSwimlane{} - -// CreateConnectorRequestSwimlane The Swimlane connector uses the Swimlane REST API to create Swimlane records. +// The Swimlane connector uses the Swimlane REST API to create Swimlane records. type CreateConnectorRequestSwimlane struct { - Config ConfigPropertiesSwimlane `json:"config"` + Config *ConfigPropertiesSwimlane `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesSwimlane `json:"secrets"` -} - -// NewCreateConnectorRequestSwimlane instantiates a new CreateConnectorRequestSwimlane object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateConnectorRequestSwimlane(config ConfigPropertiesSwimlane, connectorTypeId string, name string, secrets SecretsPropertiesSwimlane) *CreateConnectorRequestSwimlane { - this := CreateConnectorRequestSwimlane{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Name = name - this.Secrets = secrets - return &this -} - -// NewCreateConnectorRequestSwimlaneWithDefaults instantiates a new CreateConnectorRequestSwimlane object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateConnectorRequestSwimlaneWithDefaults() *CreateConnectorRequestSwimlane { - this := CreateConnectorRequestSwimlane{} - return &this -} - -// GetConfig returns the Config field value -func (o *CreateConnectorRequestSwimlane) GetConfig() ConfigPropertiesSwimlane { - if o == nil { - var ret ConfigPropertiesSwimlane - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestSwimlane) GetConfigOk() (*ConfigPropertiesSwimlane, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *CreateConnectorRequestSwimlane) SetConfig(v ConfigPropertiesSwimlane) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *CreateConnectorRequestSwimlane) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestSwimlane) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *CreateConnectorRequestSwimlane) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetName returns the Name field value -func (o *CreateConnectorRequestSwimlane) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestSwimlane) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateConnectorRequestSwimlane) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *CreateConnectorRequestSwimlane) GetSecrets() SecretsPropertiesSwimlane { - if o == nil { - var ret SecretsPropertiesSwimlane - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestSwimlane) GetSecretsOk() (*SecretsPropertiesSwimlane, bool) { - if o == nil { - return nil, false - } - return &o.Secrets, true -} - -// SetSecrets sets field value -func (o *CreateConnectorRequestSwimlane) SetSecrets(v SecretsPropertiesSwimlane) { - o.Secrets = v -} - -func (o CreateConnectorRequestSwimlane) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateConnectorRequestSwimlane) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableCreateConnectorRequestSwimlane struct { - value *CreateConnectorRequestSwimlane - isSet bool -} - -func (v NullableCreateConnectorRequestSwimlane) Get() *CreateConnectorRequestSwimlane { - return v.value -} - -func (v *NullableCreateConnectorRequestSwimlane) Set(val *CreateConnectorRequestSwimlane) { - v.value = val - v.isSet = true -} - -func (v NullableCreateConnectorRequestSwimlane) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateConnectorRequestSwimlane) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateConnectorRequestSwimlane(val *CreateConnectorRequestSwimlane) *NullableCreateConnectorRequestSwimlane { - return &NullableCreateConnectorRequestSwimlane{value: val, isSet: true} -} - -func (v NullableCreateConnectorRequestSwimlane) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateConnectorRequestSwimlane) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *SecretsPropertiesSwimlane `json:"secrets"` } diff --git a/generated/kibanaactions/model_create_connector_request_teams.go b/generated/kibanaactions/model_create_connector_request_teams.go index f41d2828e..4d50cad97 100644 --- a/generated/kibanaactions/model_create_connector_request_teams.go +++ b/generated/kibanaactions/model_create_connector_request_teams.go @@ -1,172 +1,18 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CreateConnectorRequestTeams type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateConnectorRequestTeams{} - -// CreateConnectorRequestTeams The Microsoft Teams connector uses Incoming Webhooks. +// The Microsoft Teams connector uses Incoming Webhooks. type CreateConnectorRequestTeams struct { // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The display name for the connector. - Name string `json:"name"` - // Defines secrets for connectors when type is `.teams`. - Secrets map[string]interface{} `json:"secrets"` -} - -// NewCreateConnectorRequestTeams instantiates a new CreateConnectorRequestTeams object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateConnectorRequestTeams(connectorTypeId string, name string, secrets map[string]interface{}) *CreateConnectorRequestTeams { - this := CreateConnectorRequestTeams{} - this.ConnectorTypeId = connectorTypeId - this.Name = name - this.Secrets = secrets - return &this -} - -// NewCreateConnectorRequestTeamsWithDefaults instantiates a new CreateConnectorRequestTeams object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateConnectorRequestTeamsWithDefaults() *CreateConnectorRequestTeams { - this := CreateConnectorRequestTeams{} - return &this -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *CreateConnectorRequestTeams) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestTeams) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *CreateConnectorRequestTeams) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetName returns the Name field value -func (o *CreateConnectorRequestTeams) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestTeams) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateConnectorRequestTeams) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *CreateConnectorRequestTeams) GetSecrets() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestTeams) GetSecretsOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Secrets, true -} - -// SetSecrets sets field value -func (o *CreateConnectorRequestTeams) SetSecrets(v map[string]interface{}) { - o.Secrets = v -} - -func (o CreateConnectorRequestTeams) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateConnectorRequestTeams) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableCreateConnectorRequestTeams struct { - value *CreateConnectorRequestTeams - isSet bool -} - -func (v NullableCreateConnectorRequestTeams) Get() *CreateConnectorRequestTeams { - return v.value -} - -func (v *NullableCreateConnectorRequestTeams) Set(val *CreateConnectorRequestTeams) { - v.value = val - v.isSet = true -} - -func (v NullableCreateConnectorRequestTeams) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateConnectorRequestTeams) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateConnectorRequestTeams(val *CreateConnectorRequestTeams) *NullableCreateConnectorRequestTeams { - return &NullableCreateConnectorRequestTeams{value: val, isSet: true} -} - -func (v NullableCreateConnectorRequestTeams) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateConnectorRequestTeams) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *ModelMap `json:"secrets"` } diff --git a/generated/kibanaactions/model_create_connector_request_tines.go b/generated/kibanaactions/model_create_connector_request_tines.go index 91cb98feb..5491919ce 100644 --- a/generated/kibanaactions/model_create_connector_request_tines.go +++ b/generated/kibanaactions/model_create_connector_request_tines.go @@ -1,200 +1,19 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CreateConnectorRequestTines type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateConnectorRequestTines{} - -// CreateConnectorRequestTines The Tines connector uses Tines Webhook actions to send events via POST request. +// The Tines connector uses Tines Webhook actions to send events via POST request. type CreateConnectorRequestTines struct { - // Defines properties for connectors when type is `.tines`. - Config map[string]interface{} `json:"config"` + Config *ModelMap `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The display name for the connector. - Name string `json:"name"` - // Defines secrets for connectors when type is `.tines`. - Secrets map[string]interface{} `json:"secrets"` -} - -// NewCreateConnectorRequestTines instantiates a new CreateConnectorRequestTines object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateConnectorRequestTines(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}) *CreateConnectorRequestTines { - this := CreateConnectorRequestTines{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Name = name - this.Secrets = secrets - return &this -} - -// NewCreateConnectorRequestTinesWithDefaults instantiates a new CreateConnectorRequestTines object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateConnectorRequestTinesWithDefaults() *CreateConnectorRequestTines { - this := CreateConnectorRequestTines{} - return &this -} - -// GetConfig returns the Config field value -func (o *CreateConnectorRequestTines) GetConfig() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestTines) GetConfigOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Config, true -} - -// SetConfig sets field value -func (o *CreateConnectorRequestTines) SetConfig(v map[string]interface{}) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *CreateConnectorRequestTines) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestTines) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *CreateConnectorRequestTines) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetName returns the Name field value -func (o *CreateConnectorRequestTines) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestTines) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateConnectorRequestTines) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *CreateConnectorRequestTines) GetSecrets() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestTines) GetSecretsOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Secrets, true -} - -// SetSecrets sets field value -func (o *CreateConnectorRequestTines) SetSecrets(v map[string]interface{}) { - o.Secrets = v -} - -func (o CreateConnectorRequestTines) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateConnectorRequestTines) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableCreateConnectorRequestTines struct { - value *CreateConnectorRequestTines - isSet bool -} - -func (v NullableCreateConnectorRequestTines) Get() *CreateConnectorRequestTines { - return v.value -} - -func (v *NullableCreateConnectorRequestTines) Set(val *CreateConnectorRequestTines) { - v.value = val - v.isSet = true -} - -func (v NullableCreateConnectorRequestTines) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateConnectorRequestTines) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateConnectorRequestTines(val *CreateConnectorRequestTines) *NullableCreateConnectorRequestTines { - return &NullableCreateConnectorRequestTines{value: val, isSet: true} -} - -func (v NullableCreateConnectorRequestTines) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateConnectorRequestTines) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *ModelMap `json:"secrets"` } diff --git a/generated/kibanaactions/model_create_connector_request_webhook.go b/generated/kibanaactions/model_create_connector_request_webhook.go index 557f3d4d8..f8619d2d4 100644 --- a/generated/kibanaactions/model_create_connector_request_webhook.go +++ b/generated/kibanaactions/model_create_connector_request_webhook.go @@ -1,200 +1,19 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CreateConnectorRequestWebhook type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateConnectorRequestWebhook{} - -// CreateConnectorRequestWebhook The Webhook connector uses axios to send a POST or PUT request to a web service. +// The Webhook connector uses axios to send a POST or PUT request to a web service. type CreateConnectorRequestWebhook struct { - // Defines properties for connectors when type is `.webhook`. - Config map[string]interface{} `json:"config"` + Config *ModelMap `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The display name for the connector. - Name string `json:"name"` - // Defines secrets for connectors when type is `.webhook`. - Secrets map[string]interface{} `json:"secrets"` -} - -// NewCreateConnectorRequestWebhook instantiates a new CreateConnectorRequestWebhook object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateConnectorRequestWebhook(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}) *CreateConnectorRequestWebhook { - this := CreateConnectorRequestWebhook{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Name = name - this.Secrets = secrets - return &this -} - -// NewCreateConnectorRequestWebhookWithDefaults instantiates a new CreateConnectorRequestWebhook object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateConnectorRequestWebhookWithDefaults() *CreateConnectorRequestWebhook { - this := CreateConnectorRequestWebhook{} - return &this -} - -// GetConfig returns the Config field value -func (o *CreateConnectorRequestWebhook) GetConfig() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestWebhook) GetConfigOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Config, true -} - -// SetConfig sets field value -func (o *CreateConnectorRequestWebhook) SetConfig(v map[string]interface{}) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *CreateConnectorRequestWebhook) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestWebhook) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *CreateConnectorRequestWebhook) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetName returns the Name field value -func (o *CreateConnectorRequestWebhook) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestWebhook) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateConnectorRequestWebhook) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *CreateConnectorRequestWebhook) GetSecrets() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestWebhook) GetSecretsOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Secrets, true -} - -// SetSecrets sets field value -func (o *CreateConnectorRequestWebhook) SetSecrets(v map[string]interface{}) { - o.Secrets = v -} - -func (o CreateConnectorRequestWebhook) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateConnectorRequestWebhook) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableCreateConnectorRequestWebhook struct { - value *CreateConnectorRequestWebhook - isSet bool -} - -func (v NullableCreateConnectorRequestWebhook) Get() *CreateConnectorRequestWebhook { - return v.value -} - -func (v *NullableCreateConnectorRequestWebhook) Set(val *CreateConnectorRequestWebhook) { - v.value = val - v.isSet = true -} - -func (v NullableCreateConnectorRequestWebhook) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateConnectorRequestWebhook) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateConnectorRequestWebhook(val *CreateConnectorRequestWebhook) *NullableCreateConnectorRequestWebhook { - return &NullableCreateConnectorRequestWebhook{value: val, isSet: true} -} - -func (v NullableCreateConnectorRequestWebhook) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateConnectorRequestWebhook) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *ModelMap `json:"secrets"` } diff --git a/generated/kibanaactions/model_create_connector_request_xmatters.go b/generated/kibanaactions/model_create_connector_request_xmatters.go index caf80dbca..6092debdd 100644 --- a/generated/kibanaactions/model_create_connector_request_xmatters.go +++ b/generated/kibanaactions/model_create_connector_request_xmatters.go @@ -1,200 +1,19 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the CreateConnectorRequestXmatters type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateConnectorRequestXmatters{} - -// CreateConnectorRequestXmatters The xMatters connector uses the xMatters Workflow for Elastic to send actionable alerts to on-call xMatters resources. +// The xMatters connector uses the xMatters Workflow for Elastic to send actionable alerts to on-call xMatters resources. type CreateConnectorRequestXmatters struct { - // Defines properties for connectors when type is `.xmatters`. - Config map[string]interface{} `json:"config"` + Config *ModelMap `json:"config"` // The type of connector. ConnectorTypeId string `json:"connector_type_id"` // The display name for the connector. - Name string `json:"name"` - // Defines secrets for connectors when type is `.xmatters`. - Secrets map[string]interface{} `json:"secrets"` -} - -// NewCreateConnectorRequestXmatters instantiates a new CreateConnectorRequestXmatters object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateConnectorRequestXmatters(config map[string]interface{}, connectorTypeId string, name string, secrets map[string]interface{}) *CreateConnectorRequestXmatters { - this := CreateConnectorRequestXmatters{} - this.Config = config - this.ConnectorTypeId = connectorTypeId - this.Name = name - this.Secrets = secrets - return &this -} - -// NewCreateConnectorRequestXmattersWithDefaults instantiates a new CreateConnectorRequestXmatters object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateConnectorRequestXmattersWithDefaults() *CreateConnectorRequestXmatters { - this := CreateConnectorRequestXmatters{} - return &this -} - -// GetConfig returns the Config field value -func (o *CreateConnectorRequestXmatters) GetConfig() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestXmatters) GetConfigOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Config, true -} - -// SetConfig sets field value -func (o *CreateConnectorRequestXmatters) SetConfig(v map[string]interface{}) { - o.Config = v -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *CreateConnectorRequestXmatters) GetConnectorTypeId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestXmatters) GetConnectorTypeIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *CreateConnectorRequestXmatters) SetConnectorTypeId(v string) { - o.ConnectorTypeId = v -} - -// GetName returns the Name field value -func (o *CreateConnectorRequestXmatters) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestXmatters) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateConnectorRequestXmatters) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *CreateConnectorRequestXmatters) GetSecrets() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *CreateConnectorRequestXmatters) GetSecretsOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Secrets, true -} - -// SetSecrets sets field value -func (o *CreateConnectorRequestXmatters) SetSecrets(v map[string]interface{}) { - o.Secrets = v -} - -func (o CreateConnectorRequestXmatters) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateConnectorRequestXmatters) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["connector_type_id"] = o.ConnectorTypeId - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableCreateConnectorRequestXmatters struct { - value *CreateConnectorRequestXmatters - isSet bool -} - -func (v NullableCreateConnectorRequestXmatters) Get() *CreateConnectorRequestXmatters { - return v.value -} - -func (v *NullableCreateConnectorRequestXmatters) Set(val *CreateConnectorRequestXmatters) { - v.value = val - v.isSet = true -} - -func (v NullableCreateConnectorRequestXmatters) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateConnectorRequestXmatters) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateConnectorRequestXmatters(val *CreateConnectorRequestXmatters) *NullableCreateConnectorRequestXmatters { - return &NullableCreateConnectorRequestXmatters{value: val, isSet: true} -} - -func (v NullableCreateConnectorRequestXmatters) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateConnectorRequestXmatters) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *ModelMap `json:"secrets"` } diff --git a/generated/kibanaactions/model_features.go b/generated/kibanaactions/model_features.go index ea1353179..4cf75d996 100644 --- a/generated/kibanaactions/model_features.go +++ b/generated/kibanaactions/model_features.go @@ -1,114 +1,20 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" - "fmt" -) - -// Features The feature that uses the connector. Valid values are `alerting`, `cases`, `uptime`, and `siem`. +// Features : The feature that uses the connector. Valid values are `alerting`, `cases`, `uptime`, and `siem`. type Features string // List of features const ( - ALERTING Features = "alerting" - CASES Features = "cases" - UPTIME Features = "uptime" - SIEM Features = "siem" + ALERTING_Features Features = "alerting" + CASES_Features Features = "cases" + UPTIME_Features Features = "uptime" + SIEM_Features Features = "siem" ) - -// All allowed values of Features enum -var AllowedFeaturesEnumValues = []Features{ - "alerting", - "cases", - "uptime", - "siem", -} - -func (v *Features) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := Features(value) - for _, existing := range AllowedFeaturesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Features", value) -} - -// NewFeaturesFromValue returns a pointer to a valid Features -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewFeaturesFromValue(v string) (*Features, error) { - ev := Features(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for Features: valid values are %v", v, AllowedFeaturesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v Features) IsValid() bool { - for _, existing := range AllowedFeaturesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to features value -func (v Features) Ptr() *Features { - return &v -} - -type NullableFeatures struct { - value *Features - isSet bool -} - -func (v NullableFeatures) Get() *Features { - return v.value -} - -func (v *NullableFeatures) Set(val *Features) { - v.value = val - v.isSet = true -} - -func (v NullableFeatures) IsSet() bool { - return v.isSet -} - -func (v *NullableFeatures) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFeatures(val *Features) *NullableFeatures { - return &NullableFeatures{value: val, isSet: true} -} - -func (v NullableFeatures) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFeatures) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_get_connector_404_response.go b/generated/kibanaactions/model_get_connector_404_response.go deleted file mode 100644 index bec60f5bd..000000000 --- a/generated/kibanaactions/model_get_connector_404_response.go +++ /dev/null @@ -1,196 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" -) - -// checks if the GetConnector404Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetConnector404Response{} - -// GetConnector404Response struct for GetConnector404Response -type GetConnector404Response struct { - Error *string `json:"error,omitempty"` - Message *string `json:"message,omitempty"` - StatusCode *int32 `json:"statusCode,omitempty"` -} - -// NewGetConnector404Response instantiates a new GetConnector404Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetConnector404Response() *GetConnector404Response { - this := GetConnector404Response{} - return &this -} - -// NewGetConnector404ResponseWithDefaults instantiates a new GetConnector404Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetConnector404ResponseWithDefaults() *GetConnector404Response { - this := GetConnector404Response{} - return &this -} - -// GetError returns the Error field value if set, zero value otherwise. -func (o *GetConnector404Response) GetError() string { - if o == nil || IsNil(o.Error) { - var ret string - return ret - } - return *o.Error -} - -// GetErrorOk returns a tuple with the Error field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetConnector404Response) GetErrorOk() (*string, bool) { - if o == nil || IsNil(o.Error) { - return nil, false - } - return o.Error, true -} - -// HasError returns a boolean if a field has been set. -func (o *GetConnector404Response) HasError() bool { - if o != nil && !IsNil(o.Error) { - return true - } - - return false -} - -// SetError gets a reference to the given string and assigns it to the Error field. -func (o *GetConnector404Response) SetError(v string) { - o.Error = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *GetConnector404Response) GetMessage() string { - if o == nil || IsNil(o.Message) { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetConnector404Response) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *GetConnector404Response) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *GetConnector404Response) SetMessage(v string) { - o.Message = &v -} - -// GetStatusCode returns the StatusCode field value if set, zero value otherwise. -func (o *GetConnector404Response) GetStatusCode() int32 { - if o == nil || IsNil(o.StatusCode) { - var ret int32 - return ret - } - return *o.StatusCode -} - -// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetConnector404Response) GetStatusCodeOk() (*int32, bool) { - if o == nil || IsNil(o.StatusCode) { - return nil, false - } - return o.StatusCode, true -} - -// HasStatusCode returns a boolean if a field has been set. -func (o *GetConnector404Response) HasStatusCode() bool { - if o != nil && !IsNil(o.StatusCode) { - return true - } - - return false -} - -// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. -func (o *GetConnector404Response) SetStatusCode(v int32) { - o.StatusCode = &v -} - -func (o GetConnector404Response) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetConnector404Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Error) { - toSerialize["error"] = o.Error - } - if !IsNil(o.Message) { - toSerialize["message"] = o.Message - } - if !IsNil(o.StatusCode) { - toSerialize["statusCode"] = o.StatusCode - } - return toSerialize, nil -} - -type NullableGetConnector404Response struct { - value *GetConnector404Response - isSet bool -} - -func (v NullableGetConnector404Response) Get() *GetConnector404Response { - return v.value -} - -func (v *NullableGetConnector404Response) Set(val *GetConnector404Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetConnector404Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetConnector404Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetConnector404Response(val *GetConnector404Response) *NullableGetConnector404Response { - return &NullableGetConnector404Response{value: val, isSet: true} -} - -func (v NullableGetConnector404Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetConnector404Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_get_connector_types_response_body_properties_inner.go b/generated/kibanaactions/model_get_connector_types_response_body_properties_inner.go deleted file mode 100644 index 3822e540b..000000000 --- a/generated/kibanaactions/model_get_connector_types_response_body_properties_inner.go +++ /dev/null @@ -1,346 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" -) - -// checks if the GetConnectorTypesResponseBodyPropertiesInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetConnectorTypesResponseBodyPropertiesInner{} - -// GetConnectorTypesResponseBodyPropertiesInner struct for GetConnectorTypesResponseBodyPropertiesInner -type GetConnectorTypesResponseBodyPropertiesInner struct { - // Indicates whether the connector type is enabled in Kibana. - Enabled *bool `json:"enabled,omitempty"` - // Indicates whether the connector type is enabled in the Kibana `.yml` file. - EnabledInConfig *bool `json:"enabled_in_config,omitempty"` - // Indicates whether the connector is enabled in the license. - EnabledInLicense *bool `json:"enabled_in_license,omitempty"` - Id *ConnectorTypes `json:"id,omitempty"` - // The license that is required to use the connector type. - MinimumLicenseRequired *string `json:"minimum_license_required,omitempty"` - // The name of the connector type. - Name *string `json:"name,omitempty"` - // The Kibana features that are supported by the connector type. - SupportedFeatureIds []Features `json:"supported_feature_ids,omitempty"` -} - -// NewGetConnectorTypesResponseBodyPropertiesInner instantiates a new GetConnectorTypesResponseBodyPropertiesInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetConnectorTypesResponseBodyPropertiesInner() *GetConnectorTypesResponseBodyPropertiesInner { - this := GetConnectorTypesResponseBodyPropertiesInner{} - return &this -} - -// NewGetConnectorTypesResponseBodyPropertiesInnerWithDefaults instantiates a new GetConnectorTypesResponseBodyPropertiesInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetConnectorTypesResponseBodyPropertiesInnerWithDefaults() *GetConnectorTypesResponseBodyPropertiesInner { - this := GetConnectorTypesResponseBodyPropertiesInner{} - return &this -} - -// GetEnabled returns the Enabled field value if set, zero value otherwise. -func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabled() bool { - if o == nil || IsNil(o.Enabled) { - var ret bool - return ret - } - return *o.Enabled -} - -// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledOk() (*bool, bool) { - if o == nil || IsNil(o.Enabled) { - return nil, false - } - return o.Enabled, true -} - -// HasEnabled returns a boolean if a field has been set. -func (o *GetConnectorTypesResponseBodyPropertiesInner) HasEnabled() bool { - if o != nil && !IsNil(o.Enabled) { - return true - } - - return false -} - -// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. -func (o *GetConnectorTypesResponseBodyPropertiesInner) SetEnabled(v bool) { - o.Enabled = &v -} - -// GetEnabledInConfig returns the EnabledInConfig field value if set, zero value otherwise. -func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledInConfig() bool { - if o == nil || IsNil(o.EnabledInConfig) { - var ret bool - return ret - } - return *o.EnabledInConfig -} - -// GetEnabledInConfigOk returns a tuple with the EnabledInConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledInConfigOk() (*bool, bool) { - if o == nil || IsNil(o.EnabledInConfig) { - return nil, false - } - return o.EnabledInConfig, true -} - -// HasEnabledInConfig returns a boolean if a field has been set. -func (o *GetConnectorTypesResponseBodyPropertiesInner) HasEnabledInConfig() bool { - if o != nil && !IsNil(o.EnabledInConfig) { - return true - } - - return false -} - -// SetEnabledInConfig gets a reference to the given bool and assigns it to the EnabledInConfig field. -func (o *GetConnectorTypesResponseBodyPropertiesInner) SetEnabledInConfig(v bool) { - o.EnabledInConfig = &v -} - -// GetEnabledInLicense returns the EnabledInLicense field value if set, zero value otherwise. -func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledInLicense() bool { - if o == nil || IsNil(o.EnabledInLicense) { - var ret bool - return ret - } - return *o.EnabledInLicense -} - -// GetEnabledInLicenseOk returns a tuple with the EnabledInLicense field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetConnectorTypesResponseBodyPropertiesInner) GetEnabledInLicenseOk() (*bool, bool) { - if o == nil || IsNil(o.EnabledInLicense) { - return nil, false - } - return o.EnabledInLicense, true -} - -// HasEnabledInLicense returns a boolean if a field has been set. -func (o *GetConnectorTypesResponseBodyPropertiesInner) HasEnabledInLicense() bool { - if o != nil && !IsNil(o.EnabledInLicense) { - return true - } - - return false -} - -// SetEnabledInLicense gets a reference to the given bool and assigns it to the EnabledInLicense field. -func (o *GetConnectorTypesResponseBodyPropertiesInner) SetEnabledInLicense(v bool) { - o.EnabledInLicense = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *GetConnectorTypesResponseBodyPropertiesInner) GetId() ConnectorTypes { - if o == nil || IsNil(o.Id) { - var ret ConnectorTypes - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetConnectorTypesResponseBodyPropertiesInner) GetIdOk() (*ConnectorTypes, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *GetConnectorTypesResponseBodyPropertiesInner) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given ConnectorTypes and assigns it to the Id field. -func (o *GetConnectorTypesResponseBodyPropertiesInner) SetId(v ConnectorTypes) { - o.Id = &v -} - -// GetMinimumLicenseRequired returns the MinimumLicenseRequired field value if set, zero value otherwise. -func (o *GetConnectorTypesResponseBodyPropertiesInner) GetMinimumLicenseRequired() string { - if o == nil || IsNil(o.MinimumLicenseRequired) { - var ret string - return ret - } - return *o.MinimumLicenseRequired -} - -// GetMinimumLicenseRequiredOk returns a tuple with the MinimumLicenseRequired field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetConnectorTypesResponseBodyPropertiesInner) GetMinimumLicenseRequiredOk() (*string, bool) { - if o == nil || IsNil(o.MinimumLicenseRequired) { - return nil, false - } - return o.MinimumLicenseRequired, true -} - -// HasMinimumLicenseRequired returns a boolean if a field has been set. -func (o *GetConnectorTypesResponseBodyPropertiesInner) HasMinimumLicenseRequired() bool { - if o != nil && !IsNil(o.MinimumLicenseRequired) { - return true - } - - return false -} - -// SetMinimumLicenseRequired gets a reference to the given string and assigns it to the MinimumLicenseRequired field. -func (o *GetConnectorTypesResponseBodyPropertiesInner) SetMinimumLicenseRequired(v string) { - o.MinimumLicenseRequired = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *GetConnectorTypesResponseBodyPropertiesInner) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetConnectorTypesResponseBodyPropertiesInner) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *GetConnectorTypesResponseBodyPropertiesInner) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *GetConnectorTypesResponseBodyPropertiesInner) SetName(v string) { - o.Name = &v -} - -// GetSupportedFeatureIds returns the SupportedFeatureIds field value if set, zero value otherwise. -func (o *GetConnectorTypesResponseBodyPropertiesInner) GetSupportedFeatureIds() []Features { - if o == nil || IsNil(o.SupportedFeatureIds) { - var ret []Features - return ret - } - return o.SupportedFeatureIds -} - -// GetSupportedFeatureIdsOk returns a tuple with the SupportedFeatureIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetConnectorTypesResponseBodyPropertiesInner) GetSupportedFeatureIdsOk() ([]Features, bool) { - if o == nil || IsNil(o.SupportedFeatureIds) { - return nil, false - } - return o.SupportedFeatureIds, true -} - -// HasSupportedFeatureIds returns a boolean if a field has been set. -func (o *GetConnectorTypesResponseBodyPropertiesInner) HasSupportedFeatureIds() bool { - if o != nil && !IsNil(o.SupportedFeatureIds) { - return true - } - - return false -} - -// SetSupportedFeatureIds gets a reference to the given []Features and assigns it to the SupportedFeatureIds field. -func (o *GetConnectorTypesResponseBodyPropertiesInner) SetSupportedFeatureIds(v []Features) { - o.SupportedFeatureIds = v -} - -func (o GetConnectorTypesResponseBodyPropertiesInner) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetConnectorTypesResponseBodyPropertiesInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Enabled) { - toSerialize["enabled"] = o.Enabled - } - if !IsNil(o.EnabledInConfig) { - toSerialize["enabled_in_config"] = o.EnabledInConfig - } - if !IsNil(o.EnabledInLicense) { - toSerialize["enabled_in_license"] = o.EnabledInLicense - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.MinimumLicenseRequired) { - toSerialize["minimum_license_required"] = o.MinimumLicenseRequired - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.SupportedFeatureIds) { - toSerialize["supported_feature_ids"] = o.SupportedFeatureIds - } - return toSerialize, nil -} - -type NullableGetConnectorTypesResponseBodyPropertiesInner struct { - value *GetConnectorTypesResponseBodyPropertiesInner - isSet bool -} - -func (v NullableGetConnectorTypesResponseBodyPropertiesInner) Get() *GetConnectorTypesResponseBodyPropertiesInner { - return v.value -} - -func (v *NullableGetConnectorTypesResponseBodyPropertiesInner) Set(val *GetConnectorTypesResponseBodyPropertiesInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetConnectorTypesResponseBodyPropertiesInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetConnectorTypesResponseBodyPropertiesInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetConnectorTypesResponseBodyPropertiesInner(val *GetConnectorTypesResponseBodyPropertiesInner) *NullableGetConnectorTypesResponseBodyPropertiesInner { - return &NullableGetConnectorTypesResponseBodyPropertiesInner{value: val, isSet: true} -} - -func (v NullableGetConnectorTypesResponseBodyPropertiesInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetConnectorTypesResponseBodyPropertiesInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_get_connectors_response_body_properties.go b/generated/kibanaactions/model_get_connectors_response_body_properties.go index 20df518c0..a0930ab67 100644 --- a/generated/kibanaactions/model_get_connectors_response_body_properties.go +++ b/generated/kibanaactions/model_get_connectors_response_body_properties.go @@ -1,332 +1,25 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the GetConnectorsResponseBodyProperties type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetConnectorsResponseBodyProperties{} - -// GetConnectorsResponseBodyProperties The properties vary for each connector type. +// The properties vary for each connector type. type GetConnectorsResponseBodyProperties struct { - ConnectorTypeId ConnectorTypes `json:"connector_type_id"` + ConnectorTypeId *ConnectorTypes `json:"connector_type_id"` // The configuration for the connector. Configuration properties vary depending on the connector type. - Config map[string]interface{} `json:"config,omitempty"` + Config ModelMap `json:"config,omitempty"` // The identifier for the connector. - Id string `json:"id"` - // Indicates whether the connector type is deprecated. - IsDeprecated bool `json:"is_deprecated"` - // Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. - IsMissingSecrets *bool `json:"is_missing_secrets,omitempty"` - // Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. - IsPreconfigured bool `json:"is_preconfigured"` + Id string `json:"id"` + IsDeprecated bool `json:"is_deprecated"` + IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` + IsPreconfigured bool `json:"is_preconfigured"` // The display name for the connector. Name string `json:"name"` // Indicates the number of saved objects that reference the connector. If `is_preconfigured` is true, this value is not calculated. ReferencedByCount int32 `json:"referenced_by_count"` } - -// NewGetConnectorsResponseBodyProperties instantiates a new GetConnectorsResponseBodyProperties object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetConnectorsResponseBodyProperties(connectorTypeId ConnectorTypes, id string, isDeprecated bool, isPreconfigured bool, name string, referencedByCount int32) *GetConnectorsResponseBodyProperties { - this := GetConnectorsResponseBodyProperties{} - this.ConnectorTypeId = connectorTypeId - this.Id = id - this.IsDeprecated = isDeprecated - this.IsPreconfigured = isPreconfigured - this.Name = name - this.ReferencedByCount = referencedByCount - return &this -} - -// NewGetConnectorsResponseBodyPropertiesWithDefaults instantiates a new GetConnectorsResponseBodyProperties object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetConnectorsResponseBodyPropertiesWithDefaults() *GetConnectorsResponseBodyProperties { - this := GetConnectorsResponseBodyProperties{} - var referencedByCount int32 = 0 - this.ReferencedByCount = referencedByCount - return &this -} - -// GetConnectorTypeId returns the ConnectorTypeId field value -func (o *GetConnectorsResponseBodyProperties) GetConnectorTypeId() ConnectorTypes { - if o == nil { - var ret ConnectorTypes - return ret - } - - return o.ConnectorTypeId -} - -// GetConnectorTypeIdOk returns a tuple with the ConnectorTypeId field value -// and a boolean to check if the value has been set. -func (o *GetConnectorsResponseBodyProperties) GetConnectorTypeIdOk() (*ConnectorTypes, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorTypeId, true -} - -// SetConnectorTypeId sets field value -func (o *GetConnectorsResponseBodyProperties) SetConnectorTypeId(v ConnectorTypes) { - o.ConnectorTypeId = v -} - -// GetConfig returns the Config field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetConnectorsResponseBodyProperties) GetConfig() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GetConnectorsResponseBodyProperties) GetConfigOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Config) { - return map[string]interface{}{}, false - } - return o.Config, true -} - -// HasConfig returns a boolean if a field has been set. -func (o *GetConnectorsResponseBodyProperties) HasConfig() bool { - if o != nil && IsNil(o.Config) { - return true - } - - return false -} - -// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. -func (o *GetConnectorsResponseBodyProperties) SetConfig(v map[string]interface{}) { - o.Config = v -} - -// GetId returns the Id field value -func (o *GetConnectorsResponseBodyProperties) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *GetConnectorsResponseBodyProperties) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *GetConnectorsResponseBodyProperties) SetId(v string) { - o.Id = v -} - -// GetIsDeprecated returns the IsDeprecated field value -func (o *GetConnectorsResponseBodyProperties) GetIsDeprecated() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsDeprecated -} - -// GetIsDeprecatedOk returns a tuple with the IsDeprecated field value -// and a boolean to check if the value has been set. -func (o *GetConnectorsResponseBodyProperties) GetIsDeprecatedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsDeprecated, true -} - -// SetIsDeprecated sets field value -func (o *GetConnectorsResponseBodyProperties) SetIsDeprecated(v bool) { - o.IsDeprecated = v -} - -// GetIsMissingSecrets returns the IsMissingSecrets field value if set, zero value otherwise. -func (o *GetConnectorsResponseBodyProperties) GetIsMissingSecrets() bool { - if o == nil || IsNil(o.IsMissingSecrets) { - var ret bool - return ret - } - return *o.IsMissingSecrets -} - -// GetIsMissingSecretsOk returns a tuple with the IsMissingSecrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetConnectorsResponseBodyProperties) GetIsMissingSecretsOk() (*bool, bool) { - if o == nil || IsNil(o.IsMissingSecrets) { - return nil, false - } - return o.IsMissingSecrets, true -} - -// HasIsMissingSecrets returns a boolean if a field has been set. -func (o *GetConnectorsResponseBodyProperties) HasIsMissingSecrets() bool { - if o != nil && !IsNil(o.IsMissingSecrets) { - return true - } - - return false -} - -// SetIsMissingSecrets gets a reference to the given bool and assigns it to the IsMissingSecrets field. -func (o *GetConnectorsResponseBodyProperties) SetIsMissingSecrets(v bool) { - o.IsMissingSecrets = &v -} - -// GetIsPreconfigured returns the IsPreconfigured field value -func (o *GetConnectorsResponseBodyProperties) GetIsPreconfigured() bool { - if o == nil { - var ret bool - return ret - } - - return o.IsPreconfigured -} - -// GetIsPreconfiguredOk returns a tuple with the IsPreconfigured field value -// and a boolean to check if the value has been set. -func (o *GetConnectorsResponseBodyProperties) GetIsPreconfiguredOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IsPreconfigured, true -} - -// SetIsPreconfigured sets field value -func (o *GetConnectorsResponseBodyProperties) SetIsPreconfigured(v bool) { - o.IsPreconfigured = v -} - -// GetName returns the Name field value -func (o *GetConnectorsResponseBodyProperties) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *GetConnectorsResponseBodyProperties) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *GetConnectorsResponseBodyProperties) SetName(v string) { - o.Name = v -} - -// GetReferencedByCount returns the ReferencedByCount field value -func (o *GetConnectorsResponseBodyProperties) GetReferencedByCount() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.ReferencedByCount -} - -// GetReferencedByCountOk returns a tuple with the ReferencedByCount field value -// and a boolean to check if the value has been set. -func (o *GetConnectorsResponseBodyProperties) GetReferencedByCountOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.ReferencedByCount, true -} - -// SetReferencedByCount sets field value -func (o *GetConnectorsResponseBodyProperties) SetReferencedByCount(v int32) { - o.ReferencedByCount = v -} - -func (o GetConnectorsResponseBodyProperties) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetConnectorsResponseBodyProperties) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["connector_type_id"] = o.ConnectorTypeId - if o.Config != nil { - toSerialize["config"] = o.Config - } - toSerialize["id"] = o.Id - toSerialize["is_deprecated"] = o.IsDeprecated - if !IsNil(o.IsMissingSecrets) { - toSerialize["is_missing_secrets"] = o.IsMissingSecrets - } - toSerialize["is_preconfigured"] = o.IsPreconfigured - toSerialize["name"] = o.Name - toSerialize["referenced_by_count"] = o.ReferencedByCount - return toSerialize, nil -} - -type NullableGetConnectorsResponseBodyProperties struct { - value *GetConnectorsResponseBodyProperties - isSet bool -} - -func (v NullableGetConnectorsResponseBodyProperties) Get() *GetConnectorsResponseBodyProperties { - return v.value -} - -func (v *NullableGetConnectorsResponseBodyProperties) Set(val *GetConnectorsResponseBodyProperties) { - v.value = val - v.isSet = true -} - -func (v NullableGetConnectorsResponseBodyProperties) IsSet() bool { - return v.isSet -} - -func (v *NullableGetConnectorsResponseBodyProperties) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetConnectorsResponseBodyProperties(val *GetConnectorsResponseBodyProperties) *NullableGetConnectorsResponseBodyProperties { - return &NullableGetConnectorsResponseBodyProperties{value: val, isSet: true} -} - -func (v NullableGetConnectorsResponseBodyProperties) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetConnectorsResponseBodyProperties) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_inline_response_200.go b/generated/kibanaactions/model_inline_response_200.go new file mode 100644 index 000000000..d66bd4d8e --- /dev/null +++ b/generated/kibanaactions/model_inline_response_200.go @@ -0,0 +1,25 @@ +/* + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package kibanaactions + +type InlineResponse200 struct { + // Indicates whether the connector type is enabled in Kibana. + Enabled bool `json:"enabled,omitempty"` + // Indicates whether the connector type is enabled in the Kibana `.yml` file. + EnabledInConfig bool `json:"enabled_in_config,omitempty"` + // Indicates whether the connector is enabled in the license. + EnabledInLicense bool `json:"enabled_in_license,omitempty"` + Id *ConnectorTypes `json:"id,omitempty"` + // The license that is required to use the connector type. + MinimumLicenseRequired string `json:"minimum_license_required,omitempty"` + // The name of the connector type. + Name string `json:"name,omitempty"` + // The Kibana features that are supported by the connector type. + SupportedFeatureIds []Features `json:"supported_feature_ids,omitempty"` +} diff --git a/generated/kibanaactions/model_inline_response_200_1.go b/generated/kibanaactions/model_inline_response_200_1.go new file mode 100644 index 000000000..3d3330c77 --- /dev/null +++ b/generated/kibanaactions/model_inline_response_200_1.go @@ -0,0 +1,17 @@ +/* + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package kibanaactions + +type InlineResponse2001 struct { + // The identifier for the connector. + ConnectorId string `json:"connector_id"` + Data *OneOfinlineResponse2001Data `json:"data,omitempty"` + // The status of the action. + Status string `json:"status"` +} diff --git a/generated/kibanaactions/model_inline_response_200_2.go b/generated/kibanaactions/model_inline_response_200_2.go new file mode 100644 index 000000000..2b19423ae --- /dev/null +++ b/generated/kibanaactions/model_inline_response_200_2.go @@ -0,0 +1,24 @@ +/* + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package kibanaactions + +type InlineResponse2002 struct { + // Indicates whether the connector type is enabled in Kibana. + Enabled bool `json:"enabled,omitempty"` + // Indicates whether the connector type is enabled in the Kibana `.yml` file. + EnabledInConfig bool `json:"enabledInConfig,omitempty"` + // Indicates whether the connector is enabled in the license. + EnabledInLicense bool `json:"enabledInLicense,omitempty"` + // The unique identifier for the connector type. + Id string `json:"id,omitempty"` + // The license that is required to use the connector type. + MinimumLicenseRequired string `json:"minimumLicenseRequired,omitempty"` + // The name of the connector type. + Name string `json:"name,omitempty"` +} diff --git a/generated/kibanaactions/model_inline_response_200_3.go b/generated/kibanaactions/model_inline_response_200_3.go new file mode 100644 index 000000000..22db1fe23 --- /dev/null +++ b/generated/kibanaactions/model_inline_response_200_3.go @@ -0,0 +1,16 @@ +/* + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package kibanaactions + +type InlineResponse2003 struct { + ActionId string `json:"actionId,omitempty"` + Data *OneOfinlineResponse2003Data `json:"data,omitempty"` + // The status of the action. + Status string `json:"status,omitempty"` +} diff --git a/generated/kibanaactions/model_inline_response_400.go b/generated/kibanaactions/model_inline_response_400.go new file mode 100644 index 000000000..dc1c189b7 --- /dev/null +++ b/generated/kibanaactions/model_inline_response_400.go @@ -0,0 +1,15 @@ +/* + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package kibanaactions + +type InlineResponse400 struct { + Error_ string `json:"error,omitempty"` + Message string `json:"message,omitempty"` + StatusCode int32 `json:"statusCode,omitempty"` +} diff --git a/generated/kibanaactions/model_inline_response_404.go b/generated/kibanaactions/model_inline_response_404.go new file mode 100644 index 000000000..c51a9203b --- /dev/null +++ b/generated/kibanaactions/model_inline_response_404.go @@ -0,0 +1,15 @@ +/* + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package kibanaactions + +type InlineResponse404 struct { + Error_ string `json:"error,omitempty"` + Message string `json:"message,omitempty"` + StatusCode int32 `json:"statusCode,omitempty"` +} diff --git a/generated/kibanaactions/model_legacy_create_connector_request_properties.go b/generated/kibanaactions/model_legacy_create_connector_request_properties.go index 9c89000c5..7a2f04bc9 100644 --- a/generated/kibanaactions/model_legacy_create_connector_request_properties.go +++ b/generated/kibanaactions/model_legacy_create_connector_request_properties.go @@ -1,236 +1,20 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the LegacyCreateConnectorRequestProperties type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LegacyCreateConnectorRequestProperties{} - -// LegacyCreateConnectorRequestProperties struct for LegacyCreateConnectorRequestProperties type LegacyCreateConnectorRequestProperties struct { // The connector type identifier. - ActionTypeId *string `json:"actionTypeId,omitempty"` + ActionTypeId string `json:"actionTypeId,omitempty"` // The configuration for the connector. Configuration properties vary depending on the connector type. - Config map[string]interface{} `json:"config,omitempty"` + Config *interface{} `json:"config,omitempty"` // The display name for the connector. - Name *string `json:"name,omitempty"` + Name string `json:"name,omitempty"` // The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. NOTE: Remember these values. You must provide them each time you update the connector. - Secrets map[string]interface{} `json:"secrets,omitempty"` -} - -// NewLegacyCreateConnectorRequestProperties instantiates a new LegacyCreateConnectorRequestProperties object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewLegacyCreateConnectorRequestProperties() *LegacyCreateConnectorRequestProperties { - this := LegacyCreateConnectorRequestProperties{} - return &this -} - -// NewLegacyCreateConnectorRequestPropertiesWithDefaults instantiates a new LegacyCreateConnectorRequestProperties object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewLegacyCreateConnectorRequestPropertiesWithDefaults() *LegacyCreateConnectorRequestProperties { - this := LegacyCreateConnectorRequestProperties{} - return &this -} - -// GetActionTypeId returns the ActionTypeId field value if set, zero value otherwise. -func (o *LegacyCreateConnectorRequestProperties) GetActionTypeId() string { - if o == nil || IsNil(o.ActionTypeId) { - var ret string - return ret - } - return *o.ActionTypeId -} - -// GetActionTypeIdOk returns a tuple with the ActionTypeId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LegacyCreateConnectorRequestProperties) GetActionTypeIdOk() (*string, bool) { - if o == nil || IsNil(o.ActionTypeId) { - return nil, false - } - return o.ActionTypeId, true -} - -// HasActionTypeId returns a boolean if a field has been set. -func (o *LegacyCreateConnectorRequestProperties) HasActionTypeId() bool { - if o != nil && !IsNil(o.ActionTypeId) { - return true - } - - return false -} - -// SetActionTypeId gets a reference to the given string and assigns it to the ActionTypeId field. -func (o *LegacyCreateConnectorRequestProperties) SetActionTypeId(v string) { - o.ActionTypeId = &v -} - -// GetConfig returns the Config field value if set, zero value otherwise. -func (o *LegacyCreateConnectorRequestProperties) GetConfig() map[string]interface{} { - if o == nil || IsNil(o.Config) { - var ret map[string]interface{} - return ret - } - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LegacyCreateConnectorRequestProperties) GetConfigOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Config) { - return map[string]interface{}{}, false - } - return o.Config, true -} - -// HasConfig returns a boolean if a field has been set. -func (o *LegacyCreateConnectorRequestProperties) HasConfig() bool { - if o != nil && !IsNil(o.Config) { - return true - } - - return false -} - -// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. -func (o *LegacyCreateConnectorRequestProperties) SetConfig(v map[string]interface{}) { - o.Config = v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *LegacyCreateConnectorRequestProperties) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LegacyCreateConnectorRequestProperties) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *LegacyCreateConnectorRequestProperties) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *LegacyCreateConnectorRequestProperties) SetName(v string) { - o.Name = &v -} - -// GetSecrets returns the Secrets field value if set, zero value otherwise. -func (o *LegacyCreateConnectorRequestProperties) GetSecrets() map[string]interface{} { - if o == nil || IsNil(o.Secrets) { - var ret map[string]interface{} - return ret - } - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LegacyCreateConnectorRequestProperties) GetSecretsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Secrets) { - return map[string]interface{}{}, false - } - return o.Secrets, true -} - -// HasSecrets returns a boolean if a field has been set. -func (o *LegacyCreateConnectorRequestProperties) HasSecrets() bool { - if o != nil && !IsNil(o.Secrets) { - return true - } - - return false -} - -// SetSecrets gets a reference to the given map[string]interface{} and assigns it to the Secrets field. -func (o *LegacyCreateConnectorRequestProperties) SetSecrets(v map[string]interface{}) { - o.Secrets = v -} - -func (o LegacyCreateConnectorRequestProperties) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o LegacyCreateConnectorRequestProperties) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ActionTypeId) { - toSerialize["actionTypeId"] = o.ActionTypeId - } - if !IsNil(o.Config) { - toSerialize["config"] = o.Config - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Secrets) { - toSerialize["secrets"] = o.Secrets - } - return toSerialize, nil -} - -type NullableLegacyCreateConnectorRequestProperties struct { - value *LegacyCreateConnectorRequestProperties - isSet bool -} - -func (v NullableLegacyCreateConnectorRequestProperties) Get() *LegacyCreateConnectorRequestProperties { - return v.value -} - -func (v *NullableLegacyCreateConnectorRequestProperties) Set(val *LegacyCreateConnectorRequestProperties) { - v.value = val - v.isSet = true -} - -func (v NullableLegacyCreateConnectorRequestProperties) IsSet() bool { - return v.isSet -} - -func (v *NullableLegacyCreateConnectorRequestProperties) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLegacyCreateConnectorRequestProperties(val *LegacyCreateConnectorRequestProperties) *NullableLegacyCreateConnectorRequestProperties { - return &NullableLegacyCreateConnectorRequestProperties{value: val, isSet: true} -} - -func (v NullableLegacyCreateConnectorRequestProperties) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLegacyCreateConnectorRequestProperties) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Secrets *interface{} `json:"secrets,omitempty"` } diff --git a/generated/kibanaactions/model_legacy_get_connector_types_response_body_properties_inner.go b/generated/kibanaactions/model_legacy_get_connector_types_response_body_properties_inner.go deleted file mode 100644 index 2ef5a8dad..000000000 --- a/generated/kibanaactions/model_legacy_get_connector_types_response_body_properties_inner.go +++ /dev/null @@ -1,310 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" -) - -// checks if the LegacyGetConnectorTypesResponseBodyPropertiesInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LegacyGetConnectorTypesResponseBodyPropertiesInner{} - -// LegacyGetConnectorTypesResponseBodyPropertiesInner struct for LegacyGetConnectorTypesResponseBodyPropertiesInner -type LegacyGetConnectorTypesResponseBodyPropertiesInner struct { - // Indicates whether the connector type is enabled in Kibana. - Enabled *bool `json:"enabled,omitempty"` - // Indicates whether the connector type is enabled in the Kibana `.yml` file. - EnabledInConfig *bool `json:"enabledInConfig,omitempty"` - // Indicates whether the connector is enabled in the license. - EnabledInLicense *bool `json:"enabledInLicense,omitempty"` - // The unique identifier for the connector type. - Id *string `json:"id,omitempty"` - // The license that is required to use the connector type. - MinimumLicenseRequired *string `json:"minimumLicenseRequired,omitempty"` - // The name of the connector type. - Name *string `json:"name,omitempty"` -} - -// NewLegacyGetConnectorTypesResponseBodyPropertiesInner instantiates a new LegacyGetConnectorTypesResponseBodyPropertiesInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewLegacyGetConnectorTypesResponseBodyPropertiesInner() *LegacyGetConnectorTypesResponseBodyPropertiesInner { - this := LegacyGetConnectorTypesResponseBodyPropertiesInner{} - return &this -} - -// NewLegacyGetConnectorTypesResponseBodyPropertiesInnerWithDefaults instantiates a new LegacyGetConnectorTypesResponseBodyPropertiesInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewLegacyGetConnectorTypesResponseBodyPropertiesInnerWithDefaults() *LegacyGetConnectorTypesResponseBodyPropertiesInner { - this := LegacyGetConnectorTypesResponseBodyPropertiesInner{} - return &this -} - -// GetEnabled returns the Enabled field value if set, zero value otherwise. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabled() bool { - if o == nil || IsNil(o.Enabled) { - var ret bool - return ret - } - return *o.Enabled -} - -// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledOk() (*bool, bool) { - if o == nil || IsNil(o.Enabled) { - return nil, false - } - return o.Enabled, true -} - -// HasEnabled returns a boolean if a field has been set. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasEnabled() bool { - if o != nil && !IsNil(o.Enabled) { - return true - } - - return false -} - -// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetEnabled(v bool) { - o.Enabled = &v -} - -// GetEnabledInConfig returns the EnabledInConfig field value if set, zero value otherwise. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledInConfig() bool { - if o == nil || IsNil(o.EnabledInConfig) { - var ret bool - return ret - } - return *o.EnabledInConfig -} - -// GetEnabledInConfigOk returns a tuple with the EnabledInConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledInConfigOk() (*bool, bool) { - if o == nil || IsNil(o.EnabledInConfig) { - return nil, false - } - return o.EnabledInConfig, true -} - -// HasEnabledInConfig returns a boolean if a field has been set. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasEnabledInConfig() bool { - if o != nil && !IsNil(o.EnabledInConfig) { - return true - } - - return false -} - -// SetEnabledInConfig gets a reference to the given bool and assigns it to the EnabledInConfig field. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetEnabledInConfig(v bool) { - o.EnabledInConfig = &v -} - -// GetEnabledInLicense returns the EnabledInLicense field value if set, zero value otherwise. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledInLicense() bool { - if o == nil || IsNil(o.EnabledInLicense) { - var ret bool - return ret - } - return *o.EnabledInLicense -} - -// GetEnabledInLicenseOk returns a tuple with the EnabledInLicense field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetEnabledInLicenseOk() (*bool, bool) { - if o == nil || IsNil(o.EnabledInLicense) { - return nil, false - } - return o.EnabledInLicense, true -} - -// HasEnabledInLicense returns a boolean if a field has been set. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasEnabledInLicense() bool { - if o != nil && !IsNil(o.EnabledInLicense) { - return true - } - - return false -} - -// SetEnabledInLicense gets a reference to the given bool and assigns it to the EnabledInLicense field. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetEnabledInLicense(v bool) { - o.EnabledInLicense = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetId(v string) { - o.Id = &v -} - -// GetMinimumLicenseRequired returns the MinimumLicenseRequired field value if set, zero value otherwise. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetMinimumLicenseRequired() string { - if o == nil || IsNil(o.MinimumLicenseRequired) { - var ret string - return ret - } - return *o.MinimumLicenseRequired -} - -// GetMinimumLicenseRequiredOk returns a tuple with the MinimumLicenseRequired field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetMinimumLicenseRequiredOk() (*string, bool) { - if o == nil || IsNil(o.MinimumLicenseRequired) { - return nil, false - } - return o.MinimumLicenseRequired, true -} - -// HasMinimumLicenseRequired returns a boolean if a field has been set. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasMinimumLicenseRequired() bool { - if o != nil && !IsNil(o.MinimumLicenseRequired) { - return true - } - - return false -} - -// SetMinimumLicenseRequired gets a reference to the given string and assigns it to the MinimumLicenseRequired field. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetMinimumLicenseRequired(v string) { - o.MinimumLicenseRequired = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *LegacyGetConnectorTypesResponseBodyPropertiesInner) SetName(v string) { - o.Name = &v -} - -func (o LegacyGetConnectorTypesResponseBodyPropertiesInner) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o LegacyGetConnectorTypesResponseBodyPropertiesInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Enabled) { - toSerialize["enabled"] = o.Enabled - } - if !IsNil(o.EnabledInConfig) { - toSerialize["enabledInConfig"] = o.EnabledInConfig - } - if !IsNil(o.EnabledInLicense) { - toSerialize["enabledInLicense"] = o.EnabledInLicense - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.MinimumLicenseRequired) { - toSerialize["minimumLicenseRequired"] = o.MinimumLicenseRequired - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - return toSerialize, nil -} - -type NullableLegacyGetConnectorTypesResponseBodyPropertiesInner struct { - value *LegacyGetConnectorTypesResponseBodyPropertiesInner - isSet bool -} - -func (v NullableLegacyGetConnectorTypesResponseBodyPropertiesInner) Get() *LegacyGetConnectorTypesResponseBodyPropertiesInner { - return v.value -} - -func (v *NullableLegacyGetConnectorTypesResponseBodyPropertiesInner) Set(val *LegacyGetConnectorTypesResponseBodyPropertiesInner) { - v.value = val - v.isSet = true -} - -func (v NullableLegacyGetConnectorTypesResponseBodyPropertiesInner) IsSet() bool { - return v.isSet -} - -func (v *NullableLegacyGetConnectorTypesResponseBodyPropertiesInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLegacyGetConnectorTypesResponseBodyPropertiesInner(val *LegacyGetConnectorTypesResponseBodyPropertiesInner) *NullableLegacyGetConnectorTypesResponseBodyPropertiesInner { - return &NullableLegacyGetConnectorTypesResponseBodyPropertiesInner{value: val, isSet: true} -} - -func (v NullableLegacyGetConnectorTypesResponseBodyPropertiesInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLegacyGetConnectorTypesResponseBodyPropertiesInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_legacy_run_connector_200_response.go b/generated/kibanaactions/model_legacy_run_connector_200_response.go deleted file mode 100644 index bcf7ad780..000000000 --- a/generated/kibanaactions/model_legacy_run_connector_200_response.go +++ /dev/null @@ -1,197 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" -) - -// checks if the LegacyRunConnector200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LegacyRunConnector200Response{} - -// LegacyRunConnector200Response struct for LegacyRunConnector200Response -type LegacyRunConnector200Response struct { - ActionId *string `json:"actionId,omitempty"` - Data *RunConnector200ResponseData `json:"data,omitempty"` - // The status of the action. - Status *string `json:"status,omitempty"` -} - -// NewLegacyRunConnector200Response instantiates a new LegacyRunConnector200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewLegacyRunConnector200Response() *LegacyRunConnector200Response { - this := LegacyRunConnector200Response{} - return &this -} - -// NewLegacyRunConnector200ResponseWithDefaults instantiates a new LegacyRunConnector200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewLegacyRunConnector200ResponseWithDefaults() *LegacyRunConnector200Response { - this := LegacyRunConnector200Response{} - return &this -} - -// GetActionId returns the ActionId field value if set, zero value otherwise. -func (o *LegacyRunConnector200Response) GetActionId() string { - if o == nil || IsNil(o.ActionId) { - var ret string - return ret - } - return *o.ActionId -} - -// GetActionIdOk returns a tuple with the ActionId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LegacyRunConnector200Response) GetActionIdOk() (*string, bool) { - if o == nil || IsNil(o.ActionId) { - return nil, false - } - return o.ActionId, true -} - -// HasActionId returns a boolean if a field has been set. -func (o *LegacyRunConnector200Response) HasActionId() bool { - if o != nil && !IsNil(o.ActionId) { - return true - } - - return false -} - -// SetActionId gets a reference to the given string and assigns it to the ActionId field. -func (o *LegacyRunConnector200Response) SetActionId(v string) { - o.ActionId = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *LegacyRunConnector200Response) GetData() RunConnector200ResponseData { - if o == nil || IsNil(o.Data) { - var ret RunConnector200ResponseData - return ret - } - return *o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LegacyRunConnector200Response) GetDataOk() (*RunConnector200ResponseData, bool) { - if o == nil || IsNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *LegacyRunConnector200Response) HasData() bool { - if o != nil && !IsNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given RunConnector200ResponseData and assigns it to the Data field. -func (o *LegacyRunConnector200Response) SetData(v RunConnector200ResponseData) { - o.Data = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *LegacyRunConnector200Response) GetStatus() string { - if o == nil || IsNil(o.Status) { - var ret string - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LegacyRunConnector200Response) GetStatusOk() (*string, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *LegacyRunConnector200Response) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *LegacyRunConnector200Response) SetStatus(v string) { - o.Status = &v -} - -func (o LegacyRunConnector200Response) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o LegacyRunConnector200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ActionId) { - toSerialize["actionId"] = o.ActionId - } - if !IsNil(o.Data) { - toSerialize["data"] = o.Data - } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status - } - return toSerialize, nil -} - -type NullableLegacyRunConnector200Response struct { - value *LegacyRunConnector200Response - isSet bool -} - -func (v NullableLegacyRunConnector200Response) Get() *LegacyRunConnector200Response { - return v.value -} - -func (v *NullableLegacyRunConnector200Response) Set(val *LegacyRunConnector200Response) { - v.value = val - v.isSet = true -} - -func (v NullableLegacyRunConnector200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableLegacyRunConnector200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLegacyRunConnector200Response(val *LegacyRunConnector200Response) *NullableLegacyRunConnector200Response { - return &NullableLegacyRunConnector200Response{value: val, isSet: true} -} - -func (v NullableLegacyRunConnector200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLegacyRunConnector200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_legacy_run_connector_request_body_properties.go b/generated/kibanaactions/model_legacy_run_connector_request_body_properties.go index 7292d0b0e..11a829a03 100644 --- a/generated/kibanaactions/model_legacy_run_connector_request_body_properties.go +++ b/generated/kibanaactions/model_legacy_run_connector_request_body_properties.go @@ -1,116 +1,15 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the LegacyRunConnectorRequestBodyProperties type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LegacyRunConnectorRequestBodyProperties{} - -// LegacyRunConnectorRequestBodyProperties The properties vary depending on the connector type. +// The properties vary depending on the connector type. type LegacyRunConnectorRequestBodyProperties struct { // The parameters of the connector. Parameter properties vary depending on the connector type. - Params map[string]interface{} `json:"params"` -} - -// NewLegacyRunConnectorRequestBodyProperties instantiates a new LegacyRunConnectorRequestBodyProperties object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewLegacyRunConnectorRequestBodyProperties(params map[string]interface{}) *LegacyRunConnectorRequestBodyProperties { - this := LegacyRunConnectorRequestBodyProperties{} - this.Params = params - return &this -} - -// NewLegacyRunConnectorRequestBodyPropertiesWithDefaults instantiates a new LegacyRunConnectorRequestBodyProperties object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewLegacyRunConnectorRequestBodyPropertiesWithDefaults() *LegacyRunConnectorRequestBodyProperties { - this := LegacyRunConnectorRequestBodyProperties{} - return &this -} - -// GetParams returns the Params field value -func (o *LegacyRunConnectorRequestBodyProperties) GetParams() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Params -} - -// GetParamsOk returns a tuple with the Params field value -// and a boolean to check if the value has been set. -func (o *LegacyRunConnectorRequestBodyProperties) GetParamsOk() (map[string]interface{}, bool) { - if o == nil { - return map[string]interface{}{}, false - } - return o.Params, true -} - -// SetParams sets field value -func (o *LegacyRunConnectorRequestBodyProperties) SetParams(v map[string]interface{}) { - o.Params = v -} - -func (o LegacyRunConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o LegacyRunConnectorRequestBodyProperties) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["params"] = o.Params - return toSerialize, nil -} - -type NullableLegacyRunConnectorRequestBodyProperties struct { - value *LegacyRunConnectorRequestBodyProperties - isSet bool -} - -func (v NullableLegacyRunConnectorRequestBodyProperties) Get() *LegacyRunConnectorRequestBodyProperties { - return v.value -} - -func (v *NullableLegacyRunConnectorRequestBodyProperties) Set(val *LegacyRunConnectorRequestBodyProperties) { - v.value = val - v.isSet = true -} - -func (v NullableLegacyRunConnectorRequestBodyProperties) IsSet() bool { - return v.isSet -} - -func (v *NullableLegacyRunConnectorRequestBodyProperties) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLegacyRunConnectorRequestBodyProperties(val *LegacyRunConnectorRequestBodyProperties) *NullableLegacyRunConnectorRequestBodyProperties { - return &NullableLegacyRunConnectorRequestBodyProperties{value: val, isSet: true} -} - -func (v NullableLegacyRunConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLegacyRunConnectorRequestBodyProperties) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Params *interface{} `json:"params"` } diff --git a/generated/kibanaactions/model_legacy_update_connector_request_body_properties.go b/generated/kibanaactions/model_legacy_update_connector_request_body_properties.go index c53dde372..1e800506b 100644 --- a/generated/kibanaactions/model_legacy_update_connector_request_body_properties.go +++ b/generated/kibanaactions/model_legacy_update_connector_request_body_properties.go @@ -1,199 +1,19 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the LegacyUpdateConnectorRequestBodyProperties type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LegacyUpdateConnectorRequestBodyProperties{} - -// LegacyUpdateConnectorRequestBodyProperties The properties vary depending on the connector type. +// The properties vary depending on the connector type. type LegacyUpdateConnectorRequestBodyProperties struct { // The new connector configuration. Configuration properties vary depending on the connector type. - Config map[string]interface{} `json:"config,omitempty"` + Config *interface{} `json:"config,omitempty"` // The new name for the connector. - Name *string `json:"name,omitempty"` + Name string `json:"name,omitempty"` // The updated secrets configuration for the connector. Secrets properties vary depending on the connector type. - Secrets map[string]interface{} `json:"secrets,omitempty"` -} - -// NewLegacyUpdateConnectorRequestBodyProperties instantiates a new LegacyUpdateConnectorRequestBodyProperties object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewLegacyUpdateConnectorRequestBodyProperties() *LegacyUpdateConnectorRequestBodyProperties { - this := LegacyUpdateConnectorRequestBodyProperties{} - return &this -} - -// NewLegacyUpdateConnectorRequestBodyPropertiesWithDefaults instantiates a new LegacyUpdateConnectorRequestBodyProperties object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewLegacyUpdateConnectorRequestBodyPropertiesWithDefaults() *LegacyUpdateConnectorRequestBodyProperties { - this := LegacyUpdateConnectorRequestBodyProperties{} - return &this -} - -// GetConfig returns the Config field value if set, zero value otherwise. -func (o *LegacyUpdateConnectorRequestBodyProperties) GetConfig() map[string]interface{} { - if o == nil || IsNil(o.Config) { - var ret map[string]interface{} - return ret - } - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LegacyUpdateConnectorRequestBodyProperties) GetConfigOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Config) { - return map[string]interface{}{}, false - } - return o.Config, true -} - -// HasConfig returns a boolean if a field has been set. -func (o *LegacyUpdateConnectorRequestBodyProperties) HasConfig() bool { - if o != nil && !IsNil(o.Config) { - return true - } - - return false -} - -// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field. -func (o *LegacyUpdateConnectorRequestBodyProperties) SetConfig(v map[string]interface{}) { - o.Config = v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *LegacyUpdateConnectorRequestBodyProperties) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LegacyUpdateConnectorRequestBodyProperties) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *LegacyUpdateConnectorRequestBodyProperties) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *LegacyUpdateConnectorRequestBodyProperties) SetName(v string) { - o.Name = &v -} - -// GetSecrets returns the Secrets field value if set, zero value otherwise. -func (o *LegacyUpdateConnectorRequestBodyProperties) GetSecrets() map[string]interface{} { - if o == nil || IsNil(o.Secrets) { - var ret map[string]interface{} - return ret - } - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LegacyUpdateConnectorRequestBodyProperties) GetSecretsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Secrets) { - return map[string]interface{}{}, false - } - return o.Secrets, true -} - -// HasSecrets returns a boolean if a field has been set. -func (o *LegacyUpdateConnectorRequestBodyProperties) HasSecrets() bool { - if o != nil && !IsNil(o.Secrets) { - return true - } - - return false -} - -// SetSecrets gets a reference to the given map[string]interface{} and assigns it to the Secrets field. -func (o *LegacyUpdateConnectorRequestBodyProperties) SetSecrets(v map[string]interface{}) { - o.Secrets = v -} - -func (o LegacyUpdateConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o LegacyUpdateConnectorRequestBodyProperties) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Config) { - toSerialize["config"] = o.Config - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Secrets) { - toSerialize["secrets"] = o.Secrets - } - return toSerialize, nil -} - -type NullableLegacyUpdateConnectorRequestBodyProperties struct { - value *LegacyUpdateConnectorRequestBodyProperties - isSet bool -} - -func (v NullableLegacyUpdateConnectorRequestBodyProperties) Get() *LegacyUpdateConnectorRequestBodyProperties { - return v.value -} - -func (v *NullableLegacyUpdateConnectorRequestBodyProperties) Set(val *LegacyUpdateConnectorRequestBodyProperties) { - v.value = val - v.isSet = true -} - -func (v NullableLegacyUpdateConnectorRequestBodyProperties) IsSet() bool { - return v.isSet -} - -func (v *NullableLegacyUpdateConnectorRequestBodyProperties) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLegacyUpdateConnectorRequestBodyProperties(val *LegacyUpdateConnectorRequestBodyProperties) *NullableLegacyUpdateConnectorRequestBodyProperties { - return &NullableLegacyUpdateConnectorRequestBodyProperties{value: val, isSet: true} -} - -func (v NullableLegacyUpdateConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLegacyUpdateConnectorRequestBodyProperties) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Secrets *interface{} `json:"secrets,omitempty"` } diff --git a/generated/kibanaactions/model_map.go b/generated/kibanaactions/model_map.go new file mode 100644 index 000000000..83cf4bd31 --- /dev/null +++ b/generated/kibanaactions/model_map.go @@ -0,0 +1,3 @@ +package kibanaactions + +type ModelMap map[string]interface{} diff --git a/generated/kibanaactions/model_not_found_response.go b/generated/kibanaactions/model_not_found_response.go index f617d7b74..f9686e3e0 100644 --- a/generated/kibanaactions/model_not_found_response.go +++ b/generated/kibanaactions/model_not_found_response.go @@ -1,196 +1,15 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the NotFoundResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NotFoundResponse{} - -// NotFoundResponse struct for NotFoundResponse type NotFoundResponse struct { - Error *string `json:"error,omitempty"` - Message *string `json:"message,omitempty"` - StatusCode *int32 `json:"statusCode,omitempty"` -} - -// NewNotFoundResponse instantiates a new NotFoundResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewNotFoundResponse() *NotFoundResponse { - this := NotFoundResponse{} - return &this -} - -// NewNotFoundResponseWithDefaults instantiates a new NotFoundResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewNotFoundResponseWithDefaults() *NotFoundResponse { - this := NotFoundResponse{} - return &this -} - -// GetError returns the Error field value if set, zero value otherwise. -func (o *NotFoundResponse) GetError() string { - if o == nil || IsNil(o.Error) { - var ret string - return ret - } - return *o.Error -} - -// GetErrorOk returns a tuple with the Error field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NotFoundResponse) GetErrorOk() (*string, bool) { - if o == nil || IsNil(o.Error) { - return nil, false - } - return o.Error, true -} - -// HasError returns a boolean if a field has been set. -func (o *NotFoundResponse) HasError() bool { - if o != nil && !IsNil(o.Error) { - return true - } - - return false -} - -// SetError gets a reference to the given string and assigns it to the Error field. -func (o *NotFoundResponse) SetError(v string) { - o.Error = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *NotFoundResponse) GetMessage() string { - if o == nil || IsNil(o.Message) { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NotFoundResponse) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *NotFoundResponse) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *NotFoundResponse) SetMessage(v string) { - o.Message = &v -} - -// GetStatusCode returns the StatusCode field value if set, zero value otherwise. -func (o *NotFoundResponse) GetStatusCode() int32 { - if o == nil || IsNil(o.StatusCode) { - var ret int32 - return ret - } - return *o.StatusCode -} - -// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NotFoundResponse) GetStatusCodeOk() (*int32, bool) { - if o == nil || IsNil(o.StatusCode) { - return nil, false - } - return o.StatusCode, true -} - -// HasStatusCode returns a boolean if a field has been set. -func (o *NotFoundResponse) HasStatusCode() bool { - if o != nil && !IsNil(o.StatusCode) { - return true - } - - return false -} - -// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. -func (o *NotFoundResponse) SetStatusCode(v int32) { - o.StatusCode = &v -} - -func (o NotFoundResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o NotFoundResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Error) { - toSerialize["error"] = o.Error - } - if !IsNil(o.Message) { - toSerialize["message"] = o.Message - } - if !IsNil(o.StatusCode) { - toSerialize["statusCode"] = o.StatusCode - } - return toSerialize, nil -} - -type NullableNotFoundResponse struct { - value *NotFoundResponse - isSet bool -} - -func (v NullableNotFoundResponse) Get() *NotFoundResponse { - return v.value -} - -func (v *NullableNotFoundResponse) Set(val *NotFoundResponse) { - v.value = val - v.isSet = true -} - -func (v NullableNotFoundResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableNotFoundResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNotFoundResponse(val *NotFoundResponse) *NullableNotFoundResponse { - return &NullableNotFoundResponse{value: val, isSet: true} -} - -func (v NullableNotFoundResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNotFoundResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Error_ string `json:"error,omitempty"` + Message string `json:"message,omitempty"` + StatusCode int32 `json:"statusCode,omitempty"` } diff --git a/generated/kibanaactions/model_one_of_run_connector_request_body_properties_params.go b/generated/kibanaactions/model_one_of_run_connector_request_body_properties_params.go new file mode 100644 index 000000000..adfbd3126 --- /dev/null +++ b/generated/kibanaactions/model_one_of_run_connector_request_body_properties_params.go @@ -0,0 +1,14 @@ +/* + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package kibanaactions + +type OneOfRunConnectorRequestBodyPropertiesParams struct { + RunConnectorParamsDocuments + RunConnectorParamsLevelMessage +} diff --git a/generated/kibanaactions/model_one_ofinline_response_200_1_data.go b/generated/kibanaactions/model_one_ofinline_response_200_1_data.go new file mode 100644 index 000000000..f0bd59c40 --- /dev/null +++ b/generated/kibanaactions/model_one_ofinline_response_200_1_data.go @@ -0,0 +1,12 @@ +/* + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package kibanaactions + +type OneOfinlineResponse2001Data struct { +} diff --git a/generated/kibanaactions/model_one_ofinline_response_200_3_data.go b/generated/kibanaactions/model_one_ofinline_response_200_3_data.go new file mode 100644 index 000000000..735082a66 --- /dev/null +++ b/generated/kibanaactions/model_one_ofinline_response_200_3_data.go @@ -0,0 +1,12 @@ +/* + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package kibanaactions + +type OneOfinlineResponse2003Data struct { +} diff --git a/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go b/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go new file mode 100644 index 000000000..42c1cae52 --- /dev/null +++ b/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go @@ -0,0 +1,12 @@ +/* + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package kibanaactions + +type OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp struct { +} diff --git a/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go b/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go new file mode 100644 index 000000000..68e09f305 --- /dev/null +++ b/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go @@ -0,0 +1,12 @@ +/* + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package kibanaactions + +type OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash struct { +} diff --git a/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go b/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go new file mode 100644 index 000000000..0107a161c --- /dev/null +++ b/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go @@ -0,0 +1,12 @@ +/* + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package kibanaactions + +type OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl struct { +} diff --git a/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go b/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go new file mode 100644 index 000000000..47e03b671 --- /dev/null +++ b/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go @@ -0,0 +1,12 @@ +/* + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package kibanaactions + +type OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp struct { +} diff --git a/generated/kibanaactions/model_rule_name_mapping.go b/generated/kibanaactions/model_rule_name_mapping.go index 2a592ef9b..48f03c2cc 100644 --- a/generated/kibanaactions/model_rule_name_mapping.go +++ b/generated/kibanaactions/model_rule_name_mapping.go @@ -1,23 +1,14 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RuleNameMapping type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RuleNameMapping{} - -// RuleNameMapping Mapping for the name of the alert's rule. +// Mapping for the name of the alert's rule. type RuleNameMapping struct { // The type of field in Swimlane. FieldType string `json:"fieldType"` @@ -28,173 +19,3 @@ type RuleNameMapping struct { // The name of the field in Swimlane. Name string `json:"name"` } - -// NewRuleNameMapping instantiates a new RuleNameMapping object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRuleNameMapping(fieldType string, id string, key string, name string) *RuleNameMapping { - this := RuleNameMapping{} - this.FieldType = fieldType - this.Id = id - this.Key = key - this.Name = name - return &this -} - -// NewRuleNameMappingWithDefaults instantiates a new RuleNameMapping object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRuleNameMappingWithDefaults() *RuleNameMapping { - this := RuleNameMapping{} - return &this -} - -// GetFieldType returns the FieldType field value -func (o *RuleNameMapping) GetFieldType() string { - if o == nil { - var ret string - return ret - } - - return o.FieldType -} - -// GetFieldTypeOk returns a tuple with the FieldType field value -// and a boolean to check if the value has been set. -func (o *RuleNameMapping) GetFieldTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FieldType, true -} - -// SetFieldType sets field value -func (o *RuleNameMapping) SetFieldType(v string) { - o.FieldType = v -} - -// GetId returns the Id field value -func (o *RuleNameMapping) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *RuleNameMapping) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *RuleNameMapping) SetId(v string) { - o.Id = v -} - -// GetKey returns the Key field value -func (o *RuleNameMapping) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *RuleNameMapping) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *RuleNameMapping) SetKey(v string) { - o.Key = v -} - -// GetName returns the Name field value -func (o *RuleNameMapping) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *RuleNameMapping) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *RuleNameMapping) SetName(v string) { - o.Name = v -} - -func (o RuleNameMapping) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RuleNameMapping) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["fieldType"] = o.FieldType - toSerialize["id"] = o.Id - toSerialize["key"] = o.Key - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableRuleNameMapping struct { - value *RuleNameMapping - isSet bool -} - -func (v NullableRuleNameMapping) Get() *RuleNameMapping { - return v.value -} - -func (v *NullableRuleNameMapping) Set(val *RuleNameMapping) { - v.value = val - v.isSet = true -} - -func (v NullableRuleNameMapping) IsSet() bool { - return v.isSet -} - -func (v *NullableRuleNameMapping) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRuleNameMapping(val *RuleNameMapping) *NullableRuleNameMapping { - return &NullableRuleNameMapping{value: val, isSet: true} -} - -func (v NullableRuleNameMapping) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRuleNameMapping) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_run_connector_200_response.go b/generated/kibanaactions/model_run_connector_200_response.go deleted file mode 100644 index c8cebb6d0..000000000 --- a/generated/kibanaactions/model_run_connector_200_response.go +++ /dev/null @@ -1,180 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" -) - -// checks if the RunConnector200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnector200Response{} - -// RunConnector200Response struct for RunConnector200Response -type RunConnector200Response struct { - // The identifier for the connector. - ConnectorId string `json:"connector_id"` - Data *RunConnector200ResponseData `json:"data,omitempty"` - // The status of the action. - Status string `json:"status"` -} - -// NewRunConnector200Response instantiates a new RunConnector200Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnector200Response(connectorId string, status string) *RunConnector200Response { - this := RunConnector200Response{} - this.ConnectorId = connectorId - this.Status = status - return &this -} - -// NewRunConnector200ResponseWithDefaults instantiates a new RunConnector200Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnector200ResponseWithDefaults() *RunConnector200Response { - this := RunConnector200Response{} - return &this -} - -// GetConnectorId returns the ConnectorId field value -func (o *RunConnector200Response) GetConnectorId() string { - if o == nil { - var ret string - return ret - } - - return o.ConnectorId -} - -// GetConnectorIdOk returns a tuple with the ConnectorId field value -// and a boolean to check if the value has been set. -func (o *RunConnector200Response) GetConnectorIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorId, true -} - -// SetConnectorId sets field value -func (o *RunConnector200Response) SetConnectorId(v string) { - o.ConnectorId = v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *RunConnector200Response) GetData() RunConnector200ResponseData { - if o == nil || IsNil(o.Data) { - var ret RunConnector200ResponseData - return ret - } - return *o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnector200Response) GetDataOk() (*RunConnector200ResponseData, bool) { - if o == nil || IsNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *RunConnector200Response) HasData() bool { - if o != nil && !IsNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given RunConnector200ResponseData and assigns it to the Data field. -func (o *RunConnector200Response) SetData(v RunConnector200ResponseData) { - o.Data = &v -} - -// GetStatus returns the Status field value -func (o *RunConnector200Response) GetStatus() string { - if o == nil { - var ret string - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *RunConnector200Response) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *RunConnector200Response) SetStatus(v string) { - o.Status = v -} - -func (o RunConnector200Response) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnector200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["connector_id"] = o.ConnectorId - if !IsNil(o.Data) { - toSerialize["data"] = o.Data - } - toSerialize["status"] = o.Status - return toSerialize, nil -} - -type NullableRunConnector200Response struct { - value *RunConnector200Response - isSet bool -} - -func (v NullableRunConnector200Response) Get() *RunConnector200Response { - return v.value -} - -func (v *NullableRunConnector200Response) Set(val *RunConnector200Response) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnector200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnector200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnector200Response(val *RunConnector200Response) *NullableRunConnector200Response { - return &NullableRunConnector200Response{value: val, isSet: true} -} - -func (v NullableRunConnector200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnector200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_run_connector_200_response_data.go b/generated/kibanaactions/model_run_connector_200_response_data.go deleted file mode 100644 index f807fe5e9..000000000 --- a/generated/kibanaactions/model_run_connector_200_response_data.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" - "fmt" -) - -// RunConnector200ResponseData - struct for RunConnector200ResponseData -type RunConnector200ResponseData struct { - ArrayOfMapmapOfStringinterface *[]map[string]interface{} - MapmapOfStringinterface *map[string]interface{} -} - -// []map[string]interface{}AsRunConnector200ResponseData is a convenience function that returns []map[string]interface{} wrapped in RunConnector200ResponseData -func ArrayOfMapmapOfStringinterfaceAsRunConnector200ResponseData(v *[]map[string]interface{}) RunConnector200ResponseData { - return RunConnector200ResponseData{ - ArrayOfMapmapOfStringinterface: v, - } -} - -// map[string]interface{}AsRunConnector200ResponseData is a convenience function that returns map[string]interface{} wrapped in RunConnector200ResponseData -func MapmapOfStringinterfaceAsRunConnector200ResponseData(v *map[string]interface{}) RunConnector200ResponseData { - return RunConnector200ResponseData{ - MapmapOfStringinterface: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *RunConnector200ResponseData) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into ArrayOfMapmapOfStringinterface{} - err = json.Unmarshal(data, &dst.ArrayOfMapmapOfStringinterface) - if err == nil { - jsonmapstringinterface, _ := json.Marshal(dst.ArrayOfMapmapOfStringinterface) - if string(jsonmapstringinterface) == "{}" { // empty struct - dst.ArrayOfMapmapOfStringinterface = nil - } else { - match++ - } - } else { - dst.ArrayOfMapmapOfStringinterface = nil - } - - // try to unmarshal data into MapmapOfStringinterface{} - err = json.Unmarshal(data, &dst.MapmapOfStringinterface) - if err == nil { - jsonmapstringinterface, _ := json.Marshal(dst.MapmapOfStringinterface) - if string(jsonmapstringinterface) == "{}" { // empty struct - dst.MapmapOfStringinterface = nil - } else { - match++ - } - } else { - dst.MapmapOfStringinterface = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.ArrayOfMapmapOfStringinterface = nil - dst.MapmapOfStringinterface = nil - - return fmt.Errorf("data matches more than one schema in oneOf(RunConnector200ResponseData)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(RunConnector200ResponseData)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src RunConnector200ResponseData) MarshalJSON() ([]byte, error) { - if src.ArrayOfMapmapOfStringinterface != nil { - return json.Marshal(&src.ArrayOfMapmapOfStringinterface) - } - - if src.MapmapOfStringinterface != nil { - return json.Marshal(&src.MapmapOfStringinterface) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *RunConnector200ResponseData) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.ArrayOfMapmapOfStringinterface != nil { - return obj.ArrayOfMapmapOfStringinterface - } - - if obj.MapmapOfStringinterface != nil { - return obj.MapmapOfStringinterface - } - - // all schemas are nil - return nil -} - -type NullableRunConnector200ResponseData struct { - value *RunConnector200ResponseData - isSet bool -} - -func (v NullableRunConnector200ResponseData) Get() *RunConnector200ResponseData { - return v.value -} - -func (v *NullableRunConnector200ResponseData) Set(val *RunConnector200ResponseData) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnector200ResponseData) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnector200ResponseData) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnector200ResponseData(val *RunConnector200ResponseData) *NullableRunConnector200ResponseData { - return &NullableRunConnector200ResponseData{value: val, isSet: true} -} - -func (v NullableRunConnector200ResponseData) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnector200ResponseData) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/generated/kibanaactions/model_run_connector_params_documents.go b/generated/kibanaactions/model_run_connector_params_documents.go index 64a876b41..2cfa01f1f 100644 --- a/generated/kibanaactions/model_run_connector_params_documents.go +++ b/generated/kibanaactions/model_run_connector_params_documents.go @@ -1,116 +1,15 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorParamsDocuments type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorParamsDocuments{} - -// RunConnectorParamsDocuments Test an action that indexes a document into Elasticsearch. +// Test an action that indexes a document into Elasticsearch. type RunConnectorParamsDocuments struct { // The documents in JSON format for index connectors. - Documents []map[string]interface{} `json:"documents"` -} - -// NewRunConnectorParamsDocuments instantiates a new RunConnectorParamsDocuments object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorParamsDocuments(documents []map[string]interface{}) *RunConnectorParamsDocuments { - this := RunConnectorParamsDocuments{} - this.Documents = documents - return &this -} - -// NewRunConnectorParamsDocumentsWithDefaults instantiates a new RunConnectorParamsDocuments object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorParamsDocumentsWithDefaults() *RunConnectorParamsDocuments { - this := RunConnectorParamsDocuments{} - return &this -} - -// GetDocuments returns the Documents field value -func (o *RunConnectorParamsDocuments) GetDocuments() []map[string]interface{} { - if o == nil { - var ret []map[string]interface{} - return ret - } - - return o.Documents -} - -// GetDocumentsOk returns a tuple with the Documents field value -// and a boolean to check if the value has been set. -func (o *RunConnectorParamsDocuments) GetDocumentsOk() ([]map[string]interface{}, bool) { - if o == nil { - return nil, false - } - return o.Documents, true -} - -// SetDocuments sets field value -func (o *RunConnectorParamsDocuments) SetDocuments(v []map[string]interface{}) { - o.Documents = v -} - -func (o RunConnectorParamsDocuments) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorParamsDocuments) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["documents"] = o.Documents - return toSerialize, nil -} - -type NullableRunConnectorParamsDocuments struct { - value *RunConnectorParamsDocuments - isSet bool -} - -func (v NullableRunConnectorParamsDocuments) Get() *RunConnectorParamsDocuments { - return v.value -} - -func (v *NullableRunConnectorParamsDocuments) Set(val *RunConnectorParamsDocuments) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorParamsDocuments) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorParamsDocuments) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorParamsDocuments(val *RunConnectorParamsDocuments) *NullableRunConnectorParamsDocuments { - return &NullableRunConnectorParamsDocuments{value: val, isSet: true} -} - -func (v NullableRunConnectorParamsDocuments) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorParamsDocuments) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Documents []ModelMap `json:"documents"` } diff --git a/generated/kibanaactions/model_run_connector_params_level_message.go b/generated/kibanaactions/model_run_connector_params_level_message.go index a8c7a2df2..ce3b6840c 100644 --- a/generated/kibanaactions/model_run_connector_params_level_message.go +++ b/generated/kibanaactions/model_run_connector_params_level_message.go @@ -1,157 +1,17 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorParamsLevelMessage type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorParamsLevelMessage{} - -// RunConnectorParamsLevelMessage Test an action that writes an entry to the Kibana server log. +// Test an action that writes an entry to the Kibana server log. type RunConnectorParamsLevelMessage struct { // The log level of the message for server log connectors. - Level *string `json:"level,omitempty"` + Level string `json:"level,omitempty"` // The message for server log connectors. Message string `json:"message"` } - -// NewRunConnectorParamsLevelMessage instantiates a new RunConnectorParamsLevelMessage object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorParamsLevelMessage(message string) *RunConnectorParamsLevelMessage { - this := RunConnectorParamsLevelMessage{} - var level string = "info" - this.Level = &level - this.Message = message - return &this -} - -// NewRunConnectorParamsLevelMessageWithDefaults instantiates a new RunConnectorParamsLevelMessage object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorParamsLevelMessageWithDefaults() *RunConnectorParamsLevelMessage { - this := RunConnectorParamsLevelMessage{} - var level string = "info" - this.Level = &level - return &this -} - -// GetLevel returns the Level field value if set, zero value otherwise. -func (o *RunConnectorParamsLevelMessage) GetLevel() string { - if o == nil || IsNil(o.Level) { - var ret string - return ret - } - return *o.Level -} - -// GetLevelOk returns a tuple with the Level field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorParamsLevelMessage) GetLevelOk() (*string, bool) { - if o == nil || IsNil(o.Level) { - return nil, false - } - return o.Level, true -} - -// HasLevel returns a boolean if a field has been set. -func (o *RunConnectorParamsLevelMessage) HasLevel() bool { - if o != nil && !IsNil(o.Level) { - return true - } - - return false -} - -// SetLevel gets a reference to the given string and assigns it to the Level field. -func (o *RunConnectorParamsLevelMessage) SetLevel(v string) { - o.Level = &v -} - -// GetMessage returns the Message field value -func (o *RunConnectorParamsLevelMessage) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *RunConnectorParamsLevelMessage) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *RunConnectorParamsLevelMessage) SetMessage(v string) { - o.Message = v -} - -func (o RunConnectorParamsLevelMessage) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorParamsLevelMessage) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Level) { - toSerialize["level"] = o.Level - } - toSerialize["message"] = o.Message - return toSerialize, nil -} - -type NullableRunConnectorParamsLevelMessage struct { - value *RunConnectorParamsLevelMessage - isSet bool -} - -func (v NullableRunConnectorParamsLevelMessage) Get() *RunConnectorParamsLevelMessage { - return v.value -} - -func (v *NullableRunConnectorParamsLevelMessage) Set(val *RunConnectorParamsLevelMessage) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorParamsLevelMessage) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorParamsLevelMessage) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorParamsLevelMessage(val *RunConnectorParamsLevelMessage) *NullableRunConnectorParamsLevelMessage { - return &NullableRunConnectorParamsLevelMessage{value: val, isSet: true} -} - -func (v NullableRunConnectorParamsLevelMessage) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorParamsLevelMessage) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_run_connector_request_body_properties.go b/generated/kibanaactions/model_run_connector_request_body_properties.go index a2df6a4f9..89d90f21f 100644 --- a/generated/kibanaactions/model_run_connector_request_body_properties.go +++ b/generated/kibanaactions/model_run_connector_request_body_properties.go @@ -1,115 +1,14 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorRequestBodyProperties type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorRequestBodyProperties{} - -// RunConnectorRequestBodyProperties The properties vary depending on the connector type. +// The properties vary depending on the connector type. type RunConnectorRequestBodyProperties struct { - Params RunConnectorRequestBodyPropertiesParams `json:"params"` -} - -// NewRunConnectorRequestBodyProperties instantiates a new RunConnectorRequestBodyProperties object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorRequestBodyProperties(params RunConnectorRequestBodyPropertiesParams) *RunConnectorRequestBodyProperties { - this := RunConnectorRequestBodyProperties{} - this.Params = params - return &this -} - -// NewRunConnectorRequestBodyPropertiesWithDefaults instantiates a new RunConnectorRequestBodyProperties object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorRequestBodyPropertiesWithDefaults() *RunConnectorRequestBodyProperties { - this := RunConnectorRequestBodyProperties{} - return &this -} - -// GetParams returns the Params field value -func (o *RunConnectorRequestBodyProperties) GetParams() RunConnectorRequestBodyPropertiesParams { - if o == nil { - var ret RunConnectorRequestBodyPropertiesParams - return ret - } - - return o.Params -} - -// GetParamsOk returns a tuple with the Params field value -// and a boolean to check if the value has been set. -func (o *RunConnectorRequestBodyProperties) GetParamsOk() (*RunConnectorRequestBodyPropertiesParams, bool) { - if o == nil { - return nil, false - } - return &o.Params, true -} - -// SetParams sets field value -func (o *RunConnectorRequestBodyProperties) SetParams(v RunConnectorRequestBodyPropertiesParams) { - o.Params = v -} - -func (o RunConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorRequestBodyProperties) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["params"] = o.Params - return toSerialize, nil -} - -type NullableRunConnectorRequestBodyProperties struct { - value *RunConnectorRequestBodyProperties - isSet bool -} - -func (v NullableRunConnectorRequestBodyProperties) Get() *RunConnectorRequestBodyProperties { - return v.value -} - -func (v *NullableRunConnectorRequestBodyProperties) Set(val *RunConnectorRequestBodyProperties) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorRequestBodyProperties) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorRequestBodyProperties) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorRequestBodyProperties(val *RunConnectorRequestBodyProperties) *NullableRunConnectorRequestBodyProperties { - return &NullableRunConnectorRequestBodyProperties{value: val, isSet: true} -} - -func (v NullableRunConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorRequestBodyProperties) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Params *OneOfRunConnectorRequestBodyPropertiesParams `json:"params"` } diff --git a/generated/kibanaactions/model_run_connector_request_body_properties_params.go b/generated/kibanaactions/model_run_connector_request_body_properties_params.go deleted file mode 100644 index b1ebe85da..000000000 --- a/generated/kibanaactions/model_run_connector_request_body_properties_params.go +++ /dev/null @@ -1,175 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" - "fmt" -) - -// RunConnectorRequestBodyPropertiesParams - struct for RunConnectorRequestBodyPropertiesParams -type RunConnectorRequestBodyPropertiesParams struct { - RunConnectorParamsDocuments *RunConnectorParamsDocuments - RunConnectorParamsLevelMessage *RunConnectorParamsLevelMessage - SubactionParameters *SubactionParameters -} - -// RunConnectorParamsDocumentsAsRunConnectorRequestBodyPropertiesParams is a convenience function that returns RunConnectorParamsDocuments wrapped in RunConnectorRequestBodyPropertiesParams -func RunConnectorParamsDocumentsAsRunConnectorRequestBodyPropertiesParams(v *RunConnectorParamsDocuments) RunConnectorRequestBodyPropertiesParams { - return RunConnectorRequestBodyPropertiesParams{ - RunConnectorParamsDocuments: v, - } -} - -// RunConnectorParamsLevelMessageAsRunConnectorRequestBodyPropertiesParams is a convenience function that returns RunConnectorParamsLevelMessage wrapped in RunConnectorRequestBodyPropertiesParams -func RunConnectorParamsLevelMessageAsRunConnectorRequestBodyPropertiesParams(v *RunConnectorParamsLevelMessage) RunConnectorRequestBodyPropertiesParams { - return RunConnectorRequestBodyPropertiesParams{ - RunConnectorParamsLevelMessage: v, - } -} - -// SubactionParametersAsRunConnectorRequestBodyPropertiesParams is a convenience function that returns SubactionParameters wrapped in RunConnectorRequestBodyPropertiesParams -func SubactionParametersAsRunConnectorRequestBodyPropertiesParams(v *SubactionParameters) RunConnectorRequestBodyPropertiesParams { - return RunConnectorRequestBodyPropertiesParams{ - SubactionParameters: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *RunConnectorRequestBodyPropertiesParams) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into RunConnectorParamsDocuments - err = json.Unmarshal(data, &dst.RunConnectorParamsDocuments) - if err == nil { - jsonRunConnectorParamsDocuments, _ := json.Marshal(dst.RunConnectorParamsDocuments) - if string(jsonRunConnectorParamsDocuments) == "{}" { // empty struct - dst.RunConnectorParamsDocuments = nil - } else { - match++ - } - } else { - dst.RunConnectorParamsDocuments = nil - } - - // try to unmarshal data into RunConnectorParamsLevelMessage - err = json.Unmarshal(data, &dst.RunConnectorParamsLevelMessage) - if err == nil { - jsonRunConnectorParamsLevelMessage, _ := json.Marshal(dst.RunConnectorParamsLevelMessage) - if string(jsonRunConnectorParamsLevelMessage) == "{}" { // empty struct - dst.RunConnectorParamsLevelMessage = nil - } else { - match++ - } - } else { - dst.RunConnectorParamsLevelMessage = nil - } - - // try to unmarshal data into SubactionParameters - err = json.Unmarshal(data, &dst.SubactionParameters) - if err == nil { - jsonSubactionParameters, _ := json.Marshal(dst.SubactionParameters) - if string(jsonSubactionParameters) == "{}" { // empty struct - dst.SubactionParameters = nil - } else { - match++ - } - } else { - dst.SubactionParameters = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.RunConnectorParamsDocuments = nil - dst.RunConnectorParamsLevelMessage = nil - dst.SubactionParameters = nil - - return fmt.Errorf("data matches more than one schema in oneOf(RunConnectorRequestBodyPropertiesParams)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(RunConnectorRequestBodyPropertiesParams)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src RunConnectorRequestBodyPropertiesParams) MarshalJSON() ([]byte, error) { - if src.RunConnectorParamsDocuments != nil { - return json.Marshal(&src.RunConnectorParamsDocuments) - } - - if src.RunConnectorParamsLevelMessage != nil { - return json.Marshal(&src.RunConnectorParamsLevelMessage) - } - - if src.SubactionParameters != nil { - return json.Marshal(&src.SubactionParameters) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *RunConnectorRequestBodyPropertiesParams) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.RunConnectorParamsDocuments != nil { - return obj.RunConnectorParamsDocuments - } - - if obj.RunConnectorParamsLevelMessage != nil { - return obj.RunConnectorParamsLevelMessage - } - - if obj.SubactionParameters != nil { - return obj.SubactionParameters - } - - // all schemas are nil - return nil -} - -type NullableRunConnectorRequestBodyPropertiesParams struct { - value *RunConnectorRequestBodyPropertiesParams - isSet bool -} - -func (v NullableRunConnectorRequestBodyPropertiesParams) Get() *RunConnectorRequestBodyPropertiesParams { - return v.value -} - -func (v *NullableRunConnectorRequestBodyPropertiesParams) Set(val *RunConnectorRequestBodyPropertiesParams) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorRequestBodyPropertiesParams) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorRequestBodyPropertiesParams) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorRequestBodyPropertiesParams(val *RunConnectorRequestBodyPropertiesParams) *NullableRunConnectorRequestBodyPropertiesParams { - return &NullableRunConnectorRequestBodyPropertiesParams{value: val, isSet: true} -} - -func (v NullableRunConnectorRequestBodyPropertiesParams) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorRequestBodyPropertiesParams) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_run_connector_subaction_addevent.go b/generated/kibanaactions/model_run_connector_subaction_addevent.go index 4b32b833e..63d16f0ce 100644 --- a/generated/kibanaactions/model_run_connector_subaction_addevent.go +++ b/generated/kibanaactions/model_run_connector_subaction_addevent.go @@ -1,152 +1,16 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionAddevent type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionAddevent{} - -// RunConnectorSubactionAddevent The `addEvent` subaction for ServiceNow ITOM connectors. +// The `addEvent` subaction for ServiceNow ITOM connectors. type RunConnectorSubactionAddevent struct { // The action to test. SubAction string `json:"subAction"` SubActionParams *RunConnectorSubactionAddeventSubActionParams `json:"subActionParams,omitempty"` } - -// NewRunConnectorSubactionAddevent instantiates a new RunConnectorSubactionAddevent object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionAddevent(subAction string) *RunConnectorSubactionAddevent { - this := RunConnectorSubactionAddevent{} - this.SubAction = subAction - return &this -} - -// NewRunConnectorSubactionAddeventWithDefaults instantiates a new RunConnectorSubactionAddevent object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionAddeventWithDefaults() *RunConnectorSubactionAddevent { - this := RunConnectorSubactionAddevent{} - return &this -} - -// GetSubAction returns the SubAction field value -func (o *RunConnectorSubactionAddevent) GetSubAction() string { - if o == nil { - var ret string - return ret - } - - return o.SubAction -} - -// GetSubActionOk returns a tuple with the SubAction field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionAddevent) GetSubActionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SubAction, true -} - -// SetSubAction sets field value -func (o *RunConnectorSubactionAddevent) SetSubAction(v string) { - o.SubAction = v -} - -// GetSubActionParams returns the SubActionParams field value if set, zero value otherwise. -func (o *RunConnectorSubactionAddevent) GetSubActionParams() RunConnectorSubactionAddeventSubActionParams { - if o == nil || IsNil(o.SubActionParams) { - var ret RunConnectorSubactionAddeventSubActionParams - return ret - } - return *o.SubActionParams -} - -// GetSubActionParamsOk returns a tuple with the SubActionParams field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionAddevent) GetSubActionParamsOk() (*RunConnectorSubactionAddeventSubActionParams, bool) { - if o == nil || IsNil(o.SubActionParams) { - return nil, false - } - return o.SubActionParams, true -} - -// HasSubActionParams returns a boolean if a field has been set. -func (o *RunConnectorSubactionAddevent) HasSubActionParams() bool { - if o != nil && !IsNil(o.SubActionParams) { - return true - } - - return false -} - -// SetSubActionParams gets a reference to the given RunConnectorSubactionAddeventSubActionParams and assigns it to the SubActionParams field. -func (o *RunConnectorSubactionAddevent) SetSubActionParams(v RunConnectorSubactionAddeventSubActionParams) { - o.SubActionParams = &v -} - -func (o RunConnectorSubactionAddevent) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionAddevent) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["subAction"] = o.SubAction - if !IsNil(o.SubActionParams) { - toSerialize["subActionParams"] = o.SubActionParams - } - return toSerialize, nil -} - -type NullableRunConnectorSubactionAddevent struct { - value *RunConnectorSubactionAddevent - isSet bool -} - -func (v NullableRunConnectorSubactionAddevent) Get() *RunConnectorSubactionAddevent { - return v.value -} - -func (v *NullableRunConnectorSubactionAddevent) Set(val *RunConnectorSubactionAddevent) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionAddevent) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionAddevent) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionAddevent(val *RunConnectorSubactionAddevent) *NullableRunConnectorSubactionAddevent { - return &NullableRunConnectorSubactionAddevent{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionAddevent) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionAddevent) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_run_connector_subaction_addevent_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_addevent_sub_action_params.go index ec12d8298..73dc03f3f 100644 --- a/generated/kibanaactions/model_run_connector_subaction_addevent_sub_action_params.go +++ b/generated/kibanaactions/model_run_connector_subaction_addevent_sub_action_params.go @@ -1,495 +1,35 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionAddeventSubActionParams type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionAddeventSubActionParams{} - -// RunConnectorSubactionAddeventSubActionParams The set of configuration properties for the action. +// The set of configuration properties for the action. type RunConnectorSubactionAddeventSubActionParams struct { // Additional information about the event. - AdditionalInfo *string `json:"additional_info,omitempty"` + AdditionalInfo string `json:"additional_info,omitempty"` // The details about the event. - Description *string `json:"description,omitempty"` + Description string `json:"description,omitempty"` // A specific instance of the source. - EventClass *string `json:"event_class,omitempty"` + EventClass string `json:"event_class,omitempty"` // All actions sharing this key are associated with the same ServiceNow alert. The default value is `:`. - MessageKey *string `json:"message_key,omitempty"` + MessageKey string `json:"message_key,omitempty"` // The name of the metric. - MetricName *string `json:"metric_name,omitempty"` + MetricName string `json:"metric_name,omitempty"` // The host that the event was triggered for. - Node *string `json:"node,omitempty"` + Node string `json:"node,omitempty"` // The name of the resource. - Resource *string `json:"resource,omitempty"` + Resource string `json:"resource,omitempty"` // The severity of the event. - Severity *string `json:"severity,omitempty"` + Severity string `json:"severity,omitempty"` // The name of the event source type. - Source *string `json:"source,omitempty"` + Source string `json:"source,omitempty"` // The time of the event. - TimeOfEvent *string `json:"time_of_event,omitempty"` + TimeOfEvent string `json:"time_of_event,omitempty"` // The type of event. - Type *string `json:"type,omitempty"` -} - -// NewRunConnectorSubactionAddeventSubActionParams instantiates a new RunConnectorSubactionAddeventSubActionParams object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionAddeventSubActionParams() *RunConnectorSubactionAddeventSubActionParams { - this := RunConnectorSubactionAddeventSubActionParams{} - return &this -} - -// NewRunConnectorSubactionAddeventSubActionParamsWithDefaults instantiates a new RunConnectorSubactionAddeventSubActionParams object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionAddeventSubActionParamsWithDefaults() *RunConnectorSubactionAddeventSubActionParams { - this := RunConnectorSubactionAddeventSubActionParams{} - return &this -} - -// GetAdditionalInfo returns the AdditionalInfo field value if set, zero value otherwise. -func (o *RunConnectorSubactionAddeventSubActionParams) GetAdditionalInfo() string { - if o == nil || IsNil(o.AdditionalInfo) { - var ret string - return ret - } - return *o.AdditionalInfo -} - -// GetAdditionalInfoOk returns a tuple with the AdditionalInfo field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) GetAdditionalInfoOk() (*string, bool) { - if o == nil || IsNil(o.AdditionalInfo) { - return nil, false - } - return o.AdditionalInfo, true -} - -// HasAdditionalInfo returns a boolean if a field has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) HasAdditionalInfo() bool { - if o != nil && !IsNil(o.AdditionalInfo) { - return true - } - - return false -} - -// SetAdditionalInfo gets a reference to the given string and assigns it to the AdditionalInfo field. -func (o *RunConnectorSubactionAddeventSubActionParams) SetAdditionalInfo(v string) { - o.AdditionalInfo = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *RunConnectorSubactionAddeventSubActionParams) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *RunConnectorSubactionAddeventSubActionParams) SetDescription(v string) { - o.Description = &v -} - -// GetEventClass returns the EventClass field value if set, zero value otherwise. -func (o *RunConnectorSubactionAddeventSubActionParams) GetEventClass() string { - if o == nil || IsNil(o.EventClass) { - var ret string - return ret - } - return *o.EventClass -} - -// GetEventClassOk returns a tuple with the EventClass field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) GetEventClassOk() (*string, bool) { - if o == nil || IsNil(o.EventClass) { - return nil, false - } - return o.EventClass, true -} - -// HasEventClass returns a boolean if a field has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) HasEventClass() bool { - if o != nil && !IsNil(o.EventClass) { - return true - } - - return false -} - -// SetEventClass gets a reference to the given string and assigns it to the EventClass field. -func (o *RunConnectorSubactionAddeventSubActionParams) SetEventClass(v string) { - o.EventClass = &v -} - -// GetMessageKey returns the MessageKey field value if set, zero value otherwise. -func (o *RunConnectorSubactionAddeventSubActionParams) GetMessageKey() string { - if o == nil || IsNil(o.MessageKey) { - var ret string - return ret - } - return *o.MessageKey -} - -// GetMessageKeyOk returns a tuple with the MessageKey field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) GetMessageKeyOk() (*string, bool) { - if o == nil || IsNil(o.MessageKey) { - return nil, false - } - return o.MessageKey, true -} - -// HasMessageKey returns a boolean if a field has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) HasMessageKey() bool { - if o != nil && !IsNil(o.MessageKey) { - return true - } - - return false -} - -// SetMessageKey gets a reference to the given string and assigns it to the MessageKey field. -func (o *RunConnectorSubactionAddeventSubActionParams) SetMessageKey(v string) { - o.MessageKey = &v -} - -// GetMetricName returns the MetricName field value if set, zero value otherwise. -func (o *RunConnectorSubactionAddeventSubActionParams) GetMetricName() string { - if o == nil || IsNil(o.MetricName) { - var ret string - return ret - } - return *o.MetricName -} - -// GetMetricNameOk returns a tuple with the MetricName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) GetMetricNameOk() (*string, bool) { - if o == nil || IsNil(o.MetricName) { - return nil, false - } - return o.MetricName, true -} - -// HasMetricName returns a boolean if a field has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) HasMetricName() bool { - if o != nil && !IsNil(o.MetricName) { - return true - } - - return false -} - -// SetMetricName gets a reference to the given string and assigns it to the MetricName field. -func (o *RunConnectorSubactionAddeventSubActionParams) SetMetricName(v string) { - o.MetricName = &v -} - -// GetNode returns the Node field value if set, zero value otherwise. -func (o *RunConnectorSubactionAddeventSubActionParams) GetNode() string { - if o == nil || IsNil(o.Node) { - var ret string - return ret - } - return *o.Node -} - -// GetNodeOk returns a tuple with the Node field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) GetNodeOk() (*string, bool) { - if o == nil || IsNil(o.Node) { - return nil, false - } - return o.Node, true -} - -// HasNode returns a boolean if a field has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) HasNode() bool { - if o != nil && !IsNil(o.Node) { - return true - } - - return false -} - -// SetNode gets a reference to the given string and assigns it to the Node field. -func (o *RunConnectorSubactionAddeventSubActionParams) SetNode(v string) { - o.Node = &v -} - -// GetResource returns the Resource field value if set, zero value otherwise. -func (o *RunConnectorSubactionAddeventSubActionParams) GetResource() string { - if o == nil || IsNil(o.Resource) { - var ret string - return ret - } - return *o.Resource -} - -// GetResourceOk returns a tuple with the Resource field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) GetResourceOk() (*string, bool) { - if o == nil || IsNil(o.Resource) { - return nil, false - } - return o.Resource, true -} - -// HasResource returns a boolean if a field has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) HasResource() bool { - if o != nil && !IsNil(o.Resource) { - return true - } - - return false -} - -// SetResource gets a reference to the given string and assigns it to the Resource field. -func (o *RunConnectorSubactionAddeventSubActionParams) SetResource(v string) { - o.Resource = &v -} - -// GetSeverity returns the Severity field value if set, zero value otherwise. -func (o *RunConnectorSubactionAddeventSubActionParams) GetSeverity() string { - if o == nil || IsNil(o.Severity) { - var ret string - return ret - } - return *o.Severity -} - -// GetSeverityOk returns a tuple with the Severity field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) GetSeverityOk() (*string, bool) { - if o == nil || IsNil(o.Severity) { - return nil, false - } - return o.Severity, true -} - -// HasSeverity returns a boolean if a field has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) HasSeverity() bool { - if o != nil && !IsNil(o.Severity) { - return true - } - - return false -} - -// SetSeverity gets a reference to the given string and assigns it to the Severity field. -func (o *RunConnectorSubactionAddeventSubActionParams) SetSeverity(v string) { - o.Severity = &v -} - -// GetSource returns the Source field value if set, zero value otherwise. -func (o *RunConnectorSubactionAddeventSubActionParams) GetSource() string { - if o == nil || IsNil(o.Source) { - var ret string - return ret - } - return *o.Source -} - -// GetSourceOk returns a tuple with the Source field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) GetSourceOk() (*string, bool) { - if o == nil || IsNil(o.Source) { - return nil, false - } - return o.Source, true -} - -// HasSource returns a boolean if a field has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) HasSource() bool { - if o != nil && !IsNil(o.Source) { - return true - } - - return false -} - -// SetSource gets a reference to the given string and assigns it to the Source field. -func (o *RunConnectorSubactionAddeventSubActionParams) SetSource(v string) { - o.Source = &v -} - -// GetTimeOfEvent returns the TimeOfEvent field value if set, zero value otherwise. -func (o *RunConnectorSubactionAddeventSubActionParams) GetTimeOfEvent() string { - if o == nil || IsNil(o.TimeOfEvent) { - var ret string - return ret - } - return *o.TimeOfEvent -} - -// GetTimeOfEventOk returns a tuple with the TimeOfEvent field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) GetTimeOfEventOk() (*string, bool) { - if o == nil || IsNil(o.TimeOfEvent) { - return nil, false - } - return o.TimeOfEvent, true -} - -// HasTimeOfEvent returns a boolean if a field has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) HasTimeOfEvent() bool { - if o != nil && !IsNil(o.TimeOfEvent) { - return true - } - - return false -} - -// SetTimeOfEvent gets a reference to the given string and assigns it to the TimeOfEvent field. -func (o *RunConnectorSubactionAddeventSubActionParams) SetTimeOfEvent(v string) { - o.TimeOfEvent = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *RunConnectorSubactionAddeventSubActionParams) GetType() string { - if o == nil || IsNil(o.Type) { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) GetTypeOk() (*string, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *RunConnectorSubactionAddeventSubActionParams) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *RunConnectorSubactionAddeventSubActionParams) SetType(v string) { - o.Type = &v -} - -func (o RunConnectorSubactionAddeventSubActionParams) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionAddeventSubActionParams) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.AdditionalInfo) { - toSerialize["additional_info"] = o.AdditionalInfo - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.EventClass) { - toSerialize["event_class"] = o.EventClass - } - if !IsNil(o.MessageKey) { - toSerialize["message_key"] = o.MessageKey - } - if !IsNil(o.MetricName) { - toSerialize["metric_name"] = o.MetricName - } - if !IsNil(o.Node) { - toSerialize["node"] = o.Node - } - if !IsNil(o.Resource) { - toSerialize["resource"] = o.Resource - } - if !IsNil(o.Severity) { - toSerialize["severity"] = o.Severity - } - if !IsNil(o.Source) { - toSerialize["source"] = o.Source - } - if !IsNil(o.TimeOfEvent) { - toSerialize["time_of_event"] = o.TimeOfEvent - } - if !IsNil(o.Type) { - toSerialize["type"] = o.Type - } - return toSerialize, nil -} - -type NullableRunConnectorSubactionAddeventSubActionParams struct { - value *RunConnectorSubactionAddeventSubActionParams - isSet bool -} - -func (v NullableRunConnectorSubactionAddeventSubActionParams) Get() *RunConnectorSubactionAddeventSubActionParams { - return v.value -} - -func (v *NullableRunConnectorSubactionAddeventSubActionParams) Set(val *RunConnectorSubactionAddeventSubActionParams) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionAddeventSubActionParams) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionAddeventSubActionParams) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionAddeventSubActionParams(val *RunConnectorSubactionAddeventSubActionParams) *NullableRunConnectorSubactionAddeventSubActionParams { - return &NullableRunConnectorSubactionAddeventSubActionParams{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionAddeventSubActionParams) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionAddeventSubActionParams) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Type_ string `json:"type,omitempty"` } diff --git a/generated/kibanaactions/model_run_connector_subaction_closealert.go b/generated/kibanaactions/model_run_connector_subaction_closealert.go index 97d88173b..5c56f9b78 100644 --- a/generated/kibanaactions/model_run_connector_subaction_closealert.go +++ b/generated/kibanaactions/model_run_connector_subaction_closealert.go @@ -1,143 +1,16 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionClosealert type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionClosealert{} - -// RunConnectorSubactionClosealert The `closeAlert` subaction for Opsgenie connectors. +// The `closeAlert` subaction for Opsgenie connectors. type RunConnectorSubactionClosealert struct { // The action to test. - SubAction string `json:"subAction"` - SubActionParams RunConnectorSubactionClosealertSubActionParams `json:"subActionParams"` -} - -// NewRunConnectorSubactionClosealert instantiates a new RunConnectorSubactionClosealert object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionClosealert(subAction string, subActionParams RunConnectorSubactionClosealertSubActionParams) *RunConnectorSubactionClosealert { - this := RunConnectorSubactionClosealert{} - this.SubAction = subAction - this.SubActionParams = subActionParams - return &this -} - -// NewRunConnectorSubactionClosealertWithDefaults instantiates a new RunConnectorSubactionClosealert object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionClosealertWithDefaults() *RunConnectorSubactionClosealert { - this := RunConnectorSubactionClosealert{} - return &this -} - -// GetSubAction returns the SubAction field value -func (o *RunConnectorSubactionClosealert) GetSubAction() string { - if o == nil { - var ret string - return ret - } - - return o.SubAction -} - -// GetSubActionOk returns a tuple with the SubAction field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionClosealert) GetSubActionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SubAction, true -} - -// SetSubAction sets field value -func (o *RunConnectorSubactionClosealert) SetSubAction(v string) { - o.SubAction = v -} - -// GetSubActionParams returns the SubActionParams field value -func (o *RunConnectorSubactionClosealert) GetSubActionParams() RunConnectorSubactionClosealertSubActionParams { - if o == nil { - var ret RunConnectorSubactionClosealertSubActionParams - return ret - } - - return o.SubActionParams -} - -// GetSubActionParamsOk returns a tuple with the SubActionParams field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionClosealert) GetSubActionParamsOk() (*RunConnectorSubactionClosealertSubActionParams, bool) { - if o == nil { - return nil, false - } - return &o.SubActionParams, true -} - -// SetSubActionParams sets field value -func (o *RunConnectorSubactionClosealert) SetSubActionParams(v RunConnectorSubactionClosealertSubActionParams) { - o.SubActionParams = v -} - -func (o RunConnectorSubactionClosealert) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionClosealert) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["subAction"] = o.SubAction - toSerialize["subActionParams"] = o.SubActionParams - return toSerialize, nil -} - -type NullableRunConnectorSubactionClosealert struct { - value *RunConnectorSubactionClosealert - isSet bool -} - -func (v NullableRunConnectorSubactionClosealert) Get() *RunConnectorSubactionClosealert { - return v.value -} - -func (v *NullableRunConnectorSubactionClosealert) Set(val *RunConnectorSubactionClosealert) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionClosealert) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionClosealert) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionClosealert(val *RunConnectorSubactionClosealert) *NullableRunConnectorSubactionClosealert { - return &NullableRunConnectorSubactionClosealert{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionClosealert) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionClosealert) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + SubAction string `json:"subAction"` + SubActionParams *RunConnectorSubactionClosealertSubActionParams `json:"subActionParams"` } diff --git a/generated/kibanaactions/model_run_connector_subaction_closealert_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_closealert_sub_action_params.go index 2b7df1cf0..eb5ccbe87 100644 --- a/generated/kibanaactions/model_run_connector_subaction_closealert_sub_action_params.go +++ b/generated/kibanaactions/model_run_connector_subaction_closealert_sub_action_params.go @@ -1,227 +1,20 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionClosealertSubActionParams type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionClosealertSubActionParams{} - -// RunConnectorSubactionClosealertSubActionParams struct for RunConnectorSubactionClosealertSubActionParams type RunConnectorSubactionClosealertSubActionParams struct { // The unique identifier used for alert deduplication in Opsgenie. The alias must match the value used when creating the alert. Alias string `json:"alias"` // Additional information for the alert. - Note *string `json:"note,omitempty"` + Note string `json:"note,omitempty"` // The display name for the source of the alert. - Source *string `json:"source,omitempty"` + Source string `json:"source,omitempty"` // The display name for the owner. - User *string `json:"user,omitempty"` -} - -// NewRunConnectorSubactionClosealertSubActionParams instantiates a new RunConnectorSubactionClosealertSubActionParams object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionClosealertSubActionParams(alias string) *RunConnectorSubactionClosealertSubActionParams { - this := RunConnectorSubactionClosealertSubActionParams{} - this.Alias = alias - return &this -} - -// NewRunConnectorSubactionClosealertSubActionParamsWithDefaults instantiates a new RunConnectorSubactionClosealertSubActionParams object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionClosealertSubActionParamsWithDefaults() *RunConnectorSubactionClosealertSubActionParams { - this := RunConnectorSubactionClosealertSubActionParams{} - return &this -} - -// GetAlias returns the Alias field value -func (o *RunConnectorSubactionClosealertSubActionParams) GetAlias() string { - if o == nil { - var ret string - return ret - } - - return o.Alias -} - -// GetAliasOk returns a tuple with the Alias field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionClosealertSubActionParams) GetAliasOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Alias, true -} - -// SetAlias sets field value -func (o *RunConnectorSubactionClosealertSubActionParams) SetAlias(v string) { - o.Alias = v -} - -// GetNote returns the Note field value if set, zero value otherwise. -func (o *RunConnectorSubactionClosealertSubActionParams) GetNote() string { - if o == nil || IsNil(o.Note) { - var ret string - return ret - } - return *o.Note -} - -// GetNoteOk returns a tuple with the Note field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionClosealertSubActionParams) GetNoteOk() (*string, bool) { - if o == nil || IsNil(o.Note) { - return nil, false - } - return o.Note, true -} - -// HasNote returns a boolean if a field has been set. -func (o *RunConnectorSubactionClosealertSubActionParams) HasNote() bool { - if o != nil && !IsNil(o.Note) { - return true - } - - return false -} - -// SetNote gets a reference to the given string and assigns it to the Note field. -func (o *RunConnectorSubactionClosealertSubActionParams) SetNote(v string) { - o.Note = &v -} - -// GetSource returns the Source field value if set, zero value otherwise. -func (o *RunConnectorSubactionClosealertSubActionParams) GetSource() string { - if o == nil || IsNil(o.Source) { - var ret string - return ret - } - return *o.Source -} - -// GetSourceOk returns a tuple with the Source field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionClosealertSubActionParams) GetSourceOk() (*string, bool) { - if o == nil || IsNil(o.Source) { - return nil, false - } - return o.Source, true -} - -// HasSource returns a boolean if a field has been set. -func (o *RunConnectorSubactionClosealertSubActionParams) HasSource() bool { - if o != nil && !IsNil(o.Source) { - return true - } - - return false -} - -// SetSource gets a reference to the given string and assigns it to the Source field. -func (o *RunConnectorSubactionClosealertSubActionParams) SetSource(v string) { - o.Source = &v -} - -// GetUser returns the User field value if set, zero value otherwise. -func (o *RunConnectorSubactionClosealertSubActionParams) GetUser() string { - if o == nil || IsNil(o.User) { - var ret string - return ret - } - return *o.User -} - -// GetUserOk returns a tuple with the User field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionClosealertSubActionParams) GetUserOk() (*string, bool) { - if o == nil || IsNil(o.User) { - return nil, false - } - return o.User, true -} - -// HasUser returns a boolean if a field has been set. -func (o *RunConnectorSubactionClosealertSubActionParams) HasUser() bool { - if o != nil && !IsNil(o.User) { - return true - } - - return false -} - -// SetUser gets a reference to the given string and assigns it to the User field. -func (o *RunConnectorSubactionClosealertSubActionParams) SetUser(v string) { - o.User = &v -} - -func (o RunConnectorSubactionClosealertSubActionParams) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionClosealertSubActionParams) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["alias"] = o.Alias - if !IsNil(o.Note) { - toSerialize["note"] = o.Note - } - if !IsNil(o.Source) { - toSerialize["source"] = o.Source - } - if !IsNil(o.User) { - toSerialize["user"] = o.User - } - return toSerialize, nil -} - -type NullableRunConnectorSubactionClosealertSubActionParams struct { - value *RunConnectorSubactionClosealertSubActionParams - isSet bool -} - -func (v NullableRunConnectorSubactionClosealertSubActionParams) Get() *RunConnectorSubactionClosealertSubActionParams { - return v.value -} - -func (v *NullableRunConnectorSubactionClosealertSubActionParams) Set(val *RunConnectorSubactionClosealertSubActionParams) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionClosealertSubActionParams) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionClosealertSubActionParams) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionClosealertSubActionParams(val *RunConnectorSubactionClosealertSubActionParams) *NullableRunConnectorSubactionClosealertSubActionParams { - return &NullableRunConnectorSubactionClosealertSubActionParams{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionClosealertSubActionParams) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionClosealertSubActionParams) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + User string `json:"user,omitempty"` } diff --git a/generated/kibanaactions/model_run_connector_subaction_createalert.go b/generated/kibanaactions/model_run_connector_subaction_createalert.go index 032c0bcb1..bc015b80e 100644 --- a/generated/kibanaactions/model_run_connector_subaction_createalert.go +++ b/generated/kibanaactions/model_run_connector_subaction_createalert.go @@ -1,143 +1,16 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionCreatealert type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionCreatealert{} - -// RunConnectorSubactionCreatealert The `createAlert` subaction for Opsgenie connectors. +// The `createAlert` subaction for Opsgenie connectors. type RunConnectorSubactionCreatealert struct { // The action to test. - SubAction string `json:"subAction"` - SubActionParams RunConnectorSubactionCreatealertSubActionParams `json:"subActionParams"` -} - -// NewRunConnectorSubactionCreatealert instantiates a new RunConnectorSubactionCreatealert object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionCreatealert(subAction string, subActionParams RunConnectorSubactionCreatealertSubActionParams) *RunConnectorSubactionCreatealert { - this := RunConnectorSubactionCreatealert{} - this.SubAction = subAction - this.SubActionParams = subActionParams - return &this -} - -// NewRunConnectorSubactionCreatealertWithDefaults instantiates a new RunConnectorSubactionCreatealert object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionCreatealertWithDefaults() *RunConnectorSubactionCreatealert { - this := RunConnectorSubactionCreatealert{} - return &this -} - -// GetSubAction returns the SubAction field value -func (o *RunConnectorSubactionCreatealert) GetSubAction() string { - if o == nil { - var ret string - return ret - } - - return o.SubAction -} - -// GetSubActionOk returns a tuple with the SubAction field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealert) GetSubActionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SubAction, true -} - -// SetSubAction sets field value -func (o *RunConnectorSubactionCreatealert) SetSubAction(v string) { - o.SubAction = v -} - -// GetSubActionParams returns the SubActionParams field value -func (o *RunConnectorSubactionCreatealert) GetSubActionParams() RunConnectorSubactionCreatealertSubActionParams { - if o == nil { - var ret RunConnectorSubactionCreatealertSubActionParams - return ret - } - - return o.SubActionParams -} - -// GetSubActionParamsOk returns a tuple with the SubActionParams field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealert) GetSubActionParamsOk() (*RunConnectorSubactionCreatealertSubActionParams, bool) { - if o == nil { - return nil, false - } - return &o.SubActionParams, true -} - -// SetSubActionParams sets field value -func (o *RunConnectorSubactionCreatealert) SetSubActionParams(v RunConnectorSubactionCreatealertSubActionParams) { - o.SubActionParams = v -} - -func (o RunConnectorSubactionCreatealert) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionCreatealert) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["subAction"] = o.SubAction - toSerialize["subActionParams"] = o.SubActionParams - return toSerialize, nil -} - -type NullableRunConnectorSubactionCreatealert struct { - value *RunConnectorSubactionCreatealert - isSet bool -} - -func (v NullableRunConnectorSubactionCreatealert) Get() *RunConnectorSubactionCreatealert { - return v.value -} - -func (v *NullableRunConnectorSubactionCreatealert) Set(val *RunConnectorSubactionCreatealert) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionCreatealert) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionCreatealert) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionCreatealert(val *RunConnectorSubactionCreatealert) *NullableRunConnectorSubactionCreatealert { - return &NullableRunConnectorSubactionCreatealert{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionCreatealert) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionCreatealert) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + SubAction string `json:"subAction"` + SubActionParams *RunConnectorSubactionCreatealertSubActionParams `json:"subActionParams"` } diff --git a/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params.go index 078a3def7..eadb45b7a 100644 --- a/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params.go +++ b/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params.go @@ -1,560 +1,38 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionCreatealertSubActionParams type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionCreatealertSubActionParams{} - -// RunConnectorSubactionCreatealertSubActionParams struct for RunConnectorSubactionCreatealertSubActionParams type RunConnectorSubactionCreatealertSubActionParams struct { // The custom actions available to the alert. Actions []string `json:"actions,omitempty"` // The unique identifier used for alert deduplication in Opsgenie. - Alias *string `json:"alias,omitempty"` + Alias string `json:"alias,omitempty"` // A description that provides detailed information about the alert. - Description *string `json:"description,omitempty"` + Description string `json:"description,omitempty"` // The custom properties of the alert. - Details map[string]interface{} `json:"details,omitempty"` + Details ModelMap `json:"details,omitempty"` // The domain of the alert. For example, the application or server name. - Entity *string `json:"entity,omitempty"` + Entity string `json:"entity,omitempty"` // The alert message. Message string `json:"message"` // Additional information for the alert. - Note *string `json:"note,omitempty"` + Note string `json:"note,omitempty"` // The priority level for the alert. - Priority *string `json:"priority,omitempty"` + Priority string `json:"priority,omitempty"` // The entities to receive notifications about the alert. If `type` is `user`, either `id` or `username` is required. If `type` is `team`, either `id` or `name` is required. - Responders []RunConnectorSubactionCreatealertSubActionParamsRespondersInner `json:"responders,omitempty"` + Responders []RunConnectorSubactionCreatealertSubActionParamsResponders `json:"responders,omitempty"` // The display name for the source of the alert. - Source *string `json:"source,omitempty"` + Source string `json:"source,omitempty"` // The tags for the alert. Tags []string `json:"tags,omitempty"` // The display name for the owner. - User *string `json:"user,omitempty"` + User string `json:"user,omitempty"` // The teams and users that the alert will be visible to without sending a notification. Only one of `id`, `name`, or `username` is required. - VisibleTo []RunConnectorSubactionCreatealertSubActionParamsVisibleToInner `json:"visibleTo,omitempty"` -} - -// NewRunConnectorSubactionCreatealertSubActionParams instantiates a new RunConnectorSubactionCreatealertSubActionParams object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionCreatealertSubActionParams(message string) *RunConnectorSubactionCreatealertSubActionParams { - this := RunConnectorSubactionCreatealertSubActionParams{} - this.Message = message - return &this -} - -// NewRunConnectorSubactionCreatealertSubActionParamsWithDefaults instantiates a new RunConnectorSubactionCreatealertSubActionParams object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionCreatealertSubActionParamsWithDefaults() *RunConnectorSubactionCreatealertSubActionParams { - this := RunConnectorSubactionCreatealertSubActionParams{} - return &this -} - -// GetActions returns the Actions field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetActions() []string { - if o == nil || IsNil(o.Actions) { - var ret []string - return ret - } - return o.Actions -} - -// GetActionsOk returns a tuple with the Actions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetActionsOk() ([]string, bool) { - if o == nil || IsNil(o.Actions) { - return nil, false - } - return o.Actions, true -} - -// HasActions returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) HasActions() bool { - if o != nil && !IsNil(o.Actions) { - return true - } - - return false -} - -// SetActions gets a reference to the given []string and assigns it to the Actions field. -func (o *RunConnectorSubactionCreatealertSubActionParams) SetActions(v []string) { - o.Actions = v -} - -// GetAlias returns the Alias field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetAlias() string { - if o == nil || IsNil(o.Alias) { - var ret string - return ret - } - return *o.Alias -} - -// GetAliasOk returns a tuple with the Alias field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetAliasOk() (*string, bool) { - if o == nil || IsNil(o.Alias) { - return nil, false - } - return o.Alias, true -} - -// HasAlias returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) HasAlias() bool { - if o != nil && !IsNil(o.Alias) { - return true - } - - return false -} - -// SetAlias gets a reference to the given string and assigns it to the Alias field. -func (o *RunConnectorSubactionCreatealertSubActionParams) SetAlias(v string) { - o.Alias = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *RunConnectorSubactionCreatealertSubActionParams) SetDescription(v string) { - o.Description = &v -} - -// GetDetails returns the Details field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetDetails() map[string]interface{} { - if o == nil || IsNil(o.Details) { - var ret map[string]interface{} - return ret - } - return o.Details -} - -// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetDetailsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Details) { - return map[string]interface{}{}, false - } - return o.Details, true -} - -// HasDetails returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) HasDetails() bool { - if o != nil && !IsNil(o.Details) { - return true - } - - return false -} - -// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field. -func (o *RunConnectorSubactionCreatealertSubActionParams) SetDetails(v map[string]interface{}) { - o.Details = v -} - -// GetEntity returns the Entity field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetEntity() string { - if o == nil || IsNil(o.Entity) { - var ret string - return ret - } - return *o.Entity -} - -// GetEntityOk returns a tuple with the Entity field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetEntityOk() (*string, bool) { - if o == nil || IsNil(o.Entity) { - return nil, false - } - return o.Entity, true -} - -// HasEntity returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) HasEntity() bool { - if o != nil && !IsNil(o.Entity) { - return true - } - - return false -} - -// SetEntity gets a reference to the given string and assigns it to the Entity field. -func (o *RunConnectorSubactionCreatealertSubActionParams) SetEntity(v string) { - o.Entity = &v -} - -// GetMessage returns the Message field value -func (o *RunConnectorSubactionCreatealertSubActionParams) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *RunConnectorSubactionCreatealertSubActionParams) SetMessage(v string) { - o.Message = v -} - -// GetNote returns the Note field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetNote() string { - if o == nil || IsNil(o.Note) { - var ret string - return ret - } - return *o.Note -} - -// GetNoteOk returns a tuple with the Note field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetNoteOk() (*string, bool) { - if o == nil || IsNil(o.Note) { - return nil, false - } - return o.Note, true -} - -// HasNote returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) HasNote() bool { - if o != nil && !IsNil(o.Note) { - return true - } - - return false -} - -// SetNote gets a reference to the given string and assigns it to the Note field. -func (o *RunConnectorSubactionCreatealertSubActionParams) SetNote(v string) { - o.Note = &v -} - -// GetPriority returns the Priority field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetPriority() string { - if o == nil || IsNil(o.Priority) { - var ret string - return ret - } - return *o.Priority -} - -// GetPriorityOk returns a tuple with the Priority field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetPriorityOk() (*string, bool) { - if o == nil || IsNil(o.Priority) { - return nil, false - } - return o.Priority, true -} - -// HasPriority returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) HasPriority() bool { - if o != nil && !IsNil(o.Priority) { - return true - } - - return false -} - -// SetPriority gets a reference to the given string and assigns it to the Priority field. -func (o *RunConnectorSubactionCreatealertSubActionParams) SetPriority(v string) { - o.Priority = &v -} - -// GetResponders returns the Responders field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetResponders() []RunConnectorSubactionCreatealertSubActionParamsRespondersInner { - if o == nil || IsNil(o.Responders) { - var ret []RunConnectorSubactionCreatealertSubActionParamsRespondersInner - return ret - } - return o.Responders -} - -// GetRespondersOk returns a tuple with the Responders field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetRespondersOk() ([]RunConnectorSubactionCreatealertSubActionParamsRespondersInner, bool) { - if o == nil || IsNil(o.Responders) { - return nil, false - } - return o.Responders, true -} - -// HasResponders returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) HasResponders() bool { - if o != nil && !IsNil(o.Responders) { - return true - } - - return false -} - -// SetResponders gets a reference to the given []RunConnectorSubactionCreatealertSubActionParamsRespondersInner and assigns it to the Responders field. -func (o *RunConnectorSubactionCreatealertSubActionParams) SetResponders(v []RunConnectorSubactionCreatealertSubActionParamsRespondersInner) { - o.Responders = v -} - -// GetSource returns the Source field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetSource() string { - if o == nil || IsNil(o.Source) { - var ret string - return ret - } - return *o.Source -} - -// GetSourceOk returns a tuple with the Source field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetSourceOk() (*string, bool) { - if o == nil || IsNil(o.Source) { - return nil, false - } - return o.Source, true -} - -// HasSource returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) HasSource() bool { - if o != nil && !IsNil(o.Source) { - return true - } - - return false -} - -// SetSource gets a reference to the given string and assigns it to the Source field. -func (o *RunConnectorSubactionCreatealertSubActionParams) SetSource(v string) { - o.Source = &v -} - -// GetTags returns the Tags field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetTags() []string { - if o == nil || IsNil(o.Tags) { - var ret []string - return ret - } - return o.Tags -} - -// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetTagsOk() ([]string, bool) { - if o == nil || IsNil(o.Tags) { - return nil, false - } - return o.Tags, true -} - -// HasTags returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) HasTags() bool { - if o != nil && !IsNil(o.Tags) { - return true - } - - return false -} - -// SetTags gets a reference to the given []string and assigns it to the Tags field. -func (o *RunConnectorSubactionCreatealertSubActionParams) SetTags(v []string) { - o.Tags = v -} - -// GetUser returns the User field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetUser() string { - if o == nil || IsNil(o.User) { - var ret string - return ret - } - return *o.User -} - -// GetUserOk returns a tuple with the User field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetUserOk() (*string, bool) { - if o == nil || IsNil(o.User) { - return nil, false - } - return o.User, true -} - -// HasUser returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) HasUser() bool { - if o != nil && !IsNil(o.User) { - return true - } - - return false -} - -// SetUser gets a reference to the given string and assigns it to the User field. -func (o *RunConnectorSubactionCreatealertSubActionParams) SetUser(v string) { - o.User = &v -} - -// GetVisibleTo returns the VisibleTo field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetVisibleTo() []RunConnectorSubactionCreatealertSubActionParamsVisibleToInner { - if o == nil || IsNil(o.VisibleTo) { - var ret []RunConnectorSubactionCreatealertSubActionParamsVisibleToInner - return ret - } - return o.VisibleTo -} - -// GetVisibleToOk returns a tuple with the VisibleTo field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) GetVisibleToOk() ([]RunConnectorSubactionCreatealertSubActionParamsVisibleToInner, bool) { - if o == nil || IsNil(o.VisibleTo) { - return nil, false - } - return o.VisibleTo, true -} - -// HasVisibleTo returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParams) HasVisibleTo() bool { - if o != nil && !IsNil(o.VisibleTo) { - return true - } - - return false -} - -// SetVisibleTo gets a reference to the given []RunConnectorSubactionCreatealertSubActionParamsVisibleToInner and assigns it to the VisibleTo field. -func (o *RunConnectorSubactionCreatealertSubActionParams) SetVisibleTo(v []RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) { - o.VisibleTo = v -} - -func (o RunConnectorSubactionCreatealertSubActionParams) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionCreatealertSubActionParams) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Actions) { - toSerialize["actions"] = o.Actions - } - if !IsNil(o.Alias) { - toSerialize["alias"] = o.Alias - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.Details) { - toSerialize["details"] = o.Details - } - if !IsNil(o.Entity) { - toSerialize["entity"] = o.Entity - } - toSerialize["message"] = o.Message - if !IsNil(o.Note) { - toSerialize["note"] = o.Note - } - if !IsNil(o.Priority) { - toSerialize["priority"] = o.Priority - } - if !IsNil(o.Responders) { - toSerialize["responders"] = o.Responders - } - if !IsNil(o.Source) { - toSerialize["source"] = o.Source - } - if !IsNil(o.Tags) { - toSerialize["tags"] = o.Tags - } - if !IsNil(o.User) { - toSerialize["user"] = o.User - } - if !IsNil(o.VisibleTo) { - toSerialize["visibleTo"] = o.VisibleTo - } - return toSerialize, nil -} - -type NullableRunConnectorSubactionCreatealertSubActionParams struct { - value *RunConnectorSubactionCreatealertSubActionParams - isSet bool -} - -func (v NullableRunConnectorSubactionCreatealertSubActionParams) Get() *RunConnectorSubactionCreatealertSubActionParams { - return v.value -} - -func (v *NullableRunConnectorSubactionCreatealertSubActionParams) Set(val *RunConnectorSubactionCreatealertSubActionParams) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionCreatealertSubActionParams) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionCreatealertSubActionParams) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionCreatealertSubActionParams(val *RunConnectorSubactionCreatealertSubActionParams) *NullableRunConnectorSubactionCreatealertSubActionParams { - return &NullableRunConnectorSubactionCreatealertSubActionParams{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionCreatealertSubActionParams) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionCreatealertSubActionParams) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + VisibleTo []RunConnectorSubactionCreatealertSubActionParamsVisibleTo `json:"visibleTo,omitempty"` } diff --git a/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_responders.go b/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_responders.go new file mode 100644 index 000000000..37793d081 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_responders.go @@ -0,0 +1,20 @@ +/* + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package kibanaactions + +type RunConnectorSubactionCreatealertSubActionParamsResponders struct { + // The identifier for the entity. + Id string `json:"id,omitempty"` + // The name of the entity. + Name string `json:"name,omitempty"` + // The type of responders, in this case `escalation`. + Type_ string `json:"type,omitempty"` + // A valid email address for the user. + Username string `json:"username,omitempty"` +} diff --git a/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_responders_inner.go b/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_responders_inner.go deleted file mode 100644 index e51d5113e..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_responders_inner.go +++ /dev/null @@ -1,236 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionCreatealertSubActionParamsRespondersInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionCreatealertSubActionParamsRespondersInner{} - -// RunConnectorSubactionCreatealertSubActionParamsRespondersInner struct for RunConnectorSubactionCreatealertSubActionParamsRespondersInner -type RunConnectorSubactionCreatealertSubActionParamsRespondersInner struct { - // The identifier for the entity. - Id *string `json:"id,omitempty"` - // The name of the entity. - Name *string `json:"name,omitempty"` - // The type of responders, in this case `escalation`. - Type *string `json:"type,omitempty"` - // A valid email address for the user. - Username *string `json:"username,omitempty"` -} - -// NewRunConnectorSubactionCreatealertSubActionParamsRespondersInner instantiates a new RunConnectorSubactionCreatealertSubActionParamsRespondersInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionCreatealertSubActionParamsRespondersInner() *RunConnectorSubactionCreatealertSubActionParamsRespondersInner { - this := RunConnectorSubactionCreatealertSubActionParamsRespondersInner{} - return &this -} - -// NewRunConnectorSubactionCreatealertSubActionParamsRespondersInnerWithDefaults instantiates a new RunConnectorSubactionCreatealertSubActionParamsRespondersInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionCreatealertSubActionParamsRespondersInnerWithDefaults() *RunConnectorSubactionCreatealertSubActionParamsRespondersInner { - this := RunConnectorSubactionCreatealertSubActionParamsRespondersInner{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) SetId(v string) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) SetName(v string) { - o.Name = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetType() string { - if o == nil || IsNil(o.Type) { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetTypeOk() (*string, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) SetType(v string) { - o.Type = &v -} - -// GetUsername returns the Username field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetUsername() string { - if o == nil || IsNil(o.Username) { - var ret string - return ret - } - return *o.Username -} - -// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) GetUsernameOk() (*string, bool) { - if o == nil || IsNil(o.Username) { - return nil, false - } - return o.Username, true -} - -// HasUsername returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) HasUsername() bool { - if o != nil && !IsNil(o.Username) { - return true - } - - return false -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -func (o *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) SetUsername(v string) { - o.Username = &v -} - -func (o RunConnectorSubactionCreatealertSubActionParamsRespondersInner) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionCreatealertSubActionParamsRespondersInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Type) { - toSerialize["type"] = o.Type - } - if !IsNil(o.Username) { - toSerialize["username"] = o.Username - } - return toSerialize, nil -} - -type NullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner struct { - value *RunConnectorSubactionCreatealertSubActionParamsRespondersInner - isSet bool -} - -func (v NullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner) Get() *RunConnectorSubactionCreatealertSubActionParamsRespondersInner { - return v.value -} - -func (v *NullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner) Set(val *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner(val *RunConnectorSubactionCreatealertSubActionParamsRespondersInner) *NullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner { - return &NullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionCreatealertSubActionParamsRespondersInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_visible_to.go b/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_visible_to.go new file mode 100644 index 000000000..e8c6f2eb1 --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_visible_to.go @@ -0,0 +1,20 @@ +/* + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package kibanaactions + +type RunConnectorSubactionCreatealertSubActionParamsVisibleTo struct { + // The identifier for the entity. + Id string `json:"id,omitempty"` + // The name of the entity. + Name string `json:"name,omitempty"` + // Valid values are `team` and `user`. + Type_ string `json:"type"` + // The user name. This property is required only when the `type` is `user`. + Username string `json:"username,omitempty"` +} diff --git a/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_visible_to_inner.go b/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_visible_to_inner.go deleted file mode 100644 index baeb28a42..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_visible_to_inner.go +++ /dev/null @@ -1,227 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionCreatealertSubActionParamsVisibleToInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionCreatealertSubActionParamsVisibleToInner{} - -// RunConnectorSubactionCreatealertSubActionParamsVisibleToInner struct for RunConnectorSubactionCreatealertSubActionParamsVisibleToInner -type RunConnectorSubactionCreatealertSubActionParamsVisibleToInner struct { - // The identifier for the entity. - Id *string `json:"id,omitempty"` - // The name of the entity. - Name *string `json:"name,omitempty"` - // Valid values are `team` and `user`. - Type string `json:"type"` - // The user name. This property is required only when the `type` is `user`. - Username *string `json:"username,omitempty"` -} - -// NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInner instantiates a new RunConnectorSubactionCreatealertSubActionParamsVisibleToInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInner(type_ string) *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner { - this := RunConnectorSubactionCreatealertSubActionParamsVisibleToInner{} - this.Type = type_ - return &this -} - -// NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInnerWithDefaults instantiates a new RunConnectorSubactionCreatealertSubActionParamsVisibleToInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionCreatealertSubActionParamsVisibleToInnerWithDefaults() *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner { - this := RunConnectorSubactionCreatealertSubActionParamsVisibleToInner{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) SetId(v string) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) SetName(v string) { - o.Name = &v -} - -// GetType returns the Type field value -func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetType() string { - if o == nil { - var ret string - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) SetType(v string) { - o.Type = v -} - -// GetUsername returns the Username field value if set, zero value otherwise. -func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetUsername() string { - if o == nil || IsNil(o.Username) { - var ret string - return ret - } - return *o.Username -} - -// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) GetUsernameOk() (*string, bool) { - if o == nil || IsNil(o.Username) { - return nil, false - } - return o.Username, true -} - -// HasUsername returns a boolean if a field has been set. -func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) HasUsername() bool { - if o != nil && !IsNil(o.Username) { - return true - } - - return false -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -func (o *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) SetUsername(v string) { - o.Username = &v -} - -func (o RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - toSerialize["type"] = o.Type - if !IsNil(o.Username) { - toSerialize["username"] = o.Username - } - return toSerialize, nil -} - -type NullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner struct { - value *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner - isSet bool -} - -func (v NullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner) Get() *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner { - return v.value -} - -func (v *NullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner) Set(val *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner(val *RunConnectorSubactionCreatealertSubActionParamsVisibleToInner) *NullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner { - return &NullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionCreatealertSubActionParamsVisibleToInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype.go b/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype.go index 21d07c8cf..e58b6be54 100644 --- a/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype.go +++ b/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype.go @@ -1,143 +1,16 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionFieldsbyissuetype type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionFieldsbyissuetype{} - -// RunConnectorSubactionFieldsbyissuetype The `fieldsByIssueType` subaction for Jira connectors. +// The `fieldsByIssueType` subaction for Jira connectors. type RunConnectorSubactionFieldsbyissuetype struct { // The action to test. - SubAction string `json:"subAction"` - SubActionParams RunConnectorSubactionFieldsbyissuetypeSubActionParams `json:"subActionParams"` -} - -// NewRunConnectorSubactionFieldsbyissuetype instantiates a new RunConnectorSubactionFieldsbyissuetype object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionFieldsbyissuetype(subAction string, subActionParams RunConnectorSubactionFieldsbyissuetypeSubActionParams) *RunConnectorSubactionFieldsbyissuetype { - this := RunConnectorSubactionFieldsbyissuetype{} - this.SubAction = subAction - this.SubActionParams = subActionParams - return &this -} - -// NewRunConnectorSubactionFieldsbyissuetypeWithDefaults instantiates a new RunConnectorSubactionFieldsbyissuetype object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionFieldsbyissuetypeWithDefaults() *RunConnectorSubactionFieldsbyissuetype { - this := RunConnectorSubactionFieldsbyissuetype{} - return &this -} - -// GetSubAction returns the SubAction field value -func (o *RunConnectorSubactionFieldsbyissuetype) GetSubAction() string { - if o == nil { - var ret string - return ret - } - - return o.SubAction -} - -// GetSubActionOk returns a tuple with the SubAction field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionFieldsbyissuetype) GetSubActionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SubAction, true -} - -// SetSubAction sets field value -func (o *RunConnectorSubactionFieldsbyissuetype) SetSubAction(v string) { - o.SubAction = v -} - -// GetSubActionParams returns the SubActionParams field value -func (o *RunConnectorSubactionFieldsbyissuetype) GetSubActionParams() RunConnectorSubactionFieldsbyissuetypeSubActionParams { - if o == nil { - var ret RunConnectorSubactionFieldsbyissuetypeSubActionParams - return ret - } - - return o.SubActionParams -} - -// GetSubActionParamsOk returns a tuple with the SubActionParams field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionFieldsbyissuetype) GetSubActionParamsOk() (*RunConnectorSubactionFieldsbyissuetypeSubActionParams, bool) { - if o == nil { - return nil, false - } - return &o.SubActionParams, true -} - -// SetSubActionParams sets field value -func (o *RunConnectorSubactionFieldsbyissuetype) SetSubActionParams(v RunConnectorSubactionFieldsbyissuetypeSubActionParams) { - o.SubActionParams = v -} - -func (o RunConnectorSubactionFieldsbyissuetype) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionFieldsbyissuetype) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["subAction"] = o.SubAction - toSerialize["subActionParams"] = o.SubActionParams - return toSerialize, nil -} - -type NullableRunConnectorSubactionFieldsbyissuetype struct { - value *RunConnectorSubactionFieldsbyissuetype - isSet bool -} - -func (v NullableRunConnectorSubactionFieldsbyissuetype) Get() *RunConnectorSubactionFieldsbyissuetype { - return v.value -} - -func (v *NullableRunConnectorSubactionFieldsbyissuetype) Set(val *RunConnectorSubactionFieldsbyissuetype) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionFieldsbyissuetype) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionFieldsbyissuetype) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionFieldsbyissuetype(val *RunConnectorSubactionFieldsbyissuetype) *NullableRunConnectorSubactionFieldsbyissuetype { - return &NullableRunConnectorSubactionFieldsbyissuetype{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionFieldsbyissuetype) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionFieldsbyissuetype) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + SubAction string `json:"subAction"` + SubActionParams *RunConnectorSubactionFieldsbyissuetypeSubActionParams `json:"subActionParams"` } diff --git a/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype_sub_action_params.go index cc12da586..ddd444e86 100644 --- a/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype_sub_action_params.go +++ b/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype_sub_action_params.go @@ -1,116 +1,14 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionFieldsbyissuetypeSubActionParams type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionFieldsbyissuetypeSubActionParams{} - -// RunConnectorSubactionFieldsbyissuetypeSubActionParams struct for RunConnectorSubactionFieldsbyissuetypeSubActionParams type RunConnectorSubactionFieldsbyissuetypeSubActionParams struct { // The Jira issue type identifier. Id string `json:"id"` } - -// NewRunConnectorSubactionFieldsbyissuetypeSubActionParams instantiates a new RunConnectorSubactionFieldsbyissuetypeSubActionParams object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionFieldsbyissuetypeSubActionParams(id string) *RunConnectorSubactionFieldsbyissuetypeSubActionParams { - this := RunConnectorSubactionFieldsbyissuetypeSubActionParams{} - this.Id = id - return &this -} - -// NewRunConnectorSubactionFieldsbyissuetypeSubActionParamsWithDefaults instantiates a new RunConnectorSubactionFieldsbyissuetypeSubActionParams object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionFieldsbyissuetypeSubActionParamsWithDefaults() *RunConnectorSubactionFieldsbyissuetypeSubActionParams { - this := RunConnectorSubactionFieldsbyissuetypeSubActionParams{} - return &this -} - -// GetId returns the Id field value -func (o *RunConnectorSubactionFieldsbyissuetypeSubActionParams) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionFieldsbyissuetypeSubActionParams) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *RunConnectorSubactionFieldsbyissuetypeSubActionParams) SetId(v string) { - o.Id = v -} - -func (o RunConnectorSubactionFieldsbyissuetypeSubActionParams) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionFieldsbyissuetypeSubActionParams) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - return toSerialize, nil -} - -type NullableRunConnectorSubactionFieldsbyissuetypeSubActionParams struct { - value *RunConnectorSubactionFieldsbyissuetypeSubActionParams - isSet bool -} - -func (v NullableRunConnectorSubactionFieldsbyissuetypeSubActionParams) Get() *RunConnectorSubactionFieldsbyissuetypeSubActionParams { - return v.value -} - -func (v *NullableRunConnectorSubactionFieldsbyissuetypeSubActionParams) Set(val *RunConnectorSubactionFieldsbyissuetypeSubActionParams) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionFieldsbyissuetypeSubActionParams) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionFieldsbyissuetypeSubActionParams) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionFieldsbyissuetypeSubActionParams(val *RunConnectorSubactionFieldsbyissuetypeSubActionParams) *NullableRunConnectorSubactionFieldsbyissuetypeSubActionParams { - return &NullableRunConnectorSubactionFieldsbyissuetypeSubActionParams{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionFieldsbyissuetypeSubActionParams) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionFieldsbyissuetypeSubActionParams) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_run_connector_subaction_getchoices.go b/generated/kibanaactions/model_run_connector_subaction_getchoices.go index 1c0e9dc99..c5aedeb92 100644 --- a/generated/kibanaactions/model_run_connector_subaction_getchoices.go +++ b/generated/kibanaactions/model_run_connector_subaction_getchoices.go @@ -1,143 +1,16 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionGetchoices type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionGetchoices{} - -// RunConnectorSubactionGetchoices The `getChoices` subaction for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors. +// The `getChoices` subaction for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors. type RunConnectorSubactionGetchoices struct { // The action to test. - SubAction string `json:"subAction"` - SubActionParams RunConnectorSubactionGetchoicesSubActionParams `json:"subActionParams"` -} - -// NewRunConnectorSubactionGetchoices instantiates a new RunConnectorSubactionGetchoices object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionGetchoices(subAction string, subActionParams RunConnectorSubactionGetchoicesSubActionParams) *RunConnectorSubactionGetchoices { - this := RunConnectorSubactionGetchoices{} - this.SubAction = subAction - this.SubActionParams = subActionParams - return &this -} - -// NewRunConnectorSubactionGetchoicesWithDefaults instantiates a new RunConnectorSubactionGetchoices object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionGetchoicesWithDefaults() *RunConnectorSubactionGetchoices { - this := RunConnectorSubactionGetchoices{} - return &this -} - -// GetSubAction returns the SubAction field value -func (o *RunConnectorSubactionGetchoices) GetSubAction() string { - if o == nil { - var ret string - return ret - } - - return o.SubAction -} - -// GetSubActionOk returns a tuple with the SubAction field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionGetchoices) GetSubActionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SubAction, true -} - -// SetSubAction sets field value -func (o *RunConnectorSubactionGetchoices) SetSubAction(v string) { - o.SubAction = v -} - -// GetSubActionParams returns the SubActionParams field value -func (o *RunConnectorSubactionGetchoices) GetSubActionParams() RunConnectorSubactionGetchoicesSubActionParams { - if o == nil { - var ret RunConnectorSubactionGetchoicesSubActionParams - return ret - } - - return o.SubActionParams -} - -// GetSubActionParamsOk returns a tuple with the SubActionParams field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionGetchoices) GetSubActionParamsOk() (*RunConnectorSubactionGetchoicesSubActionParams, bool) { - if o == nil { - return nil, false - } - return &o.SubActionParams, true -} - -// SetSubActionParams sets field value -func (o *RunConnectorSubactionGetchoices) SetSubActionParams(v RunConnectorSubactionGetchoicesSubActionParams) { - o.SubActionParams = v -} - -func (o RunConnectorSubactionGetchoices) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionGetchoices) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["subAction"] = o.SubAction - toSerialize["subActionParams"] = o.SubActionParams - return toSerialize, nil -} - -type NullableRunConnectorSubactionGetchoices struct { - value *RunConnectorSubactionGetchoices - isSet bool -} - -func (v NullableRunConnectorSubactionGetchoices) Get() *RunConnectorSubactionGetchoices { - return v.value -} - -func (v *NullableRunConnectorSubactionGetchoices) Set(val *RunConnectorSubactionGetchoices) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionGetchoices) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionGetchoices) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionGetchoices(val *RunConnectorSubactionGetchoices) *NullableRunConnectorSubactionGetchoices { - return &NullableRunConnectorSubactionGetchoices{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionGetchoices) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionGetchoices) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + SubAction string `json:"subAction"` + SubActionParams *RunConnectorSubactionGetchoicesSubActionParams `json:"subActionParams"` } diff --git a/generated/kibanaactions/model_run_connector_subaction_getchoices_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_getchoices_sub_action_params.go index 3b7a99ea8..a5de3b171 100644 --- a/generated/kibanaactions/model_run_connector_subaction_getchoices_sub_action_params.go +++ b/generated/kibanaactions/model_run_connector_subaction_getchoices_sub_action_params.go @@ -1,116 +1,15 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionGetchoicesSubActionParams type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionGetchoicesSubActionParams{} - -// RunConnectorSubactionGetchoicesSubActionParams The set of configuration properties for the action. +// The set of configuration properties for the action. type RunConnectorSubactionGetchoicesSubActionParams struct { // An array of fields. Fields []string `json:"fields"` } - -// NewRunConnectorSubactionGetchoicesSubActionParams instantiates a new RunConnectorSubactionGetchoicesSubActionParams object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionGetchoicesSubActionParams(fields []string) *RunConnectorSubactionGetchoicesSubActionParams { - this := RunConnectorSubactionGetchoicesSubActionParams{} - this.Fields = fields - return &this -} - -// NewRunConnectorSubactionGetchoicesSubActionParamsWithDefaults instantiates a new RunConnectorSubactionGetchoicesSubActionParams object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionGetchoicesSubActionParamsWithDefaults() *RunConnectorSubactionGetchoicesSubActionParams { - this := RunConnectorSubactionGetchoicesSubActionParams{} - return &this -} - -// GetFields returns the Fields field value -func (o *RunConnectorSubactionGetchoicesSubActionParams) GetFields() []string { - if o == nil { - var ret []string - return ret - } - - return o.Fields -} - -// GetFieldsOk returns a tuple with the Fields field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionGetchoicesSubActionParams) GetFieldsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Fields, true -} - -// SetFields sets field value -func (o *RunConnectorSubactionGetchoicesSubActionParams) SetFields(v []string) { - o.Fields = v -} - -func (o RunConnectorSubactionGetchoicesSubActionParams) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionGetchoicesSubActionParams) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["fields"] = o.Fields - return toSerialize, nil -} - -type NullableRunConnectorSubactionGetchoicesSubActionParams struct { - value *RunConnectorSubactionGetchoicesSubActionParams - isSet bool -} - -func (v NullableRunConnectorSubactionGetchoicesSubActionParams) Get() *RunConnectorSubactionGetchoicesSubActionParams { - return v.value -} - -func (v *NullableRunConnectorSubactionGetchoicesSubActionParams) Set(val *RunConnectorSubactionGetchoicesSubActionParams) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionGetchoicesSubActionParams) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionGetchoicesSubActionParams) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionGetchoicesSubActionParams(val *RunConnectorSubactionGetchoicesSubActionParams) *NullableRunConnectorSubactionGetchoicesSubActionParams { - return &NullableRunConnectorSubactionGetchoicesSubActionParams{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionGetchoicesSubActionParams) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionGetchoicesSubActionParams) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_run_connector_subaction_getfields.go b/generated/kibanaactions/model_run_connector_subaction_getfields.go index 780c9c145..4f059f850 100644 --- a/generated/kibanaactions/model_run_connector_subaction_getfields.go +++ b/generated/kibanaactions/model_run_connector_subaction_getfields.go @@ -1,116 +1,15 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionGetfields type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionGetfields{} - -// RunConnectorSubactionGetfields The `getFields` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors. +// The `getFields` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors. type RunConnectorSubactionGetfields struct { // The action to test. SubAction string `json:"subAction"` } - -// NewRunConnectorSubactionGetfields instantiates a new RunConnectorSubactionGetfields object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionGetfields(subAction string) *RunConnectorSubactionGetfields { - this := RunConnectorSubactionGetfields{} - this.SubAction = subAction - return &this -} - -// NewRunConnectorSubactionGetfieldsWithDefaults instantiates a new RunConnectorSubactionGetfields object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionGetfieldsWithDefaults() *RunConnectorSubactionGetfields { - this := RunConnectorSubactionGetfields{} - return &this -} - -// GetSubAction returns the SubAction field value -func (o *RunConnectorSubactionGetfields) GetSubAction() string { - if o == nil { - var ret string - return ret - } - - return o.SubAction -} - -// GetSubActionOk returns a tuple with the SubAction field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionGetfields) GetSubActionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SubAction, true -} - -// SetSubAction sets field value -func (o *RunConnectorSubactionGetfields) SetSubAction(v string) { - o.SubAction = v -} - -func (o RunConnectorSubactionGetfields) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionGetfields) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["subAction"] = o.SubAction - return toSerialize, nil -} - -type NullableRunConnectorSubactionGetfields struct { - value *RunConnectorSubactionGetfields - isSet bool -} - -func (v NullableRunConnectorSubactionGetfields) Get() *RunConnectorSubactionGetfields { - return v.value -} - -func (v *NullableRunConnectorSubactionGetfields) Set(val *RunConnectorSubactionGetfields) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionGetfields) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionGetfields) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionGetfields(val *RunConnectorSubactionGetfields) *NullableRunConnectorSubactionGetfields { - return &NullableRunConnectorSubactionGetfields{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionGetfields) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionGetfields) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_run_connector_subaction_getincident.go b/generated/kibanaactions/model_run_connector_subaction_getincident.go index d89bde297..b8bbbdb9b 100644 --- a/generated/kibanaactions/model_run_connector_subaction_getincident.go +++ b/generated/kibanaactions/model_run_connector_subaction_getincident.go @@ -1,143 +1,16 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionGetincident type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionGetincident{} - -// RunConnectorSubactionGetincident The `getIncident` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors. +// The `getIncident` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors. type RunConnectorSubactionGetincident struct { // The action to test. - SubAction string `json:"subAction"` - SubActionParams RunConnectorSubactionGetincidentSubActionParams `json:"subActionParams"` -} - -// NewRunConnectorSubactionGetincident instantiates a new RunConnectorSubactionGetincident object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionGetincident(subAction string, subActionParams RunConnectorSubactionGetincidentSubActionParams) *RunConnectorSubactionGetincident { - this := RunConnectorSubactionGetincident{} - this.SubAction = subAction - this.SubActionParams = subActionParams - return &this -} - -// NewRunConnectorSubactionGetincidentWithDefaults instantiates a new RunConnectorSubactionGetincident object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionGetincidentWithDefaults() *RunConnectorSubactionGetincident { - this := RunConnectorSubactionGetincident{} - return &this -} - -// GetSubAction returns the SubAction field value -func (o *RunConnectorSubactionGetincident) GetSubAction() string { - if o == nil { - var ret string - return ret - } - - return o.SubAction -} - -// GetSubActionOk returns a tuple with the SubAction field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionGetincident) GetSubActionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SubAction, true -} - -// SetSubAction sets field value -func (o *RunConnectorSubactionGetincident) SetSubAction(v string) { - o.SubAction = v -} - -// GetSubActionParams returns the SubActionParams field value -func (o *RunConnectorSubactionGetincident) GetSubActionParams() RunConnectorSubactionGetincidentSubActionParams { - if o == nil { - var ret RunConnectorSubactionGetincidentSubActionParams - return ret - } - - return o.SubActionParams -} - -// GetSubActionParamsOk returns a tuple with the SubActionParams field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionGetincident) GetSubActionParamsOk() (*RunConnectorSubactionGetincidentSubActionParams, bool) { - if o == nil { - return nil, false - } - return &o.SubActionParams, true -} - -// SetSubActionParams sets field value -func (o *RunConnectorSubactionGetincident) SetSubActionParams(v RunConnectorSubactionGetincidentSubActionParams) { - o.SubActionParams = v -} - -func (o RunConnectorSubactionGetincident) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionGetincident) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["subAction"] = o.SubAction - toSerialize["subActionParams"] = o.SubActionParams - return toSerialize, nil -} - -type NullableRunConnectorSubactionGetincident struct { - value *RunConnectorSubactionGetincident - isSet bool -} - -func (v NullableRunConnectorSubactionGetincident) Get() *RunConnectorSubactionGetincident { - return v.value -} - -func (v *NullableRunConnectorSubactionGetincident) Set(val *RunConnectorSubactionGetincident) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionGetincident) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionGetincident) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionGetincident(val *RunConnectorSubactionGetincident) *NullableRunConnectorSubactionGetincident { - return &NullableRunConnectorSubactionGetincident{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionGetincident) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionGetincident) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + SubAction string `json:"subAction"` + SubActionParams *RunConnectorSubactionGetincidentSubActionParams `json:"subActionParams"` } diff --git a/generated/kibanaactions/model_run_connector_subaction_getincident_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_getincident_sub_action_params.go index be962b568..a2fe77e47 100644 --- a/generated/kibanaactions/model_run_connector_subaction_getincident_sub_action_params.go +++ b/generated/kibanaactions/model_run_connector_subaction_getincident_sub_action_params.go @@ -1,116 +1,14 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionGetincidentSubActionParams type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionGetincidentSubActionParams{} - -// RunConnectorSubactionGetincidentSubActionParams struct for RunConnectorSubactionGetincidentSubActionParams type RunConnectorSubactionGetincidentSubActionParams struct { // The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. ExternalId string `json:"externalId"` } - -// NewRunConnectorSubactionGetincidentSubActionParams instantiates a new RunConnectorSubactionGetincidentSubActionParams object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionGetincidentSubActionParams(externalId string) *RunConnectorSubactionGetincidentSubActionParams { - this := RunConnectorSubactionGetincidentSubActionParams{} - this.ExternalId = externalId - return &this -} - -// NewRunConnectorSubactionGetincidentSubActionParamsWithDefaults instantiates a new RunConnectorSubactionGetincidentSubActionParams object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionGetincidentSubActionParamsWithDefaults() *RunConnectorSubactionGetincidentSubActionParams { - this := RunConnectorSubactionGetincidentSubActionParams{} - return &this -} - -// GetExternalId returns the ExternalId field value -func (o *RunConnectorSubactionGetincidentSubActionParams) GetExternalId() string { - if o == nil { - var ret string - return ret - } - - return o.ExternalId -} - -// GetExternalIdOk returns a tuple with the ExternalId field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionGetincidentSubActionParams) GetExternalIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ExternalId, true -} - -// SetExternalId sets field value -func (o *RunConnectorSubactionGetincidentSubActionParams) SetExternalId(v string) { - o.ExternalId = v -} - -func (o RunConnectorSubactionGetincidentSubActionParams) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionGetincidentSubActionParams) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["externalId"] = o.ExternalId - return toSerialize, nil -} - -type NullableRunConnectorSubactionGetincidentSubActionParams struct { - value *RunConnectorSubactionGetincidentSubActionParams - isSet bool -} - -func (v NullableRunConnectorSubactionGetincidentSubActionParams) Get() *RunConnectorSubactionGetincidentSubActionParams { - return v.value -} - -func (v *NullableRunConnectorSubactionGetincidentSubActionParams) Set(val *RunConnectorSubactionGetincidentSubActionParams) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionGetincidentSubActionParams) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionGetincidentSubActionParams) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionGetincidentSubActionParams(val *RunConnectorSubactionGetincidentSubActionParams) *NullableRunConnectorSubactionGetincidentSubActionParams { - return &NullableRunConnectorSubactionGetincidentSubActionParams{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionGetincidentSubActionParams) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionGetincidentSubActionParams) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_run_connector_subaction_issue.go b/generated/kibanaactions/model_run_connector_subaction_issue.go index a546a199b..ed83f51fd 100644 --- a/generated/kibanaactions/model_run_connector_subaction_issue.go +++ b/generated/kibanaactions/model_run_connector_subaction_issue.go @@ -1,152 +1,16 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionIssue type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionIssue{} - -// RunConnectorSubactionIssue The `issue` subaction for Jira connectors. +// The `issue` subaction for Jira connectors. type RunConnectorSubactionIssue struct { // The action to test. SubAction string `json:"subAction"` SubActionParams *RunConnectorSubactionIssueSubActionParams `json:"subActionParams,omitempty"` } - -// NewRunConnectorSubactionIssue instantiates a new RunConnectorSubactionIssue object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionIssue(subAction string) *RunConnectorSubactionIssue { - this := RunConnectorSubactionIssue{} - this.SubAction = subAction - return &this -} - -// NewRunConnectorSubactionIssueWithDefaults instantiates a new RunConnectorSubactionIssue object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionIssueWithDefaults() *RunConnectorSubactionIssue { - this := RunConnectorSubactionIssue{} - return &this -} - -// GetSubAction returns the SubAction field value -func (o *RunConnectorSubactionIssue) GetSubAction() string { - if o == nil { - var ret string - return ret - } - - return o.SubAction -} - -// GetSubActionOk returns a tuple with the SubAction field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionIssue) GetSubActionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SubAction, true -} - -// SetSubAction sets field value -func (o *RunConnectorSubactionIssue) SetSubAction(v string) { - o.SubAction = v -} - -// GetSubActionParams returns the SubActionParams field value if set, zero value otherwise. -func (o *RunConnectorSubactionIssue) GetSubActionParams() RunConnectorSubactionIssueSubActionParams { - if o == nil || IsNil(o.SubActionParams) { - var ret RunConnectorSubactionIssueSubActionParams - return ret - } - return *o.SubActionParams -} - -// GetSubActionParamsOk returns a tuple with the SubActionParams field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionIssue) GetSubActionParamsOk() (*RunConnectorSubactionIssueSubActionParams, bool) { - if o == nil || IsNil(o.SubActionParams) { - return nil, false - } - return o.SubActionParams, true -} - -// HasSubActionParams returns a boolean if a field has been set. -func (o *RunConnectorSubactionIssue) HasSubActionParams() bool { - if o != nil && !IsNil(o.SubActionParams) { - return true - } - - return false -} - -// SetSubActionParams gets a reference to the given RunConnectorSubactionIssueSubActionParams and assigns it to the SubActionParams field. -func (o *RunConnectorSubactionIssue) SetSubActionParams(v RunConnectorSubactionIssueSubActionParams) { - o.SubActionParams = &v -} - -func (o RunConnectorSubactionIssue) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionIssue) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["subAction"] = o.SubAction - if !IsNil(o.SubActionParams) { - toSerialize["subActionParams"] = o.SubActionParams - } - return toSerialize, nil -} - -type NullableRunConnectorSubactionIssue struct { - value *RunConnectorSubactionIssue - isSet bool -} - -func (v NullableRunConnectorSubactionIssue) Get() *RunConnectorSubactionIssue { - return v.value -} - -func (v *NullableRunConnectorSubactionIssue) Set(val *RunConnectorSubactionIssue) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionIssue) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionIssue) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionIssue(val *RunConnectorSubactionIssue) *NullableRunConnectorSubactionIssue { - return &NullableRunConnectorSubactionIssue{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionIssue) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionIssue) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_run_connector_subaction_issue_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_issue_sub_action_params.go index 4ea3a0723..7b75a9ca5 100644 --- a/generated/kibanaactions/model_run_connector_subaction_issue_sub_action_params.go +++ b/generated/kibanaactions/model_run_connector_subaction_issue_sub_action_params.go @@ -1,116 +1,14 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionIssueSubActionParams type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionIssueSubActionParams{} - -// RunConnectorSubactionIssueSubActionParams struct for RunConnectorSubactionIssueSubActionParams type RunConnectorSubactionIssueSubActionParams struct { // The Jira issue identifier. Id string `json:"id"` } - -// NewRunConnectorSubactionIssueSubActionParams instantiates a new RunConnectorSubactionIssueSubActionParams object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionIssueSubActionParams(id string) *RunConnectorSubactionIssueSubActionParams { - this := RunConnectorSubactionIssueSubActionParams{} - this.Id = id - return &this -} - -// NewRunConnectorSubactionIssueSubActionParamsWithDefaults instantiates a new RunConnectorSubactionIssueSubActionParams object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionIssueSubActionParamsWithDefaults() *RunConnectorSubactionIssueSubActionParams { - this := RunConnectorSubactionIssueSubActionParams{} - return &this -} - -// GetId returns the Id field value -func (o *RunConnectorSubactionIssueSubActionParams) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionIssueSubActionParams) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *RunConnectorSubactionIssueSubActionParams) SetId(v string) { - o.Id = v -} - -func (o RunConnectorSubactionIssueSubActionParams) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionIssueSubActionParams) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - return toSerialize, nil -} - -type NullableRunConnectorSubactionIssueSubActionParams struct { - value *RunConnectorSubactionIssueSubActionParams - isSet bool -} - -func (v NullableRunConnectorSubactionIssueSubActionParams) Get() *RunConnectorSubactionIssueSubActionParams { - return v.value -} - -func (v *NullableRunConnectorSubactionIssueSubActionParams) Set(val *RunConnectorSubactionIssueSubActionParams) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionIssueSubActionParams) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionIssueSubActionParams) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionIssueSubActionParams(val *RunConnectorSubactionIssueSubActionParams) *NullableRunConnectorSubactionIssueSubActionParams { - return &NullableRunConnectorSubactionIssueSubActionParams{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionIssueSubActionParams) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionIssueSubActionParams) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_run_connector_subaction_issues.go b/generated/kibanaactions/model_run_connector_subaction_issues.go index 23291bd08..c03adb62b 100644 --- a/generated/kibanaactions/model_run_connector_subaction_issues.go +++ b/generated/kibanaactions/model_run_connector_subaction_issues.go @@ -1,143 +1,16 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionIssues type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionIssues{} - -// RunConnectorSubactionIssues The `issues` subaction for Jira connectors. +// The `issues` subaction for Jira connectors. type RunConnectorSubactionIssues struct { // The action to test. - SubAction string `json:"subAction"` - SubActionParams RunConnectorSubactionIssuesSubActionParams `json:"subActionParams"` -} - -// NewRunConnectorSubactionIssues instantiates a new RunConnectorSubactionIssues object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionIssues(subAction string, subActionParams RunConnectorSubactionIssuesSubActionParams) *RunConnectorSubactionIssues { - this := RunConnectorSubactionIssues{} - this.SubAction = subAction - this.SubActionParams = subActionParams - return &this -} - -// NewRunConnectorSubactionIssuesWithDefaults instantiates a new RunConnectorSubactionIssues object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionIssuesWithDefaults() *RunConnectorSubactionIssues { - this := RunConnectorSubactionIssues{} - return &this -} - -// GetSubAction returns the SubAction field value -func (o *RunConnectorSubactionIssues) GetSubAction() string { - if o == nil { - var ret string - return ret - } - - return o.SubAction -} - -// GetSubActionOk returns a tuple with the SubAction field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionIssues) GetSubActionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SubAction, true -} - -// SetSubAction sets field value -func (o *RunConnectorSubactionIssues) SetSubAction(v string) { - o.SubAction = v -} - -// GetSubActionParams returns the SubActionParams field value -func (o *RunConnectorSubactionIssues) GetSubActionParams() RunConnectorSubactionIssuesSubActionParams { - if o == nil { - var ret RunConnectorSubactionIssuesSubActionParams - return ret - } - - return o.SubActionParams -} - -// GetSubActionParamsOk returns a tuple with the SubActionParams field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionIssues) GetSubActionParamsOk() (*RunConnectorSubactionIssuesSubActionParams, bool) { - if o == nil { - return nil, false - } - return &o.SubActionParams, true -} - -// SetSubActionParams sets field value -func (o *RunConnectorSubactionIssues) SetSubActionParams(v RunConnectorSubactionIssuesSubActionParams) { - o.SubActionParams = v -} - -func (o RunConnectorSubactionIssues) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionIssues) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["subAction"] = o.SubAction - toSerialize["subActionParams"] = o.SubActionParams - return toSerialize, nil -} - -type NullableRunConnectorSubactionIssues struct { - value *RunConnectorSubactionIssues - isSet bool -} - -func (v NullableRunConnectorSubactionIssues) Get() *RunConnectorSubactionIssues { - return v.value -} - -func (v *NullableRunConnectorSubactionIssues) Set(val *RunConnectorSubactionIssues) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionIssues) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionIssues) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionIssues(val *RunConnectorSubactionIssues) *NullableRunConnectorSubactionIssues { - return &NullableRunConnectorSubactionIssues{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionIssues) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionIssues) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + SubAction string `json:"subAction"` + SubActionParams *RunConnectorSubactionIssuesSubActionParams `json:"subActionParams"` } diff --git a/generated/kibanaactions/model_run_connector_subaction_issues_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_issues_sub_action_params.go index a97f6d660..0e8f7c5e0 100644 --- a/generated/kibanaactions/model_run_connector_subaction_issues_sub_action_params.go +++ b/generated/kibanaactions/model_run_connector_subaction_issues_sub_action_params.go @@ -1,116 +1,14 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionIssuesSubActionParams type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionIssuesSubActionParams{} - -// RunConnectorSubactionIssuesSubActionParams struct for RunConnectorSubactionIssuesSubActionParams type RunConnectorSubactionIssuesSubActionParams struct { // The title of the Jira issue. Title string `json:"title"` } - -// NewRunConnectorSubactionIssuesSubActionParams instantiates a new RunConnectorSubactionIssuesSubActionParams object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionIssuesSubActionParams(title string) *RunConnectorSubactionIssuesSubActionParams { - this := RunConnectorSubactionIssuesSubActionParams{} - this.Title = title - return &this -} - -// NewRunConnectorSubactionIssuesSubActionParamsWithDefaults instantiates a new RunConnectorSubactionIssuesSubActionParams object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionIssuesSubActionParamsWithDefaults() *RunConnectorSubactionIssuesSubActionParams { - this := RunConnectorSubactionIssuesSubActionParams{} - return &this -} - -// GetTitle returns the Title field value -func (o *RunConnectorSubactionIssuesSubActionParams) GetTitle() string { - if o == nil { - var ret string - return ret - } - - return o.Title -} - -// GetTitleOk returns a tuple with the Title field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionIssuesSubActionParams) GetTitleOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Title, true -} - -// SetTitle sets field value -func (o *RunConnectorSubactionIssuesSubActionParams) SetTitle(v string) { - o.Title = v -} - -func (o RunConnectorSubactionIssuesSubActionParams) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionIssuesSubActionParams) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["title"] = o.Title - return toSerialize, nil -} - -type NullableRunConnectorSubactionIssuesSubActionParams struct { - value *RunConnectorSubactionIssuesSubActionParams - isSet bool -} - -func (v NullableRunConnectorSubactionIssuesSubActionParams) Get() *RunConnectorSubactionIssuesSubActionParams { - return v.value -} - -func (v *NullableRunConnectorSubactionIssuesSubActionParams) Set(val *RunConnectorSubactionIssuesSubActionParams) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionIssuesSubActionParams) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionIssuesSubActionParams) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionIssuesSubActionParams(val *RunConnectorSubactionIssuesSubActionParams) *NullableRunConnectorSubactionIssuesSubActionParams { - return &NullableRunConnectorSubactionIssuesSubActionParams{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionIssuesSubActionParams) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionIssuesSubActionParams) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_run_connector_subaction_issuetypes.go b/generated/kibanaactions/model_run_connector_subaction_issuetypes.go index b7754c27e..0ef586e4a 100644 --- a/generated/kibanaactions/model_run_connector_subaction_issuetypes.go +++ b/generated/kibanaactions/model_run_connector_subaction_issuetypes.go @@ -1,116 +1,15 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionIssuetypes type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionIssuetypes{} - -// RunConnectorSubactionIssuetypes The `issueTypes` subaction for Jira connectors. +// The `issueTypes` subaction for Jira connectors. type RunConnectorSubactionIssuetypes struct { // The action to test. SubAction string `json:"subAction"` } - -// NewRunConnectorSubactionIssuetypes instantiates a new RunConnectorSubactionIssuetypes object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionIssuetypes(subAction string) *RunConnectorSubactionIssuetypes { - this := RunConnectorSubactionIssuetypes{} - this.SubAction = subAction - return &this -} - -// NewRunConnectorSubactionIssuetypesWithDefaults instantiates a new RunConnectorSubactionIssuetypes object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionIssuetypesWithDefaults() *RunConnectorSubactionIssuetypes { - this := RunConnectorSubactionIssuetypes{} - return &this -} - -// GetSubAction returns the SubAction field value -func (o *RunConnectorSubactionIssuetypes) GetSubAction() string { - if o == nil { - var ret string - return ret - } - - return o.SubAction -} - -// GetSubActionOk returns a tuple with the SubAction field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionIssuetypes) GetSubActionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SubAction, true -} - -// SetSubAction sets field value -func (o *RunConnectorSubactionIssuetypes) SetSubAction(v string) { - o.SubAction = v -} - -func (o RunConnectorSubactionIssuetypes) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionIssuetypes) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["subAction"] = o.SubAction - return toSerialize, nil -} - -type NullableRunConnectorSubactionIssuetypes struct { - value *RunConnectorSubactionIssuetypes - isSet bool -} - -func (v NullableRunConnectorSubactionIssuetypes) Get() *RunConnectorSubactionIssuetypes { - return v.value -} - -func (v *NullableRunConnectorSubactionIssuetypes) Set(val *RunConnectorSubactionIssuetypes) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionIssuetypes) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionIssuetypes) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionIssuetypes(val *RunConnectorSubactionIssuetypes) *NullableRunConnectorSubactionIssuetypes { - return &NullableRunConnectorSubactionIssuetypes{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionIssuetypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionIssuetypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice.go index 3fecdb551..3e2a98f94 100644 --- a/generated/kibanaactions/model_run_connector_subaction_pushtoservice.go +++ b/generated/kibanaactions/model_run_connector_subaction_pushtoservice.go @@ -1,143 +1,16 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionPushtoservice type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionPushtoservice{} - -// RunConnectorSubactionPushtoservice The `pushToService` subaction for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors. +// The `pushToService` subaction for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors. type RunConnectorSubactionPushtoservice struct { // The action to test. - SubAction string `json:"subAction"` - SubActionParams RunConnectorSubactionPushtoserviceSubActionParams `json:"subActionParams"` -} - -// NewRunConnectorSubactionPushtoservice instantiates a new RunConnectorSubactionPushtoservice object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionPushtoservice(subAction string, subActionParams RunConnectorSubactionPushtoserviceSubActionParams) *RunConnectorSubactionPushtoservice { - this := RunConnectorSubactionPushtoservice{} - this.SubAction = subAction - this.SubActionParams = subActionParams - return &this -} - -// NewRunConnectorSubactionPushtoserviceWithDefaults instantiates a new RunConnectorSubactionPushtoservice object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionPushtoserviceWithDefaults() *RunConnectorSubactionPushtoservice { - this := RunConnectorSubactionPushtoservice{} - return &this -} - -// GetSubAction returns the SubAction field value -func (o *RunConnectorSubactionPushtoservice) GetSubAction() string { - if o == nil { - var ret string - return ret - } - - return o.SubAction -} - -// GetSubActionOk returns a tuple with the SubAction field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoservice) GetSubActionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SubAction, true -} - -// SetSubAction sets field value -func (o *RunConnectorSubactionPushtoservice) SetSubAction(v string) { - o.SubAction = v -} - -// GetSubActionParams returns the SubActionParams field value -func (o *RunConnectorSubactionPushtoservice) GetSubActionParams() RunConnectorSubactionPushtoserviceSubActionParams { - if o == nil { - var ret RunConnectorSubactionPushtoserviceSubActionParams - return ret - } - - return o.SubActionParams -} - -// GetSubActionParamsOk returns a tuple with the SubActionParams field value -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoservice) GetSubActionParamsOk() (*RunConnectorSubactionPushtoserviceSubActionParams, bool) { - if o == nil { - return nil, false - } - return &o.SubActionParams, true -} - -// SetSubActionParams sets field value -func (o *RunConnectorSubactionPushtoservice) SetSubActionParams(v RunConnectorSubactionPushtoserviceSubActionParams) { - o.SubActionParams = v -} - -func (o RunConnectorSubactionPushtoservice) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionPushtoservice) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["subAction"] = o.SubAction - toSerialize["subActionParams"] = o.SubActionParams - return toSerialize, nil -} - -type NullableRunConnectorSubactionPushtoservice struct { - value *RunConnectorSubactionPushtoservice - isSet bool -} - -func (v NullableRunConnectorSubactionPushtoservice) Get() *RunConnectorSubactionPushtoservice { - return v.value -} - -func (v *NullableRunConnectorSubactionPushtoservice) Set(val *RunConnectorSubactionPushtoservice) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionPushtoservice) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionPushtoservice) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionPushtoservice(val *RunConnectorSubactionPushtoservice) *NullableRunConnectorSubactionPushtoservice { - return &NullableRunConnectorSubactionPushtoservice{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionPushtoservice) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionPushtoservice) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + SubAction string `json:"subAction"` + SubActionParams *RunConnectorSubactionPushtoserviceSubActionParams `json:"subActionParams"` } diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params.go index f9c3f4b6a..35276aaf8 100644 --- a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params.go +++ b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params.go @@ -1,161 +1,16 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionPushtoserviceSubActionParams type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionPushtoserviceSubActionParams{} - -// RunConnectorSubactionPushtoserviceSubActionParams The set of configuration properties for the action. +// The set of configuration properties for the action. type RunConnectorSubactionPushtoserviceSubActionParams struct { // Additional information that is sent to Jira, ServiceNow ITSM, ServiceNow SecOps, or Swimlane. - Comments []RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner `json:"comments,omitempty"` - Incident *RunConnectorSubactionPushtoserviceSubActionParamsIncident `json:"incident,omitempty"` -} - -// NewRunConnectorSubactionPushtoserviceSubActionParams instantiates a new RunConnectorSubactionPushtoserviceSubActionParams object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionPushtoserviceSubActionParams() *RunConnectorSubactionPushtoserviceSubActionParams { - this := RunConnectorSubactionPushtoserviceSubActionParams{} - return &this -} - -// NewRunConnectorSubactionPushtoserviceSubActionParamsWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParams object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionPushtoserviceSubActionParamsWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParams { - this := RunConnectorSubactionPushtoserviceSubActionParams{} - return &this -} - -// GetComments returns the Comments field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParams) GetComments() []RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner { - if o == nil || IsNil(o.Comments) { - var ret []RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner - return ret - } - return o.Comments -} - -// GetCommentsOk returns a tuple with the Comments field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParams) GetCommentsOk() ([]RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner, bool) { - if o == nil || IsNil(o.Comments) { - return nil, false - } - return o.Comments, true -} - -// HasComments returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParams) HasComments() bool { - if o != nil && !IsNil(o.Comments) { - return true - } - - return false -} - -// SetComments gets a reference to the given []RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner and assigns it to the Comments field. -func (o *RunConnectorSubactionPushtoserviceSubActionParams) SetComments(v []RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) { - o.Comments = v -} - -// GetIncident returns the Incident field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParams) GetIncident() RunConnectorSubactionPushtoserviceSubActionParamsIncident { - if o == nil || IsNil(o.Incident) { - var ret RunConnectorSubactionPushtoserviceSubActionParamsIncident - return ret - } - return *o.Incident -} - -// GetIncidentOk returns a tuple with the Incident field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParams) GetIncidentOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncident, bool) { - if o == nil || IsNil(o.Incident) { - return nil, false - } - return o.Incident, true -} - -// HasIncident returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParams) HasIncident() bool { - if o != nil && !IsNil(o.Incident) { - return true - } - - return false -} - -// SetIncident gets a reference to the given RunConnectorSubactionPushtoserviceSubActionParamsIncident and assigns it to the Incident field. -func (o *RunConnectorSubactionPushtoserviceSubActionParams) SetIncident(v RunConnectorSubactionPushtoserviceSubActionParamsIncident) { - o.Incident = &v -} - -func (o RunConnectorSubactionPushtoserviceSubActionParams) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionPushtoserviceSubActionParams) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Comments) { - toSerialize["comments"] = o.Comments - } - if !IsNil(o.Incident) { - toSerialize["incident"] = o.Incident - } - return toSerialize, nil -} - -type NullableRunConnectorSubactionPushtoserviceSubActionParams struct { - value *RunConnectorSubactionPushtoserviceSubActionParams - isSet bool -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParams) Get() *RunConnectorSubactionPushtoserviceSubActionParams { - return v.value -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParams) Set(val *RunConnectorSubactionPushtoserviceSubActionParams) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParams) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParams) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionPushtoserviceSubActionParams(val *RunConnectorSubactionPushtoserviceSubActionParams) *NullableRunConnectorSubactionPushtoserviceSubActionParams { - return &NullableRunConnectorSubactionPushtoserviceSubActionParams{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParams) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParams) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Comments []RunConnectorSubactionPushtoserviceSubActionParamsComments `json:"comments,omitempty"` + Incident *RunConnectorSubactionPushtoserviceSubActionParamsIncident `json:"incident,omitempty"` } diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_comments.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_comments.go new file mode 100644 index 000000000..a03d18fbb --- /dev/null +++ b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_comments.go @@ -0,0 +1,16 @@ +/* + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package kibanaactions + +type RunConnectorSubactionPushtoserviceSubActionParamsComments struct { + // A comment related to the incident. For example, describe how to troubleshoot the issue. + Comment string `json:"comment,omitempty"` + // A unique identifier for the comment. + CommentId int32 `json:"commentId,omitempty"` +} diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_comments_inner.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_comments_inner.go deleted file mode 100644 index ec94aaa3e..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_comments_inner.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner{} - -// RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner struct for RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner -type RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner struct { - // A comment related to the incident. For example, describe how to troubleshoot the issue. - Comment *string `json:"comment,omitempty"` - // A unique identifier for the comment. - CommentId *int32 `json:"commentId,omitempty"` -} - -// NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner() *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner { - this := RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner{} - return &this -} - -// NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInnerWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionPushtoserviceSubActionParamsCommentsInnerWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner { - this := RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner{} - return &this -} - -// GetComment returns the Comment field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) GetComment() string { - if o == nil || IsNil(o.Comment) { - var ret string - return ret - } - return *o.Comment -} - -// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) GetCommentOk() (*string, bool) { - if o == nil || IsNil(o.Comment) { - return nil, false - } - return o.Comment, true -} - -// HasComment returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) HasComment() bool { - if o != nil && !IsNil(o.Comment) { - return true - } - - return false -} - -// SetComment gets a reference to the given string and assigns it to the Comment field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) SetComment(v string) { - o.Comment = &v -} - -// GetCommentId returns the CommentId field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) GetCommentId() int32 { - if o == nil || IsNil(o.CommentId) { - var ret int32 - return ret - } - return *o.CommentId -} - -// GetCommentIdOk returns a tuple with the CommentId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) GetCommentIdOk() (*int32, bool) { - if o == nil || IsNil(o.CommentId) { - return nil, false - } - return o.CommentId, true -} - -// HasCommentId returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) HasCommentId() bool { - if o != nil && !IsNil(o.CommentId) { - return true - } - - return false -} - -// SetCommentId gets a reference to the given int32 and assigns it to the CommentId field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) SetCommentId(v int32) { - o.CommentId = &v -} - -func (o RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Comment) { - toSerialize["comment"] = o.Comment - } - if !IsNil(o.CommentId) { - toSerialize["commentId"] = o.CommentId - } - return toSerialize, nil -} - -type NullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner struct { - value *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner - isSet bool -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) Get() *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner { - return v.value -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) Set(val *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner(val *RunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) *NullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner { - return &NullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsCommentsInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident.go index a3e148ecc..43e071bcd 100644 --- a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident.go +++ b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident.go @@ -1,972 +1,61 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the RunConnectorSubactionPushtoserviceSubActionParamsIncident type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RunConnectorSubactionPushtoserviceSubActionParamsIncident{} - -// RunConnectorSubactionPushtoserviceSubActionParamsIncident Information necessary to create or update a Jira, ServiceNow ITSM, ServiveNow SecOps, or Swimlane incident. +// Information necessary to create or update a Jira, ServiceNow ITSM, ServiveNow SecOps, or Swimlane incident. type RunConnectorSubactionPushtoserviceSubActionParamsIncident struct { // The alert identifier for Swimlane connectors. - AlertId *string `json:"alertId,omitempty"` + AlertId string `json:"alertId,omitempty"` // The case identifier for the incident for Swimlane connectors. - CaseId *string `json:"caseId,omitempty"` + CaseId string `json:"caseId,omitempty"` // The case name for the incident for Swimlane connectors. - CaseName *string `json:"caseName,omitempty"` + CaseName string `json:"caseName,omitempty"` // The category of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. - Category *string `json:"category,omitempty"` + Category string `json:"category,omitempty"` // A descriptive label of the alert for correlation purposes for ServiceNow ITSM and ServiceNow SecOps connectors. - CorrelationDisplay *string `json:"correlation_display,omitempty"` + CorrelationDisplay string `json:"correlation_display,omitempty"` // The correlation identifier for the security incident for ServiceNow ITSM and ServiveNow SecOps connectors. Connectors using the same correlation ID are associated with the same ServiceNow incident. This value determines whether a new ServiceNow incident is created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the correlation ID value in ServiceNow. The maximum character length for this value is 100 characters. NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that ServiceNow creates a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, ServiceNow creates and continually updates a single incident record for the alert. - CorrelationId *string `json:"correlation_id,omitempty"` + CorrelationId string `json:"correlation_id,omitempty"` // The description of the incident for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors. - Description *string `json:"description,omitempty"` - DestIp *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp `json:"dest_ip,omitempty"` + Description string `json:"description,omitempty"` + // A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. + DestIp *OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp `json:"dest_ip,omitempty"` // The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. If present, the incident is updated. Otherwise, a new incident is created. - ExternalId *string `json:"externalId,omitempty"` + ExternalId string `json:"externalId,omitempty"` // The impact of the incident for ServiceNow ITSM connectors. - Impact *string `json:"impact,omitempty"` + Impact string `json:"impact,omitempty"` // The type of incident for Jira connectors. For example, 10006. To obtain the list of valid values, set `subAction` to `issueTypes`. - IssueType *int32 `json:"issueType,omitempty"` + IssueType int32 `json:"issueType,omitempty"` // The labels for the incident for Jira connectors. NOTE: Labels cannot contain spaces. - Labels []string `json:"labels,omitempty"` - MalwareHash *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash `json:"malware_hash,omitempty"` - MalwareUrl *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl `json:"malware_url,omitempty"` + Labels []string `json:"labels,omitempty"` + // A list of malware hashes related to the security incident for ServiceNow SecOps connectors. The hashes are added as observables to the security incident. + MalwareHash *OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash `json:"malware_hash,omitempty"` + // A list of malware URLs related to the security incident for ServiceNow SecOps connectors. The URLs are added as observables to the security incident. + MalwareUrl OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl `json:"malware_url,omitempty"` // The ID or key of the parent issue for Jira connectors. Applies only to `Sub-task` types of issues. - Parent *string `json:"parent,omitempty"` + Parent string `json:"parent,omitempty"` // The priority of the incident in Jira and ServiceNow SecOps connectors. - Priority *string `json:"priority,omitempty"` + Priority string `json:"priority,omitempty"` // The rule name for Swimlane connectors. - RuleName *string `json:"ruleName,omitempty"` + RuleName string `json:"ruleName,omitempty"` // The severity of the incident for ServiceNow ITSM and Swimlane connectors. - Severity *string `json:"severity,omitempty"` + Severity string `json:"severity,omitempty"` // A short description of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. It is used for searching the contents of the knowledge base. - ShortDescription *string `json:"short_description,omitempty"` - SourceIp *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp `json:"source_ip,omitempty"` + ShortDescription string `json:"short_description,omitempty"` + // A list of source IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. + SourceIp *OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp `json:"source_ip,omitempty"` // The subcategory of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. - Subcategory *string `json:"subcategory,omitempty"` + Subcategory string `json:"subcategory,omitempty"` // A summary of the incident for Jira connectors. - Summary *string `json:"summary,omitempty"` + Summary string `json:"summary,omitempty"` // A title for the incident for Jira connectors. It is used for searching the contents of the knowledge base. - Title *string `json:"title,omitempty"` + Title string `json:"title,omitempty"` // The urgency of the incident for ServiceNow ITSM connectors. - Urgency *string `json:"urgency,omitempty"` -} - -// NewRunConnectorSubactionPushtoserviceSubActionParamsIncident instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncident object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRunConnectorSubactionPushtoserviceSubActionParamsIncident() *RunConnectorSubactionPushtoserviceSubActionParamsIncident { - this := RunConnectorSubactionPushtoserviceSubActionParamsIncident{} - return &this -} - -// NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentWithDefaults instantiates a new RunConnectorSubactionPushtoserviceSubActionParamsIncident object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRunConnectorSubactionPushtoserviceSubActionParamsIncidentWithDefaults() *RunConnectorSubactionPushtoserviceSubActionParamsIncident { - this := RunConnectorSubactionPushtoserviceSubActionParamsIncident{} - return &this -} - -// GetAlertId returns the AlertId field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetAlertId() string { - if o == nil || IsNil(o.AlertId) { - var ret string - return ret - } - return *o.AlertId -} - -// GetAlertIdOk returns a tuple with the AlertId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetAlertIdOk() (*string, bool) { - if o == nil || IsNil(o.AlertId) { - return nil, false - } - return o.AlertId, true -} - -// HasAlertId returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasAlertId() bool { - if o != nil && !IsNil(o.AlertId) { - return true - } - - return false -} - -// SetAlertId gets a reference to the given string and assigns it to the AlertId field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetAlertId(v string) { - o.AlertId = &v -} - -// GetCaseId returns the CaseId field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCaseId() string { - if o == nil || IsNil(o.CaseId) { - var ret string - return ret - } - return *o.CaseId -} - -// GetCaseIdOk returns a tuple with the CaseId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCaseIdOk() (*string, bool) { - if o == nil || IsNil(o.CaseId) { - return nil, false - } - return o.CaseId, true -} - -// HasCaseId returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCaseId() bool { - if o != nil && !IsNil(o.CaseId) { - return true - } - - return false -} - -// SetCaseId gets a reference to the given string and assigns it to the CaseId field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCaseId(v string) { - o.CaseId = &v -} - -// GetCaseName returns the CaseName field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCaseName() string { - if o == nil || IsNil(o.CaseName) { - var ret string - return ret - } - return *o.CaseName -} - -// GetCaseNameOk returns a tuple with the CaseName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCaseNameOk() (*string, bool) { - if o == nil || IsNil(o.CaseName) { - return nil, false - } - return o.CaseName, true -} - -// HasCaseName returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCaseName() bool { - if o != nil && !IsNil(o.CaseName) { - return true - } - - return false -} - -// SetCaseName gets a reference to the given string and assigns it to the CaseName field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCaseName(v string) { - o.CaseName = &v -} - -// GetCategory returns the Category field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCategory() string { - if o == nil || IsNil(o.Category) { - var ret string - return ret - } - return *o.Category -} - -// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCategoryOk() (*string, bool) { - if o == nil || IsNil(o.Category) { - return nil, false - } - return o.Category, true -} - -// HasCategory returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCategory() bool { - if o != nil && !IsNil(o.Category) { - return true - } - - return false -} - -// SetCategory gets a reference to the given string and assigns it to the Category field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCategory(v string) { - o.Category = &v -} - -// GetCorrelationDisplay returns the CorrelationDisplay field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCorrelationDisplay() string { - if o == nil || IsNil(o.CorrelationDisplay) { - var ret string - return ret - } - return *o.CorrelationDisplay -} - -// GetCorrelationDisplayOk returns a tuple with the CorrelationDisplay field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCorrelationDisplayOk() (*string, bool) { - if o == nil || IsNil(o.CorrelationDisplay) { - return nil, false - } - return o.CorrelationDisplay, true -} - -// HasCorrelationDisplay returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCorrelationDisplay() bool { - if o != nil && !IsNil(o.CorrelationDisplay) { - return true - } - - return false -} - -// SetCorrelationDisplay gets a reference to the given string and assigns it to the CorrelationDisplay field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCorrelationDisplay(v string) { - o.CorrelationDisplay = &v -} - -// GetCorrelationId returns the CorrelationId field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCorrelationId() string { - if o == nil || IsNil(o.CorrelationId) { - var ret string - return ret - } - return *o.CorrelationId -} - -// GetCorrelationIdOk returns a tuple with the CorrelationId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetCorrelationIdOk() (*string, bool) { - if o == nil || IsNil(o.CorrelationId) { - return nil, false - } - return o.CorrelationId, true -} - -// HasCorrelationId returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasCorrelationId() bool { - if o != nil && !IsNil(o.CorrelationId) { - return true - } - - return false -} - -// SetCorrelationId gets a reference to the given string and assigns it to the CorrelationId field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetCorrelationId(v string) { - o.CorrelationId = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetDescription(v string) { - o.Description = &v -} - -// GetDestIp returns the DestIp field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetDestIp() RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp { - if o == nil || IsNil(o.DestIp) { - var ret RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp - return ret - } - return *o.DestIp -} - -// GetDestIpOk returns a tuple with the DestIp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetDestIpOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp, bool) { - if o == nil || IsNil(o.DestIp) { - return nil, false - } - return o.DestIp, true -} - -// HasDestIp returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasDestIp() bool { - if o != nil && !IsNil(o.DestIp) { - return true - } - - return false -} - -// SetDestIp gets a reference to the given RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp and assigns it to the DestIp field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetDestIp(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) { - o.DestIp = &v -} - -// GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetExternalId() string { - if o == nil || IsNil(o.ExternalId) { - var ret string - return ret - } - return *o.ExternalId -} - -// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetExternalIdOk() (*string, bool) { - if o == nil || IsNil(o.ExternalId) { - return nil, false - } - return o.ExternalId, true -} - -// HasExternalId returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasExternalId() bool { - if o != nil && !IsNil(o.ExternalId) { - return true - } - - return false -} - -// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetExternalId(v string) { - o.ExternalId = &v -} - -// GetImpact returns the Impact field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetImpact() string { - if o == nil || IsNil(o.Impact) { - var ret string - return ret - } - return *o.Impact -} - -// GetImpactOk returns a tuple with the Impact field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetImpactOk() (*string, bool) { - if o == nil || IsNil(o.Impact) { - return nil, false - } - return o.Impact, true -} - -// HasImpact returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasImpact() bool { - if o != nil && !IsNil(o.Impact) { - return true - } - - return false -} - -// SetImpact gets a reference to the given string and assigns it to the Impact field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetImpact(v string) { - o.Impact = &v -} - -// GetIssueType returns the IssueType field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetIssueType() int32 { - if o == nil || IsNil(o.IssueType) { - var ret int32 - return ret - } - return *o.IssueType -} - -// GetIssueTypeOk returns a tuple with the IssueType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetIssueTypeOk() (*int32, bool) { - if o == nil || IsNil(o.IssueType) { - return nil, false - } - return o.IssueType, true -} - -// HasIssueType returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasIssueType() bool { - if o != nil && !IsNil(o.IssueType) { - return true - } - - return false -} - -// SetIssueType gets a reference to the given int32 and assigns it to the IssueType field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetIssueType(v int32) { - o.IssueType = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetLabels() []string { - if o == nil || IsNil(o.Labels) { - var ret []string - return ret - } - return o.Labels -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetLabelsOk() ([]string, bool) { - if o == nil || IsNil(o.Labels) { - return nil, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given []string and assigns it to the Labels field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetLabels(v []string) { - o.Labels = v -} - -// GetMalwareHash returns the MalwareHash field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetMalwareHash() RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash { - if o == nil || IsNil(o.MalwareHash) { - var ret RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash - return ret - } - return *o.MalwareHash -} - -// GetMalwareHashOk returns a tuple with the MalwareHash field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetMalwareHashOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash, bool) { - if o == nil || IsNil(o.MalwareHash) { - return nil, false - } - return o.MalwareHash, true -} - -// HasMalwareHash returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasMalwareHash() bool { - if o != nil && !IsNil(o.MalwareHash) { - return true - } - - return false -} - -// SetMalwareHash gets a reference to the given RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash and assigns it to the MalwareHash field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetMalwareHash(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) { - o.MalwareHash = &v -} - -// GetMalwareUrl returns the MalwareUrl field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetMalwareUrl() RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl { - if o == nil || IsNil(o.MalwareUrl) { - var ret RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl - return ret - } - return *o.MalwareUrl -} - -// GetMalwareUrlOk returns a tuple with the MalwareUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetMalwareUrlOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl, bool) { - if o == nil || IsNil(o.MalwareUrl) { - return nil, false - } - return o.MalwareUrl, true -} - -// HasMalwareUrl returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasMalwareUrl() bool { - if o != nil && !IsNil(o.MalwareUrl) { - return true - } - - return false -} - -// SetMalwareUrl gets a reference to the given RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl and assigns it to the MalwareUrl field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetMalwareUrl(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) { - o.MalwareUrl = &v -} - -// GetParent returns the Parent field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetParent() string { - if o == nil || IsNil(o.Parent) { - var ret string - return ret - } - return *o.Parent -} - -// GetParentOk returns a tuple with the Parent field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetParentOk() (*string, bool) { - if o == nil || IsNil(o.Parent) { - return nil, false - } - return o.Parent, true -} - -// HasParent returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasParent() bool { - if o != nil && !IsNil(o.Parent) { - return true - } - - return false -} - -// SetParent gets a reference to the given string and assigns it to the Parent field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetParent(v string) { - o.Parent = &v -} - -// GetPriority returns the Priority field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetPriority() string { - if o == nil || IsNil(o.Priority) { - var ret string - return ret - } - return *o.Priority -} - -// GetPriorityOk returns a tuple with the Priority field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetPriorityOk() (*string, bool) { - if o == nil || IsNil(o.Priority) { - return nil, false - } - return o.Priority, true -} - -// HasPriority returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasPriority() bool { - if o != nil && !IsNil(o.Priority) { - return true - } - - return false -} - -// SetPriority gets a reference to the given string and assigns it to the Priority field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetPriority(v string) { - o.Priority = &v -} - -// GetRuleName returns the RuleName field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetRuleName() string { - if o == nil || IsNil(o.RuleName) { - var ret string - return ret - } - return *o.RuleName -} - -// GetRuleNameOk returns a tuple with the RuleName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetRuleNameOk() (*string, bool) { - if o == nil || IsNil(o.RuleName) { - return nil, false - } - return o.RuleName, true -} - -// HasRuleName returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasRuleName() bool { - if o != nil && !IsNil(o.RuleName) { - return true - } - - return false -} - -// SetRuleName gets a reference to the given string and assigns it to the RuleName field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetRuleName(v string) { - o.RuleName = &v -} - -// GetSeverity returns the Severity field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSeverity() string { - if o == nil || IsNil(o.Severity) { - var ret string - return ret - } - return *o.Severity -} - -// GetSeverityOk returns a tuple with the Severity field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSeverityOk() (*string, bool) { - if o == nil || IsNil(o.Severity) { - return nil, false - } - return o.Severity, true -} - -// HasSeverity returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasSeverity() bool { - if o != nil && !IsNil(o.Severity) { - return true - } - - return false -} - -// SetSeverity gets a reference to the given string and assigns it to the Severity field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetSeverity(v string) { - o.Severity = &v -} - -// GetShortDescription returns the ShortDescription field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetShortDescription() string { - if o == nil || IsNil(o.ShortDescription) { - var ret string - return ret - } - return *o.ShortDescription -} - -// GetShortDescriptionOk returns a tuple with the ShortDescription field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetShortDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.ShortDescription) { - return nil, false - } - return o.ShortDescription, true -} - -// HasShortDescription returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasShortDescription() bool { - if o != nil && !IsNil(o.ShortDescription) { - return true - } - - return false -} - -// SetShortDescription gets a reference to the given string and assigns it to the ShortDescription field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetShortDescription(v string) { - o.ShortDescription = &v -} - -// GetSourceIp returns the SourceIp field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSourceIp() RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp { - if o == nil || IsNil(o.SourceIp) { - var ret RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp - return ret - } - return *o.SourceIp -} - -// GetSourceIpOk returns a tuple with the SourceIp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSourceIpOk() (*RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp, bool) { - if o == nil || IsNil(o.SourceIp) { - return nil, false - } - return o.SourceIp, true -} - -// HasSourceIp returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasSourceIp() bool { - if o != nil && !IsNil(o.SourceIp) { - return true - } - - return false -} - -// SetSourceIp gets a reference to the given RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp and assigns it to the SourceIp field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetSourceIp(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) { - o.SourceIp = &v -} - -// GetSubcategory returns the Subcategory field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSubcategory() string { - if o == nil || IsNil(o.Subcategory) { - var ret string - return ret - } - return *o.Subcategory -} - -// GetSubcategoryOk returns a tuple with the Subcategory field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSubcategoryOk() (*string, bool) { - if o == nil || IsNil(o.Subcategory) { - return nil, false - } - return o.Subcategory, true -} - -// HasSubcategory returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasSubcategory() bool { - if o != nil && !IsNil(o.Subcategory) { - return true - } - - return false -} - -// SetSubcategory gets a reference to the given string and assigns it to the Subcategory field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetSubcategory(v string) { - o.Subcategory = &v -} - -// GetSummary returns the Summary field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSummary() string { - if o == nil || IsNil(o.Summary) { - var ret string - return ret - } - return *o.Summary -} - -// GetSummaryOk returns a tuple with the Summary field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetSummaryOk() (*string, bool) { - if o == nil || IsNil(o.Summary) { - return nil, false - } - return o.Summary, true -} - -// HasSummary returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasSummary() bool { - if o != nil && !IsNil(o.Summary) { - return true - } - - return false -} - -// SetSummary gets a reference to the given string and assigns it to the Summary field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetSummary(v string) { - o.Summary = &v -} - -// GetTitle returns the Title field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetTitle() string { - if o == nil || IsNil(o.Title) { - var ret string - return ret - } - return *o.Title -} - -// GetTitleOk returns a tuple with the Title field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetTitleOk() (*string, bool) { - if o == nil || IsNil(o.Title) { - return nil, false - } - return o.Title, true -} - -// HasTitle returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasTitle() bool { - if o != nil && !IsNil(o.Title) { - return true - } - - return false -} - -// SetTitle gets a reference to the given string and assigns it to the Title field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetTitle(v string) { - o.Title = &v -} - -// GetUrgency returns the Urgency field value if set, zero value otherwise. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetUrgency() string { - if o == nil || IsNil(o.Urgency) { - var ret string - return ret - } - return *o.Urgency -} - -// GetUrgencyOk returns a tuple with the Urgency field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) GetUrgencyOk() (*string, bool) { - if o == nil || IsNil(o.Urgency) { - return nil, false - } - return o.Urgency, true -} - -// HasUrgency returns a boolean if a field has been set. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) HasUrgency() bool { - if o != nil && !IsNil(o.Urgency) { - return true - } - - return false -} - -// SetUrgency gets a reference to the given string and assigns it to the Urgency field. -func (o *RunConnectorSubactionPushtoserviceSubActionParamsIncident) SetUrgency(v string) { - o.Urgency = &v -} - -func (o RunConnectorSubactionPushtoserviceSubActionParamsIncident) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RunConnectorSubactionPushtoserviceSubActionParamsIncident) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.AlertId) { - toSerialize["alertId"] = o.AlertId - } - if !IsNil(o.CaseId) { - toSerialize["caseId"] = o.CaseId - } - if !IsNil(o.CaseName) { - toSerialize["caseName"] = o.CaseName - } - if !IsNil(o.Category) { - toSerialize["category"] = o.Category - } - if !IsNil(o.CorrelationDisplay) { - toSerialize["correlation_display"] = o.CorrelationDisplay - } - if !IsNil(o.CorrelationId) { - toSerialize["correlation_id"] = o.CorrelationId - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.DestIp) { - toSerialize["dest_ip"] = o.DestIp - } - if !IsNil(o.ExternalId) { - toSerialize["externalId"] = o.ExternalId - } - if !IsNil(o.Impact) { - toSerialize["impact"] = o.Impact - } - if !IsNil(o.IssueType) { - toSerialize["issueType"] = o.IssueType - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if !IsNil(o.MalwareHash) { - toSerialize["malware_hash"] = o.MalwareHash - } - if !IsNil(o.MalwareUrl) { - toSerialize["malware_url"] = o.MalwareUrl - } - if !IsNil(o.Parent) { - toSerialize["parent"] = o.Parent - } - if !IsNil(o.Priority) { - toSerialize["priority"] = o.Priority - } - if !IsNil(o.RuleName) { - toSerialize["ruleName"] = o.RuleName - } - if !IsNil(o.Severity) { - toSerialize["severity"] = o.Severity - } - if !IsNil(o.ShortDescription) { - toSerialize["short_description"] = o.ShortDescription - } - if !IsNil(o.SourceIp) { - toSerialize["source_ip"] = o.SourceIp - } - if !IsNil(o.Subcategory) { - toSerialize["subcategory"] = o.Subcategory - } - if !IsNil(o.Summary) { - toSerialize["summary"] = o.Summary - } - if !IsNil(o.Title) { - toSerialize["title"] = o.Title - } - if !IsNil(o.Urgency) { - toSerialize["urgency"] = o.Urgency - } - return toSerialize, nil -} - -type NullableRunConnectorSubactionPushtoserviceSubActionParamsIncident struct { - value *RunConnectorSubactionPushtoserviceSubActionParamsIncident - isSet bool -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncident) Get() *RunConnectorSubactionPushtoserviceSubActionParamsIncident { - return v.value -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncident) Set(val *RunConnectorSubactionPushtoserviceSubActionParamsIncident) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncident) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncident) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionPushtoserviceSubActionParamsIncident(val *RunConnectorSubactionPushtoserviceSubActionParamsIncident) *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncident { - return &NullableRunConnectorSubactionPushtoserviceSubActionParamsIncident{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncident) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncident) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Urgency string `json:"urgency,omitempty"` } diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go deleted file mode 100644 index 7d21abba7..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" - "fmt" -) - -// RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp - A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. -type RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp struct { - ArrayOfString *[]string - String *string -} - -// []stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp is a convenience function that returns []string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp -func ArrayOfStringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp(v *[]string) RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp { - return RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp{ - ArrayOfString: v, - } -} - -// stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp is a convenience function that returns string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp -func StringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp(v *string) RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp { - return RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp{ - String: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into ArrayOfString - err = json.Unmarshal(data, &dst.ArrayOfString) - if err == nil { - jsonstring, _ := json.Marshal(dst.ArrayOfString) - if string(jsonstring) == "{}" { // empty struct - dst.ArrayOfString = nil - } else { - match++ - } - } else { - dst.ArrayOfString = nil - } - - // try to unmarshal data into String - err = json.Unmarshal(data, &dst.String) - if err == nil { - jsonstring, _ := json.Marshal(dst.String) - if string(jsonstring) == "{}" { // empty struct - dst.String = nil - } else { - match++ - } - } else { - dst.String = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.ArrayOfString = nil - dst.String = nil - - return fmt.Errorf("data matches more than one schema in oneOf(RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) MarshalJSON() ([]byte, error) { - if src.ArrayOfString != nil { - return json.Marshal(&src.ArrayOfString) - } - - if src.String != nil { - return json.Marshal(&src.String) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.ArrayOfString != nil { - return obj.ArrayOfString - } - - if obj.String != nil { - return obj.String - } - - // all schemas are nil - return nil -} - -type NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp struct { - value *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp - isSet bool -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) Get() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp { - return v.value -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) Set(val *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp(val *RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp { - return &NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go deleted file mode 100644 index dbb0e47f0..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" - "fmt" -) - -// RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash - A list of malware hashes related to the security incident for ServiceNow SecOps connectors. The hashes are added as observables to the security incident. -type RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash struct { - ArrayOfString *[]string - String *string -} - -// []stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash is a convenience function that returns []string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash -func ArrayOfStringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash(v *[]string) RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash { - return RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash{ - ArrayOfString: v, - } -} - -// stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash is a convenience function that returns string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash -func StringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash(v *string) RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash { - return RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash{ - String: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into ArrayOfString - err = json.Unmarshal(data, &dst.ArrayOfString) - if err == nil { - jsonstring, _ := json.Marshal(dst.ArrayOfString) - if string(jsonstring) == "{}" { // empty struct - dst.ArrayOfString = nil - } else { - match++ - } - } else { - dst.ArrayOfString = nil - } - - // try to unmarshal data into String - err = json.Unmarshal(data, &dst.String) - if err == nil { - jsonstring, _ := json.Marshal(dst.String) - if string(jsonstring) == "{}" { // empty struct - dst.String = nil - } else { - match++ - } - } else { - dst.String = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.ArrayOfString = nil - dst.String = nil - - return fmt.Errorf("data matches more than one schema in oneOf(RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) MarshalJSON() ([]byte, error) { - if src.ArrayOfString != nil { - return json.Marshal(&src.ArrayOfString) - } - - if src.String != nil { - return json.Marshal(&src.String) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.ArrayOfString != nil { - return obj.ArrayOfString - } - - if obj.String != nil { - return obj.String - } - - // all schemas are nil - return nil -} - -type NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash struct { - value *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash - isSet bool -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) Get() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash { - return v.value -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) Set(val *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash(val *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash { - return &NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go deleted file mode 100644 index 39d411b4b..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" - "fmt" -) - -// RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl - A list of malware URLs related to the security incident for ServiceNow SecOps connectors. The URLs are added as observables to the security incident. -type RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl struct { - ArrayOfString *[]string - String *string -} - -// []stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl is a convenience function that returns []string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl -func ArrayOfStringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl(v *[]string) RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl { - return RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl{ - ArrayOfString: v, - } -} - -// stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl is a convenience function that returns string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl -func StringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl(v *string) RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl { - return RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl{ - String: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into ArrayOfString - err = json.Unmarshal(data, &dst.ArrayOfString) - if err == nil { - jsonstring, _ := json.Marshal(dst.ArrayOfString) - if string(jsonstring) == "{}" { // empty struct - dst.ArrayOfString = nil - } else { - match++ - } - } else { - dst.ArrayOfString = nil - } - - // try to unmarshal data into String - err = json.Unmarshal(data, &dst.String) - if err == nil { - jsonstring, _ := json.Marshal(dst.String) - if string(jsonstring) == "{}" { // empty struct - dst.String = nil - } else { - match++ - } - } else { - dst.String = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.ArrayOfString = nil - dst.String = nil - - return fmt.Errorf("data matches more than one schema in oneOf(RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) MarshalJSON() ([]byte, error) { - if src.ArrayOfString != nil { - return json.Marshal(&src.ArrayOfString) - } - - if src.String != nil { - return json.Marshal(&src.String) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.ArrayOfString != nil { - return obj.ArrayOfString - } - - if obj.String != nil { - return obj.String - } - - // all schemas are nil - return nil -} - -type NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl struct { - value *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl - isSet bool -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) Get() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl { - return v.value -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) Set(val *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl(val *RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl { - return &NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go deleted file mode 100644 index 23223dc07..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" - "fmt" -) - -// RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp - A list of source IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. -type RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp struct { - ArrayOfString *[]string - String *string -} - -// []stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp is a convenience function that returns []string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp -func ArrayOfStringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp(v *[]string) RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp { - return RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp{ - ArrayOfString: v, - } -} - -// stringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp is a convenience function that returns string wrapped in RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp -func StringAsRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp(v *string) RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp { - return RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp{ - String: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into ArrayOfString - err = json.Unmarshal(data, &dst.ArrayOfString) - if err == nil { - jsonstring, _ := json.Marshal(dst.ArrayOfString) - if string(jsonstring) == "{}" { // empty struct - dst.ArrayOfString = nil - } else { - match++ - } - } else { - dst.ArrayOfString = nil - } - - // try to unmarshal data into String - err = json.Unmarshal(data, &dst.String) - if err == nil { - jsonstring, _ := json.Marshal(dst.String) - if string(jsonstring) == "{}" { // empty struct - dst.String = nil - } else { - match++ - } - } else { - dst.String = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.ArrayOfString = nil - dst.String = nil - - return fmt.Errorf("data matches more than one schema in oneOf(RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) MarshalJSON() ([]byte, error) { - if src.ArrayOfString != nil { - return json.Marshal(&src.ArrayOfString) - } - - if src.String != nil { - return json.Marshal(&src.String) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.ArrayOfString != nil { - return obj.ArrayOfString - } - - if obj.String != nil { - return obj.String - } - - // all schemas are nil - return nil -} - -type NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp struct { - value *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp - isSet bool -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) Get() *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp { - return v.value -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) Set(val *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) { - v.value = val - v.isSet = true -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) IsSet() bool { - return v.isSet -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp(val *RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp { - return &NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp{value: val, isSet: true} -} - -func (v NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/generated/kibanaactions/model_secrets_properties_cases_webhook.go b/generated/kibanaactions/model_secrets_properties_cases_webhook.go index 9c1123320..f5515fd85 100644 --- a/generated/kibanaactions/model_secrets_properties_cases_webhook.go +++ b/generated/kibanaactions/model_secrets_properties_cases_webhook.go @@ -1,162 +1,16 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the SecretsPropertiesCasesWebhook type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SecretsPropertiesCasesWebhook{} - -// SecretsPropertiesCasesWebhook struct for SecretsPropertiesCasesWebhook type SecretsPropertiesCasesWebhook struct { // The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. - Password *string `json:"password,omitempty"` + Password string `json:"password,omitempty"` // The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. - User *string `json:"user,omitempty"` -} - -// NewSecretsPropertiesCasesWebhook instantiates a new SecretsPropertiesCasesWebhook object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSecretsPropertiesCasesWebhook() *SecretsPropertiesCasesWebhook { - this := SecretsPropertiesCasesWebhook{} - return &this -} - -// NewSecretsPropertiesCasesWebhookWithDefaults instantiates a new SecretsPropertiesCasesWebhook object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSecretsPropertiesCasesWebhookWithDefaults() *SecretsPropertiesCasesWebhook { - this := SecretsPropertiesCasesWebhook{} - return &this -} - -// GetPassword returns the Password field value if set, zero value otherwise. -func (o *SecretsPropertiesCasesWebhook) GetPassword() string { - if o == nil || IsNil(o.Password) { - var ret string - return ret - } - return *o.Password -} - -// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SecretsPropertiesCasesWebhook) GetPasswordOk() (*string, bool) { - if o == nil || IsNil(o.Password) { - return nil, false - } - return o.Password, true -} - -// HasPassword returns a boolean if a field has been set. -func (o *SecretsPropertiesCasesWebhook) HasPassword() bool { - if o != nil && !IsNil(o.Password) { - return true - } - - return false -} - -// SetPassword gets a reference to the given string and assigns it to the Password field. -func (o *SecretsPropertiesCasesWebhook) SetPassword(v string) { - o.Password = &v -} - -// GetUser returns the User field value if set, zero value otherwise. -func (o *SecretsPropertiesCasesWebhook) GetUser() string { - if o == nil || IsNil(o.User) { - var ret string - return ret - } - return *o.User -} - -// GetUserOk returns a tuple with the User field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SecretsPropertiesCasesWebhook) GetUserOk() (*string, bool) { - if o == nil || IsNil(o.User) { - return nil, false - } - return o.User, true -} - -// HasUser returns a boolean if a field has been set. -func (o *SecretsPropertiesCasesWebhook) HasUser() bool { - if o != nil && !IsNil(o.User) { - return true - } - - return false -} - -// SetUser gets a reference to the given string and assigns it to the User field. -func (o *SecretsPropertiesCasesWebhook) SetUser(v string) { - o.User = &v -} - -func (o SecretsPropertiesCasesWebhook) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SecretsPropertiesCasesWebhook) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Password) { - toSerialize["password"] = o.Password - } - if !IsNil(o.User) { - toSerialize["user"] = o.User - } - return toSerialize, nil -} - -type NullableSecretsPropertiesCasesWebhook struct { - value *SecretsPropertiesCasesWebhook - isSet bool -} - -func (v NullableSecretsPropertiesCasesWebhook) Get() *SecretsPropertiesCasesWebhook { - return v.value -} - -func (v *NullableSecretsPropertiesCasesWebhook) Set(val *SecretsPropertiesCasesWebhook) { - v.value = val - v.isSet = true -} - -func (v NullableSecretsPropertiesCasesWebhook) IsSet() bool { - return v.isSet -} - -func (v *NullableSecretsPropertiesCasesWebhook) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSecretsPropertiesCasesWebhook(val *SecretsPropertiesCasesWebhook) *NullableSecretsPropertiesCasesWebhook { - return &NullableSecretsPropertiesCasesWebhook{value: val, isSet: true} -} - -func (v NullableSecretsPropertiesCasesWebhook) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSecretsPropertiesCasesWebhook) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + User string `json:"user,omitempty"` } diff --git a/generated/kibanaactions/model_secrets_properties_jira.go b/generated/kibanaactions/model_secrets_properties_jira.go index 956f78eb0..ee6d51c11 100644 --- a/generated/kibanaactions/model_secrets_properties_jira.go +++ b/generated/kibanaactions/model_secrets_properties_jira.go @@ -1,144 +1,17 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the SecretsPropertiesJira type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SecretsPropertiesJira{} - -// SecretsPropertiesJira Defines secrets for connectors when type is `.jira`. +// Defines secrets for connectors when type is `.jira`. type SecretsPropertiesJira struct { // The Jira API authentication token for HTTP basic authentication. ApiToken string `json:"apiToken"` // The account email for HTTP Basic authentication. Email string `json:"email"` } - -// NewSecretsPropertiesJira instantiates a new SecretsPropertiesJira object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSecretsPropertiesJira(apiToken string, email string) *SecretsPropertiesJira { - this := SecretsPropertiesJira{} - this.ApiToken = apiToken - this.Email = email - return &this -} - -// NewSecretsPropertiesJiraWithDefaults instantiates a new SecretsPropertiesJira object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSecretsPropertiesJiraWithDefaults() *SecretsPropertiesJira { - this := SecretsPropertiesJira{} - return &this -} - -// GetApiToken returns the ApiToken field value -func (o *SecretsPropertiesJira) GetApiToken() string { - if o == nil { - var ret string - return ret - } - - return o.ApiToken -} - -// GetApiTokenOk returns a tuple with the ApiToken field value -// and a boolean to check if the value has been set. -func (o *SecretsPropertiesJira) GetApiTokenOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ApiToken, true -} - -// SetApiToken sets field value -func (o *SecretsPropertiesJira) SetApiToken(v string) { - o.ApiToken = v -} - -// GetEmail returns the Email field value -func (o *SecretsPropertiesJira) GetEmail() string { - if o == nil { - var ret string - return ret - } - - return o.Email -} - -// GetEmailOk returns a tuple with the Email field value -// and a boolean to check if the value has been set. -func (o *SecretsPropertiesJira) GetEmailOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Email, true -} - -// SetEmail sets field value -func (o *SecretsPropertiesJira) SetEmail(v string) { - o.Email = v -} - -func (o SecretsPropertiesJira) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SecretsPropertiesJira) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["apiToken"] = o.ApiToken - toSerialize["email"] = o.Email - return toSerialize, nil -} - -type NullableSecretsPropertiesJira struct { - value *SecretsPropertiesJira - isSet bool -} - -func (v NullableSecretsPropertiesJira) Get() *SecretsPropertiesJira { - return v.value -} - -func (v *NullableSecretsPropertiesJira) Set(val *SecretsPropertiesJira) { - v.value = val - v.isSet = true -} - -func (v NullableSecretsPropertiesJira) IsSet() bool { - return v.isSet -} - -func (v *NullableSecretsPropertiesJira) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSecretsPropertiesJira(val *SecretsPropertiesJira) *NullableSecretsPropertiesJira { - return &NullableSecretsPropertiesJira{value: val, isSet: true} -} - -func (v NullableSecretsPropertiesJira) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSecretsPropertiesJira) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_secrets_properties_opsgenie.go b/generated/kibanaactions/model_secrets_properties_opsgenie.go index 7374f134e..e8d12120e 100644 --- a/generated/kibanaactions/model_secrets_properties_opsgenie.go +++ b/generated/kibanaactions/model_secrets_properties_opsgenie.go @@ -1,116 +1,15 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the SecretsPropertiesOpsgenie type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SecretsPropertiesOpsgenie{} - -// SecretsPropertiesOpsgenie Defines secrets for connectors when type is `.opsgenie`. +// Defines secrets for connectors when type is `.opsgenie`. type SecretsPropertiesOpsgenie struct { // The Opsgenie API authentication key for HTTP Basic authentication. ApiKey string `json:"apiKey"` } - -// NewSecretsPropertiesOpsgenie instantiates a new SecretsPropertiesOpsgenie object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSecretsPropertiesOpsgenie(apiKey string) *SecretsPropertiesOpsgenie { - this := SecretsPropertiesOpsgenie{} - this.ApiKey = apiKey - return &this -} - -// NewSecretsPropertiesOpsgenieWithDefaults instantiates a new SecretsPropertiesOpsgenie object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSecretsPropertiesOpsgenieWithDefaults() *SecretsPropertiesOpsgenie { - this := SecretsPropertiesOpsgenie{} - return &this -} - -// GetApiKey returns the ApiKey field value -func (o *SecretsPropertiesOpsgenie) GetApiKey() string { - if o == nil { - var ret string - return ret - } - - return o.ApiKey -} - -// GetApiKeyOk returns a tuple with the ApiKey field value -// and a boolean to check if the value has been set. -func (o *SecretsPropertiesOpsgenie) GetApiKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ApiKey, true -} - -// SetApiKey sets field value -func (o *SecretsPropertiesOpsgenie) SetApiKey(v string) { - o.ApiKey = v -} - -func (o SecretsPropertiesOpsgenie) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SecretsPropertiesOpsgenie) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["apiKey"] = o.ApiKey - return toSerialize, nil -} - -type NullableSecretsPropertiesOpsgenie struct { - value *SecretsPropertiesOpsgenie - isSet bool -} - -func (v NullableSecretsPropertiesOpsgenie) Get() *SecretsPropertiesOpsgenie { - return v.value -} - -func (v *NullableSecretsPropertiesOpsgenie) Set(val *SecretsPropertiesOpsgenie) { - v.value = val - v.isSet = true -} - -func (v NullableSecretsPropertiesOpsgenie) IsSet() bool { - return v.isSet -} - -func (v *NullableSecretsPropertiesOpsgenie) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSecretsPropertiesOpsgenie(val *SecretsPropertiesOpsgenie) *NullableSecretsPropertiesOpsgenie { - return &NullableSecretsPropertiesOpsgenie{value: val, isSet: true} -} - -func (v NullableSecretsPropertiesOpsgenie) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSecretsPropertiesOpsgenie) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_secrets_properties_resilient.go b/generated/kibanaactions/model_secrets_properties_resilient.go index 2ad50115c..a193b6a33 100644 --- a/generated/kibanaactions/model_secrets_properties_resilient.go +++ b/generated/kibanaactions/model_secrets_properties_resilient.go @@ -1,144 +1,17 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the SecretsPropertiesResilient type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SecretsPropertiesResilient{} - -// SecretsPropertiesResilient Defines secrets for connectors when type is `.resilient`. +// Defines secrets for connectors when type is `.resilient`. type SecretsPropertiesResilient struct { // The authentication key ID for HTTP Basic authentication. ApiKeyId string `json:"apiKeyId"` // The authentication key secret for HTTP Basic authentication. ApiKeySecret string `json:"apiKeySecret"` } - -// NewSecretsPropertiesResilient instantiates a new SecretsPropertiesResilient object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSecretsPropertiesResilient(apiKeyId string, apiKeySecret string) *SecretsPropertiesResilient { - this := SecretsPropertiesResilient{} - this.ApiKeyId = apiKeyId - this.ApiKeySecret = apiKeySecret - return &this -} - -// NewSecretsPropertiesResilientWithDefaults instantiates a new SecretsPropertiesResilient object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSecretsPropertiesResilientWithDefaults() *SecretsPropertiesResilient { - this := SecretsPropertiesResilient{} - return &this -} - -// GetApiKeyId returns the ApiKeyId field value -func (o *SecretsPropertiesResilient) GetApiKeyId() string { - if o == nil { - var ret string - return ret - } - - return o.ApiKeyId -} - -// GetApiKeyIdOk returns a tuple with the ApiKeyId field value -// and a boolean to check if the value has been set. -func (o *SecretsPropertiesResilient) GetApiKeyIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ApiKeyId, true -} - -// SetApiKeyId sets field value -func (o *SecretsPropertiesResilient) SetApiKeyId(v string) { - o.ApiKeyId = v -} - -// GetApiKeySecret returns the ApiKeySecret field value -func (o *SecretsPropertiesResilient) GetApiKeySecret() string { - if o == nil { - var ret string - return ret - } - - return o.ApiKeySecret -} - -// GetApiKeySecretOk returns a tuple with the ApiKeySecret field value -// and a boolean to check if the value has been set. -func (o *SecretsPropertiesResilient) GetApiKeySecretOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ApiKeySecret, true -} - -// SetApiKeySecret sets field value -func (o *SecretsPropertiesResilient) SetApiKeySecret(v string) { - o.ApiKeySecret = v -} - -func (o SecretsPropertiesResilient) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SecretsPropertiesResilient) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["apiKeyId"] = o.ApiKeyId - toSerialize["apiKeySecret"] = o.ApiKeySecret - return toSerialize, nil -} - -type NullableSecretsPropertiesResilient struct { - value *SecretsPropertiesResilient - isSet bool -} - -func (v NullableSecretsPropertiesResilient) Get() *SecretsPropertiesResilient { - return v.value -} - -func (v *NullableSecretsPropertiesResilient) Set(val *SecretsPropertiesResilient) { - v.value = val - v.isSet = true -} - -func (v NullableSecretsPropertiesResilient) IsSet() bool { - return v.isSet -} - -func (v *NullableSecretsPropertiesResilient) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSecretsPropertiesResilient(val *SecretsPropertiesResilient) *NullableSecretsPropertiesResilient { - return &NullableSecretsPropertiesResilient{value: val, isSet: true} -} - -func (v NullableSecretsPropertiesResilient) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSecretsPropertiesResilient) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_secrets_properties_servicenow.go b/generated/kibanaactions/model_secrets_properties_servicenow.go index 34a1817d1..1cdfd0b39 100644 --- a/generated/kibanaactions/model_secrets_properties_servicenow.go +++ b/generated/kibanaactions/model_secrets_properties_servicenow.go @@ -1,273 +1,23 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the SecretsPropertiesServicenow type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SecretsPropertiesServicenow{} - -// SecretsPropertiesServicenow Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `.servicenow-itom`. +// Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `.servicenow-itom`. type SecretsPropertiesServicenow struct { // The client secret assigned to your OAuth application. This property is required when `isOAuth` is `true`. - ClientSecret *string `json:"clientSecret,omitempty"` + ClientSecret string `json:"clientSecret,omitempty"` // The password for HTTP basic authentication. This property is required when `isOAuth` is `false`. - Password *string `json:"password,omitempty"` + Password string `json:"password,omitempty"` // The RSA private key that you created for use in ServiceNow. This property is required when `isOAuth` is `true`. - PrivateKey *string `json:"privateKey,omitempty"` + PrivateKey string `json:"privateKey,omitempty"` // The password for the RSA private key. This property is required when `isOAuth` is `true` and you set a password on your private key. - PrivateKeyPassword *string `json:"privateKeyPassword,omitempty"` + PrivateKeyPassword string `json:"privateKeyPassword,omitempty"` // The username for HTTP basic authentication. This property is required when `isOAuth` is `false`. - Username *string `json:"username,omitempty"` -} - -// NewSecretsPropertiesServicenow instantiates a new SecretsPropertiesServicenow object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSecretsPropertiesServicenow() *SecretsPropertiesServicenow { - this := SecretsPropertiesServicenow{} - return &this -} - -// NewSecretsPropertiesServicenowWithDefaults instantiates a new SecretsPropertiesServicenow object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSecretsPropertiesServicenowWithDefaults() *SecretsPropertiesServicenow { - this := SecretsPropertiesServicenow{} - return &this -} - -// GetClientSecret returns the ClientSecret field value if set, zero value otherwise. -func (o *SecretsPropertiesServicenow) GetClientSecret() string { - if o == nil || IsNil(o.ClientSecret) { - var ret string - return ret - } - return *o.ClientSecret -} - -// GetClientSecretOk returns a tuple with the ClientSecret field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SecretsPropertiesServicenow) GetClientSecretOk() (*string, bool) { - if o == nil || IsNil(o.ClientSecret) { - return nil, false - } - return o.ClientSecret, true -} - -// HasClientSecret returns a boolean if a field has been set. -func (o *SecretsPropertiesServicenow) HasClientSecret() bool { - if o != nil && !IsNil(o.ClientSecret) { - return true - } - - return false -} - -// SetClientSecret gets a reference to the given string and assigns it to the ClientSecret field. -func (o *SecretsPropertiesServicenow) SetClientSecret(v string) { - o.ClientSecret = &v -} - -// GetPassword returns the Password field value if set, zero value otherwise. -func (o *SecretsPropertiesServicenow) GetPassword() string { - if o == nil || IsNil(o.Password) { - var ret string - return ret - } - return *o.Password -} - -// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SecretsPropertiesServicenow) GetPasswordOk() (*string, bool) { - if o == nil || IsNil(o.Password) { - return nil, false - } - return o.Password, true -} - -// HasPassword returns a boolean if a field has been set. -func (o *SecretsPropertiesServicenow) HasPassword() bool { - if o != nil && !IsNil(o.Password) { - return true - } - - return false -} - -// SetPassword gets a reference to the given string and assigns it to the Password field. -func (o *SecretsPropertiesServicenow) SetPassword(v string) { - o.Password = &v -} - -// GetPrivateKey returns the PrivateKey field value if set, zero value otherwise. -func (o *SecretsPropertiesServicenow) GetPrivateKey() string { - if o == nil || IsNil(o.PrivateKey) { - var ret string - return ret - } - return *o.PrivateKey -} - -// GetPrivateKeyOk returns a tuple with the PrivateKey field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SecretsPropertiesServicenow) GetPrivateKeyOk() (*string, bool) { - if o == nil || IsNil(o.PrivateKey) { - return nil, false - } - return o.PrivateKey, true -} - -// HasPrivateKey returns a boolean if a field has been set. -func (o *SecretsPropertiesServicenow) HasPrivateKey() bool { - if o != nil && !IsNil(o.PrivateKey) { - return true - } - - return false -} - -// SetPrivateKey gets a reference to the given string and assigns it to the PrivateKey field. -func (o *SecretsPropertiesServicenow) SetPrivateKey(v string) { - o.PrivateKey = &v -} - -// GetPrivateKeyPassword returns the PrivateKeyPassword field value if set, zero value otherwise. -func (o *SecretsPropertiesServicenow) GetPrivateKeyPassword() string { - if o == nil || IsNil(o.PrivateKeyPassword) { - var ret string - return ret - } - return *o.PrivateKeyPassword -} - -// GetPrivateKeyPasswordOk returns a tuple with the PrivateKeyPassword field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SecretsPropertiesServicenow) GetPrivateKeyPasswordOk() (*string, bool) { - if o == nil || IsNil(o.PrivateKeyPassword) { - return nil, false - } - return o.PrivateKeyPassword, true -} - -// HasPrivateKeyPassword returns a boolean if a field has been set. -func (o *SecretsPropertiesServicenow) HasPrivateKeyPassword() bool { - if o != nil && !IsNil(o.PrivateKeyPassword) { - return true - } - - return false -} - -// SetPrivateKeyPassword gets a reference to the given string and assigns it to the PrivateKeyPassword field. -func (o *SecretsPropertiesServicenow) SetPrivateKeyPassword(v string) { - o.PrivateKeyPassword = &v -} - -// GetUsername returns the Username field value if set, zero value otherwise. -func (o *SecretsPropertiesServicenow) GetUsername() string { - if o == nil || IsNil(o.Username) { - var ret string - return ret - } - return *o.Username -} - -// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SecretsPropertiesServicenow) GetUsernameOk() (*string, bool) { - if o == nil || IsNil(o.Username) { - return nil, false - } - return o.Username, true -} - -// HasUsername returns a boolean if a field has been set. -func (o *SecretsPropertiesServicenow) HasUsername() bool { - if o != nil && !IsNil(o.Username) { - return true - } - - return false -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -func (o *SecretsPropertiesServicenow) SetUsername(v string) { - o.Username = &v -} - -func (o SecretsPropertiesServicenow) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SecretsPropertiesServicenow) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ClientSecret) { - toSerialize["clientSecret"] = o.ClientSecret - } - if !IsNil(o.Password) { - toSerialize["password"] = o.Password - } - if !IsNil(o.PrivateKey) { - toSerialize["privateKey"] = o.PrivateKey - } - if !IsNil(o.PrivateKeyPassword) { - toSerialize["privateKeyPassword"] = o.PrivateKeyPassword - } - if !IsNil(o.Username) { - toSerialize["username"] = o.Username - } - return toSerialize, nil -} - -type NullableSecretsPropertiesServicenow struct { - value *SecretsPropertiesServicenow - isSet bool -} - -func (v NullableSecretsPropertiesServicenow) Get() *SecretsPropertiesServicenow { - return v.value -} - -func (v *NullableSecretsPropertiesServicenow) Set(val *SecretsPropertiesServicenow) { - v.value = val - v.isSet = true -} - -func (v NullableSecretsPropertiesServicenow) IsSet() bool { - return v.isSet -} - -func (v *NullableSecretsPropertiesServicenow) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSecretsPropertiesServicenow(val *SecretsPropertiesServicenow) *NullableSecretsPropertiesServicenow { - return &NullableSecretsPropertiesServicenow{value: val, isSet: true} -} - -func (v NullableSecretsPropertiesServicenow) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSecretsPropertiesServicenow) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Username string `json:"username,omitempty"` } diff --git a/generated/kibanaactions/model_secrets_properties_swimlane.go b/generated/kibanaactions/model_secrets_properties_swimlane.go index 9f27c2fcc..5a55d951e 100644 --- a/generated/kibanaactions/model_secrets_properties_swimlane.go +++ b/generated/kibanaactions/model_secrets_properties_swimlane.go @@ -1,125 +1,15 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the SecretsPropertiesSwimlane type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SecretsPropertiesSwimlane{} - -// SecretsPropertiesSwimlane Defines secrets for connectors when type is `.swimlane`. +// Defines secrets for connectors when type is `.swimlane`. type SecretsPropertiesSwimlane struct { // Swimlane API authentication token. - ApiToken *string `json:"apiToken,omitempty"` -} - -// NewSecretsPropertiesSwimlane instantiates a new SecretsPropertiesSwimlane object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSecretsPropertiesSwimlane() *SecretsPropertiesSwimlane { - this := SecretsPropertiesSwimlane{} - return &this -} - -// NewSecretsPropertiesSwimlaneWithDefaults instantiates a new SecretsPropertiesSwimlane object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSecretsPropertiesSwimlaneWithDefaults() *SecretsPropertiesSwimlane { - this := SecretsPropertiesSwimlane{} - return &this -} - -// GetApiToken returns the ApiToken field value if set, zero value otherwise. -func (o *SecretsPropertiesSwimlane) GetApiToken() string { - if o == nil || IsNil(o.ApiToken) { - var ret string - return ret - } - return *o.ApiToken -} - -// GetApiTokenOk returns a tuple with the ApiToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SecretsPropertiesSwimlane) GetApiTokenOk() (*string, bool) { - if o == nil || IsNil(o.ApiToken) { - return nil, false - } - return o.ApiToken, true -} - -// HasApiToken returns a boolean if a field has been set. -func (o *SecretsPropertiesSwimlane) HasApiToken() bool { - if o != nil && !IsNil(o.ApiToken) { - return true - } - - return false -} - -// SetApiToken gets a reference to the given string and assigns it to the ApiToken field. -func (o *SecretsPropertiesSwimlane) SetApiToken(v string) { - o.ApiToken = &v -} - -func (o SecretsPropertiesSwimlane) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SecretsPropertiesSwimlane) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ApiToken) { - toSerialize["apiToken"] = o.ApiToken - } - return toSerialize, nil -} - -type NullableSecretsPropertiesSwimlane struct { - value *SecretsPropertiesSwimlane - isSet bool -} - -func (v NullableSecretsPropertiesSwimlane) Get() *SecretsPropertiesSwimlane { - return v.value -} - -func (v *NullableSecretsPropertiesSwimlane) Set(val *SecretsPropertiesSwimlane) { - v.value = val - v.isSet = true -} - -func (v NullableSecretsPropertiesSwimlane) IsSet() bool { - return v.isSet -} - -func (v *NullableSecretsPropertiesSwimlane) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSecretsPropertiesSwimlane(val *SecretsPropertiesSwimlane) *NullableSecretsPropertiesSwimlane { - return &NullableSecretsPropertiesSwimlane{value: val, isSet: true} -} - -func (v NullableSecretsPropertiesSwimlane) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSecretsPropertiesSwimlane) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + ApiToken string `json:"apiToken,omitempty"` } diff --git a/generated/kibanaactions/model_severity_mapping.go b/generated/kibanaactions/model_severity_mapping.go index 226d6cd4e..c26bb5c6c 100644 --- a/generated/kibanaactions/model_severity_mapping.go +++ b/generated/kibanaactions/model_severity_mapping.go @@ -1,23 +1,14 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the SeverityMapping type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SeverityMapping{} - -// SeverityMapping Mapping for the severity. +// Mapping for the severity. type SeverityMapping struct { // The type of field in Swimlane. FieldType string `json:"fieldType"` @@ -28,173 +19,3 @@ type SeverityMapping struct { // The name of the field in Swimlane. Name string `json:"name"` } - -// NewSeverityMapping instantiates a new SeverityMapping object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSeverityMapping(fieldType string, id string, key string, name string) *SeverityMapping { - this := SeverityMapping{} - this.FieldType = fieldType - this.Id = id - this.Key = key - this.Name = name - return &this -} - -// NewSeverityMappingWithDefaults instantiates a new SeverityMapping object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSeverityMappingWithDefaults() *SeverityMapping { - this := SeverityMapping{} - return &this -} - -// GetFieldType returns the FieldType field value -func (o *SeverityMapping) GetFieldType() string { - if o == nil { - var ret string - return ret - } - - return o.FieldType -} - -// GetFieldTypeOk returns a tuple with the FieldType field value -// and a boolean to check if the value has been set. -func (o *SeverityMapping) GetFieldTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FieldType, true -} - -// SetFieldType sets field value -func (o *SeverityMapping) SetFieldType(v string) { - o.FieldType = v -} - -// GetId returns the Id field value -func (o *SeverityMapping) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *SeverityMapping) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *SeverityMapping) SetId(v string) { - o.Id = v -} - -// GetKey returns the Key field value -func (o *SeverityMapping) GetKey() string { - if o == nil { - var ret string - return ret - } - - return o.Key -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -func (o *SeverityMapping) GetKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Key, true -} - -// SetKey sets field value -func (o *SeverityMapping) SetKey(v string) { - o.Key = v -} - -// GetName returns the Name field value -func (o *SeverityMapping) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *SeverityMapping) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *SeverityMapping) SetName(v string) { - o.Name = v -} - -func (o SeverityMapping) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SeverityMapping) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["fieldType"] = o.FieldType - toSerialize["id"] = o.Id - toSerialize["key"] = o.Key - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableSeverityMapping struct { - value *SeverityMapping - isSet bool -} - -func (v NullableSeverityMapping) Get() *SeverityMapping { - return v.value -} - -func (v *NullableSeverityMapping) Set(val *SeverityMapping) { - v.value = val - v.isSet = true -} - -func (v NullableSeverityMapping) IsSet() bool { - return v.isSet -} - -func (v *NullableSeverityMapping) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSeverityMapping(val *SeverityMapping) *NullableSeverityMapping { - return &NullableSeverityMapping{value: val, isSet: true} -} - -func (v NullableSeverityMapping) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSeverityMapping) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_subaction_parameters.go b/generated/kibanaactions/model_subaction_parameters.go deleted file mode 100644 index 5072c6159..000000000 --- a/generated/kibanaactions/model_subaction_parameters.go +++ /dev/null @@ -1,391 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" - "fmt" -) - -// SubactionParameters - Test an action that involves a subaction. -type SubactionParameters struct { - RunConnectorSubactionAddevent *RunConnectorSubactionAddevent - RunConnectorSubactionClosealert *RunConnectorSubactionClosealert - RunConnectorSubactionCreatealert *RunConnectorSubactionCreatealert - RunConnectorSubactionFieldsbyissuetype *RunConnectorSubactionFieldsbyissuetype - RunConnectorSubactionGetchoices *RunConnectorSubactionGetchoices - RunConnectorSubactionGetfields *RunConnectorSubactionGetfields - RunConnectorSubactionGetincident *RunConnectorSubactionGetincident - RunConnectorSubactionIssue *RunConnectorSubactionIssue - RunConnectorSubactionIssues *RunConnectorSubactionIssues - RunConnectorSubactionIssuetypes *RunConnectorSubactionIssuetypes - RunConnectorSubactionPushtoservice *RunConnectorSubactionPushtoservice -} - -// RunConnectorSubactionAddeventAsSubactionParameters is a convenience function that returns RunConnectorSubactionAddevent wrapped in SubactionParameters -func RunConnectorSubactionAddeventAsSubactionParameters(v *RunConnectorSubactionAddevent) SubactionParameters { - return SubactionParameters{ - RunConnectorSubactionAddevent: v, - } -} - -// RunConnectorSubactionClosealertAsSubactionParameters is a convenience function that returns RunConnectorSubactionClosealert wrapped in SubactionParameters -func RunConnectorSubactionClosealertAsSubactionParameters(v *RunConnectorSubactionClosealert) SubactionParameters { - return SubactionParameters{ - RunConnectorSubactionClosealert: v, - } -} - -// RunConnectorSubactionCreatealertAsSubactionParameters is a convenience function that returns RunConnectorSubactionCreatealert wrapped in SubactionParameters -func RunConnectorSubactionCreatealertAsSubactionParameters(v *RunConnectorSubactionCreatealert) SubactionParameters { - return SubactionParameters{ - RunConnectorSubactionCreatealert: v, - } -} - -// RunConnectorSubactionFieldsbyissuetypeAsSubactionParameters is a convenience function that returns RunConnectorSubactionFieldsbyissuetype wrapped in SubactionParameters -func RunConnectorSubactionFieldsbyissuetypeAsSubactionParameters(v *RunConnectorSubactionFieldsbyissuetype) SubactionParameters { - return SubactionParameters{ - RunConnectorSubactionFieldsbyissuetype: v, - } -} - -// RunConnectorSubactionGetchoicesAsSubactionParameters is a convenience function that returns RunConnectorSubactionGetchoices wrapped in SubactionParameters -func RunConnectorSubactionGetchoicesAsSubactionParameters(v *RunConnectorSubactionGetchoices) SubactionParameters { - return SubactionParameters{ - RunConnectorSubactionGetchoices: v, - } -} - -// RunConnectorSubactionGetfieldsAsSubactionParameters is a convenience function that returns RunConnectorSubactionGetfields wrapped in SubactionParameters -func RunConnectorSubactionGetfieldsAsSubactionParameters(v *RunConnectorSubactionGetfields) SubactionParameters { - return SubactionParameters{ - RunConnectorSubactionGetfields: v, - } -} - -// RunConnectorSubactionGetincidentAsSubactionParameters is a convenience function that returns RunConnectorSubactionGetincident wrapped in SubactionParameters -func RunConnectorSubactionGetincidentAsSubactionParameters(v *RunConnectorSubactionGetincident) SubactionParameters { - return SubactionParameters{ - RunConnectorSubactionGetincident: v, - } -} - -// RunConnectorSubactionIssueAsSubactionParameters is a convenience function that returns RunConnectorSubactionIssue wrapped in SubactionParameters -func RunConnectorSubactionIssueAsSubactionParameters(v *RunConnectorSubactionIssue) SubactionParameters { - return SubactionParameters{ - RunConnectorSubactionIssue: v, - } -} - -// RunConnectorSubactionIssuesAsSubactionParameters is a convenience function that returns RunConnectorSubactionIssues wrapped in SubactionParameters -func RunConnectorSubactionIssuesAsSubactionParameters(v *RunConnectorSubactionIssues) SubactionParameters { - return SubactionParameters{ - RunConnectorSubactionIssues: v, - } -} - -// RunConnectorSubactionIssuetypesAsSubactionParameters is a convenience function that returns RunConnectorSubactionIssuetypes wrapped in SubactionParameters -func RunConnectorSubactionIssuetypesAsSubactionParameters(v *RunConnectorSubactionIssuetypes) SubactionParameters { - return SubactionParameters{ - RunConnectorSubactionIssuetypes: v, - } -} - -// RunConnectorSubactionPushtoserviceAsSubactionParameters is a convenience function that returns RunConnectorSubactionPushtoservice wrapped in SubactionParameters -func RunConnectorSubactionPushtoserviceAsSubactionParameters(v *RunConnectorSubactionPushtoservice) SubactionParameters { - return SubactionParameters{ - RunConnectorSubactionPushtoservice: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *SubactionParameters) UnmarshalJSON(data []byte) error { - var err error - // use discriminator value to speed up the lookup - var jsonDict map[string]interface{} - err = newStrictDecoder(data).Decode(&jsonDict) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") - } - - // check if the discriminator value is 'run_connector_subaction_addevent' - if jsonDict["subAction"] == "run_connector_subaction_addevent" { - // try to unmarshal JSON data into RunConnectorSubactionAddevent - err = json.Unmarshal(data, &dst.RunConnectorSubactionAddevent) - if err == nil { - return nil // data stored in dst.RunConnectorSubactionAddevent, return on the first match - } else { - dst.RunConnectorSubactionAddevent = nil - return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionAddevent: %s", err.Error()) - } - } - - // check if the discriminator value is 'run_connector_subaction_closealert' - if jsonDict["subAction"] == "run_connector_subaction_closealert" { - // try to unmarshal JSON data into RunConnectorSubactionClosealert - err = json.Unmarshal(data, &dst.RunConnectorSubactionClosealert) - if err == nil { - return nil // data stored in dst.RunConnectorSubactionClosealert, return on the first match - } else { - dst.RunConnectorSubactionClosealert = nil - return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionClosealert: %s", err.Error()) - } - } - - // check if the discriminator value is 'run_connector_subaction_createalert' - if jsonDict["subAction"] == "run_connector_subaction_createalert" { - // try to unmarshal JSON data into RunConnectorSubactionCreatealert - err = json.Unmarshal(data, &dst.RunConnectorSubactionCreatealert) - if err == nil { - return nil // data stored in dst.RunConnectorSubactionCreatealert, return on the first match - } else { - dst.RunConnectorSubactionCreatealert = nil - return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionCreatealert: %s", err.Error()) - } - } - - // check if the discriminator value is 'run_connector_subaction_fieldsbyissuetype' - if jsonDict["subAction"] == "run_connector_subaction_fieldsbyissuetype" { - // try to unmarshal JSON data into RunConnectorSubactionFieldsbyissuetype - err = json.Unmarshal(data, &dst.RunConnectorSubactionFieldsbyissuetype) - if err == nil { - return nil // data stored in dst.RunConnectorSubactionFieldsbyissuetype, return on the first match - } else { - dst.RunConnectorSubactionFieldsbyissuetype = nil - return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionFieldsbyissuetype: %s", err.Error()) - } - } - - // check if the discriminator value is 'run_connector_subaction_getchoices' - if jsonDict["subAction"] == "run_connector_subaction_getchoices" { - // try to unmarshal JSON data into RunConnectorSubactionGetchoices - err = json.Unmarshal(data, &dst.RunConnectorSubactionGetchoices) - if err == nil { - return nil // data stored in dst.RunConnectorSubactionGetchoices, return on the first match - } else { - dst.RunConnectorSubactionGetchoices = nil - return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionGetchoices: %s", err.Error()) - } - } - - // check if the discriminator value is 'run_connector_subaction_getfields' - if jsonDict["subAction"] == "run_connector_subaction_getfields" { - // try to unmarshal JSON data into RunConnectorSubactionGetfields - err = json.Unmarshal(data, &dst.RunConnectorSubactionGetfields) - if err == nil { - return nil // data stored in dst.RunConnectorSubactionGetfields, return on the first match - } else { - dst.RunConnectorSubactionGetfields = nil - return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionGetfields: %s", err.Error()) - } - } - - // check if the discriminator value is 'run_connector_subaction_getincident' - if jsonDict["subAction"] == "run_connector_subaction_getincident" { - // try to unmarshal JSON data into RunConnectorSubactionGetincident - err = json.Unmarshal(data, &dst.RunConnectorSubactionGetincident) - if err == nil { - return nil // data stored in dst.RunConnectorSubactionGetincident, return on the first match - } else { - dst.RunConnectorSubactionGetincident = nil - return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionGetincident: %s", err.Error()) - } - } - - // check if the discriminator value is 'run_connector_subaction_issue' - if jsonDict["subAction"] == "run_connector_subaction_issue" { - // try to unmarshal JSON data into RunConnectorSubactionIssue - err = json.Unmarshal(data, &dst.RunConnectorSubactionIssue) - if err == nil { - return nil // data stored in dst.RunConnectorSubactionIssue, return on the first match - } else { - dst.RunConnectorSubactionIssue = nil - return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionIssue: %s", err.Error()) - } - } - - // check if the discriminator value is 'run_connector_subaction_issues' - if jsonDict["subAction"] == "run_connector_subaction_issues" { - // try to unmarshal JSON data into RunConnectorSubactionIssues - err = json.Unmarshal(data, &dst.RunConnectorSubactionIssues) - if err == nil { - return nil // data stored in dst.RunConnectorSubactionIssues, return on the first match - } else { - dst.RunConnectorSubactionIssues = nil - return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionIssues: %s", err.Error()) - } - } - - // check if the discriminator value is 'run_connector_subaction_issuetypes' - if jsonDict["subAction"] == "run_connector_subaction_issuetypes" { - // try to unmarshal JSON data into RunConnectorSubactionIssuetypes - err = json.Unmarshal(data, &dst.RunConnectorSubactionIssuetypes) - if err == nil { - return nil // data stored in dst.RunConnectorSubactionIssuetypes, return on the first match - } else { - dst.RunConnectorSubactionIssuetypes = nil - return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionIssuetypes: %s", err.Error()) - } - } - - // check if the discriminator value is 'run_connector_subaction_pushtoservice' - if jsonDict["subAction"] == "run_connector_subaction_pushtoservice" { - // try to unmarshal JSON data into RunConnectorSubactionPushtoservice - err = json.Unmarshal(data, &dst.RunConnectorSubactionPushtoservice) - if err == nil { - return nil // data stored in dst.RunConnectorSubactionPushtoservice, return on the first match - } else { - dst.RunConnectorSubactionPushtoservice = nil - return fmt.Errorf("failed to unmarshal SubactionParameters as RunConnectorSubactionPushtoservice: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src SubactionParameters) MarshalJSON() ([]byte, error) { - if src.RunConnectorSubactionAddevent != nil { - return json.Marshal(&src.RunConnectorSubactionAddevent) - } - - if src.RunConnectorSubactionClosealert != nil { - return json.Marshal(&src.RunConnectorSubactionClosealert) - } - - if src.RunConnectorSubactionCreatealert != nil { - return json.Marshal(&src.RunConnectorSubactionCreatealert) - } - - if src.RunConnectorSubactionFieldsbyissuetype != nil { - return json.Marshal(&src.RunConnectorSubactionFieldsbyissuetype) - } - - if src.RunConnectorSubactionGetchoices != nil { - return json.Marshal(&src.RunConnectorSubactionGetchoices) - } - - if src.RunConnectorSubactionGetfields != nil { - return json.Marshal(&src.RunConnectorSubactionGetfields) - } - - if src.RunConnectorSubactionGetincident != nil { - return json.Marshal(&src.RunConnectorSubactionGetincident) - } - - if src.RunConnectorSubactionIssue != nil { - return json.Marshal(&src.RunConnectorSubactionIssue) - } - - if src.RunConnectorSubactionIssues != nil { - return json.Marshal(&src.RunConnectorSubactionIssues) - } - - if src.RunConnectorSubactionIssuetypes != nil { - return json.Marshal(&src.RunConnectorSubactionIssuetypes) - } - - if src.RunConnectorSubactionPushtoservice != nil { - return json.Marshal(&src.RunConnectorSubactionPushtoservice) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *SubactionParameters) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.RunConnectorSubactionAddevent != nil { - return obj.RunConnectorSubactionAddevent - } - - if obj.RunConnectorSubactionClosealert != nil { - return obj.RunConnectorSubactionClosealert - } - - if obj.RunConnectorSubactionCreatealert != nil { - return obj.RunConnectorSubactionCreatealert - } - - if obj.RunConnectorSubactionFieldsbyissuetype != nil { - return obj.RunConnectorSubactionFieldsbyissuetype - } - - if obj.RunConnectorSubactionGetchoices != nil { - return obj.RunConnectorSubactionGetchoices - } - - if obj.RunConnectorSubactionGetfields != nil { - return obj.RunConnectorSubactionGetfields - } - - if obj.RunConnectorSubactionGetincident != nil { - return obj.RunConnectorSubactionGetincident - } - - if obj.RunConnectorSubactionIssue != nil { - return obj.RunConnectorSubactionIssue - } - - if obj.RunConnectorSubactionIssues != nil { - return obj.RunConnectorSubactionIssues - } - - if obj.RunConnectorSubactionIssuetypes != nil { - return obj.RunConnectorSubactionIssuetypes - } - - if obj.RunConnectorSubactionPushtoservice != nil { - return obj.RunConnectorSubactionPushtoservice - } - - // all schemas are nil - return nil -} - -type NullableSubactionParameters struct { - value *SubactionParameters - isSet bool -} - -func (v NullableSubactionParameters) Get() *SubactionParameters { - return v.value -} - -func (v *NullableSubactionParameters) Set(val *SubactionParameters) { - v.value = val - v.isSet = true -} - -func (v NullableSubactionParameters) IsSet() bool { - return v.isSet -} - -func (v *NullableSubactionParameters) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSubactionParameters(val *SubactionParameters) *NullableSubactionParameters { - return &NullableSubactionParameters{value: val, isSet: true} -} - -func (v NullableSubactionParameters) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSubactionParameters) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_unauthorized_response.go b/generated/kibanaactions/model_unauthorized_response.go index 98368a427..fe1e39e87 100644 --- a/generated/kibanaactions/model_unauthorized_response.go +++ b/generated/kibanaactions/model_unauthorized_response.go @@ -1,196 +1,15 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the UnauthorizedResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UnauthorizedResponse{} - -// UnauthorizedResponse struct for UnauthorizedResponse type UnauthorizedResponse struct { - Error *string `json:"error,omitempty"` - Message *string `json:"message,omitempty"` - StatusCode *int32 `json:"statusCode,omitempty"` -} - -// NewUnauthorizedResponse instantiates a new UnauthorizedResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUnauthorizedResponse() *UnauthorizedResponse { - this := UnauthorizedResponse{} - return &this -} - -// NewUnauthorizedResponseWithDefaults instantiates a new UnauthorizedResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUnauthorizedResponseWithDefaults() *UnauthorizedResponse { - this := UnauthorizedResponse{} - return &this -} - -// GetError returns the Error field value if set, zero value otherwise. -func (o *UnauthorizedResponse) GetError() string { - if o == nil || IsNil(o.Error) { - var ret string - return ret - } - return *o.Error -} - -// GetErrorOk returns a tuple with the Error field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UnauthorizedResponse) GetErrorOk() (*string, bool) { - if o == nil || IsNil(o.Error) { - return nil, false - } - return o.Error, true -} - -// HasError returns a boolean if a field has been set. -func (o *UnauthorizedResponse) HasError() bool { - if o != nil && !IsNil(o.Error) { - return true - } - - return false -} - -// SetError gets a reference to the given string and assigns it to the Error field. -func (o *UnauthorizedResponse) SetError(v string) { - o.Error = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *UnauthorizedResponse) GetMessage() string { - if o == nil || IsNil(o.Message) { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UnauthorizedResponse) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *UnauthorizedResponse) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *UnauthorizedResponse) SetMessage(v string) { - o.Message = &v -} - -// GetStatusCode returns the StatusCode field value if set, zero value otherwise. -func (o *UnauthorizedResponse) GetStatusCode() int32 { - if o == nil || IsNil(o.StatusCode) { - var ret int32 - return ret - } - return *o.StatusCode -} - -// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UnauthorizedResponse) GetStatusCodeOk() (*int32, bool) { - if o == nil || IsNil(o.StatusCode) { - return nil, false - } - return o.StatusCode, true -} - -// HasStatusCode returns a boolean if a field has been set. -func (o *UnauthorizedResponse) HasStatusCode() bool { - if o != nil && !IsNil(o.StatusCode) { - return true - } - - return false -} - -// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. -func (o *UnauthorizedResponse) SetStatusCode(v int32) { - o.StatusCode = &v -} - -func (o UnauthorizedResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UnauthorizedResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Error) { - toSerialize["error"] = o.Error - } - if !IsNil(o.Message) { - toSerialize["message"] = o.Message - } - if !IsNil(o.StatusCode) { - toSerialize["statusCode"] = o.StatusCode - } - return toSerialize, nil -} - -type NullableUnauthorizedResponse struct { - value *UnauthorizedResponse - isSet bool -} - -func (v NullableUnauthorizedResponse) Get() *UnauthorizedResponse { - return v.value -} - -func (v *NullableUnauthorizedResponse) Set(val *UnauthorizedResponse) { - v.value = val - v.isSet = true -} - -func (v NullableUnauthorizedResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableUnauthorizedResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUnauthorizedResponse(val *UnauthorizedResponse) *NullableUnauthorizedResponse { - return &NullableUnauthorizedResponse{value: val, isSet: true} -} - -func (v NullableUnauthorizedResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUnauthorizedResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Error_ string `json:"error,omitempty"` + Message string `json:"message,omitempty"` + StatusCode int32 `json:"statusCode,omitempty"` } diff --git a/generated/kibanaactions/model_update_connector_400_response.go b/generated/kibanaactions/model_update_connector_400_response.go deleted file mode 100644 index a25dd0461..000000000 --- a/generated/kibanaactions/model_update_connector_400_response.go +++ /dev/null @@ -1,196 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" -) - -// checks if the UpdateConnector400Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateConnector400Response{} - -// UpdateConnector400Response struct for UpdateConnector400Response -type UpdateConnector400Response struct { - Error *string `json:"error,omitempty"` - Message *string `json:"message,omitempty"` - StatusCode *int32 `json:"statusCode,omitempty"` -} - -// NewUpdateConnector400Response instantiates a new UpdateConnector400Response object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdateConnector400Response() *UpdateConnector400Response { - this := UpdateConnector400Response{} - return &this -} - -// NewUpdateConnector400ResponseWithDefaults instantiates a new UpdateConnector400Response object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdateConnector400ResponseWithDefaults() *UpdateConnector400Response { - this := UpdateConnector400Response{} - return &this -} - -// GetError returns the Error field value if set, zero value otherwise. -func (o *UpdateConnector400Response) GetError() string { - if o == nil || IsNil(o.Error) { - var ret string - return ret - } - return *o.Error -} - -// GetErrorOk returns a tuple with the Error field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateConnector400Response) GetErrorOk() (*string, bool) { - if o == nil || IsNil(o.Error) { - return nil, false - } - return o.Error, true -} - -// HasError returns a boolean if a field has been set. -func (o *UpdateConnector400Response) HasError() bool { - if o != nil && !IsNil(o.Error) { - return true - } - - return false -} - -// SetError gets a reference to the given string and assigns it to the Error field. -func (o *UpdateConnector400Response) SetError(v string) { - o.Error = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *UpdateConnector400Response) GetMessage() string { - if o == nil || IsNil(o.Message) { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateConnector400Response) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *UpdateConnector400Response) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *UpdateConnector400Response) SetMessage(v string) { - o.Message = &v -} - -// GetStatusCode returns the StatusCode field value if set, zero value otherwise. -func (o *UpdateConnector400Response) GetStatusCode() int32 { - if o == nil || IsNil(o.StatusCode) { - var ret int32 - return ret - } - return *o.StatusCode -} - -// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateConnector400Response) GetStatusCodeOk() (*int32, bool) { - if o == nil || IsNil(o.StatusCode) { - return nil, false - } - return o.StatusCode, true -} - -// HasStatusCode returns a boolean if a field has been set. -func (o *UpdateConnector400Response) HasStatusCode() bool { - if o != nil && !IsNil(o.StatusCode) { - return true - } - - return false -} - -// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. -func (o *UpdateConnector400Response) SetStatusCode(v int32) { - o.StatusCode = &v -} - -func (o UpdateConnector400Response) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateConnector400Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Error) { - toSerialize["error"] = o.Error - } - if !IsNil(o.Message) { - toSerialize["message"] = o.Message - } - if !IsNil(o.StatusCode) { - toSerialize["statusCode"] = o.StatusCode - } - return toSerialize, nil -} - -type NullableUpdateConnector400Response struct { - value *UpdateConnector400Response - isSet bool -} - -func (v NullableUpdateConnector400Response) Get() *UpdateConnector400Response { - return v.value -} - -func (v *NullableUpdateConnector400Response) Set(val *UpdateConnector400Response) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateConnector400Response) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateConnector400Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateConnector400Response(val *UpdateConnector400Response) *NullableUpdateConnector400Response { - return &NullableUpdateConnector400Response{value: val, isSet: true} -} - -func (v NullableUpdateConnector400Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateConnector400Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_update_connector_request_body_properties.go b/generated/kibanaactions/model_update_connector_request_body_properties.go index 4705e0c53..cbac94b27 100644 --- a/generated/kibanaactions/model_update_connector_request_body_properties.go +++ b/generated/kibanaactions/model_update_connector_request_body_properties.go @@ -1,355 +1,22 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" - "fmt" -) - -// UpdateConnectorRequestBodyProperties - The properties vary depending on the connector type. +// The properties vary depending on the connector type. type UpdateConnectorRequestBodyProperties struct { - UpdateConnectorRequestCasesWebhook *UpdateConnectorRequestCasesWebhook - UpdateConnectorRequestIndex *UpdateConnectorRequestIndex - UpdateConnectorRequestJira *UpdateConnectorRequestJira - UpdateConnectorRequestOpsgenie *UpdateConnectorRequestOpsgenie - UpdateConnectorRequestResilient *UpdateConnectorRequestResilient - UpdateConnectorRequestServerlog *UpdateConnectorRequestServerlog - UpdateConnectorRequestServicenow *UpdateConnectorRequestServicenow - UpdateConnectorRequestServicenowItom *UpdateConnectorRequestServicenowItom - UpdateConnectorRequestSwimlane *UpdateConnectorRequestSwimlane -} - -// UpdateConnectorRequestCasesWebhookAsUpdateConnectorRequestBodyProperties is a convenience function that returns UpdateConnectorRequestCasesWebhook wrapped in UpdateConnectorRequestBodyProperties -func UpdateConnectorRequestCasesWebhookAsUpdateConnectorRequestBodyProperties(v *UpdateConnectorRequestCasesWebhook) UpdateConnectorRequestBodyProperties { - return UpdateConnectorRequestBodyProperties{ - UpdateConnectorRequestCasesWebhook: v, - } -} - -// UpdateConnectorRequestIndexAsUpdateConnectorRequestBodyProperties is a convenience function that returns UpdateConnectorRequestIndex wrapped in UpdateConnectorRequestBodyProperties -func UpdateConnectorRequestIndexAsUpdateConnectorRequestBodyProperties(v *UpdateConnectorRequestIndex) UpdateConnectorRequestBodyProperties { - return UpdateConnectorRequestBodyProperties{ - UpdateConnectorRequestIndex: v, - } -} - -// UpdateConnectorRequestJiraAsUpdateConnectorRequestBodyProperties is a convenience function that returns UpdateConnectorRequestJira wrapped in UpdateConnectorRequestBodyProperties -func UpdateConnectorRequestJiraAsUpdateConnectorRequestBodyProperties(v *UpdateConnectorRequestJira) UpdateConnectorRequestBodyProperties { - return UpdateConnectorRequestBodyProperties{ - UpdateConnectorRequestJira: v, - } -} - -// UpdateConnectorRequestOpsgenieAsUpdateConnectorRequestBodyProperties is a convenience function that returns UpdateConnectorRequestOpsgenie wrapped in UpdateConnectorRequestBodyProperties -func UpdateConnectorRequestOpsgenieAsUpdateConnectorRequestBodyProperties(v *UpdateConnectorRequestOpsgenie) UpdateConnectorRequestBodyProperties { - return UpdateConnectorRequestBodyProperties{ - UpdateConnectorRequestOpsgenie: v, - } -} - -// UpdateConnectorRequestResilientAsUpdateConnectorRequestBodyProperties is a convenience function that returns UpdateConnectorRequestResilient wrapped in UpdateConnectorRequestBodyProperties -func UpdateConnectorRequestResilientAsUpdateConnectorRequestBodyProperties(v *UpdateConnectorRequestResilient) UpdateConnectorRequestBodyProperties { - return UpdateConnectorRequestBodyProperties{ - UpdateConnectorRequestResilient: v, - } -} - -// UpdateConnectorRequestServerlogAsUpdateConnectorRequestBodyProperties is a convenience function that returns UpdateConnectorRequestServerlog wrapped in UpdateConnectorRequestBodyProperties -func UpdateConnectorRequestServerlogAsUpdateConnectorRequestBodyProperties(v *UpdateConnectorRequestServerlog) UpdateConnectorRequestBodyProperties { - return UpdateConnectorRequestBodyProperties{ - UpdateConnectorRequestServerlog: v, - } -} - -// UpdateConnectorRequestServicenowAsUpdateConnectorRequestBodyProperties is a convenience function that returns UpdateConnectorRequestServicenow wrapped in UpdateConnectorRequestBodyProperties -func UpdateConnectorRequestServicenowAsUpdateConnectorRequestBodyProperties(v *UpdateConnectorRequestServicenow) UpdateConnectorRequestBodyProperties { - return UpdateConnectorRequestBodyProperties{ - UpdateConnectorRequestServicenow: v, - } -} - -// UpdateConnectorRequestServicenowItomAsUpdateConnectorRequestBodyProperties is a convenience function that returns UpdateConnectorRequestServicenowItom wrapped in UpdateConnectorRequestBodyProperties -func UpdateConnectorRequestServicenowItomAsUpdateConnectorRequestBodyProperties(v *UpdateConnectorRequestServicenowItom) UpdateConnectorRequestBodyProperties { - return UpdateConnectorRequestBodyProperties{ - UpdateConnectorRequestServicenowItom: v, - } -} - -// UpdateConnectorRequestSwimlaneAsUpdateConnectorRequestBodyProperties is a convenience function that returns UpdateConnectorRequestSwimlane wrapped in UpdateConnectorRequestBodyProperties -func UpdateConnectorRequestSwimlaneAsUpdateConnectorRequestBodyProperties(v *UpdateConnectorRequestSwimlane) UpdateConnectorRequestBodyProperties { - return UpdateConnectorRequestBodyProperties{ - UpdateConnectorRequestSwimlane: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *UpdateConnectorRequestBodyProperties) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into UpdateConnectorRequestCasesWebhook - err = json.Unmarshal(data, &dst.UpdateConnectorRequestCasesWebhook) - if err == nil { - jsonUpdateConnectorRequestCasesWebhook, _ := json.Marshal(dst.UpdateConnectorRequestCasesWebhook) - if string(jsonUpdateConnectorRequestCasesWebhook) == "{}" { // empty struct - dst.UpdateConnectorRequestCasesWebhook = nil - } else { - match++ - } - } else { - dst.UpdateConnectorRequestCasesWebhook = nil - } - - // try to unmarshal data into UpdateConnectorRequestIndex - err = json.Unmarshal(data, &dst.UpdateConnectorRequestIndex) - if err == nil { - jsonUpdateConnectorRequestIndex, _ := json.Marshal(dst.UpdateConnectorRequestIndex) - if string(jsonUpdateConnectorRequestIndex) == "{}" { // empty struct - dst.UpdateConnectorRequestIndex = nil - } else { - match++ - } - } else { - dst.UpdateConnectorRequestIndex = nil - } - - // try to unmarshal data into UpdateConnectorRequestJira - err = json.Unmarshal(data, &dst.UpdateConnectorRequestJira) - if err == nil { - jsonUpdateConnectorRequestJira, _ := json.Marshal(dst.UpdateConnectorRequestJira) - if string(jsonUpdateConnectorRequestJira) == "{}" { // empty struct - dst.UpdateConnectorRequestJira = nil - } else { - match++ - } - } else { - dst.UpdateConnectorRequestJira = nil - } - - // try to unmarshal data into UpdateConnectorRequestOpsgenie - err = json.Unmarshal(data, &dst.UpdateConnectorRequestOpsgenie) - if err == nil { - jsonUpdateConnectorRequestOpsgenie, _ := json.Marshal(dst.UpdateConnectorRequestOpsgenie) - if string(jsonUpdateConnectorRequestOpsgenie) == "{}" { // empty struct - dst.UpdateConnectorRequestOpsgenie = nil - } else { - match++ - } - } else { - dst.UpdateConnectorRequestOpsgenie = nil - } - - // try to unmarshal data into UpdateConnectorRequestResilient - err = json.Unmarshal(data, &dst.UpdateConnectorRequestResilient) - if err == nil { - jsonUpdateConnectorRequestResilient, _ := json.Marshal(dst.UpdateConnectorRequestResilient) - if string(jsonUpdateConnectorRequestResilient) == "{}" { // empty struct - dst.UpdateConnectorRequestResilient = nil - } else { - match++ - } - } else { - dst.UpdateConnectorRequestResilient = nil - } - - // try to unmarshal data into UpdateConnectorRequestServerlog - err = json.Unmarshal(data, &dst.UpdateConnectorRequestServerlog) - if err == nil { - jsonUpdateConnectorRequestServerlog, _ := json.Marshal(dst.UpdateConnectorRequestServerlog) - if string(jsonUpdateConnectorRequestServerlog) == "{}" { // empty struct - dst.UpdateConnectorRequestServerlog = nil - } else { - match++ - } - } else { - dst.UpdateConnectorRequestServerlog = nil - } - - // try to unmarshal data into UpdateConnectorRequestServicenow - err = json.Unmarshal(data, &dst.UpdateConnectorRequestServicenow) - if err == nil { - jsonUpdateConnectorRequestServicenow, _ := json.Marshal(dst.UpdateConnectorRequestServicenow) - if string(jsonUpdateConnectorRequestServicenow) == "{}" { // empty struct - dst.UpdateConnectorRequestServicenow = nil - } else { - match++ - } - } else { - dst.UpdateConnectorRequestServicenow = nil - } - - // try to unmarshal data into UpdateConnectorRequestServicenowItom - err = json.Unmarshal(data, &dst.UpdateConnectorRequestServicenowItom) - if err == nil { - jsonUpdateConnectorRequestServicenowItom, _ := json.Marshal(dst.UpdateConnectorRequestServicenowItom) - if string(jsonUpdateConnectorRequestServicenowItom) == "{}" { // empty struct - dst.UpdateConnectorRequestServicenowItom = nil - } else { - match++ - } - } else { - dst.UpdateConnectorRequestServicenowItom = nil - } - - // try to unmarshal data into UpdateConnectorRequestSwimlane - err = json.Unmarshal(data, &dst.UpdateConnectorRequestSwimlane) - if err == nil { - jsonUpdateConnectorRequestSwimlane, _ := json.Marshal(dst.UpdateConnectorRequestSwimlane) - if string(jsonUpdateConnectorRequestSwimlane) == "{}" { // empty struct - dst.UpdateConnectorRequestSwimlane = nil - } else { - match++ - } - } else { - dst.UpdateConnectorRequestSwimlane = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.UpdateConnectorRequestCasesWebhook = nil - dst.UpdateConnectorRequestIndex = nil - dst.UpdateConnectorRequestJira = nil - dst.UpdateConnectorRequestOpsgenie = nil - dst.UpdateConnectorRequestResilient = nil - dst.UpdateConnectorRequestServerlog = nil - dst.UpdateConnectorRequestServicenow = nil - dst.UpdateConnectorRequestServicenowItom = nil - dst.UpdateConnectorRequestSwimlane = nil - - return fmt.Errorf("data matches more than one schema in oneOf(UpdateConnectorRequestBodyProperties)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(UpdateConnectorRequestBodyProperties)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src UpdateConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { - if src.UpdateConnectorRequestCasesWebhook != nil { - return json.Marshal(&src.UpdateConnectorRequestCasesWebhook) - } - - if src.UpdateConnectorRequestIndex != nil { - return json.Marshal(&src.UpdateConnectorRequestIndex) - } - - if src.UpdateConnectorRequestJira != nil { - return json.Marshal(&src.UpdateConnectorRequestJira) - } - - if src.UpdateConnectorRequestOpsgenie != nil { - return json.Marshal(&src.UpdateConnectorRequestOpsgenie) - } - - if src.UpdateConnectorRequestResilient != nil { - return json.Marshal(&src.UpdateConnectorRequestResilient) - } - - if src.UpdateConnectorRequestServerlog != nil { - return json.Marshal(&src.UpdateConnectorRequestServerlog) - } - - if src.UpdateConnectorRequestServicenow != nil { - return json.Marshal(&src.UpdateConnectorRequestServicenow) - } - - if src.UpdateConnectorRequestServicenowItom != nil { - return json.Marshal(&src.UpdateConnectorRequestServicenowItom) - } - - if src.UpdateConnectorRequestSwimlane != nil { - return json.Marshal(&src.UpdateConnectorRequestSwimlane) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *UpdateConnectorRequestBodyProperties) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.UpdateConnectorRequestCasesWebhook != nil { - return obj.UpdateConnectorRequestCasesWebhook - } - - if obj.UpdateConnectorRequestIndex != nil { - return obj.UpdateConnectorRequestIndex - } - - if obj.UpdateConnectorRequestJira != nil { - return obj.UpdateConnectorRequestJira - } - - if obj.UpdateConnectorRequestOpsgenie != nil { - return obj.UpdateConnectorRequestOpsgenie - } - - if obj.UpdateConnectorRequestResilient != nil { - return obj.UpdateConnectorRequestResilient - } - - if obj.UpdateConnectorRequestServerlog != nil { - return obj.UpdateConnectorRequestServerlog - } - - if obj.UpdateConnectorRequestServicenow != nil { - return obj.UpdateConnectorRequestServicenow - } - - if obj.UpdateConnectorRequestServicenowItom != nil { - return obj.UpdateConnectorRequestServicenowItom - } - - if obj.UpdateConnectorRequestSwimlane != nil { - return obj.UpdateConnectorRequestSwimlane - } - - // all schemas are nil - return nil -} - -type NullableUpdateConnectorRequestBodyProperties struct { - value *UpdateConnectorRequestBodyProperties - isSet bool -} - -func (v NullableUpdateConnectorRequestBodyProperties) Get() *UpdateConnectorRequestBodyProperties { - return v.value -} - -func (v *NullableUpdateConnectorRequestBodyProperties) Set(val *UpdateConnectorRequestBodyProperties) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateConnectorRequestBodyProperties) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateConnectorRequestBodyProperties) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateConnectorRequestBodyProperties(val *UpdateConnectorRequestBodyProperties) *NullableUpdateConnectorRequestBodyProperties { - return &NullableUpdateConnectorRequestBodyProperties{value: val, isSet: true} -} - -func (v NullableUpdateConnectorRequestBodyProperties) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateConnectorRequestBodyProperties) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + UpdateConnectorRequestCasesWebhook + UpdateConnectorRequestIndex + UpdateConnectorRequestJira + UpdateConnectorRequestOpsgenie + UpdateConnectorRequestResilient + UpdateConnectorRequestServerlog + UpdateConnectorRequestServicenow + UpdateConnectorRequestServicenowItom + UpdateConnectorRequestSwimlane } diff --git a/generated/kibanaactions/model_update_connector_request_cases_webhook.go b/generated/kibanaactions/model_update_connector_request_cases_webhook.go index 34266f507..3d47abbc4 100644 --- a/generated/kibanaactions/model_update_connector_request_cases_webhook.go +++ b/generated/kibanaactions/model_update_connector_request_cases_webhook.go @@ -1,179 +1,16 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the UpdateConnectorRequestCasesWebhook type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateConnectorRequestCasesWebhook{} - -// UpdateConnectorRequestCasesWebhook struct for UpdateConnectorRequestCasesWebhook type UpdateConnectorRequestCasesWebhook struct { - Config ConfigPropertiesCasesWebhook `json:"config"` + Config *ConfigPropertiesCasesWebhook `json:"config"` // The display name for the connector. Name string `json:"name"` Secrets *SecretsPropertiesCasesWebhook `json:"secrets,omitempty"` } - -// NewUpdateConnectorRequestCasesWebhook instantiates a new UpdateConnectorRequestCasesWebhook object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdateConnectorRequestCasesWebhook(config ConfigPropertiesCasesWebhook, name string) *UpdateConnectorRequestCasesWebhook { - this := UpdateConnectorRequestCasesWebhook{} - this.Config = config - this.Name = name - return &this -} - -// NewUpdateConnectorRequestCasesWebhookWithDefaults instantiates a new UpdateConnectorRequestCasesWebhook object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdateConnectorRequestCasesWebhookWithDefaults() *UpdateConnectorRequestCasesWebhook { - this := UpdateConnectorRequestCasesWebhook{} - return &this -} - -// GetConfig returns the Config field value -func (o *UpdateConnectorRequestCasesWebhook) GetConfig() ConfigPropertiesCasesWebhook { - if o == nil { - var ret ConfigPropertiesCasesWebhook - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestCasesWebhook) GetConfigOk() (*ConfigPropertiesCasesWebhook, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *UpdateConnectorRequestCasesWebhook) SetConfig(v ConfigPropertiesCasesWebhook) { - o.Config = v -} - -// GetName returns the Name field value -func (o *UpdateConnectorRequestCasesWebhook) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestCasesWebhook) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *UpdateConnectorRequestCasesWebhook) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value if set, zero value otherwise. -func (o *UpdateConnectorRequestCasesWebhook) GetSecrets() SecretsPropertiesCasesWebhook { - if o == nil || IsNil(o.Secrets) { - var ret SecretsPropertiesCasesWebhook - return ret - } - return *o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestCasesWebhook) GetSecretsOk() (*SecretsPropertiesCasesWebhook, bool) { - if o == nil || IsNil(o.Secrets) { - return nil, false - } - return o.Secrets, true -} - -// HasSecrets returns a boolean if a field has been set. -func (o *UpdateConnectorRequestCasesWebhook) HasSecrets() bool { - if o != nil && !IsNil(o.Secrets) { - return true - } - - return false -} - -// SetSecrets gets a reference to the given SecretsPropertiesCasesWebhook and assigns it to the Secrets field. -func (o *UpdateConnectorRequestCasesWebhook) SetSecrets(v SecretsPropertiesCasesWebhook) { - o.Secrets = &v -} - -func (o UpdateConnectorRequestCasesWebhook) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateConnectorRequestCasesWebhook) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["name"] = o.Name - if !IsNil(o.Secrets) { - toSerialize["secrets"] = o.Secrets - } - return toSerialize, nil -} - -type NullableUpdateConnectorRequestCasesWebhook struct { - value *UpdateConnectorRequestCasesWebhook - isSet bool -} - -func (v NullableUpdateConnectorRequestCasesWebhook) Get() *UpdateConnectorRequestCasesWebhook { - return v.value -} - -func (v *NullableUpdateConnectorRequestCasesWebhook) Set(val *UpdateConnectorRequestCasesWebhook) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateConnectorRequestCasesWebhook) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateConnectorRequestCasesWebhook) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateConnectorRequestCasesWebhook(val *UpdateConnectorRequestCasesWebhook) *NullableUpdateConnectorRequestCasesWebhook { - return &NullableUpdateConnectorRequestCasesWebhook{value: val, isSet: true} -} - -func (v NullableUpdateConnectorRequestCasesWebhook) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateConnectorRequestCasesWebhook) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_update_connector_request_index.go b/generated/kibanaactions/model_update_connector_request_index.go index 3c5908d2e..1e32405ec 100644 --- a/generated/kibanaactions/model_update_connector_request_index.go +++ b/generated/kibanaactions/model_update_connector_request_index.go @@ -1,143 +1,15 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the UpdateConnectorRequestIndex type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateConnectorRequestIndex{} - -// UpdateConnectorRequestIndex struct for UpdateConnectorRequestIndex type UpdateConnectorRequestIndex struct { - Config ConfigPropertiesIndex `json:"config"` + Config *ConfigPropertiesIndex `json:"config"` // The display name for the connector. Name string `json:"name"` } - -// NewUpdateConnectorRequestIndex instantiates a new UpdateConnectorRequestIndex object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdateConnectorRequestIndex(config ConfigPropertiesIndex, name string) *UpdateConnectorRequestIndex { - this := UpdateConnectorRequestIndex{} - this.Config = config - this.Name = name - return &this -} - -// NewUpdateConnectorRequestIndexWithDefaults instantiates a new UpdateConnectorRequestIndex object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdateConnectorRequestIndexWithDefaults() *UpdateConnectorRequestIndex { - this := UpdateConnectorRequestIndex{} - return &this -} - -// GetConfig returns the Config field value -func (o *UpdateConnectorRequestIndex) GetConfig() ConfigPropertiesIndex { - if o == nil { - var ret ConfigPropertiesIndex - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestIndex) GetConfigOk() (*ConfigPropertiesIndex, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *UpdateConnectorRequestIndex) SetConfig(v ConfigPropertiesIndex) { - o.Config = v -} - -// GetName returns the Name field value -func (o *UpdateConnectorRequestIndex) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestIndex) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *UpdateConnectorRequestIndex) SetName(v string) { - o.Name = v -} - -func (o UpdateConnectorRequestIndex) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateConnectorRequestIndex) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableUpdateConnectorRequestIndex struct { - value *UpdateConnectorRequestIndex - isSet bool -} - -func (v NullableUpdateConnectorRequestIndex) Get() *UpdateConnectorRequestIndex { - return v.value -} - -func (v *NullableUpdateConnectorRequestIndex) Set(val *UpdateConnectorRequestIndex) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateConnectorRequestIndex) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateConnectorRequestIndex) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateConnectorRequestIndex(val *UpdateConnectorRequestIndex) *NullableUpdateConnectorRequestIndex { - return &NullableUpdateConnectorRequestIndex{value: val, isSet: true} -} - -func (v NullableUpdateConnectorRequestIndex) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateConnectorRequestIndex) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_update_connector_request_jira.go b/generated/kibanaactions/model_update_connector_request_jira.go index 60ee7c859..ef3051b37 100644 --- a/generated/kibanaactions/model_update_connector_request_jira.go +++ b/generated/kibanaactions/model_update_connector_request_jira.go @@ -1,170 +1,16 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the UpdateConnectorRequestJira type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateConnectorRequestJira{} - -// UpdateConnectorRequestJira struct for UpdateConnectorRequestJira type UpdateConnectorRequestJira struct { - Config ConfigPropertiesJira `json:"config"` + Config *ConfigPropertiesJira `json:"config"` // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesJira `json:"secrets"` -} - -// NewUpdateConnectorRequestJira instantiates a new UpdateConnectorRequestJira object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdateConnectorRequestJira(config ConfigPropertiesJira, name string, secrets SecretsPropertiesJira) *UpdateConnectorRequestJira { - this := UpdateConnectorRequestJira{} - this.Config = config - this.Name = name - this.Secrets = secrets - return &this -} - -// NewUpdateConnectorRequestJiraWithDefaults instantiates a new UpdateConnectorRequestJira object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdateConnectorRequestJiraWithDefaults() *UpdateConnectorRequestJira { - this := UpdateConnectorRequestJira{} - return &this -} - -// GetConfig returns the Config field value -func (o *UpdateConnectorRequestJira) GetConfig() ConfigPropertiesJira { - if o == nil { - var ret ConfigPropertiesJira - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestJira) GetConfigOk() (*ConfigPropertiesJira, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *UpdateConnectorRequestJira) SetConfig(v ConfigPropertiesJira) { - o.Config = v -} - -// GetName returns the Name field value -func (o *UpdateConnectorRequestJira) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestJira) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *UpdateConnectorRequestJira) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *UpdateConnectorRequestJira) GetSecrets() SecretsPropertiesJira { - if o == nil { - var ret SecretsPropertiesJira - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestJira) GetSecretsOk() (*SecretsPropertiesJira, bool) { - if o == nil { - return nil, false - } - return &o.Secrets, true -} - -// SetSecrets sets field value -func (o *UpdateConnectorRequestJira) SetSecrets(v SecretsPropertiesJira) { - o.Secrets = v -} - -func (o UpdateConnectorRequestJira) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateConnectorRequestJira) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableUpdateConnectorRequestJira struct { - value *UpdateConnectorRequestJira - isSet bool -} - -func (v NullableUpdateConnectorRequestJira) Get() *UpdateConnectorRequestJira { - return v.value -} - -func (v *NullableUpdateConnectorRequestJira) Set(val *UpdateConnectorRequestJira) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateConnectorRequestJira) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateConnectorRequestJira) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateConnectorRequestJira(val *UpdateConnectorRequestJira) *NullableUpdateConnectorRequestJira { - return &NullableUpdateConnectorRequestJira{value: val, isSet: true} -} - -func (v NullableUpdateConnectorRequestJira) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateConnectorRequestJira) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *SecretsPropertiesJira `json:"secrets"` } diff --git a/generated/kibanaactions/model_update_connector_request_opsgenie.go b/generated/kibanaactions/model_update_connector_request_opsgenie.go index e9761e873..272435980 100644 --- a/generated/kibanaactions/model_update_connector_request_opsgenie.go +++ b/generated/kibanaactions/model_update_connector_request_opsgenie.go @@ -1,170 +1,16 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the UpdateConnectorRequestOpsgenie type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateConnectorRequestOpsgenie{} - -// UpdateConnectorRequestOpsgenie struct for UpdateConnectorRequestOpsgenie type UpdateConnectorRequestOpsgenie struct { - Config ConfigPropertiesOpsgenie `json:"config"` + Config *ConfigPropertiesOpsgenie `json:"config"` // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesOpsgenie `json:"secrets"` -} - -// NewUpdateConnectorRequestOpsgenie instantiates a new UpdateConnectorRequestOpsgenie object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdateConnectorRequestOpsgenie(config ConfigPropertiesOpsgenie, name string, secrets SecretsPropertiesOpsgenie) *UpdateConnectorRequestOpsgenie { - this := UpdateConnectorRequestOpsgenie{} - this.Config = config - this.Name = name - this.Secrets = secrets - return &this -} - -// NewUpdateConnectorRequestOpsgenieWithDefaults instantiates a new UpdateConnectorRequestOpsgenie object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdateConnectorRequestOpsgenieWithDefaults() *UpdateConnectorRequestOpsgenie { - this := UpdateConnectorRequestOpsgenie{} - return &this -} - -// GetConfig returns the Config field value -func (o *UpdateConnectorRequestOpsgenie) GetConfig() ConfigPropertiesOpsgenie { - if o == nil { - var ret ConfigPropertiesOpsgenie - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestOpsgenie) GetConfigOk() (*ConfigPropertiesOpsgenie, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *UpdateConnectorRequestOpsgenie) SetConfig(v ConfigPropertiesOpsgenie) { - o.Config = v -} - -// GetName returns the Name field value -func (o *UpdateConnectorRequestOpsgenie) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestOpsgenie) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *UpdateConnectorRequestOpsgenie) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *UpdateConnectorRequestOpsgenie) GetSecrets() SecretsPropertiesOpsgenie { - if o == nil { - var ret SecretsPropertiesOpsgenie - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestOpsgenie) GetSecretsOk() (*SecretsPropertiesOpsgenie, bool) { - if o == nil { - return nil, false - } - return &o.Secrets, true -} - -// SetSecrets sets field value -func (o *UpdateConnectorRequestOpsgenie) SetSecrets(v SecretsPropertiesOpsgenie) { - o.Secrets = v -} - -func (o UpdateConnectorRequestOpsgenie) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateConnectorRequestOpsgenie) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableUpdateConnectorRequestOpsgenie struct { - value *UpdateConnectorRequestOpsgenie - isSet bool -} - -func (v NullableUpdateConnectorRequestOpsgenie) Get() *UpdateConnectorRequestOpsgenie { - return v.value -} - -func (v *NullableUpdateConnectorRequestOpsgenie) Set(val *UpdateConnectorRequestOpsgenie) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateConnectorRequestOpsgenie) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateConnectorRequestOpsgenie) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateConnectorRequestOpsgenie(val *UpdateConnectorRequestOpsgenie) *NullableUpdateConnectorRequestOpsgenie { - return &NullableUpdateConnectorRequestOpsgenie{value: val, isSet: true} -} - -func (v NullableUpdateConnectorRequestOpsgenie) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateConnectorRequestOpsgenie) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *SecretsPropertiesOpsgenie `json:"secrets"` } diff --git a/generated/kibanaactions/model_update_connector_request_resilient.go b/generated/kibanaactions/model_update_connector_request_resilient.go index 18a64c24c..bc0e3ffa2 100644 --- a/generated/kibanaactions/model_update_connector_request_resilient.go +++ b/generated/kibanaactions/model_update_connector_request_resilient.go @@ -1,170 +1,16 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the UpdateConnectorRequestResilient type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateConnectorRequestResilient{} - -// UpdateConnectorRequestResilient struct for UpdateConnectorRequestResilient type UpdateConnectorRequestResilient struct { - Config ConfigPropertiesResilient `json:"config"` + Config *ConfigPropertiesResilient `json:"config"` // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesResilient `json:"secrets"` -} - -// NewUpdateConnectorRequestResilient instantiates a new UpdateConnectorRequestResilient object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdateConnectorRequestResilient(config ConfigPropertiesResilient, name string, secrets SecretsPropertiesResilient) *UpdateConnectorRequestResilient { - this := UpdateConnectorRequestResilient{} - this.Config = config - this.Name = name - this.Secrets = secrets - return &this -} - -// NewUpdateConnectorRequestResilientWithDefaults instantiates a new UpdateConnectorRequestResilient object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdateConnectorRequestResilientWithDefaults() *UpdateConnectorRequestResilient { - this := UpdateConnectorRequestResilient{} - return &this -} - -// GetConfig returns the Config field value -func (o *UpdateConnectorRequestResilient) GetConfig() ConfigPropertiesResilient { - if o == nil { - var ret ConfigPropertiesResilient - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestResilient) GetConfigOk() (*ConfigPropertiesResilient, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *UpdateConnectorRequestResilient) SetConfig(v ConfigPropertiesResilient) { - o.Config = v -} - -// GetName returns the Name field value -func (o *UpdateConnectorRequestResilient) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestResilient) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *UpdateConnectorRequestResilient) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *UpdateConnectorRequestResilient) GetSecrets() SecretsPropertiesResilient { - if o == nil { - var ret SecretsPropertiesResilient - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestResilient) GetSecretsOk() (*SecretsPropertiesResilient, bool) { - if o == nil { - return nil, false - } - return &o.Secrets, true -} - -// SetSecrets sets field value -func (o *UpdateConnectorRequestResilient) SetSecrets(v SecretsPropertiesResilient) { - o.Secrets = v -} - -func (o UpdateConnectorRequestResilient) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateConnectorRequestResilient) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableUpdateConnectorRequestResilient struct { - value *UpdateConnectorRequestResilient - isSet bool -} - -func (v NullableUpdateConnectorRequestResilient) Get() *UpdateConnectorRequestResilient { - return v.value -} - -func (v *NullableUpdateConnectorRequestResilient) Set(val *UpdateConnectorRequestResilient) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateConnectorRequestResilient) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateConnectorRequestResilient) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateConnectorRequestResilient(val *UpdateConnectorRequestResilient) *NullableUpdateConnectorRequestResilient { - return &NullableUpdateConnectorRequestResilient{value: val, isSet: true} -} - -func (v NullableUpdateConnectorRequestResilient) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateConnectorRequestResilient) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *SecretsPropertiesResilient `json:"secrets"` } diff --git a/generated/kibanaactions/model_update_connector_request_serverlog.go b/generated/kibanaactions/model_update_connector_request_serverlog.go index cb0a3ebcb..37851361b 100644 --- a/generated/kibanaactions/model_update_connector_request_serverlog.go +++ b/generated/kibanaactions/model_update_connector_request_serverlog.go @@ -1,116 +1,14 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the UpdateConnectorRequestServerlog type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateConnectorRequestServerlog{} - -// UpdateConnectorRequestServerlog struct for UpdateConnectorRequestServerlog type UpdateConnectorRequestServerlog struct { // The display name for the connector. Name string `json:"name"` } - -// NewUpdateConnectorRequestServerlog instantiates a new UpdateConnectorRequestServerlog object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdateConnectorRequestServerlog(name string) *UpdateConnectorRequestServerlog { - this := UpdateConnectorRequestServerlog{} - this.Name = name - return &this -} - -// NewUpdateConnectorRequestServerlogWithDefaults instantiates a new UpdateConnectorRequestServerlog object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdateConnectorRequestServerlogWithDefaults() *UpdateConnectorRequestServerlog { - this := UpdateConnectorRequestServerlog{} - return &this -} - -// GetName returns the Name field value -func (o *UpdateConnectorRequestServerlog) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestServerlog) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *UpdateConnectorRequestServerlog) SetName(v string) { - o.Name = v -} - -func (o UpdateConnectorRequestServerlog) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateConnectorRequestServerlog) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableUpdateConnectorRequestServerlog struct { - value *UpdateConnectorRequestServerlog - isSet bool -} - -func (v NullableUpdateConnectorRequestServerlog) Get() *UpdateConnectorRequestServerlog { - return v.value -} - -func (v *NullableUpdateConnectorRequestServerlog) Set(val *UpdateConnectorRequestServerlog) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateConnectorRequestServerlog) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateConnectorRequestServerlog) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateConnectorRequestServerlog(val *UpdateConnectorRequestServerlog) *NullableUpdateConnectorRequestServerlog { - return &NullableUpdateConnectorRequestServerlog{value: val, isSet: true} -} - -func (v NullableUpdateConnectorRequestServerlog) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateConnectorRequestServerlog) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/kibanaactions/model_update_connector_request_servicenow.go b/generated/kibanaactions/model_update_connector_request_servicenow.go index 1853a9460..de8e8210a 100644 --- a/generated/kibanaactions/model_update_connector_request_servicenow.go +++ b/generated/kibanaactions/model_update_connector_request_servicenow.go @@ -1,170 +1,16 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the UpdateConnectorRequestServicenow type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateConnectorRequestServicenow{} - -// UpdateConnectorRequestServicenow struct for UpdateConnectorRequestServicenow type UpdateConnectorRequestServicenow struct { - Config ConfigPropertiesServicenow `json:"config"` + Config *ConfigPropertiesServicenow `json:"config"` // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesServicenow `json:"secrets"` -} - -// NewUpdateConnectorRequestServicenow instantiates a new UpdateConnectorRequestServicenow object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdateConnectorRequestServicenow(config ConfigPropertiesServicenow, name string, secrets SecretsPropertiesServicenow) *UpdateConnectorRequestServicenow { - this := UpdateConnectorRequestServicenow{} - this.Config = config - this.Name = name - this.Secrets = secrets - return &this -} - -// NewUpdateConnectorRequestServicenowWithDefaults instantiates a new UpdateConnectorRequestServicenow object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdateConnectorRequestServicenowWithDefaults() *UpdateConnectorRequestServicenow { - this := UpdateConnectorRequestServicenow{} - return &this -} - -// GetConfig returns the Config field value -func (o *UpdateConnectorRequestServicenow) GetConfig() ConfigPropertiesServicenow { - if o == nil { - var ret ConfigPropertiesServicenow - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestServicenow) GetConfigOk() (*ConfigPropertiesServicenow, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *UpdateConnectorRequestServicenow) SetConfig(v ConfigPropertiesServicenow) { - o.Config = v -} - -// GetName returns the Name field value -func (o *UpdateConnectorRequestServicenow) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestServicenow) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *UpdateConnectorRequestServicenow) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *UpdateConnectorRequestServicenow) GetSecrets() SecretsPropertiesServicenow { - if o == nil { - var ret SecretsPropertiesServicenow - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestServicenow) GetSecretsOk() (*SecretsPropertiesServicenow, bool) { - if o == nil { - return nil, false - } - return &o.Secrets, true -} - -// SetSecrets sets field value -func (o *UpdateConnectorRequestServicenow) SetSecrets(v SecretsPropertiesServicenow) { - o.Secrets = v -} - -func (o UpdateConnectorRequestServicenow) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateConnectorRequestServicenow) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableUpdateConnectorRequestServicenow struct { - value *UpdateConnectorRequestServicenow - isSet bool -} - -func (v NullableUpdateConnectorRequestServicenow) Get() *UpdateConnectorRequestServicenow { - return v.value -} - -func (v *NullableUpdateConnectorRequestServicenow) Set(val *UpdateConnectorRequestServicenow) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateConnectorRequestServicenow) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateConnectorRequestServicenow) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateConnectorRequestServicenow(val *UpdateConnectorRequestServicenow) *NullableUpdateConnectorRequestServicenow { - return &NullableUpdateConnectorRequestServicenow{value: val, isSet: true} -} - -func (v NullableUpdateConnectorRequestServicenow) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateConnectorRequestServicenow) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *SecretsPropertiesServicenow `json:"secrets"` } diff --git a/generated/kibanaactions/model_update_connector_request_servicenow_itom.go b/generated/kibanaactions/model_update_connector_request_servicenow_itom.go index d99ef90b2..e583a6c27 100644 --- a/generated/kibanaactions/model_update_connector_request_servicenow_itom.go +++ b/generated/kibanaactions/model_update_connector_request_servicenow_itom.go @@ -1,170 +1,16 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the UpdateConnectorRequestServicenowItom type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateConnectorRequestServicenowItom{} - -// UpdateConnectorRequestServicenowItom struct for UpdateConnectorRequestServicenowItom type UpdateConnectorRequestServicenowItom struct { - Config ConfigPropertiesServicenowItom `json:"config"` + Config *ConfigPropertiesServicenowItom `json:"config"` // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesServicenow `json:"secrets"` -} - -// NewUpdateConnectorRequestServicenowItom instantiates a new UpdateConnectorRequestServicenowItom object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdateConnectorRequestServicenowItom(config ConfigPropertiesServicenowItom, name string, secrets SecretsPropertiesServicenow) *UpdateConnectorRequestServicenowItom { - this := UpdateConnectorRequestServicenowItom{} - this.Config = config - this.Name = name - this.Secrets = secrets - return &this -} - -// NewUpdateConnectorRequestServicenowItomWithDefaults instantiates a new UpdateConnectorRequestServicenowItom object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdateConnectorRequestServicenowItomWithDefaults() *UpdateConnectorRequestServicenowItom { - this := UpdateConnectorRequestServicenowItom{} - return &this -} - -// GetConfig returns the Config field value -func (o *UpdateConnectorRequestServicenowItom) GetConfig() ConfigPropertiesServicenowItom { - if o == nil { - var ret ConfigPropertiesServicenowItom - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestServicenowItom) GetConfigOk() (*ConfigPropertiesServicenowItom, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *UpdateConnectorRequestServicenowItom) SetConfig(v ConfigPropertiesServicenowItom) { - o.Config = v -} - -// GetName returns the Name field value -func (o *UpdateConnectorRequestServicenowItom) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestServicenowItom) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *UpdateConnectorRequestServicenowItom) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *UpdateConnectorRequestServicenowItom) GetSecrets() SecretsPropertiesServicenow { - if o == nil { - var ret SecretsPropertiesServicenow - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestServicenowItom) GetSecretsOk() (*SecretsPropertiesServicenow, bool) { - if o == nil { - return nil, false - } - return &o.Secrets, true -} - -// SetSecrets sets field value -func (o *UpdateConnectorRequestServicenowItom) SetSecrets(v SecretsPropertiesServicenow) { - o.Secrets = v -} - -func (o UpdateConnectorRequestServicenowItom) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateConnectorRequestServicenowItom) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableUpdateConnectorRequestServicenowItom struct { - value *UpdateConnectorRequestServicenowItom - isSet bool -} - -func (v NullableUpdateConnectorRequestServicenowItom) Get() *UpdateConnectorRequestServicenowItom { - return v.value -} - -func (v *NullableUpdateConnectorRequestServicenowItom) Set(val *UpdateConnectorRequestServicenowItom) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateConnectorRequestServicenowItom) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateConnectorRequestServicenowItom) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateConnectorRequestServicenowItom(val *UpdateConnectorRequestServicenowItom) *NullableUpdateConnectorRequestServicenowItom { - return &NullableUpdateConnectorRequestServicenowItom{value: val, isSet: true} -} - -func (v NullableUpdateConnectorRequestServicenowItom) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateConnectorRequestServicenowItom) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *SecretsPropertiesServicenow `json:"secrets"` } diff --git a/generated/kibanaactions/model_update_connector_request_swimlane.go b/generated/kibanaactions/model_update_connector_request_swimlane.go index 970750e50..95bf458da 100644 --- a/generated/kibanaactions/model_update_connector_request_swimlane.go +++ b/generated/kibanaactions/model_update_connector_request_swimlane.go @@ -1,170 +1,16 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions -import ( - "encoding/json" -) - -// checks if the UpdateConnectorRequestSwimlane type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateConnectorRequestSwimlane{} - -// UpdateConnectorRequestSwimlane struct for UpdateConnectorRequestSwimlane type UpdateConnectorRequestSwimlane struct { - Config ConfigPropertiesSwimlane `json:"config"` + Config *ConfigPropertiesSwimlane `json:"config"` // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesSwimlane `json:"secrets"` -} - -// NewUpdateConnectorRequestSwimlane instantiates a new UpdateConnectorRequestSwimlane object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUpdateConnectorRequestSwimlane(config ConfigPropertiesSwimlane, name string, secrets SecretsPropertiesSwimlane) *UpdateConnectorRequestSwimlane { - this := UpdateConnectorRequestSwimlane{} - this.Config = config - this.Name = name - this.Secrets = secrets - return &this -} - -// NewUpdateConnectorRequestSwimlaneWithDefaults instantiates a new UpdateConnectorRequestSwimlane object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUpdateConnectorRequestSwimlaneWithDefaults() *UpdateConnectorRequestSwimlane { - this := UpdateConnectorRequestSwimlane{} - return &this -} - -// GetConfig returns the Config field value -func (o *UpdateConnectorRequestSwimlane) GetConfig() ConfigPropertiesSwimlane { - if o == nil { - var ret ConfigPropertiesSwimlane - return ret - } - - return o.Config -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestSwimlane) GetConfigOk() (*ConfigPropertiesSwimlane, bool) { - if o == nil { - return nil, false - } - return &o.Config, true -} - -// SetConfig sets field value -func (o *UpdateConnectorRequestSwimlane) SetConfig(v ConfigPropertiesSwimlane) { - o.Config = v -} - -// GetName returns the Name field value -func (o *UpdateConnectorRequestSwimlane) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestSwimlane) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *UpdateConnectorRequestSwimlane) SetName(v string) { - o.Name = v -} - -// GetSecrets returns the Secrets field value -func (o *UpdateConnectorRequestSwimlane) GetSecrets() SecretsPropertiesSwimlane { - if o == nil { - var ret SecretsPropertiesSwimlane - return ret - } - - return o.Secrets -} - -// GetSecretsOk returns a tuple with the Secrets field value -// and a boolean to check if the value has been set. -func (o *UpdateConnectorRequestSwimlane) GetSecretsOk() (*SecretsPropertiesSwimlane, bool) { - if o == nil { - return nil, false - } - return &o.Secrets, true -} - -// SetSecrets sets field value -func (o *UpdateConnectorRequestSwimlane) SetSecrets(v SecretsPropertiesSwimlane) { - o.Secrets = v -} - -func (o UpdateConnectorRequestSwimlane) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateConnectorRequestSwimlane) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["config"] = o.Config - toSerialize["name"] = o.Name - toSerialize["secrets"] = o.Secrets - return toSerialize, nil -} - -type NullableUpdateConnectorRequestSwimlane struct { - value *UpdateConnectorRequestSwimlane - isSet bool -} - -func (v NullableUpdateConnectorRequestSwimlane) Get() *UpdateConnectorRequestSwimlane { - return v.value -} - -func (v *NullableUpdateConnectorRequestSwimlane) Set(val *UpdateConnectorRequestSwimlane) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateConnectorRequestSwimlane) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateConnectorRequestSwimlane) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateConnectorRequestSwimlane(val *UpdateConnectorRequestSwimlane) *NullableUpdateConnectorRequestSwimlane { - return &NullableUpdateConnectorRequestSwimlane{value: val, isSet: true} -} - -func (v NullableUpdateConnectorRequestSwimlane) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateConnectorRequestSwimlane) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) + Name string `json:"name"` + Secrets *SecretsPropertiesSwimlane `json:"secrets"` } diff --git a/generated/kibanaactions/response.go b/generated/kibanaactions/response.go index 7f6195387..5b96d9e30 100644 --- a/generated/kibanaactions/response.go +++ b/generated/kibanaactions/response.go @@ -1,24 +1,21 @@ /* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - + * Connectors + * + * OpenAPI schema for Connectors endpoints + * + * API version: 0.1 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ package kibanaactions import ( "net/http" ) -// APIResponse stores the API response returned by the server. type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. + // Operation is the name of the swagger operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. @@ -32,14 +29,12 @@ type APIResponse struct { Payload []byte `json:"-"` } -// NewAPIResponse returns a new APIResponse object. func NewAPIResponse(r *http.Response) *APIResponse { response := &APIResponse{Response: r} return response } -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. func NewAPIResponseWithError(errorMessage string) *APIResponse { response := &APIResponse{Message: errorMessage} diff --git a/generated/kibanaactions/utils.go b/generated/kibanaactions/utils.go deleted file mode 100644 index 4cdad30dc..000000000 --- a/generated/kibanaactions/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Connectors - -OpenAPI schema for Connectors endpoints - -API version: 0.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package kibanaactions - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} diff --git a/go.mod b/go.mod index 5979b18ed..6a12a80aa 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/elastic/terraform-provider-elasticstack go 1.19 require ( + github.com/antihax/optional v1.0.0 github.com/disaster37/go-kibana-rest/v8 v8.5.0 github.com/elastic/go-elasticsearch/v7 v7.17.7 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 @@ -12,16 +13,23 @@ require ( github.com/hashicorp/terraform-plugin-mux v0.9.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 github.com/stretchr/testify v1.8.2 + golang.org/x/oauth2 v0.4.0 ) require ( github.com/agext/levenshtein v1.2.3 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/fatih/color v1.13.0 // indirect + github.com/dlclark/regexp2 v1.9.0 // indirect + github.com/fatih/color v1.15.0 // indirect + github.com/ghodss/yaml v1.0.0 // indirect + github.com/go-faster/errors v0.6.1 // indirect + github.com/go-faster/jx v1.0.0 // indirect + github.com/go-faster/yaml v0.4.5 // indirect github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/go-cmp v0.5.9 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-checkpoint v0.5.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -38,27 +46,34 @@ require ( github.com/hashicorp/terraform-svchost v0.0.1 // indirect github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect + github.com/mattn/go-isatty v0.0.18 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/ogen-go/ogen v0.63.0 // indirect github.com/oklog/run v1.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/segmentio/asm v1.2.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/zclconf/go-cty v1.13.1 // indirect + go.uber.org/atomic v1.10.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.24.0 // indirect golang.org/x/crypto v0.7.0 // indirect - golang.org/x/mod v0.8.0 // indirect - golang.org/x/net v0.8.0 // indirect - golang.org/x/sys v0.6.0 // indirect - golang.org/x/text v0.8.0 // indirect + golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect + golang.org/x/mod v0.10.0 // indirect + golang.org/x/net v0.9.0 // indirect + golang.org/x/sys v0.7.0 // indirect + golang.org/x/text v0.9.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect google.golang.org/grpc v1.54.0 // indirect google.golang.org/protobuf v1.30.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index c71dad957..ea512caec 100644 --- a/go.sum +++ b/go.sum @@ -11,6 +11,8 @@ github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= @@ -23,6 +25,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/disaster37/go-kibana-rest/v8 v8.5.0 h1:Wr2CMopHj0wAh7kq3p355jXctISL1LdAZ9kYN/v6abw= github.com/disaster37/go-kibana-rest/v8 v8.5.0/go.mod h1:wVGm1b93CSmsHYoxzqhDszv347xr+fELdigS8XLO+bg= +github.com/dlclark/regexp2 v1.9.0 h1:pTK/l/3qYIKaRXuHnEnIf7Y5NxfRPfpb7dis6/gdlVI= +github.com/dlclark/regexp2 v1.9.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/elastic/go-elasticsearch/v7 v7.17.7 h1:pcYNfITNPusl+cLwLN6OLmVT+F73Els0nbaWOmYachs= github.com/elastic/go-elasticsearch/v7 v7.17.7/go.mod h1:OJ4wdbtDNk5g503kvlHLyErCgQwwzmDtaFC4XyOxXA4= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= @@ -30,8 +34,18 @@ github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3 github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/go-faster/errors v0.6.1 h1:nNIPOBkprlKzkThvS/0YaX8Zs9KewLCOSFQS5BU06FI= +github.com/go-faster/errors v0.6.1/go.mod h1:5MGV2/2T9yvlrbhe9pD9LO5Z/2zCSq2T8j+Jpi2LAyY= +github.com/go-faster/jx v1.0.0 h1:HE+ms2e6ZGkZ6u13t8u+onBinrPvIPI+0hWXGELm74g= +github.com/go-faster/jx v1.0.0/go.mod h1:zm8SlkwK+H0TYNKYtVJ/7cWFS7soJBQWhcPctKyYL/4= +github.com/go-faster/yaml v0.4.5 h1:RIY6f3VoN/p8odzh/n2D4hQBbz2yupplunwoau8s6fE= +github.com/go-faster/yaml v0.4.5/go.mod h1:390dRIvV4zbnO7qC9FGo6YYutc+wyyUSHBgbXL52eXk= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= @@ -55,6 +69,8 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -132,6 +148,8 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= +github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= github.com/mitchellh/cli v1.1.5/go.mod h1:v8+iFts2sPIKUV1ltktPXMCC8fumSKFItNcD2cLtRR4= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= @@ -149,6 +167,8 @@ github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/ogen-go/ogen v0.63.0 h1:ZUaB2YtZkXN+Z5sr4MUZZcX+YdqVE7dVEozYbd8+pNA= +github.com/ogen-go/ogen v0.63.0/go.mod h1:8cZvkJSu85xWMKKgVACenk+bdItsiId46NgA/C+Tp2E= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -156,6 +176,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= +github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= @@ -190,6 +212,12 @@ github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6e github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zclconf/go-cty v1.13.1 h1:0a6bRwuiSHtAmqCqNOE+c2oHgepv0ctoxU4FUe43kwc= github.com/zclconf/go-cty v1.13.1/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= +go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= +go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -200,10 +228,14 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -214,6 +246,10 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= +golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= +golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -241,10 +277,13 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= +golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -253,6 +292,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= @@ -280,6 +321,8 @@ gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/internal/clients/api_client.go b/internal/clients/api_client.go index 7713f6d8e..bebad7279 100644 --- a/internal/clients/api_client.go +++ b/internal/clients/api_client.go @@ -63,7 +63,7 @@ type ApiClient struct { elasticsearchClusterInfo *models.ClusterInfo kibana *kibana.Client alerting alerting.AlertingApi - actionConnectors kibanaactions.ConnectorsApi + actionConnectors *kibanaactions.ConnectorsApiService kibanaConfig kibana.Config version string } @@ -122,11 +122,13 @@ func NewAcceptanceTestingClient() (*ApiClient, error) { return nil, err } + actionConnectors := buildActionConnectorClient(baseConfig, kibanaConfig) + return &ApiClient{ elasticsearch: es, kibana: kib, alerting: buildAlertingClient(baseConfig, kibanaConfig).AlertingApi, - actionConnectors: buildActionConnectorClient(baseConfig, kibanaConfig).ConnectorsApi, + actionConnectors: actionConnectors, kibanaConfig: kibanaConfig, version: "acceptance-testing", }, @@ -192,7 +194,7 @@ func (a *ApiClient) GetAlertingClient() (alerting.AlertingApi, error) { return a.alerting, nil } -func (a *ApiClient) GetKibanaActionConnectorClient(ctx context.Context) (kibanaactions.ConnectorsApi, context.Context, error) { +func (a *ApiClient) GetKibanaActionConnectorClient(ctx context.Context) (*kibanaactions.ConnectorsApiService, context.Context, error) { if a.actionConnectors == nil { return nil, nil, errors.New("kibana action connector client not found") } @@ -519,23 +521,17 @@ func buildAlertingClient(baseConfig BaseConfig, config kibana.Config) *alerting. return alerting.NewAPIClient(&alertingConfig) } -func buildActionConnectorClient(baseConfig BaseConfig, config kibana.Config) *kibanaactions.APIClient { +func buildActionConnectorClient(baseConfig BaseConfig, config kibana.Config) *kibanaactions.ConnectorsApiService { connectorsConfig := kibanaactions.Configuration{ UserAgent: baseConfig.UserAgent, - Servers: kibanaactions.ServerConfigurations{ - { - URL: config.Address, - }, - }, - Debug: logging.IsDebugOrHigher(), + BasePath: config.Address, } - return kibanaactions.NewAPIClient(&connectorsConfig) + return kibanaactions.NewAPIClient(&connectorsConfig).ConnectorsApi } const esKey string = "elasticsearch" func newApiClient(d *schema.ResourceData, version string) (*ApiClient, diag.Diagnostics) { - var diags diag.Diagnostics baseConfig := buildBaseConfig(d, version, esKey) kibanaConfig, diags := buildKibanaConfig(d, baseConfig) if diags.HasError() { @@ -562,7 +558,7 @@ func newApiClient(d *schema.ResourceData, version string) (*ApiClient, diag.Diag kibana: kibanaClient, kibanaConfig: kibanaConfig, alerting: alertingClient.AlertingApi, - actionConnectors: actionConnectorClient.ConnectorsApi, + actionConnectors: actionConnectorClient, version: version, - }, diags + }, nil } diff --git a/internal/clients/kibana/action_connector.go b/internal/clients/kibana/action_connector.go index 7798bbf5c..61e1ba43a 100644 --- a/internal/clients/kibana/action_connector.go +++ b/internal/clients/kibana/action_connector.go @@ -3,6 +3,7 @@ package kibana import ( "context" "encoding/json" + "errors" "fmt" "net/http" @@ -24,23 +25,25 @@ func CreateActionConnector(ctx context.Context, apiClient *clients.ApiClient, co return "", diag.FromErr(err) } - req := client.CreateConnector(ctxWithAuth, connectorOld.SpaceID).KbnXsrf("true").CreateConnectorRequestBodyProperties(createProperties) - - responseProperties, httpRes, err := req.Execute() - if err != nil && httpRes == nil { + responseProperties, httpRes, err := client.CreateConnector(ctxWithAuth, createProperties, "true", connectorOld.SpaceID) + if err != nil { + var swagErr kibanaactions.GenericSwaggerError + if errors.As(err, &swagErr) { + return "", diag.FromErr(fmt.Errorf("%s", string(swagErr.Body()))) + } return "", diag.FromErr(err) } defer httpRes.Body.Close() - if diags := utils.CheckHttpError(httpRes, "Unabled to create action connector"); diags.HasError() { - return "", diag.FromErr(err) - } + // if diags := utils.CheckHttpError(httpRes, "Unabled to create action connector"); diags.HasError() { + // return "", diag.FromErr(err) + // } - if err != nil { - return "", diag.FromErr(err) - } + // if err != nil { + // return "", diag.FromErr(err) + // } - connectorNew, err := actionConnectorToModel(connectorOld.SpaceID, responseProperties) + connectorNew, err := actionConnectorToModel(connectorOld.SpaceID, responseProperties, connectorOld.ConnectorID) if err != nil { return "", diag.FromErr(err) } @@ -59,9 +62,7 @@ func UpdateActionConnector(ctx context.Context, apiClient *clients.ApiClient, co return "", diag.FromErr(err) } - req := client.UpdateConnector(ctxWithAuth, connectorOld.ConnectorID, connectorOld.SpaceID).KbnXsrf("true").UpdateConnectorRequestBodyProperties(updateProperties) - - responseProperties, httpRes, err := req.Execute() + responseProperties, httpRes, err := client.UpdateConnector(ctxWithAuth, updateProperties, "true", connectorOld.ConnectorID, connectorOld.SpaceID) if err != nil && httpRes == nil { return "", diag.FromErr(err) } @@ -71,7 +72,7 @@ func UpdateActionConnector(ctx context.Context, apiClient *clients.ApiClient, co return "", diags } - connectorNew, err := actionConnectorToModel(connectorOld.SpaceID, responseProperties) + connectorNew, err := actionConnectorToModel(connectorOld.SpaceID, responseProperties, connectorOld.ConnectorTypeID) if err != nil { return "", diag.FromErr(err) } @@ -79,15 +80,13 @@ func UpdateActionConnector(ctx context.Context, apiClient *clients.ApiClient, co return connectorNew.ConnectorID, nil } -func GetActionConnector(ctx context.Context, apiClient *clients.ApiClient, connectorID, spaceID string) (*models.KibanaActionConnector, diag.Diagnostics) { +func GetActionConnector(ctx context.Context, apiClient *clients.ApiClient, connectorID, spaceID string, connectorTypeID string) (*models.KibanaActionConnector, diag.Diagnostics) { client, ctxWithAuth, err := apiClient.GetKibanaActionConnectorClient(ctx) if err != nil { return nil, diag.FromErr(err) } - req := client.GetConnector(ctxWithAuth, connectorID, spaceID) - - properties, res, err := req.Execute() + properties, res, err := client.GetConnector(ctxWithAuth, connectorID, spaceID) if err != nil && res == nil { return nil, diag.FromErr(err) } @@ -101,7 +100,7 @@ func GetActionConnector(ctx context.Context, apiClient *clients.ApiClient, conne return nil, diags } - connector, err := actionConnectorToModel(spaceID, properties) + connector, err := actionConnectorToModel(spaceID, properties, connectorTypeID) if err != nil { return nil, diag.FromErr(err) } @@ -115,8 +114,7 @@ func DeleteActionConnector(ctx context.Context, apiClient *clients.ApiClient, co return diag.FromErr(err) } - req := client.DeleteConnector(ctxWithAuth, connectorID, spaceID).KbnXsrf("true") - res, err := req.Execute() + res, err := client.DeleteConnector(ctxWithAuth, "true", connectorID, spaceID) if err != nil && res == nil { return diag.FromErr(err) } @@ -126,38 +124,33 @@ func DeleteActionConnector(ctx context.Context, apiClient *clients.ApiClient, co } func createConnectorRequestBodyProperties(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { - connectorType, err := kibanaactions.NewConnectorTypesFromValue(connector.ConnectorTypeID) - if err != nil { - return kibanaactions.CreateConnectorRequestBodyProperties{}, err - } - - switch *connectorType { - case kibanaactions.CASES_WEBHOOK: - return createConnectorRequestCasesWebhook(connector) - // case kibanaactions.EMAIL: - // return createConnectorRequestEmail(connector) - case kibanaactions.INDEX: + switch kibanaactions.ConnectorTypes(connector.ConnectorTypeID) { + // case kibanaactions.CASES_WEBHOOK_ConnectorTypes: + // return createConnectorRequestCasesWebhook(connector) + // case kibanaactions.EMAIL_ConnectorTypes: + // return createConnectorRequestEmail(connector) + case kibanaactions.INDEX_ConnectorTypes: return createConnectorRequestIndex(connector) - case kibanaactions.JIRA: - return createConnectorRequestJira(connector) - case kibanaactions.OPSGENIE: - return createConnectorRequestOpsgenie(connector) - // case kibanaactions.PAGERDUTY: - // return createConnectorRequestPagerduty(connector) - case kibanaactions.RESILIENT: - return createConnectorRequestResilient(connector) - case kibanaactions.SERVICENOW: - return createConnectorRequestServicenow(connector) - case kibanaactions.SERVICENOW_ITOM: - return createConnectorRequestServicenowItom(connector) - // case kibanaactions.SERVICENOW_SIR: - // return createConnectorRequestServicenowSir(connector) - case kibanaactions.SERVER_LOG: - return createConnectorRequestServerLog(connector) - // case kibanaactions.SLACK: - // return createConnectorRequestSlack(connector) - case kibanaactions.SWIMLANE: - return createConnectorRequestSwimlane(connector) + // case kibanaactions.JIRA_ConnectorTypes: + // return createConnectorRequestJira(connector) + // case kibanaactions.OPSGENIE_ConnectorTypes: + // return createConnectorRequestOpsgenie(connector) + // case kibanaactions.PAGERDUTY: + // return createConnectorRequestPagerduty(connector) + // case kibanaactions.RESILIENT_ConnectorTypes: + // return createConnectorRequestResilient(connector) + // case kibanaactions.SERVICENOW_ConnectorTypes: + // return createConnectorRequestServicenow(connector) + // case kibanaactions.SERVICENOW_ITOM_ConnectorTypes: + // return createConnectorRequestServicenowItom(connector) + // case kibanaactions.SERVICENOW_SIR: + // return createConnectorRequestServicenowSir(connector) + // case kibanaactions.SERVER_LOG_ConnectorTypes: + // return createConnectorRequestServerLog(connector) + // case kibanaactions.SLACK: + // return createConnectorRequestSlack(connector) + // case kibanaactions.SWIMLANE_ConnectorTypes: + // return createConnectorRequestSwimlane(connector) // case kibanaactions.TEAMS: // return createConnectorRequestTeams(connector) // case kibanaactions.TINES: @@ -172,38 +165,33 @@ func createConnectorRequestBodyProperties(connector models.KibanaActionConnector } func updateConnectorRequestBodyProperties(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { - connectorType, err := kibanaactions.NewConnectorTypesFromValue(connector.ConnectorTypeID) - if err != nil { - return kibanaactions.UpdateConnectorRequestBodyProperties{}, err - } - - switch *connectorType { - case kibanaactions.CASES_WEBHOOK: - return updateConnectorRequestCasesWebhook(connector) + switch kibanaactions.ConnectorTypes(connector.ConnectorTypeID) { + // case kibanaactions.CASES_WEBHOOK: + // return updateConnectorRequestCasesWebhook(connector) // case kibanaactions.EMAIL: // return updateConnectorRequestEmail(connector) - case kibanaactions.INDEX: + case kibanaactions.INDEX_ConnectorTypes: return updateConnectorRequestIndex(connector) - case kibanaactions.JIRA: - return updateConnectorRequestJira(connector) - case kibanaactions.OPSGENIE: - return updateConnectorRequestOpsgenie(connector) - // case kibanaactions.PAGERDUTY: - // return updateConnectorRequestPagerduty(connector) - case kibanaactions.RESILIENT: - return updateConnectorRequestResilient(connector) - case kibanaactions.SERVICENOW: - return updateConnectorRequestServicenow(connector) - case kibanaactions.SERVICENOW_ITOM: - return updateConnectorRequestServicenowItom(connector) - // case kibanaactions.SERVICENOW_SIR: - // return updateConnectorRequestServicenowSir(connector) - case kibanaactions.SERVER_LOG: - return updateConnectorRequestServerLog(connector) - // case kibanaactions.SLACK: - // return updateConnectorRequestSlack(connector) - case kibanaactions.SWIMLANE: - return updateConnectorRequestSwimlane(connector) + // case kibanaactions.JIRA: + // return updateConnectorRequestJira(connector) + // case kibanaactions.OPSGENIE: + // return updateConnectorRequestOpsgenie(connector) + // case kibanaactions.PAGERDUTY: + // return updateConnectorRequestPagerduty(connector) + // case kibanaactions.RESILIENT: + // return updateConnectorRequestResilient(connector) + // case kibanaactions.SERVICENOW: + // return updateConnectorRequestServicenow(connector) + // case kibanaactions.SERVICENOW_ITOM: + // return updateConnectorRequestServicenowItom(connector) + // case kibanaactions.SERVICENOW_SIR: + // return updateConnectorRequestServicenowSir(connector) + // case kibanaactions.SERVER_LOG: + // return updateConnectorRequestServerLog(connector) + // case kibanaactions.SLACK: + // return updateConnectorRequestSlack(connector) + // case kibanaactions.SWIMLANE: + // return updateConnectorRequestSwimlane(connector) // case kibanaactions.TEAMS: // return updateConnectorRequestTeams(connector) // case kibanaactions.TINES: @@ -217,28 +205,28 @@ func updateConnectorRequestBodyProperties(connector models.KibanaActionConnector return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("unknown connector type [%s]", connector.ConnectorTypeID) } -func createConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { - prefixError := "failed to compose create connector request for CasesWebhook" +// func createConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose create connector request for CasesWebhook" - config := kibanaactions.NullableConfigPropertiesCasesWebhook{} - if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { - return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) - } +// config := kibanaactions.NullableConfigPropertiesCasesWebhook{} +// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } - secrets := kibanaactions.NullableSecretsPropertiesCasesWebhook{} - if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { - return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) - } +// secrets := kibanaactions.NullableSecretsPropertiesCasesWebhook{} +// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } - c := kibanaactions.CreateConnectorRequestCasesWebhook{ - ConnectorTypeId: connector.ConnectorTypeID, - Name: connector.Name, - Config: *config.Get(), - Secrets: secrets.Get(), - } +// c := kibanaactions.CreateConnectorRequestCasesWebhook{ +// ConnectorTypeId: connector.ConnectorTypeID, +// Name: connector.Name, +// Config: *config.Get(), +// Secrets: secrets.Get(), +// } - return kibanaactions.CreateConnectorRequestCasesWebhookAsCreateConnectorRequestBodyProperties(&c), nil -} +// return kibanaactions.CreateConnectorRequestCasesWebhookAsCreateConnectorRequestBodyProperties(&c), nil +// } // func createConnectorRequestEmail(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for Email" @@ -266,65 +254,66 @@ func createConnectorRequestCasesWebhook(connector models.KibanaActionConnector) func createConnectorRequestIndex(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { prefixError := "failed to compose create connector request for Index" - config := kibanaactions.NullableConfigPropertiesIndex{} - if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { - return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) - } + var config kibanaactions.ConfigPropertiesIndex - c := kibanaactions.CreateConnectorRequestIndex{ - ConnectorTypeId: connector.ConnectorTypeID, - Name: connector.Name, - Config: *config.Get(), + if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { + return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) } - return kibanaactions.CreateConnectorRequestIndexAsCreateConnectorRequestBodyProperties(&c), nil + return kibanaactions.CreateConnectorRequestBodyProperties{ + CreateConnectorRequestIndex: kibanaactions.CreateConnectorRequestIndex{ + ConnectorTypeId: connector.ConnectorTypeID, + Name: connector.Name, + Config: &config, + }, + }, nil } -func createConnectorRequestJira(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { - prefixError := "failed to compose create connector request for Jira" +// func createConnectorRequestJira(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose create connector request for Jira" - config := kibanaactions.NullableConfigPropertiesJira{} - if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { - return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) - } +// config := kibanaactions.NullableConfigPropertiesJira{} +// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } - secrets := kibanaactions.NullableSecretsPropertiesJira{} - if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { - return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) - } +// secrets := kibanaactions.NullableSecretsPropertiesJira{} +// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } - c := kibanaactions.CreateConnectorRequestJira{ - ConnectorTypeId: connector.ConnectorTypeID, - Name: connector.Name, - Config: *config.Get(), - Secrets: *secrets.Get(), - } +// c := kibanaactions.CreateConnectorRequestJira{ +// ConnectorTypeId: connector.ConnectorTypeID, +// Name: connector.Name, +// Config: *config.Get(), +// Secrets: *secrets.Get(), +// } - return kibanaactions.CreateConnectorRequestJiraAsCreateConnectorRequestBodyProperties(&c), nil -} +// return kibanaactions.CreateConnectorRequestJiraAsCreateConnectorRequestBodyProperties(&c), nil +// } -func createConnectorRequestOpsgenie(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { - prefixError := "failed to compose create connector request for Opsgenie" +// func createConnectorRequestOpsgenie(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose create connector request for Opsgenie" - config := kibanaactions.NullableConfigPropertiesOpsgenie{} - if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { - return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) - } +// config := kibanaactions.NullableConfigPropertiesOpsgenie{} +// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } - secrets := kibanaactions.NullableSecretsPropertiesOpsgenie{} - if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { - return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) - } +// secrets := kibanaactions.NullableSecretsPropertiesOpsgenie{} +// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } - c := kibanaactions.CreateConnectorRequestOpsgenie{ - ConnectorTypeId: connector.ConnectorTypeID, - Name: connector.Name, - Config: *config.Get(), - Secrets: *secrets.Get(), - } +// c := kibanaactions.CreateConnectorRequestOpsgenie{ +// ConnectorTypeId: connector.ConnectorTypeID, +// Name: connector.Name, +// Config: *config.Get(), +// Secrets: *secrets.Get(), +// } - return kibanaactions.CreateConnectorRequestOpsgenieAsCreateConnectorRequestBodyProperties(&c), nil -} +// return kibanaactions.CreateConnectorRequestOpsgenieAsCreateConnectorRequestBodyProperties(&c), nil +// } // func createConnectorRequestPagerduty(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for PagerDuty" @@ -349,74 +338,74 @@ func createConnectorRequestOpsgenie(connector models.KibanaActionConnector) (kib // return kibanaactions.CreateConnectorRequestPagerdutyAsCreateConnectorRequestBodyProperties(&c), nil // } -func createConnectorRequestResilient(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { - prefixError := "failed to compose create connector request for Resilient" +// func createConnectorRequestResilient(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose create connector request for Resilient" - config := kibanaactions.NullableConfigPropertiesResilient{} - if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { - return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) - } +// config := kibanaactions.NullableConfigPropertiesResilient{} +// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } - secrets := kibanaactions.NullableSecretsPropertiesResilient{} - if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { - return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) - } +// secrets := kibanaactions.NullableSecretsPropertiesResilient{} +// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } - c := kibanaactions.CreateConnectorRequestResilient{ - ConnectorTypeId: connector.ConnectorTypeID, - Name: connector.Name, - Config: *config.Get(), - Secrets: *secrets.Get(), - } +// c := kibanaactions.CreateConnectorRequestResilient{ +// ConnectorTypeId: connector.ConnectorTypeID, +// Name: connector.Name, +// Config: *config.Get(), +// Secrets: *secrets.Get(), +// } - return kibanaactions.CreateConnectorRequestResilientAsCreateConnectorRequestBodyProperties(&c), nil -} +// return kibanaactions.CreateConnectorRequestResilientAsCreateConnectorRequestBodyProperties(&c), nil +// } -func createConnectorRequestServicenow(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { - prefixError := "failed to compose create connector request for Servicenow" +// func createConnectorRequestServicenow(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose create connector request for Servicenow" - config := kibanaactions.NullableConfigPropertiesServicenow{} - if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { - return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) - } +// config := kibanaactions.NullableConfigPropertiesServicenow{} +// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } - secrets := kibanaactions.NullableSecretsPropertiesServicenow{} - if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { - return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) - } +// secrets := kibanaactions.NullableSecretsPropertiesServicenow{} +// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } - c := kibanaactions.CreateConnectorRequestServicenow{ - ConnectorTypeId: connector.ConnectorTypeID, - Name: connector.Name, - Config: *config.Get(), - Secrets: *secrets.Get(), - } +// c := kibanaactions.CreateConnectorRequestServicenow{ +// ConnectorTypeId: connector.ConnectorTypeID, +// Name: connector.Name, +// Config: *config.Get(), +// Secrets: *secrets.Get(), +// } - return kibanaactions.CreateConnectorRequestServicenowAsCreateConnectorRequestBodyProperties(&c), nil -} +// return kibanaactions.CreateConnectorRequestServicenowAsCreateConnectorRequestBodyProperties(&c), nil +// } -func createConnectorRequestServicenowItom(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { - prefixError := "failed to compose create connector request for ServicenowItom" +// func createConnectorRequestServicenowItom(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose create connector request for ServicenowItom" - config := kibanaactions.NullableConfigPropertiesServicenowItom{} - if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { - return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) - } +// config := kibanaactions.NullableConfigPropertiesServicenowItom{} +// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } - secrets := kibanaactions.NullableSecretsPropertiesServicenow{} - if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { - return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) - } +// secrets := kibanaactions.NullableSecretsPropertiesServicenow{} +// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } - c := kibanaactions.CreateConnectorRequestServicenowItom{ - ConnectorTypeId: connector.ConnectorTypeID, - Name: connector.Name, - Config: *config.Get(), - Secrets: *secrets.Get(), - } +// c := kibanaactions.CreateConnectorRequestServicenowItom{ +// ConnectorTypeId: connector.ConnectorTypeID, +// Name: connector.Name, +// Config: *config.Get(), +// Secrets: *secrets.Get(), +// } - return kibanaactions.CreateConnectorRequestServicenowItomAsCreateConnectorRequestBodyProperties(&c), nil -} +// return kibanaactions.CreateConnectorRequestServicenowItomAsCreateConnectorRequestBodyProperties(&c), nil +// } // func createConnectorRequestServicenowSir(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for ServicenowSir" @@ -441,14 +430,14 @@ func createConnectorRequestServicenowItom(connector models.KibanaActionConnector // return kibanaactions.CreateConnectorRequestServicenowSirAsCreateConnectorRequestBodyProperties(&c), nil // } -func createConnectorRequestServerLog(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { - c := kibanaactions.CreateConnectorRequestServerlog{ - ConnectorTypeId: connector.ConnectorTypeID, - Name: connector.Name, - } +// func createConnectorRequestServerLog(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// c := kibanaactions.CreateConnectorRequestServerlog{ +// ConnectorTypeId: connector.ConnectorTypeID, +// Name: connector.Name, +// } - return kibanaactions.CreateConnectorRequestServerlogAsCreateConnectorRequestBodyProperties(&c), nil -} +// return kibanaactions.CreateConnectorRequestServerlogAsCreateConnectorRequestBodyProperties(&c), nil +// } // func createConnectorRequestSlack(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for Slack" @@ -467,28 +456,28 @@ func createConnectorRequestServerLog(connector models.KibanaActionConnector) (ki // return kibanaactions.CreateConnectorRequestSlackAsCreateConnectorRequestBodyProperties(&c), nil // } -func createConnectorRequestSwimlane(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { - prefixError := "failed to compose create connector request for Swimlane" +// func createConnectorRequestSwimlane(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose create connector request for Swimlane" - config := kibanaactions.NullableConfigPropertiesSwimlane{} - if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { - return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) - } +// config := kibanaactions.NullableConfigPropertiesSwimlane{} +// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } - secrets := kibanaactions.NullableSecretsPropertiesSwimlane{} - if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { - return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) - } +// secrets := kibanaactions.NullableSecretsPropertiesSwimlane{} +// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { +// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } - c := kibanaactions.CreateConnectorRequestSwimlane{ - ConnectorTypeId: connector.ConnectorTypeID, - Name: connector.Name, - Config: *config.Get(), - Secrets: *secrets.Get(), - } +// c := kibanaactions.CreateConnectorRequestSwimlane{ +// ConnectorTypeId: connector.ConnectorTypeID, +// Name: connector.Name, +// Config: *config.Get(), +// Secrets: *secrets.Get(), +// } - return kibanaactions.CreateConnectorRequestSwimlaneAsCreateConnectorRequestBodyProperties(&c), nil -} +// return kibanaactions.CreateConnectorRequestSwimlaneAsCreateConnectorRequestBodyProperties(&c), nil +// } // func createConnectorRequestTeams(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for Teams" @@ -576,485 +565,483 @@ func createConnectorRequestSwimlane(connector models.KibanaActionConnector) (kib // return kibanaactions.CreateConnectorRequestXmattersAsCreateConnectorRequestBodyProperties(&c), nil // } -func updateConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { - prefixError := "failed to compose update connector request for CasesWebhook" +// func updateConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose update connector request for CasesWebhook" - nullableConfig := kibanaactions.NullableConfigPropertiesCasesWebhook{} - if err := nullableConfig.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { - return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) - } +// nullableConfig := kibanaactions.NullableConfigPropertiesCasesWebhook{} +// if err := nullableConfig.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { +// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } - nullableSecrets := kibanaactions.NullableSecretsPropertiesCasesWebhook{} - if err := nullableSecrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { - return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) - } +// nullableSecrets := kibanaactions.NullableSecretsPropertiesCasesWebhook{} +// if err := nullableSecrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { +// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } - c := kibanaactions.UpdateConnectorRequestCasesWebhook{ - Name: connector.Name, - Config: *nullableConfig.Get(), - Secrets: nullableSecrets.Get(), - } +// return kibanaactions.UpdateConnectorRequestBodyProperties { +// kibanaactions.UpdateConnectorRequestCasesWebhook{ +// Name: connector.Name, +// Config: *nullableConfig.Get(), +// Secrets: nullableSecrets.Get(), +// } - return kibanaactions.UpdateConnectorRequestCasesWebhookAsUpdateConnectorRequestBodyProperties(&c), nil -} +// return kibanaactions.UpdateConnectorRequestCasesWebhookAsUpdateConnectorRequestBodyProperties(&c), nil +// } func updateConnectorRequestIndex(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { prefixError := "failed to compose update connector request for Index" - config := kibanaactions.NullableConfigPropertiesIndex{} - if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { - return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) - } - - c := kibanaactions.UpdateConnectorRequestIndex{ - Name: connector.Name, - Config: *config.Get(), - } - - return kibanaactions.UpdateConnectorRequestIndexAsUpdateConnectorRequestBodyProperties(&c), nil -} - -func updateConnectorRequestJira(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { - prefixError := "failed to compose update connector request for Jira" - - config := kibanaactions.NullableConfigPropertiesJira{} - if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + var config kibanaactions.ConfigPropertiesIndex + if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) } - secrets := kibanaactions.NullableSecretsPropertiesJira{} - if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { - return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) - } - - c := kibanaactions.UpdateConnectorRequestJira{ - Name: connector.Name, - Config: *config.Get(), - Secrets: *secrets.Get(), - } - - return kibanaactions.UpdateConnectorRequestJiraAsUpdateConnectorRequestBodyProperties(&c), nil + return kibanaactions.UpdateConnectorRequestBodyProperties{ + UpdateConnectorRequestIndex: kibanaactions.UpdateConnectorRequestIndex{ + Name: connector.Name, + Config: &config, + }, + }, nil } -func updateConnectorRequestOpsgenie(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { - prefixError := "failed to compose update connector request for Opsgenie" - - config := kibanaactions.NullableConfigPropertiesOpsgenie{} - if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { - return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) - } - - secrets := kibanaactions.NullableSecretsPropertiesOpsgenie{} - if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { - return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) - } +// func updateConnectorRequestJira(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose update connector request for Jira" - c := kibanaactions.UpdateConnectorRequestOpsgenie{ - Name: connector.Name, - Config: *config.Get(), - Secrets: *secrets.Get(), - } - - return kibanaactions.UpdateConnectorRequestOpsgenieAsUpdateConnectorRequestBodyProperties(&c), nil -} - -func updateConnectorRequestResilient(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { - prefixError := "failed to compose update connector request for Resilient" - - config := kibanaactions.NullableConfigPropertiesResilient{} - if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { - return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) - } - - secrets := kibanaactions.NullableSecretsPropertiesResilient{} - if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { - return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) - } - - c := kibanaactions.UpdateConnectorRequestResilient{ - Name: connector.Name, - Config: *config.Get(), - Secrets: *secrets.Get(), - } - - return kibanaactions.UpdateConnectorRequestResilientAsUpdateConnectorRequestBodyProperties(&c), nil -} - -func updateConnectorRequestServicenow(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { - prefixError := "failed to compose update connector request for Servicenow" - - config := kibanaactions.NullableConfigPropertiesServicenow{} - if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { - return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) - } - - secrets := kibanaactions.NullableSecretsPropertiesServicenow{} - if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { - return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) - } - - c := kibanaactions.UpdateConnectorRequestServicenow{ - Name: connector.Name, - Config: *config.Get(), - Secrets: *secrets.Get(), - } - - return kibanaactions.UpdateConnectorRequestServicenowAsUpdateConnectorRequestBodyProperties(&c), nil -} +// config := kibanaactions.NullableConfigPropertiesJira{} +// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { +// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } -func updateConnectorRequestServicenowItom(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { - prefixError := "failed to compose update connector request for ServicenowItom" +// secrets := kibanaactions.NullableSecretsPropertiesJira{} +// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { +// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } - config := kibanaactions.NullableConfigPropertiesServicenowItom{} - if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { - return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) - } +// c := kibanaactions.UpdateConnectorRequestJira{ +// Name: connector.Name, +// Config: *config.Get(), +// Secrets: *secrets.Get(), +// } - secrets := kibanaactions.NullableSecretsPropertiesServicenow{} - if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { - return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) - } +// return kibanaactions.UpdateConnectorRequestJiraAsUpdateConnectorRequestBodyProperties(&c), nil +// } - c := kibanaactions.UpdateConnectorRequestServicenowItom{ - Name: connector.Name, - Config: *config.Get(), - Secrets: *secrets.Get(), - } +// func updateConnectorRequestOpsgenie(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose update connector request for Opsgenie" - return kibanaactions.UpdateConnectorRequestServicenowItomAsUpdateConnectorRequestBodyProperties(&c), nil -} +// config := kibanaactions.NullableConfigPropertiesOpsgenie{} +// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { +// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } -func updateConnectorRequestServerLog(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { - c := kibanaactions.UpdateConnectorRequestServerlog{ - Name: connector.Name, - } +// secrets := kibanaactions.NullableSecretsPropertiesOpsgenie{} +// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { +// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } - return kibanaactions.UpdateConnectorRequestServerlogAsUpdateConnectorRequestBodyProperties(&c), nil -} +// c := kibanaactions.UpdateConnectorRequestOpsgenie{ +// Name: connector.Name, +// Config: *config.Get(), +// Secrets: *secrets.Get(), +// } -func updateConnectorRequestSwimlane(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { - prefixError := "failed to compose update connector request for Swimlane" +// return kibanaactions.UpdateConnectorRequestOpsgenieAsUpdateConnectorRequestBodyProperties(&c), nil +// } - config := kibanaactions.NullableConfigPropertiesSwimlane{} - if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { - return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) - } +// func updateConnectorRequestResilient(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose update connector request for Resilient" - secrets := kibanaactions.NullableSecretsPropertiesSwimlane{} - if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { - return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) - } +// config := kibanaactions.NullableConfigPropertiesResilient{} +// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { +// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } - c := kibanaactions.UpdateConnectorRequestSwimlane{ - Name: connector.Name, - Config: *config.Get(), - Secrets: *secrets.Get(), - } +// secrets := kibanaactions.NullableSecretsPropertiesResilient{} +// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { +// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } - return kibanaactions.UpdateConnectorRequestSwimlaneAsUpdateConnectorRequestBodyProperties(&c), nil -} +// c := kibanaactions.UpdateConnectorRequestResilient{ +// Name: connector.Name, +// Config: *config.Get(), +// Secrets: *secrets.Get(), +// } -func actionConnectorToModel(spaceID string, properties *kibanaactions.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { - instance := properties.GetActualInstance() +// return kibanaactions.UpdateConnectorRequestResilientAsUpdateConnectorRequestBodyProperties(&c), nil +// } - switch response := instance.(type) { +// func updateConnectorRequestServicenow(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose update connector request for Servicenow" - case *kibanaactions.ConnectorResponsePropertiesCasesWebhook: - config, err := response.GetConfig().MarshalJSON() - if err != nil { - return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - } - // return responseToConnector(response, config, spaceID), nil +// config := kibanaactions.NullableConfigPropertiesServicenow{} +// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { +// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } - connector := models.KibanaActionConnector{ - ConnectorID: response.GetId(), - SpaceID: spaceID, - Name: response.GetName(), - ConnectorTypeID: response.GetConnectorTypeId(), - IsDeprecated: response.GetIsDeprecated(), - IsMissingSecrets: response.GetIsMissingSecrets(), - IsPreconfigured: response.GetIsPreconfigured(), - ConfigJSON: string(config), - } - return &connector, nil +// secrets := kibanaactions.NullableSecretsPropertiesServicenow{} +// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { +// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } - case *kibanaactions.ConnectorResponsePropertiesEmail: - config, err := json.Marshal(response.GetConfig()) - if err != nil { - return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesEmail - [%w]", err) - } - // return responseToConnector(response, config, spaceID), nil - connector := models.KibanaActionConnector{ - ConnectorID: response.GetId(), - SpaceID: spaceID, - Name: response.GetName(), - ConnectorTypeID: response.GetConnectorTypeId(), - IsDeprecated: response.GetIsDeprecated(), - IsMissingSecrets: response.GetIsMissingSecrets(), - IsPreconfigured: response.GetIsPreconfigured(), - ConfigJSON: string(config), - } - return &connector, nil +// c := kibanaactions.UpdateConnectorRequestServicenow{ +// Name: connector.Name, +// Config: *config.Get(), +// Secrets: *secrets.Get(), +// } - case *kibanaactions.ConnectorResponsePropertiesIndex: - config, err := response.GetConfig().MarshalJSON() - if err != nil { - return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - } - // return responseToConnector(response, config, spaceID), nil - connector := models.KibanaActionConnector{ - ConnectorID: response.GetId(), - SpaceID: spaceID, - Name: response.GetName(), - ConnectorTypeID: response.GetConnectorTypeId(), - IsDeprecated: response.GetIsDeprecated(), - IsMissingSecrets: response.GetIsMissingSecrets(), - IsPreconfigured: response.GetIsPreconfigured(), - ConfigJSON: string(config), - } - return &connector, nil +// return kibanaactions.UpdateConnectorRequestServicenowAsUpdateConnectorRequestBodyProperties(&c), nil +// } - case *kibanaactions.ConnectorResponsePropertiesJira: - config, err := response.GetConfig().MarshalJSON() - if err != nil { - return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - } - // return responseToConnector(response, config, spaceID), nil - connector := models.KibanaActionConnector{ - ConnectorID: response.GetId(), - SpaceID: spaceID, - Name: response.GetName(), - ConnectorTypeID: response.GetConnectorTypeId(), - IsDeprecated: response.GetIsDeprecated(), - IsMissingSecrets: response.GetIsMissingSecrets(), - IsPreconfigured: response.GetIsPreconfigured(), - ConfigJSON: string(config), - } - return &connector, nil +// func updateConnectorRequestServicenowItom(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose update connector request for ServicenowItom" - case *kibanaactions.ConnectorResponsePropertiesOpsgenie: - config, err := response.GetConfig().MarshalJSON() - if err != nil { - return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - } - // return responseToConnector(response, config, spaceID), nil - connector := models.KibanaActionConnector{ - ConnectorID: response.GetId(), - SpaceID: spaceID, - Name: response.GetName(), - ConnectorTypeID: response.GetConnectorTypeId(), - IsDeprecated: response.GetIsDeprecated(), - IsMissingSecrets: response.GetIsMissingSecrets(), - IsPreconfigured: response.GetIsPreconfigured(), - ConfigJSON: string(config), - } - return &connector, nil +// config := kibanaactions.NullableConfigPropertiesServicenowItom{} +// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { +// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } - case *kibanaactions.ConnectorResponsePropertiesPagerduty: - config, err := json.Marshal(response.GetConfig()) - if err != nil { - return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - } - // return responseToConnector(response, config, spaceID), nil - connector := models.KibanaActionConnector{ - ConnectorID: response.GetId(), - SpaceID: spaceID, - Name: response.GetName(), - ConnectorTypeID: response.GetConnectorTypeId(), - IsDeprecated: response.GetIsDeprecated(), - IsMissingSecrets: response.GetIsMissingSecrets(), - IsPreconfigured: response.GetIsPreconfigured(), - ConfigJSON: string(config), - } - return &connector, nil +// secrets := kibanaactions.NullableSecretsPropertiesServicenow{} +// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { +// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } - case *kibanaactions.ConnectorResponsePropertiesResilient: - config, err := response.GetConfig().MarshalJSON() - if err != nil { - return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - } - // return responseToConnector(response, config, spaceID), nil - connector := models.KibanaActionConnector{ - ConnectorID: response.GetId(), - SpaceID: spaceID, - Name: response.GetName(), - ConnectorTypeID: response.GetConnectorTypeId(), - IsDeprecated: response.GetIsDeprecated(), - IsMissingSecrets: response.GetIsMissingSecrets(), - IsPreconfigured: response.GetIsPreconfigured(), - ConfigJSON: string(config), - } - return &connector, nil +// c := kibanaactions.UpdateConnectorRequestServicenowItom{ +// Name: connector.Name, +// Config: *config.Get(), +// Secrets: *secrets.Get(), +// } - case *kibanaactions.ConnectorResponsePropertiesServerlog: - config, err := json.Marshal(response.GetConfig()) - if err != nil { - return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - } - // return responseToConnector(response, config, spaceID), nil - connector := models.KibanaActionConnector{ - ConnectorID: response.GetId(), - SpaceID: spaceID, - Name: response.GetName(), - ConnectorTypeID: response.GetConnectorTypeId(), - IsDeprecated: response.GetIsDeprecated(), - IsMissingSecrets: response.GetIsMissingSecrets(), - IsPreconfigured: response.GetIsPreconfigured(), - ConfigJSON: string(config), - } - return &connector, nil +// return kibanaactions.UpdateConnectorRequestServicenowItomAsUpdateConnectorRequestBodyProperties(&c), nil +// } - case *kibanaactions.ConnectorResponsePropertiesServicenow: - config, err := response.GetConfig().MarshalJSON() - if err != nil { - return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - } - // return responseToConnector(response, config, spaceID), nil - connector := models.KibanaActionConnector{ - ConnectorID: response.GetId(), - SpaceID: spaceID, - Name: response.GetName(), - ConnectorTypeID: response.GetConnectorTypeId(), - IsDeprecated: response.GetIsDeprecated(), - IsMissingSecrets: response.GetIsMissingSecrets(), - IsPreconfigured: response.GetIsPreconfigured(), - ConfigJSON: string(config), - } - return &connector, nil +// func updateConnectorRequestServerLog(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { +// c := kibanaactions.UpdateConnectorRequestServerlog{ +// Name: connector.Name, +// } - case *kibanaactions.ConnectorResponsePropertiesServicenowItom: - config, err := response.GetConfig().MarshalJSON() - if err != nil { - return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - } - // return responseToConnector(response, config, spaceID), nil - connector := models.KibanaActionConnector{ - ConnectorID: response.GetId(), - SpaceID: spaceID, - Name: response.GetName(), - ConnectorTypeID: response.GetConnectorTypeId(), - IsDeprecated: response.GetIsDeprecated(), - IsMissingSecrets: response.GetIsMissingSecrets(), - IsPreconfigured: response.GetIsPreconfigured(), - ConfigJSON: string(config), - } - return &connector, nil +// return kibanaactions.UpdateConnectorRequestServerlogAsUpdateConnectorRequestBodyProperties(&c), nil +// } - case *kibanaactions.ConnectorResponsePropertiesServicenowSir: - config, err := response.GetConfig().MarshalJSON() - if err != nil { - return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - } - // return responseToConnector(response, config, spaceID), nil - connector := models.KibanaActionConnector{ - ConnectorID: response.GetId(), - SpaceID: spaceID, - Name: response.GetName(), - ConnectorTypeID: response.GetConnectorTypeId(), - IsDeprecated: response.GetIsDeprecated(), - IsMissingSecrets: response.GetIsMissingSecrets(), - IsPreconfigured: response.GetIsPreconfigured(), - ConfigJSON: string(config), - } - return &connector, nil +// func updateConnectorRequestSwimlane(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { +// prefixError := "failed to compose update connector request for Swimlane" - case *kibanaactions.ConnectorResponsePropertiesSlack: - // return responseToConnector(response, config, spaceID), nil - connector := models.KibanaActionConnector{ - ConnectorID: response.GetId(), - SpaceID: spaceID, - Name: response.GetName(), - ConnectorTypeID: response.GetConnectorTypeId(), - IsDeprecated: response.GetIsDeprecated(), - IsMissingSecrets: response.GetIsMissingSecrets(), - IsPreconfigured: response.GetIsPreconfigured(), - } - return &connector, nil +// config := kibanaactions.NullableConfigPropertiesSwimlane{} +// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { +// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// } - case *kibanaactions.ConnectorResponsePropertiesSwimlane: - config, err := response.GetConfig().MarshalJSON() - if err != nil { - return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - } - // return responseToConnector(response, config, spaceID), nil - connector := models.KibanaActionConnector{ - ConnectorID: response.GetId(), - SpaceID: spaceID, - Name: response.GetName(), - ConnectorTypeID: response.GetConnectorTypeId(), - IsDeprecated: response.GetIsDeprecated(), - IsMissingSecrets: response.GetIsMissingSecrets(), - IsPreconfigured: response.GetIsPreconfigured(), - ConfigJSON: string(config), - } - return &connector, nil +// secrets := kibanaactions.NullableSecretsPropertiesSwimlane{} +// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { +// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// } - case *kibanaactions.ConnectorResponsePropertiesTeams: - // return responseToConnector(response, config, spaceID), nil - connector := models.KibanaActionConnector{ - ConnectorID: response.GetId(), - SpaceID: spaceID, - Name: response.GetName(), - ConnectorTypeID: response.GetConnectorTypeId(), - IsDeprecated: response.GetIsDeprecated(), - IsMissingSecrets: response.GetIsMissingSecrets(), - IsPreconfigured: response.GetIsPreconfigured(), - } - return &connector, nil +// c := kibanaactions.UpdateConnectorRequestSwimlane{ +// Name: connector.Name, +// Config: *config.Get(), +// Secrets: *secrets.Get(), +// } - case *kibanaactions.ConnectorResponsePropertiesTines: - config, err := json.Marshal(response.GetConfig()) - if err != nil { - return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - } - // return responseToConnector(response, config, spaceID), nil - connector := models.KibanaActionConnector{ - ConnectorID: response.GetId(), - SpaceID: spaceID, - Name: response.GetName(), - ConnectorTypeID: response.GetConnectorTypeId(), - IsDeprecated: response.GetIsDeprecated(), - IsMissingSecrets: response.GetIsMissingSecrets(), - IsPreconfigured: response.GetIsPreconfigured(), - ConfigJSON: string(config), - } - return &connector, nil +// return kibanaactions.UpdateConnectorRequestSwimlaneAsUpdateConnectorRequestBodyProperties(&c), nil +// } - case *kibanaactions.ConnectorResponsePropertiesWebhook: - config, err := json.Marshal(response.GetConfig()) +func actionConnectorToModel(spaceID string, properties kibanaactions.ConnectorResponseProperties, connectorTypeID string) (*models.KibanaActionConnector, error) { + switch kibanaactions.ConnectorTypes(connectorTypeID) { + + // case kibanaactions.CASES_WEBHOOK_ConnectorTypes: + // config, err := response.GetConfig().MarshalJSON() + // if err != nil { + // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + // } + // // return responseToConnector(response, config, spaceID), nil + + // connector := models.KibanaActionConnector{ + // ConnectorID: response.GetId(), + // SpaceID: spaceID, + // Name: response.GetName(), + // ConnectorTypeID: response.GetConnectorTypeId(), + // IsDeprecated: response.GetIsDeprecated(), + // IsMissingSecrets: response.GetIsMissingSecrets(), + // IsPreconfigured: response.GetIsPreconfigured(), + // ConfigJSON: string(config), + // } + // return &connector, nil + + // case *kibanaactions.ConnectorResponsePropertiesEmail: + // config, err := json.Marshal(response.GetConfig()) + // if err != nil { + // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesEmail - [%w]", err) + // } + // // return responseToConnector(response, config, spaceID), nil + // connector := models.KibanaActionConnector{ + // ConnectorID: response.GetId(), + // SpaceID: spaceID, + // Name: response.GetName(), + // ConnectorTypeID: response.GetConnectorTypeId(), + // IsDeprecated: response.GetIsDeprecated(), + // IsMissingSecrets: response.GetIsMissingSecrets(), + // IsPreconfigured: response.GetIsPreconfigured(), + // ConfigJSON: string(config), + // } + // return &connector, nil + + case kibanaactions.INDEX_ConnectorTypes: + config, err := json.Marshal(properties.ConnectorResponsePropertiesIndex.Config) if err != nil { return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) } - // return responseToConnector(response, config, spaceID), nil connector := models.KibanaActionConnector{ - ConnectorID: response.GetId(), + ConnectorID: properties.ConnectorResponsePropertiesIndex.Id, SpaceID: spaceID, - Name: response.GetName(), - ConnectorTypeID: response.GetConnectorTypeId(), - IsDeprecated: response.GetIsDeprecated(), - IsMissingSecrets: response.GetIsMissingSecrets(), - IsPreconfigured: response.GetIsPreconfigured(), + Name: properties.ConnectorResponsePropertiesIndex.Name, + ConnectorTypeID: connectorTypeID, + IsDeprecated: properties.ConnectorResponsePropertiesIndex.IsDeprecated, + IsMissingSecrets: properties.ConnectorResponsePropertiesIndex.IsMissingSecrets, + IsPreconfigured: properties.ConnectorResponsePropertiesIndex.IsPreconfigured, ConfigJSON: string(config), } return &connector, nil - case *kibanaactions.ConnectorResponsePropertiesXmatters: - config, err := json.Marshal(response.GetConfig()) - if err != nil { - return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - } - // return responseToConnector(response, config, spaceID), nil - connector := models.KibanaActionConnector{ - ConnectorID: response.GetId(), - SpaceID: spaceID, - Name: response.GetName(), - ConnectorTypeID: response.GetConnectorTypeId(), - IsDeprecated: response.GetIsDeprecated(), - IsMissingSecrets: response.GetIsMissingSecrets(), - IsPreconfigured: response.GetIsPreconfigured(), - ConfigJSON: string(config), - } - return &connector, nil + // case *kibanaactions.ConnectorResponsePropertiesJira: + // config, err := response.GetConfig().MarshalJSON() + // if err != nil { + // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + // } + // // return responseToConnector(response, config, spaceID), nil + // connector := models.KibanaActionConnector{ + // ConnectorID: response.GetId(), + // SpaceID: spaceID, + // Name: response.GetName(), + // ConnectorTypeID: response.GetConnectorTypeId(), + // IsDeprecated: response.GetIsDeprecated(), + // IsMissingSecrets: response.GetIsMissingSecrets(), + // IsPreconfigured: response.GetIsPreconfigured(), + // ConfigJSON: string(config), + // } + // return &connector, nil + + // case *kibanaactions.ConnectorResponsePropertiesOpsgenie: + // config, err := response.GetConfig().MarshalJSON() + // if err != nil { + // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + // } + // // return responseToConnector(response, config, spaceID), nil + // connector := models.KibanaActionConnector{ + // ConnectorID: response.GetId(), + // SpaceID: spaceID, + // Name: response.GetName(), + // ConnectorTypeID: response.GetConnectorTypeId(), + // IsDeprecated: response.GetIsDeprecated(), + // IsMissingSecrets: response.GetIsMissingSecrets(), + // IsPreconfigured: response.GetIsPreconfigured(), + // ConfigJSON: string(config), + // } + // return &connector, nil + + // case *kibanaactions.ConnectorResponsePropertiesPagerduty: + // config, err := json.Marshal(response.GetConfig()) + // if err != nil { + // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + // } + // // return responseToConnector(response, config, spaceID), nil + // connector := models.KibanaActionConnector{ + // ConnectorID: response.GetId(), + // SpaceID: spaceID, + // Name: response.GetName(), + // ConnectorTypeID: response.GetConnectorTypeId(), + // IsDeprecated: response.GetIsDeprecated(), + // IsMissingSecrets: response.GetIsMissingSecrets(), + // IsPreconfigured: response.GetIsPreconfigured(), + // ConfigJSON: string(config), + // } + // return &connector, nil + + // case *kibanaactions.ConnectorResponsePropertiesResilient: + // config, err := response.GetConfig().MarshalJSON() + // if err != nil { + // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + // } + // // return responseToConnector(response, config, spaceID), nil + // connector := models.KibanaActionConnector{ + // ConnectorID: response.GetId(), + // SpaceID: spaceID, + // Name: response.GetName(), + // ConnectorTypeID: response.GetConnectorTypeId(), + // IsDeprecated: response.GetIsDeprecated(), + // IsMissingSecrets: response.GetIsMissingSecrets(), + // IsPreconfigured: response.GetIsPreconfigured(), + // ConfigJSON: string(config), + // } + // return &connector, nil + + // case *kibanaactions.ConnectorResponsePropertiesServerlog: + // config, err := json.Marshal(response.GetConfig()) + // if err != nil { + // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + // } + // // return responseToConnector(response, config, spaceID), nil + // connector := models.KibanaActionConnector{ + // ConnectorID: response.GetId(), + // SpaceID: spaceID, + // Name: response.GetName(), + // ConnectorTypeID: response.GetConnectorTypeId(), + // IsDeprecated: response.GetIsDeprecated(), + // IsMissingSecrets: response.GetIsMissingSecrets(), + // IsPreconfigured: response.GetIsPreconfigured(), + // ConfigJSON: string(config), + // } + // return &connector, nil + + // case *kibanaactions.ConnectorResponsePropertiesServicenow: + // config, err := response.GetConfig().MarshalJSON() + // if err != nil { + // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + // } + // // return responseToConnector(response, config, spaceID), nil + // connector := models.KibanaActionConnector{ + // ConnectorID: response.GetId(), + // SpaceID: spaceID, + // Name: response.GetName(), + // ConnectorTypeID: response.GetConnectorTypeId(), + // IsDeprecated: response.GetIsDeprecated(), + // IsMissingSecrets: response.GetIsMissingSecrets(), + // IsPreconfigured: response.GetIsPreconfigured(), + // ConfigJSON: string(config), + // } + // return &connector, nil + + // case *kibanaactions.ConnectorResponsePropertiesServicenowItom: + // config, err := response.GetConfig().MarshalJSON() + // if err != nil { + // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + // } + // // return responseToConnector(response, config, spaceID), nil + // connector := models.KibanaActionConnector{ + // ConnectorID: response.GetId(), + // SpaceID: spaceID, + // Name: response.GetName(), + // ConnectorTypeID: response.GetConnectorTypeId(), + // IsDeprecated: response.GetIsDeprecated(), + // IsMissingSecrets: response.GetIsMissingSecrets(), + // IsPreconfigured: response.GetIsPreconfigured(), + // ConfigJSON: string(config), + // } + // return &connector, nil + + // case *kibanaactions.ConnectorResponsePropertiesServicenowSir: + // config, err := response.GetConfig().MarshalJSON() + // if err != nil { + // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + // } + // // return responseToConnector(response, config, spaceID), nil + // connector := models.KibanaActionConnector{ + // ConnectorID: response.GetId(), + // SpaceID: spaceID, + // Name: response.GetName(), + // ConnectorTypeID: response.GetConnectorTypeId(), + // IsDeprecated: response.GetIsDeprecated(), + // IsMissingSecrets: response.GetIsMissingSecrets(), + // IsPreconfigured: response.GetIsPreconfigured(), + // ConfigJSON: string(config), + // } + // return &connector, nil + + // case *kibanaactions.ConnectorResponsePropertiesSlack: + // // return responseToConnector(response, config, spaceID), nil + // connector := models.KibanaActionConnector{ + // ConnectorID: response.GetId(), + // SpaceID: spaceID, + // Name: response.GetName(), + // ConnectorTypeID: response.GetConnectorTypeId(), + // IsDeprecated: response.GetIsDeprecated(), + // IsMissingSecrets: response.GetIsMissingSecrets(), + // IsPreconfigured: response.GetIsPreconfigured(), + // } + // return &connector, nil + + // case *kibanaactions.ConnectorResponsePropertiesSwimlane: + // config, err := response.GetConfig().MarshalJSON() + // if err != nil { + // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + // } + // // return responseToConnector(response, config, spaceID), nil + // connector := models.KibanaActionConnector{ + // ConnectorID: response.GetId(), + // SpaceID: spaceID, + // Name: response.GetName(), + // ConnectorTypeID: response.GetConnectorTypeId(), + // IsDeprecated: response.GetIsDeprecated(), + // IsMissingSecrets: response.GetIsMissingSecrets(), + // IsPreconfigured: response.GetIsPreconfigured(), + // ConfigJSON: string(config), + // } + // return &connector, nil + + // case *kibanaactions.ConnectorResponsePropertiesTeams: + // // return responseToConnector(response, config, spaceID), nil + // connector := models.KibanaActionConnector{ + // ConnectorID: response.GetId(), + // SpaceID: spaceID, + // Name: response.GetName(), + // ConnectorTypeID: response.GetConnectorTypeId(), + // IsDeprecated: response.GetIsDeprecated(), + // IsMissingSecrets: response.GetIsMissingSecrets(), + // IsPreconfigured: response.GetIsPreconfigured(), + // } + // return &connector, nil + + // case *kibanaactions.ConnectorResponsePropertiesTines: + // config, err := json.Marshal(response.GetConfig()) + // if err != nil { + // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + // } + // // return responseToConnector(response, config, spaceID), nil + // connector := models.KibanaActionConnector{ + // ConnectorID: response.GetId(), + // SpaceID: spaceID, + // Name: response.GetName(), + // ConnectorTypeID: response.GetConnectorTypeId(), + // IsDeprecated: response.GetIsDeprecated(), + // IsMissingSecrets: response.GetIsMissingSecrets(), + // IsPreconfigured: response.GetIsPreconfigured(), + // ConfigJSON: string(config), + // } + // return &connector, nil + + // case *kibanaactions.ConnectorResponsePropertiesWebhook: + // config, err := json.Marshal(response.GetConfig()) + // if err != nil { + // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + // } + // // return responseToConnector(response, config, spaceID), nil + // connector := models.KibanaActionConnector{ + // ConnectorID: response.GetId(), + // SpaceID: spaceID, + // Name: response.GetName(), + // ConnectorTypeID: response.GetConnectorTypeId(), + // IsDeprecated: response.GetIsDeprecated(), + // IsMissingSecrets: response.GetIsMissingSecrets(), + // IsPreconfigured: response.GetIsPreconfigured(), + // ConfigJSON: string(config), + // } + // return &connector, nil + + // case *kibanaactions.ConnectorResponsePropertiesXmatters: + // config, err := json.Marshal(response.GetConfig()) + // if err != nil { + // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + // } + // // return responseToConnector(response, config, spaceID), nil + // connector := models.KibanaActionConnector{ + // ConnectorID: response.GetId(), + // SpaceID: spaceID, + // Name: response.GetName(), + // ConnectorTypeID: response.GetConnectorTypeId(), + // IsDeprecated: response.GetIsDeprecated(), + // IsMissingSecrets: response.GetIsMissingSecrets(), + // IsPreconfigured: response.GetIsPreconfigured(), + // ConfigJSON: string(config), + // } + // return &connector, nil } return nil, fmt.Errorf("unknown connector type [%+v]", properties) diff --git a/internal/kibana/action_connector.go b/internal/kibana/action_connector.go index f1ca256f7..6521113cd 100644 --- a/internal/kibana/action_connector.go +++ b/internal/kibana/action_connector.go @@ -120,11 +120,11 @@ func resourceConnectorUpdate(ctx context.Context, d *schema.ResourceData, meta i return diags } - compositeId, diags := clients.CompositeIdFromStr(d.Id()) + compositeIDold, diags := clients.CompositeIdFromStr(d.Id()) if diags.HasError() { return diags } - connectorOld.ConnectorID = compositeId.ResourceId + connectorOld.ConnectorID = compositeIDold.ResourceId connectorID, diags := kibana.UpdateActionConnector(ctx, client, connectorOld) @@ -132,8 +132,8 @@ func resourceConnectorUpdate(ctx context.Context, d *schema.ResourceData, meta i return diags } - compositeID := &clients.CompositeId{ClusterId: connectorOld.SpaceID, ResourceId: connectorID} - d.SetId(compositeID.String()) + compositeIDnew := &clients.CompositeId{ClusterId: connectorOld.SpaceID, ResourceId: connectorID} + d.SetId(compositeIDnew.String()) return resourceConnectorRead(ctx, d, meta) } @@ -144,14 +144,17 @@ func resourceConnectorRead(ctx context.Context, d *schema.ResourceData, meta int return diags } + connectorOld, diags := expandActionConnector(d) + if diags.HasError() { + return diags + } + compositeID, diags := clients.CompositeIdFromStr(d.Id()) if diags.HasError() { return diags } - connectorID := compositeID.ResourceId - spaceId := compositeID.ClusterId - connector, diags := kibana.GetActionConnector(ctx, client, connectorID, spaceId) + connector, diags := kibana.GetActionConnector(ctx, client, compositeID.ResourceId, compositeID.ClusterId, connectorOld.ConnectorTypeID) if connector == nil && diags == nil { d.SetId("") return diags diff --git a/internal/kibana/action_connector_test.go b/internal/kibana/action_connector_test.go index 3c97d0c36..8d6e0dfd7 100644 --- a/internal/kibana/action_connector_test.go +++ b/internal/kibana/action_connector_test.go @@ -73,13 +73,13 @@ provider "elasticstack" { kibana {} } -resource "elasticstack_kibana_alerting_rule" "test_rule" { +resource "elasticstack_kibana_action_connector" "test_connector" { name = "Updated %s" config = jsonencode({ index = ".kibana" refresh = false }) - connector_type_id = ".index-threshold" + connector_type_id = ".index" } `, name) } @@ -96,7 +96,7 @@ func checkResourceActionConnectorDestroy(s *terraform.State) error { } compId, _ := clients.CompositeIdFromStr(rs.Primary.ID) - rule, diags := kibana.GetActionConnector(context.Background(), client, compId.ResourceId, compId.ClusterId) + rule, diags := kibana.GetActionConnector(context.Background(), client, compId.ResourceId, compId.ClusterId, ".index") if diags.HasError() { return fmt.Errorf("Failed to get action connector: %v", diags) } From 6b6c9d0cd65452da5fa7661093acc0ce9d6467e6 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 20 Apr 2023 14:25:28 +0200 Subject: [PATCH 07/59] Switch to ogen for kibana connectors generation --- Makefile | 38 +- connectors_gen.go | 3 + .../swagger.yaml => connectors/bundled.yaml} | 3895 ++--- generated/connectors/oas_cfg_gen.go | 277 + generated/connectors/oas_client_gen.go | 2113 +++ generated/connectors/oas_defaults_gen.go | 62 + generated/connectors/oas_handlers_gen.go | 2306 +++ generated/connectors/oas_interfaces_gen.go | 54 + generated/connectors/oas_json_gen.go | 14411 ++++++++++++++++ generated/connectors/oas_middleware_gen.go | 10 + generated/connectors/oas_parameters_gen.go | 1642 ++ .../connectors/oas_request_decoders_gen.go | 347 + .../connectors/oas_request_encoders_gen.go | 82 + .../connectors/oas_response_decoders_gen.go | 1079 ++ .../connectors/oas_response_encoders_gen.go | 451 + generated/connectors/oas_router_gen.go | 611 + generated/connectors/oas_schemas_gen.go | 8193 +++++++++ generated/connectors/oas_security_gen.go | 99 + generated/connectors/oas_server_gen.go | 131 + generated/connectors/oas_unimplemented_gen.go | 152 + generated/connectors/oas_validators_gen.go | 981 ++ generated/kibanaactions/.gitignore | 24 - .../kibanaactions/.swagger-codegen-ignore | 23 - .../kibanaactions/.swagger-codegen/VERSION | 1 - generated/kibanaactions/.travis.yml | 8 - generated/kibanaactions/README.md | 186 - generated/kibanaactions/api_connectors.go | 1623 -- generated/kibanaactions/client.go | 473 - generated/kibanaactions/configuration.go | 71 - .../docs/ActionResponseProperties.md | 15 - .../docs/AlertIdentifierMapping.md | 12 - .../kibanaactions/docs/CaseCommentMapping.md | 12 - .../docs/CaseDescriptionMapping.md | 12 - .../docs/CaseIdentifierMapping.md | 12 - .../kibanaactions/docs/CaseNameMapping.md | 12 - .../docs/ConfigPropertiesCasesWebhook.md | 23 - .../docs/ConfigPropertiesIndex.md | 11 - .../docs/ConfigPropertiesJira.md | 10 - .../docs/ConfigPropertiesOpsgenie.md | 9 - .../docs/ConfigPropertiesResilient.md | 10 - .../docs/ConfigPropertiesServicenow.md | 14 - .../docs/ConfigPropertiesServicenowItom.md | 13 - .../docs/ConfigPropertiesSwimlane.md | 12 - ...MappingsPropertiesForASwimlaneConnector.md | 15 - .../docs/ConnectorResponseProperties.md | 8 - ...ConnectorResponsePropertiesCasesWebhook.md | 15 - .../docs/ConnectorResponsePropertiesEmail.md | 15 - .../docs/ConnectorResponsePropertiesIndex.md | 15 - .../docs/ConnectorResponsePropertiesJira.md | 15 - .../ConnectorResponsePropertiesOpsgenie.md | 15 - .../ConnectorResponsePropertiesPagerduty.md | 15 - .../ConnectorResponsePropertiesResilient.md | 15 - .../ConnectorResponsePropertiesServerlog.md | 15 - .../ConnectorResponsePropertiesServicenow.md | 15 - ...nnectorResponsePropertiesServicenowItom.md | 15 - ...onnectorResponsePropertiesServicenowSir.md | 15 - .../docs/ConnectorResponsePropertiesSlack.md | 14 - .../ConnectorResponsePropertiesSwimlane.md | 15 - .../docs/ConnectorResponsePropertiesTeams.md | 14 - .../docs/ConnectorResponsePropertiesTines.md | 15 - .../ConnectorResponsePropertiesWebhook.md | 15 - .../ConnectorResponsePropertiesXmatters.md | 15 - .../kibanaactions/docs/ConnectorTypes.md | 8 - generated/kibanaactions/docs/ConnectorsApi.md | 443 - .../CreateConnectorRequestBodyProperties.md | 8 - .../CreateConnectorRequestCasesWebhook.md | 12 - .../docs/CreateConnectorRequestEmail.md | 12 - .../docs/CreateConnectorRequestIndex.md | 11 - .../docs/CreateConnectorRequestJira.md | 12 - .../docs/CreateConnectorRequestOpsgenie.md | 12 - .../docs/CreateConnectorRequestPagerduty.md | 12 - .../docs/CreateConnectorRequestResilient.md | 12 - .../docs/CreateConnectorRequestServerlog.md | 10 - .../docs/CreateConnectorRequestServicenow.md | 12 - .../CreateConnectorRequestServicenowItom.md | 12 - .../CreateConnectorRequestServicenowSir.md | 12 - .../docs/CreateConnectorRequestSlack.md | 11 - .../docs/CreateConnectorRequestSwimlane.md | 12 - .../docs/CreateConnectorRequestTeams.md | 11 - .../docs/CreateConnectorRequestTines.md | 12 - .../docs/CreateConnectorRequestWebhook.md | 12 - .../docs/CreateConnectorRequestXmatters.md | 12 - generated/kibanaactions/docs/Features.md | 8 - .../GetConnectorsResponseBodyProperties.md | 16 - .../kibanaactions/docs/InlineResponse200.md | 15 - .../kibanaactions/docs/InlineResponse2001.md | 11 - .../kibanaactions/docs/InlineResponse2002.md | 14 - .../kibanaactions/docs/InlineResponse2003.md | 11 - .../kibanaactions/docs/InlineResponse400.md | 11 - .../kibanaactions/docs/InlineResponse404.md | 11 - .../LegacyCreateConnectorRequestProperties.md | 12 - ...LegacyRunConnectorRequestBodyProperties.md | 9 - ...acyUpdateConnectorRequestBodyProperties.md | 11 - .../kibanaactions/docs/NotFoundResponse.md | 11 - ...RunConnectorRequestBodyPropertiesParams.md | 8 - .../docs/OneOfinlineResponse2001Data.md | 8 - .../docs/OneOfinlineResponse2003Data.md | 8 - ...htoserviceSubActionParamsIncidentDestIp.md | 8 - ...rviceSubActionParamsIncidentMalwareHash.md | 8 - ...erviceSubActionParamsIncidentMalwareUrl.md | 8 - ...oserviceSubActionParamsIncidentSourceIp.md | 8 - .../kibanaactions/docs/RuleNameMapping.md | 12 - .../docs/RunConnectorParamsDocuments.md | 9 - .../docs/RunConnectorParamsLevelMessage.md | 10 - .../docs/RunConnectorRequestBodyProperties.md | 9 - .../docs/RunConnectorSubactionAddevent.md | 10 - ...nnectorSubactionAddeventSubActionParams.md | 19 - .../docs/RunConnectorSubactionClosealert.md | 10 - ...ectorSubactionClosealertSubActionParams.md | 12 - .../docs/RunConnectorSubactionCreatealert.md | 10 - ...ctorSubactionCreatealertSubActionParams.md | 21 - ...ionCreatealertSubActionParamsResponders.md | 12 - ...tionCreatealertSubActionParamsVisibleTo.md | 12 - .../RunConnectorSubactionFieldsbyissuetype.md | 10 - ...bactionFieldsbyissuetypeSubActionParams.md | 9 - .../docs/RunConnectorSubactionGetchoices.md | 10 - ...ectorSubactionGetchoicesSubActionParams.md | 9 - .../docs/RunConnectorSubactionGetfields.md | 9 - .../docs/RunConnectorSubactionGetincident.md | 10 - ...ctorSubactionGetincidentSubActionParams.md | 9 - .../docs/RunConnectorSubactionIssue.md | 10 - ...nConnectorSubactionIssueSubActionParams.md | 9 - .../docs/RunConnectorSubactionIssues.md | 10 - ...ConnectorSubactionIssuesSubActionParams.md | 9 - .../docs/RunConnectorSubactionIssuetypes.md | 9 - .../RunConnectorSubactionPushtoservice.md | 10 - ...orSubactionPushtoserviceSubActionParams.md | 10 - ...ionPushtoserviceSubActionParamsComments.md | 10 - ...ionPushtoserviceSubActionParamsIncident.md | 32 - .../docs/SecretsPropertiesCasesWebhook.md | 10 - .../docs/SecretsPropertiesJira.md | 10 - .../docs/SecretsPropertiesOpsgenie.md | 9 - .../docs/SecretsPropertiesResilient.md | 10 - .../docs/SecretsPropertiesServicenow.md | 13 - .../docs/SecretsPropertiesSwimlane.md | 9 - .../kibanaactions/docs/SeverityMapping.md | 12 - .../docs/UnauthorizedResponse.md | 11 - .../UpdateConnectorRequestBodyProperties.md | 8 - .../UpdateConnectorRequestCasesWebhook.md | 11 - .../docs/UpdateConnectorRequestIndex.md | 10 - .../docs/UpdateConnectorRequestJira.md | 11 - .../docs/UpdateConnectorRequestOpsgenie.md | 11 - .../docs/UpdateConnectorRequestResilient.md | 11 - .../docs/UpdateConnectorRequestServerlog.md | 9 - .../docs/UpdateConnectorRequestServicenow.md | 11 - .../UpdateConnectorRequestServicenowItom.md | 11 - .../docs/UpdateConnectorRequestSwimlane.md | 11 - generated/kibanaactions/git_push.sh | 52 - .../model_action_response_properties.go | 23 - .../model_alert_identifier_mapping.go | 21 - .../model_case_comment_mapping.go | 21 - .../model_case_description_mapping.go | 21 - .../model_case_identifier_mapping.go | 21 - .../kibanaactions/model_case_name_mapping.go | 21 - .../model_config_properties_cases_webhook.go | 43 - .../model_config_properties_index.go | 19 - .../model_config_properties_jira.go | 17 - .../model_config_properties_opsgenie.go | 15 - .../model_config_properties_resilient.go | 17 - .../model_config_properties_servicenow.go | 25 - ...model_config_properties_servicenow_itom.go | 23 - .../model_config_properties_swimlane.go | 20 - ...ngs_properties_for_a_swimlane_connector.go | 20 - .../model_connector_response_properties.go | 30 - ...ector_response_properties_cases_webhook.go | 22 - ...del_connector_response_properties_email.go | 22 - ...del_connector_response_properties_index.go | 22 - ...odel_connector_response_properties_jira.go | 22 - ..._connector_response_properties_opsgenie.go | 22 - ...connector_response_properties_pagerduty.go | 22 - ...connector_response_properties_resilient.go | 22 - ...connector_response_properties_serverlog.go | 22 - ...onnector_response_properties_servicenow.go | 22 - ...tor_response_properties_servicenow_itom.go | 22 - ...ctor_response_properties_servicenow_sir.go | 22 - ...del_connector_response_properties_slack.go | 21 - ..._connector_response_properties_swimlane.go | 22 - ...del_connector_response_properties_teams.go | 21 - ...del_connector_response_properties_tines.go | 22 - ...l_connector_response_properties_webhook.go | 22 - ..._connector_response_properties_xmatters.go | 22 - .../kibanaactions/model_connector_types.go | 33 - ...reate_connector_request_body_properties.go | 30 - ..._create_connector_request_cases_webhook.go | 19 - .../model_create_connector_request_email.go | 19 - .../model_create_connector_request_index.go | 18 - .../model_create_connector_request_jira.go | 19 - ...model_create_connector_request_opsgenie.go | 19 - ...odel_create_connector_request_pagerduty.go | 19 - ...odel_create_connector_request_resilient.go | 19 - ...odel_create_connector_request_serverlog.go | 17 - ...del_create_connector_request_servicenow.go | 19 - ...reate_connector_request_servicenow_itom.go | 19 - ...create_connector_request_servicenow_sir.go | 19 - .../model_create_connector_request_slack.go | 18 - ...model_create_connector_request_swimlane.go | 19 - .../model_create_connector_request_teams.go | 18 - .../model_create_connector_request_tines.go | 19 - .../model_create_connector_request_webhook.go | 19 - ...model_create_connector_request_xmatters.go | 19 - generated/kibanaactions/model_features.go | 20 - ...get_connectors_response_body_properties.go | 25 - .../model_inline_response_200.go | 25 - .../model_inline_response_200_1.go | 17 - .../model_inline_response_200_2.go | 24 - .../model_inline_response_200_3.go | 16 - .../model_inline_response_400.go | 15 - .../model_inline_response_404.go | 15 - ...acy_create_connector_request_properties.go | 20 - ...y_run_connector_request_body_properties.go | 15 - ...pdate_connector_request_body_properties.go | 19 - generated/kibanaactions/model_map.go | 3 - .../kibanaactions/model_not_found_response.go | 15 - ...onnector_request_body_properties_params.go | 14 - .../model_one_ofinline_response_200_1_data.go | 12 - .../model_one_ofinline_response_200_3_data.go | 12 - ...vice_sub_action_params_incident_dest_ip.go | 12 - ...sub_action_params_incident_malware_hash.go | 12 - ..._sub_action_params_incident_malware_url.go | 12 - ...ce_sub_action_params_incident_source_ip.go | 12 - .../kibanaactions/model_rule_name_mapping.go | 21 - .../model_run_connector_params_documents.go | 15 - ...odel_run_connector_params_level_message.go | 17 - ...l_run_connector_request_body_properties.go | 14 - .../model_run_connector_subaction_addevent.go | 16 - ...or_subaction_addevent_sub_action_params.go | 35 - ...odel_run_connector_subaction_closealert.go | 16 - ..._subaction_closealert_sub_action_params.go | 20 - ...del_run_connector_subaction_createalert.go | 16 - ...subaction_createalert_sub_action_params.go | 38 - ...reatealert_sub_action_params_responders.go | 20 - ...reatealert_sub_action_params_visible_to.go | 20 - ...n_connector_subaction_fieldsbyissuetype.go | 16 - ...ion_fieldsbyissuetype_sub_action_params.go | 14 - ...odel_run_connector_subaction_getchoices.go | 16 - ..._subaction_getchoices_sub_action_params.go | 15 - ...model_run_connector_subaction_getfields.go | 15 - ...del_run_connector_subaction_getincident.go | 16 - ...subaction_getincident_sub_action_params.go | 14 - .../model_run_connector_subaction_issue.go | 16 - ...ector_subaction_issue_sub_action_params.go | 14 - .../model_run_connector_subaction_issues.go | 16 - ...ctor_subaction_issues_sub_action_params.go | 14 - ...odel_run_connector_subaction_issuetypes.go | 15 - ...l_run_connector_subaction_pushtoservice.go | 16 - ...baction_pushtoservice_sub_action_params.go | 16 - ...ushtoservice_sub_action_params_comments.go | 16 - ...ushtoservice_sub_action_params_incident.go | 61 - .../model_secrets_properties_cases_webhook.go | 16 - .../model_secrets_properties_jira.go | 17 - .../model_secrets_properties_opsgenie.go | 15 - .../model_secrets_properties_resilient.go | 17 - .../model_secrets_properties_servicenow.go | 23 - .../model_secrets_properties_swimlane.go | 15 - .../kibanaactions/model_severity_mapping.go | 21 - .../model_unauthorized_response.go | 15 - ...pdate_connector_request_body_properties.go | 22 - ..._update_connector_request_cases_webhook.go | 16 - .../model_update_connector_request_index.go | 15 - .../model_update_connector_request_jira.go | 16 - ...model_update_connector_request_opsgenie.go | 16 - ...odel_update_connector_request_resilient.go | 16 - ...odel_update_connector_request_serverlog.go | 14 - ...del_update_connector_request_servicenow.go | 16 - ...pdate_connector_request_servicenow_itom.go | 16 - ...model_update_connector_request_swimlane.go | 16 - generated/kibanaactions/response.go | 42 - go.mod | 17 +- go.sum | 32 +- internal/clients/api_client.go | 49 +- .../clients/kibana/action_connector_test.go | 127 + .../{action_connector.go => connector.go} | 549 +- .../{action_connector.go => connector.go} | 0 ...on_connector_test.go => connector_test.go} | 0 274 files changed, 35203 insertions(+), 9092 deletions(-) create mode 100644 connectors_gen.go rename generated/{kibanaactions/api/swagger.yaml => connectors/bundled.yaml} (52%) create mode 100644 generated/connectors/oas_cfg_gen.go create mode 100644 generated/connectors/oas_client_gen.go create mode 100644 generated/connectors/oas_defaults_gen.go create mode 100644 generated/connectors/oas_handlers_gen.go create mode 100644 generated/connectors/oas_interfaces_gen.go create mode 100644 generated/connectors/oas_json_gen.go create mode 100644 generated/connectors/oas_middleware_gen.go create mode 100644 generated/connectors/oas_parameters_gen.go create mode 100644 generated/connectors/oas_request_decoders_gen.go create mode 100644 generated/connectors/oas_request_encoders_gen.go create mode 100644 generated/connectors/oas_response_decoders_gen.go create mode 100644 generated/connectors/oas_response_encoders_gen.go create mode 100644 generated/connectors/oas_router_gen.go create mode 100644 generated/connectors/oas_schemas_gen.go create mode 100644 generated/connectors/oas_security_gen.go create mode 100644 generated/connectors/oas_server_gen.go create mode 100644 generated/connectors/oas_unimplemented_gen.go create mode 100644 generated/connectors/oas_validators_gen.go delete mode 100644 generated/kibanaactions/.gitignore delete mode 100644 generated/kibanaactions/.swagger-codegen-ignore delete mode 100644 generated/kibanaactions/.swagger-codegen/VERSION delete mode 100644 generated/kibanaactions/.travis.yml delete mode 100644 generated/kibanaactions/README.md delete mode 100644 generated/kibanaactions/api_connectors.go delete mode 100644 generated/kibanaactions/client.go delete mode 100644 generated/kibanaactions/configuration.go delete mode 100644 generated/kibanaactions/docs/ActionResponseProperties.md delete mode 100644 generated/kibanaactions/docs/AlertIdentifierMapping.md delete mode 100644 generated/kibanaactions/docs/CaseCommentMapping.md delete mode 100644 generated/kibanaactions/docs/CaseDescriptionMapping.md delete mode 100644 generated/kibanaactions/docs/CaseIdentifierMapping.md delete mode 100644 generated/kibanaactions/docs/CaseNameMapping.md delete mode 100644 generated/kibanaactions/docs/ConfigPropertiesCasesWebhook.md delete mode 100644 generated/kibanaactions/docs/ConfigPropertiesIndex.md delete mode 100644 generated/kibanaactions/docs/ConfigPropertiesJira.md delete mode 100644 generated/kibanaactions/docs/ConfigPropertiesOpsgenie.md delete mode 100644 generated/kibanaactions/docs/ConfigPropertiesResilient.md delete mode 100644 generated/kibanaactions/docs/ConfigPropertiesServicenow.md delete mode 100644 generated/kibanaactions/docs/ConfigPropertiesServicenowItom.md delete mode 100644 generated/kibanaactions/docs/ConfigPropertiesSwimlane.md delete mode 100644 generated/kibanaactions/docs/ConnectorMappingsPropertiesForASwimlaneConnector.md delete mode 100644 generated/kibanaactions/docs/ConnectorResponseProperties.md delete mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesCasesWebhook.md delete mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesEmail.md delete mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesIndex.md delete mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesJira.md delete mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesOpsgenie.md delete mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesPagerduty.md delete mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesResilient.md delete mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesServerlog.md delete mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesServicenow.md delete mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowItom.md delete mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowSir.md delete mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesSlack.md delete mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesSwimlane.md delete mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesTeams.md delete mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesTines.md delete mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesWebhook.md delete mode 100644 generated/kibanaactions/docs/ConnectorResponsePropertiesXmatters.md delete mode 100644 generated/kibanaactions/docs/ConnectorTypes.md delete mode 100644 generated/kibanaactions/docs/ConnectorsApi.md delete mode 100644 generated/kibanaactions/docs/CreateConnectorRequestBodyProperties.md delete mode 100644 generated/kibanaactions/docs/CreateConnectorRequestCasesWebhook.md delete mode 100644 generated/kibanaactions/docs/CreateConnectorRequestEmail.md delete mode 100644 generated/kibanaactions/docs/CreateConnectorRequestIndex.md delete mode 100644 generated/kibanaactions/docs/CreateConnectorRequestJira.md delete mode 100644 generated/kibanaactions/docs/CreateConnectorRequestOpsgenie.md delete mode 100644 generated/kibanaactions/docs/CreateConnectorRequestPagerduty.md delete mode 100644 generated/kibanaactions/docs/CreateConnectorRequestResilient.md delete mode 100644 generated/kibanaactions/docs/CreateConnectorRequestServerlog.md delete mode 100644 generated/kibanaactions/docs/CreateConnectorRequestServicenow.md delete mode 100644 generated/kibanaactions/docs/CreateConnectorRequestServicenowItom.md delete mode 100644 generated/kibanaactions/docs/CreateConnectorRequestServicenowSir.md delete mode 100644 generated/kibanaactions/docs/CreateConnectorRequestSlack.md delete mode 100644 generated/kibanaactions/docs/CreateConnectorRequestSwimlane.md delete mode 100644 generated/kibanaactions/docs/CreateConnectorRequestTeams.md delete mode 100644 generated/kibanaactions/docs/CreateConnectorRequestTines.md delete mode 100644 generated/kibanaactions/docs/CreateConnectorRequestWebhook.md delete mode 100644 generated/kibanaactions/docs/CreateConnectorRequestXmatters.md delete mode 100644 generated/kibanaactions/docs/Features.md delete mode 100644 generated/kibanaactions/docs/GetConnectorsResponseBodyProperties.md delete mode 100644 generated/kibanaactions/docs/InlineResponse200.md delete mode 100644 generated/kibanaactions/docs/InlineResponse2001.md delete mode 100644 generated/kibanaactions/docs/InlineResponse2002.md delete mode 100644 generated/kibanaactions/docs/InlineResponse2003.md delete mode 100644 generated/kibanaactions/docs/InlineResponse400.md delete mode 100644 generated/kibanaactions/docs/InlineResponse404.md delete mode 100644 generated/kibanaactions/docs/LegacyCreateConnectorRequestProperties.md delete mode 100644 generated/kibanaactions/docs/LegacyRunConnectorRequestBodyProperties.md delete mode 100644 generated/kibanaactions/docs/LegacyUpdateConnectorRequestBodyProperties.md delete mode 100644 generated/kibanaactions/docs/NotFoundResponse.md delete mode 100644 generated/kibanaactions/docs/OneOfRunConnectorRequestBodyPropertiesParams.md delete mode 100644 generated/kibanaactions/docs/OneOfinlineResponse2001Data.md delete mode 100644 generated/kibanaactions/docs/OneOfinlineResponse2003Data.md delete mode 100644 generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md delete mode 100644 generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md delete mode 100644 generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md delete mode 100644 generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md delete mode 100644 generated/kibanaactions/docs/RuleNameMapping.md delete mode 100644 generated/kibanaactions/docs/RunConnectorParamsDocuments.md delete mode 100644 generated/kibanaactions/docs/RunConnectorParamsLevelMessage.md delete mode 100644 generated/kibanaactions/docs/RunConnectorRequestBodyProperties.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionAddevent.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionAddeventSubActionParams.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionClosealert.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionClosealertSubActionParams.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionCreatealert.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParams.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsResponders.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsVisibleTo.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetype.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetypeSubActionParams.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionGetchoices.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionGetchoicesSubActionParams.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionGetfields.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionGetincident.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionGetincidentSubActionParams.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionIssue.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionIssueSubActionParams.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionIssues.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionIssuesSubActionParams.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionIssuetypes.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionPushtoservice.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParams.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsComments.md delete mode 100644 generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncident.md delete mode 100644 generated/kibanaactions/docs/SecretsPropertiesCasesWebhook.md delete mode 100644 generated/kibanaactions/docs/SecretsPropertiesJira.md delete mode 100644 generated/kibanaactions/docs/SecretsPropertiesOpsgenie.md delete mode 100644 generated/kibanaactions/docs/SecretsPropertiesResilient.md delete mode 100644 generated/kibanaactions/docs/SecretsPropertiesServicenow.md delete mode 100644 generated/kibanaactions/docs/SecretsPropertiesSwimlane.md delete mode 100644 generated/kibanaactions/docs/SeverityMapping.md delete mode 100644 generated/kibanaactions/docs/UnauthorizedResponse.md delete mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestBodyProperties.md delete mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestCasesWebhook.md delete mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestIndex.md delete mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestJira.md delete mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestOpsgenie.md delete mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestResilient.md delete mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestServerlog.md delete mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestServicenow.md delete mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestServicenowItom.md delete mode 100644 generated/kibanaactions/docs/UpdateConnectorRequestSwimlane.md delete mode 100644 generated/kibanaactions/git_push.sh delete mode 100644 generated/kibanaactions/model_action_response_properties.go delete mode 100644 generated/kibanaactions/model_alert_identifier_mapping.go delete mode 100644 generated/kibanaactions/model_case_comment_mapping.go delete mode 100644 generated/kibanaactions/model_case_description_mapping.go delete mode 100644 generated/kibanaactions/model_case_identifier_mapping.go delete mode 100644 generated/kibanaactions/model_case_name_mapping.go delete mode 100644 generated/kibanaactions/model_config_properties_cases_webhook.go delete mode 100644 generated/kibanaactions/model_config_properties_index.go delete mode 100644 generated/kibanaactions/model_config_properties_jira.go delete mode 100644 generated/kibanaactions/model_config_properties_opsgenie.go delete mode 100644 generated/kibanaactions/model_config_properties_resilient.go delete mode 100644 generated/kibanaactions/model_config_properties_servicenow.go delete mode 100644 generated/kibanaactions/model_config_properties_servicenow_itom.go delete mode 100644 generated/kibanaactions/model_config_properties_swimlane.go delete mode 100644 generated/kibanaactions/model_connector_mappings_properties_for_a_swimlane_connector.go delete mode 100644 generated/kibanaactions/model_connector_response_properties.go delete mode 100644 generated/kibanaactions/model_connector_response_properties_cases_webhook.go delete mode 100644 generated/kibanaactions/model_connector_response_properties_email.go delete mode 100644 generated/kibanaactions/model_connector_response_properties_index.go delete mode 100644 generated/kibanaactions/model_connector_response_properties_jira.go delete mode 100644 generated/kibanaactions/model_connector_response_properties_opsgenie.go delete mode 100644 generated/kibanaactions/model_connector_response_properties_pagerduty.go delete mode 100644 generated/kibanaactions/model_connector_response_properties_resilient.go delete mode 100644 generated/kibanaactions/model_connector_response_properties_serverlog.go delete mode 100644 generated/kibanaactions/model_connector_response_properties_servicenow.go delete mode 100644 generated/kibanaactions/model_connector_response_properties_servicenow_itom.go delete mode 100644 generated/kibanaactions/model_connector_response_properties_servicenow_sir.go delete mode 100644 generated/kibanaactions/model_connector_response_properties_slack.go delete mode 100644 generated/kibanaactions/model_connector_response_properties_swimlane.go delete mode 100644 generated/kibanaactions/model_connector_response_properties_teams.go delete mode 100644 generated/kibanaactions/model_connector_response_properties_tines.go delete mode 100644 generated/kibanaactions/model_connector_response_properties_webhook.go delete mode 100644 generated/kibanaactions/model_connector_response_properties_xmatters.go delete mode 100644 generated/kibanaactions/model_connector_types.go delete mode 100644 generated/kibanaactions/model_create_connector_request_body_properties.go delete mode 100644 generated/kibanaactions/model_create_connector_request_cases_webhook.go delete mode 100644 generated/kibanaactions/model_create_connector_request_email.go delete mode 100644 generated/kibanaactions/model_create_connector_request_index.go delete mode 100644 generated/kibanaactions/model_create_connector_request_jira.go delete mode 100644 generated/kibanaactions/model_create_connector_request_opsgenie.go delete mode 100644 generated/kibanaactions/model_create_connector_request_pagerduty.go delete mode 100644 generated/kibanaactions/model_create_connector_request_resilient.go delete mode 100644 generated/kibanaactions/model_create_connector_request_serverlog.go delete mode 100644 generated/kibanaactions/model_create_connector_request_servicenow.go delete mode 100644 generated/kibanaactions/model_create_connector_request_servicenow_itom.go delete mode 100644 generated/kibanaactions/model_create_connector_request_servicenow_sir.go delete mode 100644 generated/kibanaactions/model_create_connector_request_slack.go delete mode 100644 generated/kibanaactions/model_create_connector_request_swimlane.go delete mode 100644 generated/kibanaactions/model_create_connector_request_teams.go delete mode 100644 generated/kibanaactions/model_create_connector_request_tines.go delete mode 100644 generated/kibanaactions/model_create_connector_request_webhook.go delete mode 100644 generated/kibanaactions/model_create_connector_request_xmatters.go delete mode 100644 generated/kibanaactions/model_features.go delete mode 100644 generated/kibanaactions/model_get_connectors_response_body_properties.go delete mode 100644 generated/kibanaactions/model_inline_response_200.go delete mode 100644 generated/kibanaactions/model_inline_response_200_1.go delete mode 100644 generated/kibanaactions/model_inline_response_200_2.go delete mode 100644 generated/kibanaactions/model_inline_response_200_3.go delete mode 100644 generated/kibanaactions/model_inline_response_400.go delete mode 100644 generated/kibanaactions/model_inline_response_404.go delete mode 100644 generated/kibanaactions/model_legacy_create_connector_request_properties.go delete mode 100644 generated/kibanaactions/model_legacy_run_connector_request_body_properties.go delete mode 100644 generated/kibanaactions/model_legacy_update_connector_request_body_properties.go delete mode 100644 generated/kibanaactions/model_map.go delete mode 100644 generated/kibanaactions/model_not_found_response.go delete mode 100644 generated/kibanaactions/model_one_of_run_connector_request_body_properties_params.go delete mode 100644 generated/kibanaactions/model_one_ofinline_response_200_1_data.go delete mode 100644 generated/kibanaactions/model_one_ofinline_response_200_3_data.go delete mode 100644 generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go delete mode 100644 generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go delete mode 100644 generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go delete mode 100644 generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go delete mode 100644 generated/kibanaactions/model_rule_name_mapping.go delete mode 100644 generated/kibanaactions/model_run_connector_params_documents.go delete mode 100644 generated/kibanaactions/model_run_connector_params_level_message.go delete mode 100644 generated/kibanaactions/model_run_connector_request_body_properties.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_addevent.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_addevent_sub_action_params.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_closealert.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_closealert_sub_action_params.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_createalert.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_responders.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_visible_to.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype_sub_action_params.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_getchoices.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_getchoices_sub_action_params.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_getfields.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_getincident.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_getincident_sub_action_params.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_issue.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_issue_sub_action_params.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_issues.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_issues_sub_action_params.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_issuetypes.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_pushtoservice.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_comments.go delete mode 100644 generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident.go delete mode 100644 generated/kibanaactions/model_secrets_properties_cases_webhook.go delete mode 100644 generated/kibanaactions/model_secrets_properties_jira.go delete mode 100644 generated/kibanaactions/model_secrets_properties_opsgenie.go delete mode 100644 generated/kibanaactions/model_secrets_properties_resilient.go delete mode 100644 generated/kibanaactions/model_secrets_properties_servicenow.go delete mode 100644 generated/kibanaactions/model_secrets_properties_swimlane.go delete mode 100644 generated/kibanaactions/model_severity_mapping.go delete mode 100644 generated/kibanaactions/model_unauthorized_response.go delete mode 100644 generated/kibanaactions/model_update_connector_request_body_properties.go delete mode 100644 generated/kibanaactions/model_update_connector_request_cases_webhook.go delete mode 100644 generated/kibanaactions/model_update_connector_request_index.go delete mode 100644 generated/kibanaactions/model_update_connector_request_jira.go delete mode 100644 generated/kibanaactions/model_update_connector_request_opsgenie.go delete mode 100644 generated/kibanaactions/model_update_connector_request_resilient.go delete mode 100644 generated/kibanaactions/model_update_connector_request_serverlog.go delete mode 100644 generated/kibanaactions/model_update_connector_request_servicenow.go delete mode 100644 generated/kibanaactions/model_update_connector_request_servicenow_itom.go delete mode 100644 generated/kibanaactions/model_update_connector_request_swimlane.go delete mode 100644 generated/kibanaactions/response.go create mode 100644 internal/clients/kibana/action_connector_test.go rename internal/clients/kibana/{action_connector.go => connector.go} (59%) rename internal/kibana/{action_connector.go => connector.go} (100%) rename internal/kibana/{action_connector_test.go => connector_test.go} (100%) diff --git a/Makefile b/Makefile index d13679130..8a465fab9 100644 --- a/Makefile +++ b/Makefile @@ -259,37 +259,7 @@ generate-alerting-client: ## generate Kibana alerting client ## -i https://raw.githubusercontent.com/elastic/kibana/$(SWAGGER_VERSION)/x-pack/plugins/actions/docs/openapi/bundled.json \ -.PHONY: generate-kibana-actions-client -generate-kibana-actions-client: ## generate Kibana actions client - @ docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \ - -i https://raw.githubusercontent.com/elastic/kibana/$(SWAGGER_VERSION)/x-pack/plugins/actions/docs/openapi/bundled.json \ - --skip-validate-spec \ - --git-repo-id terraform-provider-elasticstack \ - --git-user-id elastic \ - -p isGoSubmodule=true \ - -p packageName=kibanaactions \ - -p generateInterfaces=true \ - -g go \ - -o /local/generated/kibanaactions \ - --additional-properties=useOneOfDiscriminatorLookup=true - @ rm -rf generated/kibanaactions/go.mod generated/kibanaactions/go.sum generated/kibanaactions/test - @ go fmt ./generated/kibanaactions/... - -.PHONY: generate-kibana-actions-client2 -generate-kibana-actions-client2: ## generate Kibana actions client - @ docker run --rm -v "${PWD}:/local" --platform linux/amd64 swaggerapi/swagger-codegen-cli-v3 generate \ - -i https://raw.githubusercontent.com/elastic/kibana/$(SWAGGER_VERSION)/x-pack/plugins/actions/docs/openapi/bundled.json \ - -l go \ - -p packageName=kibanaactions \ - -o /local/generated/kibanaactions - -.PHONY: generate-kibana-actions-client3 -generate-kibana-actions-client3: ## generate Kibana actions client - @ swagger-codegen generate \ - -i https://raw.githubusercontent.com/elastic/kibana/$(SWAGGER_VERSION)/x-pack/plugins/actions/docs/openapi/bundled.json \ - -l go \ - -o ./generated/kibanaactions \ - --additional-properties=useOneOfDiscriminatorLookup=true \ - --additional-properties=generateInterfaces=true \ - --additional-properties=GoSubmodule=true \ - --additional-properties=packageName=kibanaactions \ No newline at end of file +.PHONY: generate-connectors-client +generate-connectors-client: ## generate Kibana connectors client + @ go get github.com/ogen-go/ogen/gen@v0.63.0 + @ go generate diff --git a/connectors_gen.go b/connectors_gen.go new file mode 100644 index 000000000..e09652256 --- /dev/null +++ b/connectors_gen.go @@ -0,0 +1,3 @@ +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --target generated/connectors -package connectors --clean --debug.ignoreNotImplemented "discriminator inference" ./generated/connectors/bundled.yaml + +package main diff --git a/generated/kibanaactions/api/swagger.yaml b/generated/connectors/bundled.yaml similarity index 52% rename from generated/kibanaactions/api/swagger.yaml rename to generated/connectors/bundled.yaml index b68420a2c..56bef67ed 100644 --- a/generated/kibanaactions/api/swagger.yaml +++ b/generated/connectors/bundled.yaml @@ -2,60 +2,80 @@ openapi: 3.0.1 info: title: Connectors description: OpenAPI schema for Connectors endpoints + version: '0.1' contact: name: Connectors Team license: name: Elastic License 2.0 url: https://www.elastic.co/licensing/elastic-license - version: "0.1" -servers: -- url: http://localhost:5601 - description: local -security: -- basicAuth: [] -- apiKeyAuth: [] tags: -- name: connectors - description: Connector APIs enable you to create and manage connectors. + - name: connectors + description: Connector APIs enable you to create and manage connectors. +servers: + - url: http://localhost:5601 + description: local paths: /s/{spaceId}/api/actions/connector: post: - tags: - - connectors summary: Creates a connector. + operationId: createConnector description: | You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - operationId: createConnector + tags: + - connectors parameters: - - name: kbn-xsrf - in: header - description: Cross-site request forgery protection - required: true - style: simple - explode: false - schema: - type: string - - name: spaceId - in: path - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - required: true - style: simple - explode: false - schema: - type: string - example: default + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/space_id' requestBody: + required: true content: application/json: schema: - $ref: '#/components/schemas/Create connector request body properties' + title: Create connector request body properties + description: The properties vary depending on the connector type. + oneOf: + - $ref: '#/components/schemas/create_connector_request_cases_webhook' + - $ref: '#/components/schemas/create_connector_request_email' + - $ref: '#/components/schemas/create_connector_request_index' + - $ref: '#/components/schemas/create_connector_request_jira' + - $ref: '#/components/schemas/create_connector_request_opsgenie' + - $ref: '#/components/schemas/create_connector_request_pagerduty' + - $ref: '#/components/schemas/create_connector_request_resilient' + - $ref: '#/components/schemas/create_connector_request_serverlog' + - $ref: '#/components/schemas/create_connector_request_servicenow' + - $ref: '#/components/schemas/create_connector_request_servicenow_itom' + - $ref: '#/components/schemas/create_connector_request_servicenow_sir' + - $ref: '#/components/schemas/create_connector_request_slack' + - $ref: '#/components/schemas/create_connector_request_swimlane' + - $ref: '#/components/schemas/create_connector_request_teams' + - $ref: '#/components/schemas/create_connector_request_tines' + - $ref: '#/components/schemas/create_connector_request_webhook' + - $ref: '#/components/schemas/create_connector_request_xmatters' + discriminator: + propertyName: connector_type_id + mapping: + .cases-webhook: '#/components/schemas/create_connector_request_cases_webhook' + .email: '#/components/schemas/create_connector_request_email' + .index: '#/components/schemas/create_connector_request_index' + .jira: '#/components/schemas/create_connector_request_jira' + .opsgenie: '#/components/schemas/create_connector_request_opsgenie' + .pagerduty: '#/components/schemas/create_connector_request_pagerduty' + .resilient: '#/components/schemas/create_connector_request_resilient' + .server-log: '#/components/schemas/create_connector_request_serverlog' + .servicenow: '#/components/schemas/create_connector_request_servicenow' + .servicenow-itom: '#/components/schemas/create_connector_request_servicenow_itom' + .servicenow-sir: '#/components/schemas/create_connector_request_servicenow_sir' + .slack: '#/components/schemas/create_connector_request_slack' + .swimlane: '#/components/schemas/create_connector_request_swimlane' + .teams: '#/components/schemas/create_connector_request_teams' + .tines: '#/components/schemas/create_connector_request_tines' + .webhook: '#/components/schemas/create_connector_request_webhook' + .xmatters: '#/components/schemas/create_connector_request_xmatters' examples: createIndexConnectorRequest: $ref: '#/components/examples/create_index_connector_request' - required: true responses: - "200": + '200': description: Indicates a successful call. content: application/json: @@ -64,46 +84,25 @@ paths: examples: createIndexConnectorResponse: $ref: '#/components/examples/create_index_connector_response' - "401": - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/Unauthorized response' + '401': + $ref: '#/components/responses/401' servers: - - url: https://localhost:5601 + - url: https://localhost:5601 servers: - - url: https://localhost:5601 + - url: https://localhost:5601 /s/{spaceId}/api/actions/connector/{connectorId}: get: - tags: - - connectors summary: Retrieves a connector by ID. + operationId: getConnector description: | You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - operationId: getConnector + tags: + - connectors parameters: - - name: connectorId - in: path - description: An identifier for the connector. - required: true - style: simple - explode: false - schema: - type: string - example: df770e30-8b8b-11ed-a780-3b746c987a81 - - name: spaceId - in: path - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - required: true - style: simple - explode: false - schema: - type: string - example: default + - $ref: '#/components/parameters/connector_id' + - $ref: '#/components/parameters/space_id' responses: - "200": + '200': description: Indicates a successful call. content: application/json: @@ -112,281 +111,316 @@ paths: examples: getConnectorResponse: $ref: '#/components/examples/get_connector_response' - "401": - description: Authorization information is missing or invalid. + '401': + $ref: '#/components/responses/401' + '404': + description: Object is not found. content: application/json: schema: - $ref: '#/components/schemas/Unauthorized response' - "404": + type: object + properties: + error: + type: string + example: Not Found + message: + type: string + example: Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found + statusCode: + type: integer + example: 404 + servers: + - url: https://localhost:5601 + delete: + summary: Deletes a connector. + operationId: deleteConnector + description: | + You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be recovered. + tags: + - connectors + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/connector_id' + - $ref: '#/components/parameters/space_id' + responses: + '204': + description: Indicates a successful call. + '401': + $ref: '#/components/responses/401' + '404': description: Object is not found. content: application/json: schema: - $ref: '#/components/schemas/inline_response_404' + type: object + properties: + error: + type: string + example: Not Found + message: + type: string + example: Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found + statusCode: + type: integer + example: 404 servers: - - url: https://localhost:5601 + - url: https://localhost:5601 put: - tags: - - connectors summary: Updates the attributes for a connector. + operationId: updateConnector description: | You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - operationId: updateConnector + tags: + - connectors parameters: - - name: kbn-xsrf - in: header - description: Cross-site request forgery protection - required: true - style: simple - explode: false - schema: - type: string - - name: connectorId - in: path - description: An identifier for the connector. - required: true - style: simple - explode: false - schema: - type: string - example: df770e30-8b8b-11ed-a780-3b746c987a81 - - name: spaceId - in: path - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - required: true - style: simple - explode: false - schema: - type: string - example: default + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/connector_id' + - $ref: '#/components/parameters/space_id' requestBody: + required: true content: application/json: schema: - $ref: '#/components/schemas/Update connector request body properties' + title: Update connector request body properties + description: The properties vary depending on the connector type. + oneOf: + - $ref: '#/components/schemas/update_connector_request_cases_webhook' + - $ref: '#/components/schemas/update_connector_request_index' + - $ref: '#/components/schemas/update_connector_request_jira' + - $ref: '#/components/schemas/update_connector_request_opsgenie' + - $ref: '#/components/schemas/update_connector_request_resilient' + - $ref: '#/components/schemas/update_connector_request_serverlog' + - $ref: '#/components/schemas/update_connector_request_servicenow' + - $ref: '#/components/schemas/update_connector_request_servicenow_itom' + - $ref: '#/components/schemas/update_connector_request_swimlane' + discriminator: + propertyName: connector_type_id + mapping: + .cases-webhook: '#/components/schemas/update_connector_request_cases_webhook' +# .email: '#/components/schemas/update_connector_request_email' + .index: '#/components/schemas/update_connector_request_index' + .jira: '#/components/schemas/update_connector_request_jira' + .opsgenie: '#/components/schemas/update_connector_request_opsgenie' +# .pagerduty: '#/components/schemas/update_connector_request_pagerduty' + .resilient: '#/components/schemas/update_connector_request_resilient' + .server-log: '#/components/schemas/update_connector_request_serverlog' + .servicenow: '#/components/schemas/update_connector_request_servicenow' + .servicenow-itom: '#/components/schemas/update_connector_request_servicenow_itom' +# .servicenow-sir: '#/components/schemas/create_connector_request_servicenow_sir' +# .slack: '#/components/schemas/create_connector_request_slack' + .swimlane: '#/components/schemas/update_connector_request_swimlane' + # .teams: '#/components/schemas/create_connector_request_teams' + # .tines: '#/components/schemas/create_connector_request_tines' + # .webhook: '#/components/schemas/create_connector_request_webhook' + # .xmatters: '#/components/schemas/create_connector_request_xmatters' examples: updateIndexConnectorRequest: $ref: '#/components/examples/update_index_connector_request' - required: true responses: - "200": + '200': description: Indicates a successful call. content: application/json: schema: $ref: '#/components/schemas/connector_response_properties' - "400": + '400': description: Indicates a bad request. content: application/json: schema: - $ref: '#/components/schemas/inline_response_400' - "401": - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/Unauthorized response' - "404": - description: Object is not found. - content: - application/json: - schema: - $ref: '#/components/schemas/Not found response' - servers: - - url: https://localhost:5601 - delete: - tags: - - connectors - summary: Deletes a connector. - description: | - You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be recovered. - operationId: deleteConnector - parameters: - - name: kbn-xsrf - in: header - description: Cross-site request forgery protection - required: true - style: simple - explode: false - schema: - type: string - - name: connectorId - in: path - description: An identifier for the connector. - required: true - style: simple - explode: false - schema: - type: string - example: df770e30-8b8b-11ed-a780-3b746c987a81 - - name: spaceId - in: path - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - required: true - style: simple - explode: false - schema: - type: string - example: default - responses: - "204": - description: Indicates a successful call. - "401": - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/Unauthorized response' - "404": - description: Object is not found. - content: - application/json: - schema: - $ref: '#/components/schemas/inline_response_404' + type: object + properties: + error: + type: string + example: Bad Request + message: + type: string + example: 'error validating action type config: [index]: expected value of type [string] but got [undefined]' + statusCode: + type: integer + example: 400 + '401': + $ref: '#/components/responses/401' + '404': + $ref: '#/components/responses/404' servers: - - url: https://localhost:5601 + - url: https://localhost:5601 servers: - - url: https://localhost:5601 + - url: https://localhost:5601 /s/{spaceId}/api/actions/connectors: get: - tags: - - connectors summary: Retrieves all connectors. + operationId: getConnectors description: | You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - operationId: getConnectors + tags: + - connectors parameters: - - name: spaceId - in: path - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - required: true - style: simple - explode: false - schema: - type: string - example: default + - $ref: '#/components/parameters/space_id' responses: - "200": + '200': description: Indicates a successful call. content: application/json: schema: type: array items: - $ref: '#/components/schemas/Get connectors response body properties' - x-content-type: application/json + title: Get connectors response body properties + description: The properties vary for each connector type. + type: object + required: + - connector_type_id + - id + # - is_deprecated + - is_preconfigured + - name + - referenced_by_count + properties: + connector_type_id: + $ref: '#/components/schemas/connector_types' + config: + type: object + description: The configuration for the connector. Configuration properties vary depending on the connector type. + additionalProperties: true + nullable: true + id: + type: string + description: The identifier for the connector. + example: b0766e10-d190-11ec-b04c-776c77d14fca + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + name: + type: string + description: The display name for the connector. + example: my-connector + referenced_by_count: + type: integer + description: Indicates the number of saved objects that reference the connector. If `is_preconfigured` is true, this value is not calculated. + example: 2 + default: 0 examples: getConnectorsResponse: $ref: '#/components/examples/get_connectors_response' - "401": - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/Unauthorized response' + '401': + $ref: '#/components/responses/401' servers: - - url: https://localhost:5601 + - url: https://localhost:5601 servers: - - url: https://localhost:5601 + - url: https://localhost:5601 /s/{spaceId}/api/actions/connector_types: get: - tags: - - connectors summary: Retrieves a list of all connector types. + operationId: getConnectorTypes description: | You do not need any Kibana feature privileges to run this API. - operationId: getConnectorTypes + tags: + - connectors parameters: - - name: spaceId - in: path - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - required: true - style: simple - explode: false - schema: - type: string - example: default - - name: feature_id - in: query - description: A filter to limit the retrieved connector types to those that - support a specific feature (such as alerting or cases). - required: false - style: form - explode: true - schema: - $ref: '#/components/schemas/features' + - $ref: '#/components/parameters/space_id' + - in: query + name: feature_id + description: A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases). + schema: + $ref: '#/components/schemas/features' responses: - "200": + '200': description: Indicates a successful call. content: application/json: schema: title: Get connector types response body properties - type: array description: The properties vary for each connector type. + type: array items: - $ref: '#/components/schemas/inline_response_200' - x-content-type: application/json + type: object + properties: + enabled: + type: boolean + description: Indicates whether the connector type is enabled in Kibana. + example: true + enabled_in_config: + type: boolean + description: Indicates whether the connector type is enabled in the Kibana `.yml` file. + example: true + enabled_in_license: + type: boolean + description: Indicates whether the connector is enabled in the license. + example: true + id: + $ref: '#/components/schemas/connector_types' + minimum_license_required: + type: string + description: The license that is required to use the connector type. + example: basic + name: + type: string + description: The name of the connector type. + example: Index + supported_feature_ids: + type: array + description: The Kibana features that are supported by the connector type. + items: + $ref: '#/components/schemas/features' + example: + - alerting + - uptime + - siem examples: getConnectorTypesResponse: $ref: '#/components/examples/get_connector_types_response' - "401": - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/Unauthorized response' + '401': + $ref: '#/components/responses/401' servers: - - url: https://localhost:5601 + - url: https://localhost:5601 servers: - - url: https://localhost:5601 + - url: https://localhost:5601 /s/{spaceId}/api/actions/connector/{connectorId}/_execute: post: - tags: - - connectors summary: Runs a connector. + operationId: runConnector description: | You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. If you use an index connector, you must also have `all`, `create`, `index`, or `write` indices privileges. - operationId: runConnector + tags: + - connectors parameters: - - name: kbn-xsrf - in: header - description: Cross-site request forgery protection - required: true - style: simple - explode: false - schema: - type: string - - name: connectorId - in: path - description: An identifier for the connector. - required: true - style: simple - explode: false - schema: - type: string - example: df770e30-8b8b-11ed-a780-3b746c987a81 - - name: spaceId - in: path - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - required: true - style: simple - explode: false - schema: - type: string - example: default + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/connector_id' + - $ref: '#/components/parameters/space_id' requestBody: + required: true content: application/json: schema: - $ref: '#/components/schemas/Run connector request body properties' + title: Run connector request body properties + description: The properties vary depending on the connector type. + type: object + required: + - params + properties: + params: + oneOf: + - $ref: '#/components/schemas/run_connector_params_documents' + - $ref: '#/components/schemas/run_connector_params_level_message' + - title: Subaction parameters + description: Test an action that involves a subaction. + oneOf: + - $ref: '#/components/schemas/run_connector_subaction_addevent' + - $ref: '#/components/schemas/run_connector_subaction_closealert' + - $ref: '#/components/schemas/run_connector_subaction_createalert' + - $ref: '#/components/schemas/run_connector_subaction_fieldsbyissuetype' + - $ref: '#/components/schemas/run_connector_subaction_getchoices' + - $ref: '#/components/schemas/run_connector_subaction_getfields' + - $ref: '#/components/schemas/run_connector_subaction_getincident' + - $ref: '#/components/schemas/run_connector_subaction_issue' + - $ref: '#/components/schemas/run_connector_subaction_issues' + - $ref: '#/components/schemas/run_connector_subaction_issuetypes' + - $ref: '#/components/schemas/run_connector_subaction_pushtoservice' + discriminator: + propertyName: subAction examples: runIndexConnectorRequest: $ref: '#/components/examples/run_index_connector_request' @@ -398,14 +432,35 @@ paths: $ref: '#/components/examples/run_servicenow_itom_connector_request' runSwimlaneConnectorRequest: $ref: '#/components/examples/run_swimlane_connector_request' - required: true responses: - "200": + '200': description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_1' + type: object + required: + - connector_id + - status + properties: + connector_id: + type: string + description: The identifier for the connector. + data: + oneOf: + - type: object + description: Information returned from the action. + additionalProperties: true + - type: array + description: An array of information returned from the action. + items: + type: object + status: + type: string + description: The status of the action. + enum: + - error + - ok examples: runIndexConnectorResponse: $ref: '#/components/examples/run_index_connector_response' @@ -417,184 +472,99 @@ paths: $ref: '#/components/examples/run_servicenow_itom_connector_response' runSwimlaneConnectorResponse: $ref: '#/components/examples/run_swimlane_connector_response' - "401": - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/Unauthorized response' + '401': + $ref: '#/components/responses/401' servers: - - url: https://localhost:5601 + - url: https://localhost:5601 servers: - - url: https://localhost:5601 + - url: https://localhost:5601 /s/{spaceId}/api/actions/action/{actionId}: - get: + delete: + summary: Deletes a connector. + operationId: legacyDeleteConnector + deprecated: true + description: | + Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, it cannot be recovered. tags: - - connectors - summary: Retrieves a connector by ID. - description: Deprecated in 7.13.0. Use the get connector API instead. - operationId: legacyGetConnector + - connectors parameters: - - name: actionId - in: path - description: An identifier for the action. - required: true - style: simple - explode: false - schema: - type: string - example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad - - name: spaceId - in: path - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - required: true - style: simple - explode: false - schema: - type: string - example: default + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/action_id' + - $ref: '#/components/parameters/space_id' responses: - "200": + '204': description: Indicates a successful call. - content: - application/json: - schema: - $ref: '#/components/schemas/action_response_properties' - "401": - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/Unauthorized response' + '401': + $ref: '#/components/responses/401' + servers: + - url: https://localhost:5601 + get: + summary: Retrieves a connector by ID. + operationId: legacyGetConnector + description: Deprecated in 7.13.0. Use the get connector API instead. deprecated: true + tags: + - connectors + parameters: + - $ref: '#/components/parameters/action_id' + - $ref: '#/components/parameters/space_id' + responses: + '200': + $ref: '#/components/responses/200_actions' + '401': + $ref: '#/components/responses/401' servers: - - url: https://localhost:5601 + - url: https://localhost:5601 put: - tags: - - connectors summary: Updates the attributes for a connector. - description: Deprecated in 7.13.0. Use the update connector API instead. operationId: legacyUpdateConnector + deprecated: true + description: Deprecated in 7.13.0. Use the update connector API instead. + tags: + - connectors parameters: - - name: kbn-xsrf - in: header - description: Cross-site request forgery protection - required: true - style: simple - explode: false - schema: - type: string - - name: actionId - in: path - description: An identifier for the action. - required: true - style: simple - explode: false - schema: - type: string - example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad - - name: spaceId - in: path - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - required: true - style: simple - explode: false - schema: - type: string - example: default + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/action_id' + - $ref: '#/components/parameters/space_id' requestBody: + required: true content: application/json: schema: - $ref: '#/components/schemas/Legacy update connector request body properties' - required: true - responses: - "200": - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '#/components/schemas/action_response_properties' - "404": - description: Object is not found. - content: - application/json: - schema: - $ref: '#/components/schemas/Not found response' - deprecated: true - servers: - - url: https://localhost:5601 - delete: - tags: - - connectors - summary: Deletes a connector. - description: | - Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, it cannot be recovered. - operationId: legacyDeleteConnector - parameters: - - name: kbn-xsrf - in: header - description: Cross-site request forgery protection - required: true - style: simple - explode: false - schema: - type: string - - name: actionId - in: path - description: An identifier for the action. - required: true - style: simple - explode: false - schema: - type: string - example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad - - name: spaceId - in: path - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - required: true - style: simple - explode: false - schema: - type: string - example: default + title: Legacy update connector request body properties + description: The properties vary depending on the connector type. + type: object + properties: + config: + type: object + description: The new connector configuration. Configuration properties vary depending on the connector type. + name: + type: string + description: The new name for the connector. + secrets: + type: object + description: The updated secrets configuration for the connector. Secrets properties vary depending on the connector type. responses: - "204": - description: Indicates a successful call. - "401": - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/Unauthorized response' - deprecated: true + '200': + $ref: '#/components/responses/200_actions' + '404': + $ref: '#/components/responses/404' servers: - - url: https://localhost:5601 + - url: https://localhost:5601 servers: - - url: https://localhost:5601 + - url: https://localhost:5601 /s/{spaceId}/api/actions: get: - tags: - - connectors summary: Retrieves all connectors. - description: Deprecated in 7.13.0. Use the get all connectors API instead. operationId: legacyGetConnectors + deprecated: true + description: Deprecated in 7.13.0. Use the get all connectors API instead. + tags: + - connectors parameters: - - name: spaceId - in: path - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - required: true - style: simple - explode: false - schema: - type: string - example: default + - $ref: '#/components/parameters/space_id' responses: - "200": + '200': description: Indicates a successful call. content: application/json: @@ -602,235 +572,267 @@ paths: type: array items: $ref: '#/components/schemas/action_response_properties' - x-content-type: application/json - "401": - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/Unauthorized response' - deprecated: true + '401': + $ref: '#/components/responses/401' servers: - - url: https://localhost:5601 + - url: https://localhost:5601 post: - tags: - - connectors summary: Creates a connector. - description: Deprecated in 7.13.0. Use the create connector API instead. operationId: legacyCreateConnector + deprecated: true + description: Deprecated in 7.13.0. Use the create connector API instead. + tags: + - connectors parameters: - - name: kbn-xsrf - in: header - description: Cross-site request forgery protection - required: true - style: simple - explode: false - schema: - type: string - - name: spaceId - in: path - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - required: true - style: simple - explode: false - schema: - type: string - example: default + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/space_id' requestBody: + required: true content: application/json: schema: - $ref: '#/components/schemas/Legacy create connector request properties' - required: true + title: Legacy create connector request properties + type: object + properties: + actionTypeId: + type: string + description: The connector type identifier. + config: + type: object + description: The configuration for the connector. Configuration properties vary depending on the connector type. + name: + type: string + description: The display name for the connector. + secrets: + type: object + description: | + The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. NOTE: Remember these values. You must provide them each time you update the connector. responses: - "200": - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '#/components/schemas/action_response_properties' - "401": - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/Unauthorized response' - deprecated: true + '200': + $ref: '#/components/responses/200_actions' + '401': + $ref: '#/components/responses/401' servers: - - url: https://localhost:5601 + - url: https://localhost:5601 servers: - - url: https://localhost:5601 + - url: https://localhost:5601 /s/{spaceId}/api/actions/list_action_types: get: - tags: - - connectors summary: Retrieves a list of all connector types. - description: Deprecated in 7.13.0. Use the get all connector types API instead. operationId: legacyGetConnectorTypes + deprecated: true + description: Deprecated in 7.13.0. Use the get all connector types API instead. + tags: + - connectors parameters: - - name: spaceId - in: path - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - required: true - style: simple - explode: false - schema: - type: string - example: default + - $ref: '#/components/parameters/space_id' responses: - "200": + '200': description: Indicates a successful call. content: application/json: schema: title: Legacy get connector types response body properties - type: array description: The properties vary for each connector type. + type: array items: - $ref: '#/components/schemas/inline_response_200_2' - x-content-type: application/json - "401": - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/Unauthorized response' - deprecated: true + type: object + properties: + enabled: + type: boolean + description: Indicates whether the connector type is enabled in Kibana. + enabledInConfig: + type: boolean + description: Indicates whether the connector type is enabled in the Kibana `.yml` file. + enabledInLicense: + type: boolean + description: Indicates whether the connector is enabled in the license. + example: true + id: + type: string + description: The unique identifier for the connector type. + minimumLicenseRequired: + type: string + description: The license that is required to use the connector type. + name: + type: string + description: The name of the connector type. + '401': + $ref: '#/components/responses/401' servers: - - url: https://localhost:5601 + - url: https://localhost:5601 servers: - - url: https://localhost:5601 + - url: https://localhost:5601 /s/{spaceId}/api/actions/action/{actionId}/_execute: post: - tags: - - connectors summary: Runs a connector. - description: Deprecated in 7.13.0. Use the run connector API instead. operationId: legacyRunConnector + deprecated: true + description: Deprecated in 7.13.0. Use the run connector API instead. + tags: + - connectors parameters: - - name: kbn-xsrf - in: header - description: Cross-site request forgery protection - required: true - style: simple - explode: false - schema: - type: string - - name: actionId - in: path - description: An identifier for the action. - required: true - style: simple - explode: false - schema: - type: string - example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad - - name: spaceId - in: path - description: "An identifier for the space. If `/s/` and the identifier are\ - \ omitted from the path, the default space is used." - required: true - style: simple - explode: false - schema: - type: string - example: default + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/action_id' + - $ref: '#/components/parameters/space_id' requestBody: + required: true content: application/json: schema: - $ref: '#/components/schemas/Legacy run connector request body properties' - required: true + title: Legacy run connector request body properties + description: The properties vary depending on the connector type. + type: object + required: + - params + properties: + params: + type: object + description: The parameters of the connector. Parameter properties vary depending on the connector type. responses: - "200": + '200': description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_3' - "401": - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/Unauthorized response' - deprecated: true + type: object + properties: + actionId: + type: string + data: + oneOf: + - type: object + description: Information returned from the action. + additionalProperties: true + - type: array + description: An array of information returned from the action. + items: + type: object + status: + type: string + description: The status of the action. + '401': + $ref: '#/components/responses/401' servers: - - url: https://localhost:5601 + - url: https://localhost:5601 servers: - - url: https://localhost:5601 + - url: https://localhost:5601 components: + securitySchemes: + basicAuth: + type: http + scheme: basic + apiKeyAuth: + type: apiKey + in: header + name: ApiKey + parameters: + kbn_xsrf: + schema: + type: string + in: header + name: kbn-xsrf + description: Cross-site request forgery protection + required: true + space_id: + in: path + name: spaceId + description: An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + required: true + schema: + type: string + example: default + connector_id: + in: path + name: connectorId + description: An identifier for the connector. + required: true + schema: + type: string + example: df770e30-8b8b-11ed-a780-3b746c987a81 + action_id: + in: path + name: actionId + description: An identifier for the action. + required: true + schema: + type: string + example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad schemas: config_properties_cases_webhook: title: Connector request properties for Webhook - Case Management connector required: - - createIncidentJson - - createIncidentResponseKey - - createIncidentUrl - - getIncidentResponseExternalTitleKey - - getIncidentUrl - - updateIncidentJson - - updateIncidentUrl - - viewIncidentUrl + - createIncidentJson + - createIncidentResponseKey + - createIncidentUrl + - getIncidentResponseExternalTitleKey + - getIncidentUrl + - updateIncidentJson + - updateIncidentUrl + - viewIncidentUrl + description: Defines properties for connectors when type is `.cases-webhook`. type: object properties: createCommentJson: type: string description: | A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. - example: "{\"body\":{\"[object Object]\":null}}" + example: + body: + '[object Object]': null createCommentMethod: type: string description: | The REST API HTTP request method to create a case comment in the third-party system. Valid values are `patch`, `post`, and `put`. default: put enum: - - patch - - post - - put + - patch + - post + - put createCommentUrl: type: string description: | The REST API URL to create a case comment by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts setting`, add the hostname to the allowed hosts. - example: "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}/comment" + example: https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}/comment createIncidentJson: type: string description: | A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. - example: "{\"fields\":{\"summary\":{\"[object Object]\":null},\"description\"\ - :{\"[object Object]\":null},\"labels\":{\"[object Object]\":null}}}" + example: + fields: + summary: + '[object Object]': null + description: + '[object Object]': null + labels: + '[object Object]': null createIncidentMethod: type: string description: | The REST API HTTP request method to create a case in the third-party system. Valid values are `patch`, `post`, and `put`. - default: post enum: - - patch - - post - - put + - patch + - post + - put + default: post createIncidentResponseKey: type: string - description: The JSON key in the create case response that contains the - external case ID. + description: The JSON key in the create case response that contains the external case ID. createIncidentUrl: type: string description: | The REST API URL to create a case in the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. getIncidentResponseExternalTitleKey: type: string - description: The JSON key in get case response that contains the external - case title. + description: The JSON key in get case response that contains the external case title. getIncidentUrl: type: string description: | The REST API URL to get the case by ID from the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. You can use a variable to add the external system ID to the URL. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. - example: "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}" + example: https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}} hasAuth: type: boolean - description: "If true, a username and password for login type authentication\ - \ must be provided." + description: If true, a username and password for login type authentication must be provided. default: true headers: type: string @@ -840,295 +842,295 @@ components: type: string description: | The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. - example: "{\"fields\":{\"summary\":{\"[object Object]\":null},\"description\"\ - :{\"[object Object]\":null},\"labels\":{\"[object Object]\":null}}}" + example: + fields: + summary: + '[object Object]': null + description: + '[object Object]': null + labels: + '[object Object]': null updateIncidentMethod: type: string description: | The REST API HTTP request method to update the case in the third-party system. Valid values are `patch`, `post`, and `put`. default: put enum: - - patch - - post - - put + - patch + - post + - put updateIncidentUrl: type: string description: | The REST API URL to update the case by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. - example: "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.ID}}}" + example: https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.ID}}} viewIncidentUrl: type: string description: | The URL to view the case in the external system. You can use variables to add the external system ID or external system title to the URL. - example: "https://testing-jira.atlassian.net/browse/{{{external.system.title}}}" - description: Defines properties for connectors when type is `.cases-webhook`. + example: https://testing-jira.atlassian.net/browse/{{{external.system.title}}} secrets_properties_cases_webhook: title: Connector secrets properties for Webhook - Case Management connector type: object properties: password: type: string - description: "The password for HTTP basic authentication. If `hasAuth` is\ - \ set to `true`, this property is required." + description: The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. user: type: string - description: "The username for HTTP basic authentication. If `hasAuth` is\ - \ set to `true`, this property is required." + description: The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. create_connector_request_cases_webhook: title: Create Webhook - Case Managment connector request - required: - - config - - connector_type_id - - name + description: | + The Webhook - Case Management connector uses axios to send POST, PUT, and GET requests to a case management RESTful API web service. type: object + required: + - config + - connector_type_id + - name properties: config: $ref: '#/components/schemas/config_properties_cases_webhook' connector_type_id: type: string description: The type of connector. - example: .cases-webhook enum: - - .cases-webhook + - .cases-webhook + example: .cases-webhook name: type: string description: The display name for the connector. example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_cases_webhook' - description: | - The Webhook - Case Management connector uses axios to send POST, PUT, and GET requests to a case management RESTful API web service. config_properties_email: title: Connector request properties for an email connector + description: Defines properties for connectors when type is `.email`. type: object additionalProperties: true - description: Defines properties for connectors when type is `.email`. - x-schema-name: config_properties_email secrets_properties_email: title: Connector secrets properties for an email connector + description: Defines secrets for connectors when type is `.email`. type: object additionalProperties: true - description: Defines secrets for connectors when type is `.email`. - x-schema-name: secrets_properties_email create_connector_request_email: title: Create email connector request - required: - - config - - connector_type_id - - name - - secrets + description: | + The email connector uses the SMTP protocol to send mail messages, using an integration of Nodemailer. An exception is Microsoft Exchange, which uses HTTP protocol for sending emails, Send mail. Email message text is sent as both plain text and html text. type: object + required: + - config + - connector_type_id + - name + - secrets properties: config: $ref: '#/components/schemas/config_properties_email' connector_type_id: type: string description: The type of connector. - example: .email enum: - - .email + - .email + example: .email name: type: string description: The display name for the connector. example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_email' - description: | - The email connector uses the SMTP protocol to send mail messages, using an integration of Nodemailer. An exception is Microsoft Exchange, which uses HTTP protocol for sending emails, Send mail. Email message text is sent as both plain text and html text. config_properties_index: title: Connector request properties for an index connector required: - - index + - index + description: Defines properties for connectors when type is `.index`. type: object properties: executionTimeField: + description: Specifies a field that will contain the time the alert condition was detected. + default: null type: string - description: Specifies a field that will contain the time the alert condition - was detected. nullable: true index: - type: string description: The Elasticsearch index to be written to. + type: string refresh: - type: boolean description: | The refresh policy for the write request, which affects when changes are made visible to search. Refer to the refresh setting for Elasticsearch document APIs. default: false - description: Defines properties for connectors when type is `.index`. + type: boolean create_connector_request_index: title: Create index connector request - required: - - config - - connector_type_id - - name + description: The index connector indexes a document into Elasticsearch. type: object + required: + - config + - connector_type_id + - name properties: config: $ref: '#/components/schemas/config_properties_index' connector_type_id: type: string description: The type of connector. - example: .index enum: - - .index + - .index + example: .index name: type: string description: The display name for the connector. example: my-connector - description: The index connector indexes a document into Elasticsearch. config_properties_jira: title: Connector request properties for a Jira connector required: - - apiUrl - - projectKey + - apiUrl + - projectKey + description: Defines properties for connectors when type is `.jira`. type: object properties: apiUrl: - type: string description: The Jira instance URL. - projectKey: type: string + projectKey: description: The Jira project key. - description: Defines properties for connectors when type is `.jira`. + type: string secrets_properties_jira: title: Connector secrets properties for a Jira connector required: - - apiToken - - email + - apiToken + - email + description: Defines secrets for connectors when type is `.jira`. type: object properties: apiToken: - type: string description: The Jira API authentication token for HTTP basic authentication. - email: type: string + email: description: The account email for HTTP Basic authentication. - description: Defines secrets for connectors when type is `.jira`. + type: string create_connector_request_jira: title: Create Jira connector request - required: - - config - - connector_type_id - - name - - secrets + description: The Jira connector uses the REST API v2 to create Jira issues. type: object + required: + - config + - connector_type_id + - name + - secrets properties: config: $ref: '#/components/schemas/config_properties_jira' connector_type_id: type: string description: The type of connector. - example: .jira enum: - - .jira + - .jira + example: .jira name: type: string description: The display name for the connector. example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_jira' - description: The Jira connector uses the REST API v2 to create Jira issues. config_properties_opsgenie: title: Connector request properties for an Opsgenie connector required: - - apiUrl + - apiUrl + description: Defines properties for connectors when type is `.opsgenie`. type: object properties: apiUrl: - type: string description: | The Opsgenie URL. For example, `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. - description: Defines properties for connectors when type is `.opsgenie`. + type: string secrets_properties_opsgenie: title: Connector secrets properties for an Opsgenie connector required: - - apiKey + - apiKey + description: Defines secrets for connectors when type is `.opsgenie`. type: object properties: apiKey: - type: string description: The Opsgenie API authentication key for HTTP Basic authentication. - description: Defines secrets for connectors when type is `.opsgenie`. + type: string create_connector_request_opsgenie: title: Create Opsgenie connector request - required: - - config - - connector_type_id - - name - - secrets + description: The Opsgenie connector uses the Opsgenie alert API. type: object + required: + - config + - connector_type_id + - name + - secrets properties: config: $ref: '#/components/schemas/config_properties_opsgenie' connector_type_id: type: string description: The type of connector. - example: .opsgenie enum: - - .opsgenie + - .opsgenie + example: .opsgenie name: type: string description: The display name for the connector. example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_opsgenie' - description: The Opsgenie connector uses the Opsgenie alert API. config_properties_pagerduty: title: Connector request properties for a PagerDuty connector + description: Defines properties for connectors when type is `.pagerduty`. type: object additionalProperties: true - description: Defines properties for connectors when type is `.pagerduty`. - x-schema-name: config_properties_pagerduty secrets_properties_pagerduty: title: Connector secrets properties for a PagerDuty connector + description: Defines secrets for connectors when type is `.pagerduty`. type: object additionalProperties: true - description: Defines secrets for connectors when type is `.pagerduty`. - x-schema-name: secrets_properties_pagerduty create_connector_request_pagerduty: title: Create PagerDuty connector request - required: - - config - - connector_type_id - - name - - secrets + description: | + The PagerDuty connector uses the v2 Events API to trigger, acknowledge, and resolve PagerDuty alerts. type: object + required: + - config + - connector_type_id + - name + - secrets properties: config: $ref: '#/components/schemas/config_properties_pagerduty' connector_type_id: type: string description: The type of connector. - example: .pagerduty enum: - - .pagerduty + - .pagerduty + example: .pagerduty name: type: string description: The display name for the connector. example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_pagerduty' - description: | - The PagerDuty connector uses the v2 Events API to trigger, acknowledge, and resolve PagerDuty alerts. config_properties_resilient: title: Connector request properties for a IBM Resilient connector required: - - apiUrl - - orgId + - apiUrl + - orgId + description: Defines properties for connectors when type is `.resilient`. type: object properties: apiUrl: - type: string description: The IBM Resilient instance URL. - orgId: type: string + orgId: description: The IBM Resilient organization ID. - description: Defines properties for connectors when type is `.resilient`. + type: string secrets_properties_resilient: title: Connector secrets properties for IBM Resilient connector required: - - apiKeyId - - apiKeySecret + - apiKeyId + - apiKeySecret + description: Defines secrets for connectors when type is `.resilient`. type: object properties: apiKeyId: @@ -1137,467 +1139,602 @@ components: apiKeySecret: type: string description: The authentication key secret for HTTP Basic authentication. - description: Defines secrets for connectors when type is `.resilient`. create_connector_request_resilient: title: Create IBM Resilient connector request - required: - - config - - connector_type_id - - name - - secrets + description: The IBM Resilient connector uses the RESILIENT REST v2 to create IBM Resilient incidents. type: object + required: + - config + - connector_type_id + - name + - secrets properties: config: $ref: '#/components/schemas/config_properties_resilient' connector_type_id: - type: string description: The type of connector. + type: string example: .resilient enum: - - .resilient + - .resilient name: type: string description: The display name for the connector. example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_resilient' - description: The IBM Resilient connector uses the RESILIENT REST v2 to create - IBM Resilient incidents. create_connector_request_serverlog: title: Create server log connector request - required: - - connector_type_id - - name + description: This connector writes an entry to the Kibana server log. type: object + required: + - connector_type_id + - name properties: connector_type_id: type: string description: The type of connector. - example: .server-log enum: - - .server-log + - .server-log + example: .server-log name: type: string description: The display name for the connector. example: my-connector - description: This connector writes an entry to the Kibana server log. config_properties_servicenow: title: Connector request properties for a ServiceNow ITSM connector required: - - apiUrl + - apiUrl + description: Defines properties for connectors when type is `.servicenow`. type: object properties: apiUrl: type: string description: The ServiceNow instance URL. clientId: - type: string description: | The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. + type: string isOAuth: - type: boolean description: | The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). default: false + type: boolean jwtKeyId: - type: string description: | The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. - userIdentifierValue: type: string + userIdentifierValue: description: | The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. + type: string usesTableApi: - type: boolean description: | Determines whether the connector uses the Table API or the Import Set API. This property is supported only for ServiceNow ITSM and ServiceNow SecOps connectors. NOTE: If this property is set to `false`, the Elastic application should be installed in ServiceNow. default: true - description: Defines properties for connectors when type is `.servicenow`. + type: boolean secrets_properties_servicenow: - title: "Connector secrets properties for ServiceNow ITOM, ServiceNow ITSM, and\ - \ ServiceNow SecOps connectors" + title: Connector secrets properties for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors + description: Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `.servicenow-itom`. type: object properties: clientSecret: type: string - description: The client secret assigned to your OAuth application. This - property is required when `isOAuth` is `true`. + description: The client secret assigned to your OAuth application. This property is required when `isOAuth` is `true`. password: type: string - description: The password for HTTP basic authentication. This property is - required when `isOAuth` is `false`. + description: The password for HTTP basic authentication. This property is required when `isOAuth` is `false`. privateKey: type: string - description: The RSA private key that you created for use in ServiceNow. - This property is required when `isOAuth` is `true`. + description: The RSA private key that you created for use in ServiceNow. This property is required when `isOAuth` is `true`. privateKeyPassword: type: string - description: The password for the RSA private key. This property is required - when `isOAuth` is `true` and you set a password on your private key. + description: The password for the RSA private key. This property is required when `isOAuth` is `true` and you set a password on your private key. username: type: string - description: The username for HTTP basic authentication. This property is - required when `isOAuth` is `false`. - description: "Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`,\ - \ or `.servicenow-itom`." + description: The username for HTTP basic authentication. This property is required when `isOAuth` is `false`. create_connector_request_servicenow: title: Create ServiceNow ITSM connector request - required: - - config - - connector_type_id - - name - - secrets + description: | + The ServiceNow ITSM connector uses the import set API to create ServiceNow incidents. You can use the connector for rule actions and cases. type: object + required: + - config + - connector_type_id + - name + - secrets properties: config: $ref: '#/components/schemas/config_properties_servicenow' connector_type_id: type: string description: The type of connector. - example: .servicenow enum: - - .servicenow + - .servicenow + example: .servicenow name: type: string description: The display name for the connector. example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_servicenow' - description: | - The ServiceNow ITSM connector uses the import set API to create ServiceNow incidents. You can use the connector for rule actions and cases. config_properties_servicenow_itom: title: Connector request properties for a ServiceNow ITSM connector required: - - apiUrl + - apiUrl + description: Defines properties for connectors when type is `.servicenow`. type: object properties: apiUrl: type: string description: The ServiceNow instance URL. clientId: - type: string description: | The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. + type: string isOAuth: - type: boolean description: | The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). default: false + type: boolean jwtKeyId: - type: string description: | The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. - userIdentifierValue: type: string + userIdentifierValue: description: | The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. - description: Defines properties for connectors when type is `.servicenow`. + type: string create_connector_request_servicenow_itom: title: Create ServiceNow ITOM connector request - required: - - config - - connector_type_id - - name - - secrets + description: | + The ServiceNow ITOM connector uses the event API to create ServiceNow events. You can use the connector for rule actions. type: object + required: + - config + - connector_type_id + - name + - secrets properties: config: $ref: '#/components/schemas/config_properties_servicenow_itom' connector_type_id: type: string description: The type of connector. - example: .servicenow-itom enum: - - .servicenow-itom + - .servicenow-itom + example: .servicenow-itom name: type: string description: The display name for the connector. example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_servicenow' - description: | - The ServiceNow ITOM connector uses the event API to create ServiceNow events. You can use the connector for rule actions. create_connector_request_servicenow_sir: title: Create ServiceNow SecOps connector request - required: - - config - - connector_type_id - - name - - secrets + description: | + The ServiceNow SecOps connector uses the import set API to create ServiceNow security incidents. You can use the connector for rule actions and cases. type: object + required: + - config + - connector_type_id + - name + - secrets properties: config: $ref: '#/components/schemas/config_properties_servicenow' connector_type_id: type: string description: The type of connector. - example: .servicenow-sir enum: - - .servicenow-sir + - .servicenow-sir + example: .servicenow-sir name: type: string description: The display name for the connector. example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_servicenow' - description: | - The ServiceNow SecOps connector uses the import set API to create ServiceNow security incidents. You can use the connector for rule actions and cases. secrets_properties_slack: title: Connector secrets properties for a Slack connector + description: Defines secrets for connectors when type is `.slack`. type: object additionalProperties: true - description: Defines secrets for connectors when type is `.slack`. - x-schema-name: secrets_properties_slack create_connector_request_slack: title: Create Slack connector request - required: - - connector_type_id - - name - - secrets + description: The Slack connector uses Slack Incoming Webhooks. type: object + required: + - connector_type_id + - name + - secrets properties: connector_type_id: type: string description: The type of connector. - example: .slack enum: - - .slack + - .slack + example: .slack name: type: string description: The display name for the connector. example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_slack' - description: The Slack connector uses Slack Incoming Webhooks. config_properties_swimlane: title: Connector request properties for a Swimlane connector required: - - apiUrl - - appId - - connectorType + - apiUrl + - appId + - connectorType + description: Defines properties for connectors when type is `.swimlane`. type: object properties: apiUrl: - type: string description: The Swimlane instance URL. - appId: type: string + appId: description: The Swimlane application ID. + type: string connectorType: + description: The type of connector. Valid values are `all`, `alerts`, and `cases`. type: string - description: "The type of connector. Valid values are `all`, `alerts`, and\ - \ `cases`." enum: - - all - - alerts - - cases + - all + - alerts + - cases mappings: - $ref: '#/components/schemas/Connector mappings properties for a Swimlane - connector' - description: Defines properties for connectors when type is `.swimlane`. + title: Connector mappings properties for a Swimlane connector + description: The field mapping. + type: object + properties: + alertIdConfig: + title: Alert identifier mapping + description: Mapping for the alert ID. + type: object + required: + - fieldType + - id + - key + - name + properties: + fieldType: + type: string + description: The type of field in Swimlane. + id: + type: string + description: The identifier for the field in Swimlane. + key: + type: string + description: The key for the field in Swimlane. + name: + type: string + description: The name of the field in Swimlane. + caseIdConfig: + title: Case identifier mapping + description: Mapping for the case ID. + type: object + required: + - fieldType + - id + - key + - name + properties: + fieldType: + type: string + description: The type of field in Swimlane. + id: + type: string + description: The identifier for the field in Swimlane. + key: + type: string + description: The key for the field in Swimlane. + name: + type: string + description: The name of the field in Swimlane. + caseNameConfig: + title: Case name mapping + description: Mapping for the case name. + type: object + required: + - fieldType + - id + - key + - name + properties: + fieldType: + type: string + description: The type of field in Swimlane. + id: + type: string + description: The identifier for the field in Swimlane. + key: + type: string + description: The key for the field in Swimlane. + name: + type: string + description: The name of the field in Swimlane. + commentsConfig: + title: Case comment mapping + description: Mapping for the case comments. + type: object + required: + - fieldType + - id + - key + - name + properties: + fieldType: + type: string + description: The type of field in Swimlane. + id: + type: string + description: The identifier for the field in Swimlane. + key: + type: string + description: The key for the field in Swimlane. + name: + type: string + description: The name of the field in Swimlane. + descriptionConfig: + title: Case description mapping + description: Mapping for the case description. + type: object + required: + - fieldType + - id + - key + - name + properties: + fieldType: + type: string + description: The type of field in Swimlane. + id: + type: string + description: The identifier for the field in Swimlane. + key: + type: string + description: The key for the field in Swimlane. + name: + type: string + description: The name of the field in Swimlane. + ruleNameConfig: + title: Rule name mapping + description: Mapping for the name of the alert's rule. + type: object + required: + - fieldType + - id + - key + - name + properties: + fieldType: + type: string + description: The type of field in Swimlane. + id: + type: string + description: The identifier for the field in Swimlane. + key: + type: string + description: The key for the field in Swimlane. + name: + type: string + description: The name of the field in Swimlane. + severityConfig: + title: Severity mapping + description: Mapping for the severity. + type: object + required: + - fieldType + - id + - key + - name + properties: + fieldType: + type: string + description: The type of field in Swimlane. + id: + type: string + description: The identifier for the field in Swimlane. + key: + type: string + description: The key for the field in Swimlane. + name: + type: string + description: The name of the field in Swimlane. secrets_properties_swimlane: title: Connector secrets properties for a Swimlane connector + description: Defines secrets for connectors when type is `.swimlane`. type: object properties: apiToken: - type: string description: Swimlane API authentication token. - description: Defines secrets for connectors when type is `.swimlane`. + type: string create_connector_request_swimlane: title: Create Swimlane connector request - required: - - config - - connector_type_id - - name - - secrets + description: The Swimlane connector uses the Swimlane REST API to create Swimlane records. type: object + required: + - config + - connector_type_id + - name + - secrets properties: config: $ref: '#/components/schemas/config_properties_swimlane' connector_type_id: type: string description: The type of connector. - example: .swimlane enum: - - .swimlane + - .swimlane + example: .swimlane name: type: string description: The display name for the connector. example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_swimlane' - description: The Swimlane connector uses the Swimlane REST API to create Swimlane - records. secrets_properties_teams: title: Connector secrets properties for a Microsoft Teams connector + description: Defines secrets for connectors when type is `.teams`. type: object additionalProperties: true - description: Defines secrets for connectors when type is `.teams`. - x-schema-name: secrets_properties_teams create_connector_request_teams: title: Create Microsoft Teams connector request - required: - - connector_type_id - - name - - secrets + description: The Microsoft Teams connector uses Incoming Webhooks. type: object + required: + - connector_type_id + - name + - secrets properties: connector_type_id: type: string description: The type of connector. - example: .teams enum: - - .teams + - .teams + example: .teams name: type: string description: The display name for the connector. example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_teams' - description: The Microsoft Teams connector uses Incoming Webhooks. config_properties_tines: title: Connector request properties for a Tines connector + description: Defines properties for connectors when type is `.tines`. type: object additionalProperties: true - description: Defines properties for connectors when type is `.tines`. - x-schema-name: config_properties_tines secrets_properties_tines: title: Connector secrets properties for a Tines connector + description: Defines secrets for connectors when type is `.tines`. type: object additionalProperties: true - description: Defines secrets for connectors when type is `.tines`. - x-schema-name: secrets_properties_tines create_connector_request_tines: title: Create Tines connector request - required: - - config - - connector_type_id - - name - - secrets + description: | + The Tines connector uses Tines Webhook actions to send events via POST request. type: object + required: + - config + - connector_type_id + - name + - secrets properties: config: $ref: '#/components/schemas/config_properties_tines' connector_type_id: type: string description: The type of connector. - example: .tines enum: - - .tines + - .tines + example: .tines name: type: string description: The display name for the connector. example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_tines' - description: | - The Tines connector uses Tines Webhook actions to send events via POST request. config_properties_webhook: title: Connector request properties for a Webhook connector + description: Defines properties for connectors when type is `.webhook`. type: object additionalProperties: true - description: Defines properties for connectors when type is `.webhook`. - x-schema-name: config_properties_webhook secrets_properties_webhook: title: Connector secrets properties for a Webhook connector + description: Defines secrets for connectors when type is `.webhook`. type: object additionalProperties: true - description: Defines secrets for connectors when type is `.webhook`. - x-schema-name: secrets_properties_webhook create_connector_request_webhook: title: Create Webhook connector request - required: - - config - - connector_type_id - - name - - secrets + description: | + The Webhook connector uses axios to send a POST or PUT request to a web service. type: object + required: + - config + - connector_type_id + - name + - secrets properties: config: $ref: '#/components/schemas/config_properties_webhook' connector_type_id: type: string description: The type of connector. - example: .webhook enum: - - .webhook + - .webhook + example: .webhook name: type: string description: The display name for the connector. example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_webhook' - description: | - The Webhook connector uses axios to send a POST or PUT request to a web service. config_properties_xmatters: title: Connector request properties for a xMatters connector + description: Defines properties for connectors when type is `.xmatters`. type: object additionalProperties: true - description: Defines properties for connectors when type is `.xmatters`. - x-schema-name: config_properties_xmatters secrets_properties_xmatters: title: Connector secrets properties for an xMatters connector + description: Defines secrets for connectors when type is `.xmatters`. type: object additionalProperties: true - description: Defines secrets for connectors when type is `.xmatters`. - x-schema-name: secrets_properties_xmatters create_connector_request_xmatters: title: Create xMatters connector request - required: - - config - - connector_type_id - - name - - secrets + description: | + The xMatters connector uses the xMatters Workflow for Elastic to send actionable alerts to on-call xMatters resources. type: object + required: + - config + - connector_type_id + - name + - secrets properties: config: $ref: '#/components/schemas/config_properties_xmatters' connector_type_id: type: string description: The type of connector. - example: .xmatters enum: - - .xmatters + - .xmatters + example: .xmatters name: type: string description: The display name for the connector. example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_xmatters' - description: | - The xMatters connector uses the xMatters Workflow for Elastic to send actionable alerts to on-call xMatters resources. is_deprecated: type: boolean description: Indicates whether the connector type is deprecated. example: false is_missing_secrets: type: boolean - description: Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. + description: Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. example: false is_preconfigured: type: boolean - description: "Indicates whether it is a preconfigured connector. If true, the\ - \ `config` and `is_missing_secrets` properties are omitted from the response." + description: Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. example: false connector_response_properties_cases_webhook: title: Connector request properties for a Webhook - Case Management connector - required: - - config - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name type: object + required: + - config + - connector_type_id + - id + # - is_deprecated + - is_preconfigured + - name properties: config: $ref: '#/components/schemas/config_properties_cases_webhook' connector_type_id: - type: string description: The type of connector. + type: string enum: - - .cases-webhook + - .cases-webhook id: type: string description: The identifier for the connector. @@ -1612,14 +1749,14 @@ components: description: The display name for the connector. connector_response_properties_email: title: Connector response properties for an email connector - required: - - config - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name type: object + required: + - config + - connector_type_id + - id + # - is_deprecated + - is_preconfigured + - name properties: config: $ref: '#/components/schemas/config_properties_email' @@ -1627,7 +1764,7 @@ components: type: string description: The type of connector. enum: - - .email + - .email id: type: string description: The identifier for the connector. @@ -1642,14 +1779,14 @@ components: description: The display name for the connector. connector_response_properties_index: title: Connector response properties for an index connector - required: - - config - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name type: object + required: + - config + - connector_type_id + - id + # - is_deprecated + - is_preconfigured + - name properties: config: $ref: '#/components/schemas/config_properties_index' @@ -1657,7 +1794,7 @@ components: type: string description: The type of connector. enum: - - .index + - .index id: type: string description: The identifier for the connector. @@ -1672,14 +1809,14 @@ components: description: The display name for the connector. connector_response_properties_jira: title: Connector response properties for a Jira connector - required: - - config - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name type: object + required: + - config + - connector_type_id + - id + # - is_deprecated + - is_preconfigured + - name properties: config: $ref: '#/components/schemas/config_properties_jira' @@ -1687,7 +1824,7 @@ components: type: string description: The type of connector. enum: - - .jira + - .jira id: type: string description: The identifier for the connector. @@ -1702,14 +1839,14 @@ components: description: The display name for the connector. connector_response_properties_opsgenie: title: Connector response properties for an Opsgenie connector - required: - - config - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name type: object + required: + - config + - connector_type_id + - id + # - is_deprecated + - is_preconfigured + - name properties: config: $ref: '#/components/schemas/config_properties_opsgenie' @@ -1717,7 +1854,7 @@ components: type: string description: The type of connector. enum: - - .opsgenie + - .opsgenie id: type: string description: The identifier for the connector. @@ -1732,14 +1869,14 @@ components: description: The display name for the connector. connector_response_properties_pagerduty: title: Connector response properties for a PagerDuty connector - required: - - config - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name type: object + required: + - config + - connector_type_id + - id + # - is_deprecated + - is_preconfigured + - name properties: config: $ref: '#/components/schemas/config_properties_pagerduty' @@ -1747,7 +1884,7 @@ components: type: string description: The type of connector. enum: - - .pagerduty + - .pagerduty id: type: string description: The identifier for the connector. @@ -1762,14 +1899,14 @@ components: description: The display name for the connector. connector_response_properties_resilient: title: Connector response properties for a IBM Resilient connector - required: - - config - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name type: object + required: + - config + - connector_type_id + - id + # - is_deprecated + - is_preconfigured + - name properties: config: $ref: '#/components/schemas/config_properties_resilient' @@ -1777,7 +1914,7 @@ components: type: string description: The type of connector. enum: - - .resilient + - .resilient id: type: string description: The identifier for the connector. @@ -1792,14 +1929,14 @@ components: description: The display name for the connector. connector_response_properties_serverlog: title: Connector response properties for a server log connector - required: - - config - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name type: object + required: + - config + - connector_type_id + - id + # - is_deprecated + - is_preconfigured + - name properties: config: type: object @@ -1808,7 +1945,7 @@ components: type: string description: The type of connector. enum: - - .server-log + - .server-log id: type: string description: The identifier for the connector. @@ -1823,14 +1960,14 @@ components: description: The display name for the connector. connector_response_properties_servicenow: title: Connector response properties for a ServiceNow ITSM connector - required: - - config - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name type: object + required: + - config + - connector_type_id + - id + # - is_deprecated + - is_preconfigured + - name properties: config: $ref: '#/components/schemas/config_properties_servicenow' @@ -1838,7 +1975,7 @@ components: type: string description: The type of connector. enum: - - .servicenow + - .servicenow id: type: string description: The identifier for the connector. @@ -1853,14 +1990,14 @@ components: description: The display name for the connector. connector_response_properties_servicenow_itom: title: Connector response properties for a ServiceNow ITOM connector - required: - - config - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name type: object + required: + - config + - connector_type_id + - id + # - is_deprecated + - is_preconfigured + - name properties: config: $ref: '#/components/schemas/config_properties_servicenow_itom' @@ -1868,7 +2005,7 @@ components: type: string description: The type of connector. enum: - - .servicenow-itom + - .servicenow-itom id: type: string description: The identifier for the connector. @@ -1883,14 +2020,14 @@ components: description: The display name for the connector. connector_response_properties_servicenow_sir: title: Connector response properties for a ServiceNow SecOps connector - required: - - config - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name type: object + required: + - config + - connector_type_id + - id + # - is_deprecated + - is_preconfigured + - name properties: config: $ref: '#/components/schemas/config_properties_servicenow' @@ -1898,7 +2035,7 @@ components: type: string description: The type of connector. enum: - - .servicenow-sir + - .servicenow-sir id: type: string description: The identifier for the connector. @@ -1913,19 +2050,19 @@ components: description: The display name for the connector. connector_response_properties_slack: title: Connector response properties for a Slack connector - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name type: object + required: + - connector_type_id + - id + # - is_deprecated + - is_preconfigured + - name properties: connector_type_id: type: string description: The type of connector. enum: - - .slack + - .slack id: type: string description: The identifier for the connector. @@ -1940,14 +2077,14 @@ components: description: The display name for the connector. connector_response_properties_swimlane: title: Connector response properties for a Swimlane connector - required: - - config - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name type: object + required: + - config + - connector_type_id + - id + # - is_deprecated + - is_preconfigured + - name properties: config: $ref: '#/components/schemas/config_properties_swimlane' @@ -1955,7 +2092,7 @@ components: type: string description: The type of connector. enum: - - .swimlane + - .swimlane id: type: string description: The identifier for the connector. @@ -1970,19 +2107,19 @@ components: description: The display name for the connector. connector_response_properties_teams: title: Connector response properties for a Microsoft Teams connector - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name type: object + required: + - connector_type_id + - id + # - is_deprecated + - is_preconfigured + - name properties: connector_type_id: type: string description: The type of connector. enum: - - .teams + - .teams id: type: string description: The identifier for the connector. @@ -1997,14 +2134,14 @@ components: description: The display name for the connector. connector_response_properties_tines: title: Connector response properties for a Tines connector - required: - - config - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name type: object + required: + - config + - connector_type_id + - id + # - is_deprecated + - is_preconfigured + - name properties: config: $ref: '#/components/schemas/config_properties_tines' @@ -2012,7 +2149,7 @@ components: type: string description: The type of connector. enum: - - .tines + - .tines id: type: string description: The identifier for the connector. @@ -2027,14 +2164,14 @@ components: description: The display name for the connector. connector_response_properties_webhook: title: Connector response properties for a Webhook connector - required: - - config - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name type: object + required: + - config + - connector_type_id + - id + # - is_deprecated + - is_preconfigured + - name properties: config: $ref: '#/components/schemas/config_properties_webhook' @@ -2042,7 +2179,7 @@ components: type: string description: The type of connector. enum: - - .webhook + - .webhook id: type: string description: The identifier for the connector. @@ -2057,14 +2194,14 @@ components: description: The display name for the connector. connector_response_properties_xmatters: title: Connector response properties for an xMatters connector - required: - - config - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name type: object + required: + - config + - connector_type_id + - id + # - is_deprecated + - is_preconfigured + - name properties: config: $ref: '#/components/schemas/config_properties_xmatters' @@ -2072,7 +2209,7 @@ components: type: string description: The type of connector. enum: - - .xmatters + - .xmatters id: type: string description: The identifier for the connector. @@ -2088,32 +2225,50 @@ components: connector_response_properties: title: Connector response properties description: The properties vary depending on the connector type. - discriminator: - propertyName: ConnectorTypeId oneOf: - - $ref: '#/components/schemas/connector_response_properties_cases_webhook' - - $ref: '#/components/schemas/connector_response_properties_email' - - $ref: '#/components/schemas/connector_response_properties_index' - - $ref: '#/components/schemas/connector_response_properties_jira' - - $ref: '#/components/schemas/connector_response_properties_opsgenie' - - $ref: '#/components/schemas/connector_response_properties_pagerduty' - - $ref: '#/components/schemas/connector_response_properties_resilient' - - $ref: '#/components/schemas/connector_response_properties_serverlog' - - $ref: '#/components/schemas/connector_response_properties_servicenow' - - $ref: '#/components/schemas/connector_response_properties_servicenow_itom' - - $ref: '#/components/schemas/connector_response_properties_servicenow_sir' - - $ref: '#/components/schemas/connector_response_properties_slack' - - $ref: '#/components/schemas/connector_response_properties_swimlane' - - $ref: '#/components/schemas/connector_response_properties_teams' - - $ref: '#/components/schemas/connector_response_properties_tines' - - $ref: '#/components/schemas/connector_response_properties_webhook' - - $ref: '#/components/schemas/connector_response_properties_xmatters' + - $ref: '#/components/schemas/connector_response_properties_cases_webhook' + - $ref: '#/components/schemas/connector_response_properties_email' + - $ref: '#/components/schemas/connector_response_properties_index' + - $ref: '#/components/schemas/connector_response_properties_jira' + - $ref: '#/components/schemas/connector_response_properties_opsgenie' + - $ref: '#/components/schemas/connector_response_properties_pagerduty' + - $ref: '#/components/schemas/connector_response_properties_resilient' + - $ref: '#/components/schemas/connector_response_properties_serverlog' + - $ref: '#/components/schemas/connector_response_properties_servicenow' + - $ref: '#/components/schemas/connector_response_properties_servicenow_itom' + - $ref: '#/components/schemas/connector_response_properties_servicenow_sir' + - $ref: '#/components/schemas/connector_response_properties_slack' + - $ref: '#/components/schemas/connector_response_properties_swimlane' + - $ref: '#/components/schemas/connector_response_properties_teams' + - $ref: '#/components/schemas/connector_response_properties_tines' + - $ref: '#/components/schemas/connector_response_properties_webhook' + - $ref: '#/components/schemas/connector_response_properties_xmatters' + discriminator: + propertyName: connector_type_id + mapping: + .cases-webhook: '#/components/schemas/connector_response_properties_cases_webhook' + .email: '#/components/schemas/connector_response_properties_email' + .index: '#/components/schemas/connector_response_properties_index' + .jira: '#/components/schemas/connector_response_properties_jira' + .opsgenie: '#/components/schemas/connector_response_properties_opsgenie' + .pagerduty: '#/components/schemas/connector_response_properties_pagerduty' + .resilient: '#/components/schemas/connector_response_properties_resilient' + .server-log: '#/components/schemas/connector_response_properties_serverlog' + .servicenow: '#/components/schemas/connector_response_properties_servicenow' + .servicenow-itom: '#/components/schemas/connector_response_properties_servicenow_itom' + .servicenow-sir: '#/components/schemas/connector_response_properties_servicenow_sir' + .slack: '#/components/schemas/connector_response_properties_slack' + .swimlane: '#/components/schemas/connector_response_properties_swimlane' + .teams: '#/components/schemas/connector_response_properties_teams' + .tines: '#/components/schemas/connector_response_properties_tines' + .webhook: '#/components/schemas/connector_response_properties_webhook' + .xmatters: '#/components/schemas/connector_response_properties_xmatters' update_connector_request_cases_webhook: title: Update Webhook - Case Managment connector request - required: - - config - - name type: object + required: + - config + - name properties: config: $ref: '#/components/schemas/config_properties_cases_webhook' @@ -2125,10 +2280,11 @@ components: $ref: '#/components/schemas/secrets_properties_cases_webhook' update_connector_request_index: title: Update index connector request - required: - - config - - name type: object + required: + - config +# - connector_type_id + - name properties: config: $ref: '#/components/schemas/config_properties_index' @@ -2137,11 +2293,11 @@ components: description: The display name for the connector. update_connector_request_jira: title: Update Jira connector request - required: - - config - - name - - secrets type: object + required: + - config + - name + - secrets properties: config: $ref: '#/components/schemas/config_properties_jira' @@ -2152,11 +2308,11 @@ components: $ref: '#/components/schemas/secrets_properties_jira' update_connector_request_opsgenie: title: Update Opsgenie connector request - required: - - config - - name - - secrets type: object + required: + - config + - name + - secrets properties: config: $ref: '#/components/schemas/config_properties_opsgenie' @@ -2167,11 +2323,11 @@ components: $ref: '#/components/schemas/secrets_properties_opsgenie' update_connector_request_resilient: title: Update IBM Resilient connector request - required: - - config - - name - - secrets type: object + required: + - config + - name + - secrets properties: config: $ref: '#/components/schemas/config_properties_resilient' @@ -2182,20 +2338,20 @@ components: $ref: '#/components/schemas/secrets_properties_resilient' update_connector_request_serverlog: title: Update server log connector request - required: - - name type: object + required: + - name properties: name: type: string description: The display name for the connector. update_connector_request_servicenow: title: Update ServiceNow ITSM connector or ServiceNow SecOps request - required: - - config - - name - - secrets type: object + required: + - config + - name + - secrets properties: config: $ref: '#/components/schemas/config_properties_servicenow' @@ -2206,11 +2362,11 @@ components: $ref: '#/components/schemas/secrets_properties_servicenow' update_connector_request_servicenow_itom: title: Create ServiceNow ITOM connector request - required: - - config - - name - - secrets type: object + required: + - config + - name + - secrets properties: config: $ref: '#/components/schemas/config_properties_servicenow_itom' @@ -2221,11 +2377,11 @@ components: $ref: '#/components/schemas/secrets_properties_servicenow' update_connector_request_swimlane: title: Update Swimlane connector request - required: - - config - - name - - secrets type: object + required: + - config + - name + - secrets properties: config: $ref: '#/components/schemas/config_properties_swimlane' @@ -2238,41 +2394,41 @@ components: connector_types: title: Connector types type: string - description: "The type of connector. For example, `.email`, `.index`, `.jira`,\ - \ `.opsgenie`, or `.server-log`." - example: .server-log + description: The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`. enum: - - .cases-webhook - - .email - - .index - - .jira - - .opsgenie - - .pagerduty - - .resilient - - .servicenow - - .servicenow-itom - - .servicenow-sir - - .server-log - - .slack - - .swimlane - - .teams - - .tines - - .webhook - - .xmatters + - .cases-webhook + - .email + - .index + - .jira + - .opsgenie + - .pagerduty + - .resilient + - .servicenow + - .servicenow-itom + - .servicenow-sir + - .server-log + - .slack + - .swimlane + - .teams + - .tines + - .webhook + - .xmatters + example: .server-log features: type: string description: | The feature that uses the connector. Valid values are `alerting`, `cases`, `uptime`, and `siem`. enum: - - alerting - - cases - - uptime - - siem + - alerting + - cases + - uptime + - siem run_connector_params_documents: title: Index connector parameters - required: - - documents + description: Test an action that indexes a document into Elasticsearch. type: object + required: + - documents properties: documents: type: array @@ -2280,191 +2436,485 @@ components: items: type: object additionalProperties: true - description: Test an action that indexes a document into Elasticsearch. run_connector_params_level_message: title: Server log connector parameters - required: - - message + description: Test an action that writes an entry to the Kibana server log. type: object + required: + - message properties: level: type: string description: The log level of the message for server log connectors. - default: info enum: - - debug - - error - - fatal - - info - - trace - - warn + - debug + - error + - fatal + - info + - trace + - warn + default: info message: type: string description: The message for server log connectors. - description: Test an action that writes an entry to the Kibana server log. run_connector_subaction_addevent: title: The addEvent subaction - required: - - subAction type: object + required: + - subAction + description: The `addEvent` subaction for ServiceNow ITOM connectors. properties: subAction: type: string description: The action to test. enum: - - addEvent + - addEvent subActionParams: - $ref: '#/components/schemas/run_connector_subaction_addevent_subActionParams' - description: The `addEvent` subaction for ServiceNow ITOM connectors. + type: object + description: The set of configuration properties for the action. + properties: + additional_info: + type: string + description: Additional information about the event. + description: + type: string + description: The details about the event. + event_class: + type: string + description: A specific instance of the source. + message_key: + type: string + description: All actions sharing this key are associated with the same ServiceNow alert. The default value is `:`. + metric_name: + type: string + description: The name of the metric. + node: + type: string + description: The host that the event was triggered for. + resource: + type: string + description: The name of the resource. + severity: + type: string + description: The severity of the event. + source: + type: string + description: The name of the event source type. + time_of_event: + type: string + description: The time of the event. + type: + type: string + description: The type of event. run_connector_subaction_closealert: title: The closeAlert subaction - required: - - subAction - - subActionParams type: object + required: + - subAction + - subActionParams + description: The `closeAlert` subaction for Opsgenie connectors. properties: subAction: type: string description: The action to test. enum: - - closeAlert + - closeAlert subActionParams: - $ref: '#/components/schemas/run_connector_subaction_closealert_subActionParams' - description: The `closeAlert` subaction for Opsgenie connectors. + type: object + required: + - alias + properties: + alias: + type: string + description: The unique identifier used for alert deduplication in Opsgenie. The alias must match the value used when creating the alert. + note: + type: string + description: Additional information for the alert. + source: + type: string + description: The display name for the source of the alert. + user: + type: string + description: The display name for the owner. run_connector_subaction_createalert: title: The createAlert subaction - required: - - subAction - - subActionParams type: object + required: + - subAction + - subActionParams + description: The `createAlert` subaction for Opsgenie connectors. properties: subAction: type: string description: The action to test. enum: - - createAlert + - createAlert subActionParams: - $ref: '#/components/schemas/run_connector_subaction_createalert_subActionParams' - description: The `createAlert` subaction for Opsgenie connectors. + type: object + required: + - message + properties: + actions: + type: array + description: The custom actions available to the alert. + items: + type: string + alias: + type: string + description: The unique identifier used for alert deduplication in Opsgenie. + description: + type: string + description: A description that provides detailed information about the alert. + details: + type: object + description: The custom properties of the alert. + additionalProperties: true + example: + key1: value1 + key2: value2 + entity: + type: string + description: The domain of the alert. For example, the application or server name. + message: + type: string + description: The alert message. + note: + type: string + description: Additional information for the alert. + priority: + type: string + description: The priority level for the alert. + enum: + - P1 + - P2 + - P3 + - P4 + - P5 + responders: + type: array + description: | + The entities to receive notifications about the alert. If `type` is `user`, either `id` or `username` is required. If `type` is `team`, either `id` or `name` is required. + items: + type: object + properties: + id: + type: string + description: The identifier for the entity. + name: + type: string + description: The name of the entity. + type: + type: string + description: The type of responders, in this case `escalation`. + enum: + - escalation + - schedule + - team + - user + username: + type: string + description: A valid email address for the user. + source: + type: string + description: The display name for the source of the alert. + tags: + type: array + description: The tags for the alert. + items: + type: string + user: + type: string + description: The display name for the owner. + visibleTo: + type: array + description: The teams and users that the alert will be visible to without sending a notification. Only one of `id`, `name`, or `username` is required. + items: + type: object + required: + - type + properties: + id: + type: string + description: The identifier for the entity. + name: + type: string + description: The name of the entity. + type: + type: string + description: Valid values are `team` and `user`. + enum: + - team + - user + username: + type: string + description: The user name. This property is required only when the `type` is `user`. run_connector_subaction_fieldsbyissuetype: title: The fieldsByIssueType subaction - required: - - subAction - - subActionParams type: object + required: + - subAction + - subActionParams + description: The `fieldsByIssueType` subaction for Jira connectors. properties: subAction: type: string description: The action to test. enum: - - fieldsByIssueType + - fieldsByIssueType subActionParams: - $ref: '#/components/schemas/run_connector_subaction_fieldsbyissuetype_subActionParams' - description: The `fieldsByIssueType` subaction for Jira connectors. + type: object + required: + - id + properties: + id: + type: string + description: The Jira issue type identifier. + example: 10024 run_connector_subaction_getchoices: title: The getChoices subaction - required: - - subAction - - subActionParams type: object + required: + - subAction + - subActionParams + description: The `getChoices` subaction for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors. properties: subAction: type: string description: The action to test. enum: - - getChoices + - getChoices subActionParams: - $ref: '#/components/schemas/run_connector_subaction_getchoices_subActionParams' - description: "The `getChoices` subaction for ServiceNow ITOM, ServiceNow ITSM,\ - \ and ServiceNow SecOps connectors." + type: object + description: The set of configuration properties for the action. + required: + - fields + properties: + fields: + type: array + description: An array of fields. + items: + type: string run_connector_subaction_getfields: title: The getFields subaction - required: - - subAction type: object + required: + - subAction + description: The `getFields` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors. properties: subAction: type: string description: The action to test. enum: - - getFields - description: "The `getFields` subaction for Jira, ServiceNow ITSM, and ServiceNow\ - \ SecOps connectors." + - getFields run_connector_subaction_getincident: title: The getIncident subaction - required: - - subAction - - subActionParams type: object + description: The `getIncident` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors. + required: + - subAction + - subActionParams properties: subAction: type: string description: The action to test. enum: - - getIncident + - getIncident subActionParams: - $ref: '#/components/schemas/run_connector_subaction_getincident_subActionParams' - description: "The `getIncident` subaction for Jira, ServiceNow ITSM, and ServiceNow\ - \ SecOps connectors." + type: object + required: + - externalId + properties: + externalId: + type: string + description: The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. + example: 71778 run_connector_subaction_issue: title: The issue subaction - required: - - subAction type: object + required: + - subAction + description: The `issue` subaction for Jira connectors. properties: subAction: type: string description: The action to test. enum: - - issue + - issue subActionParams: - $ref: '#/components/schemas/run_connector_subaction_issue_subActionParams' - description: The `issue` subaction for Jira connectors. + type: object + required: + - id + properties: + id: + type: string + description: The Jira issue identifier. + example: 71778 run_connector_subaction_issues: title: The issues subaction - required: - - subAction - - subActionParams type: object + required: + - subAction + - subActionParams + description: The `issues` subaction for Jira connectors. properties: subAction: type: string description: The action to test. enum: - - issues + - issues subActionParams: - $ref: '#/components/schemas/run_connector_subaction_issues_subActionParams' - description: The `issues` subaction for Jira connectors. + type: object + required: + - title + properties: + title: + type: string + description: The title of the Jira issue. run_connector_subaction_issuetypes: title: The issueTypes subaction - required: - - subAction type: object + required: + - subAction + description: The `issueTypes` subaction for Jira connectors. properties: subAction: type: string description: The action to test. enum: - - issueTypes - description: The `issueTypes` subaction for Jira connectors. + - issueTypes run_connector_subaction_pushtoservice: title: The pushToService subaction - required: - - subAction - - subActionParams type: object + required: + - subAction + - subActionParams + description: The `pushToService` subaction for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors. properties: subAction: type: string description: The action to test. enum: - - pushToService + - pushToService subActionParams: - $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams' - description: "The `pushToService` subaction for Jira, ServiceNow ITSM, ServiceNow\ - \ SecOps, and Swimlane connectors." + type: object + description: The set of configuration properties for the action. + properties: + comments: + type: array + description: Additional information that is sent to Jira, ServiceNow ITSM, ServiceNow SecOps, or Swimlane. + items: + type: object + properties: + comment: + type: string + description: A comment related to the incident. For example, describe how to troubleshoot the issue. + commentId: + type: integer + description: A unique identifier for the comment. + incident: + type: object + description: Information necessary to create or update a Jira, ServiceNow ITSM, ServiveNow SecOps, or Swimlane incident. + properties: + alertId: + type: string + description: The alert identifier for Swimlane connectors. + caseId: + type: string + description: The case identifier for the incident for Swimlane connectors. + caseName: + type: string + description: The case name for the incident for Swimlane connectors. + category: + type: string + description: The category of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. + correlation_display: + type: string + description: A descriptive label of the alert for correlation purposes for ServiceNow ITSM and ServiceNow SecOps connectors. + correlation_id: + type: string + description: | + The correlation identifier for the security incident for ServiceNow ITSM and ServiveNow SecOps connectors. Connectors using the same correlation ID are associated with the same ServiceNow incident. This value determines whether a new ServiceNow incident is created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the correlation ID value in ServiceNow. The maximum character length for this value is 100 characters. NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that ServiceNow creates a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, ServiceNow creates and continually updates a single incident record for the alert. + description: + type: string + description: The description of the incident for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors. + dest_ip: + description: | + A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. + oneOf: + - type: string + - type: array + items: + type: string + externalId: + type: string + description: | + The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. If present, the incident is updated. Otherwise, a new incident is created. + impact: + type: string + description: The impact of the incident for ServiceNow ITSM connectors. + issueType: + type: integer + description: The type of incident for Jira connectors. For example, 10006. To obtain the list of valid values, set `subAction` to `issueTypes`. + labels: + type: array + items: + type: string + description: | + The labels for the incident for Jira connectors. NOTE: Labels cannot contain spaces. + malware_hash: + description: A list of malware hashes related to the security incident for ServiceNow SecOps connectors. The hashes are added as observables to the security incident. + oneOf: + - type: string + - type: array + items: + type: string + malware_url: + type: string + description: A list of malware URLs related to the security incident for ServiceNow SecOps connectors. The URLs are added as observables to the security incident. + oneOf: + - type: string + - type: array + items: + type: string + parent: + type: string + description: The ID or key of the parent issue for Jira connectors. Applies only to `Sub-task` types of issues. + priority: + type: string + description: The priority of the incident in Jira and ServiceNow SecOps connectors. + ruleName: + type: string + description: The rule name for Swimlane connectors. + severity: + type: string + description: The severity of the incident for ServiceNow ITSM and Swimlane connectors. + short_description: + type: string + description: | + A short description of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. It is used for searching the contents of the knowledge base. + source_ip: + description: A list of source IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. + oneOf: + - type: string + - type: array + items: + type: string + subcategory: + type: string + description: The subcategory of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. + summary: + type: string + description: A summary of the incident for Jira connectors. + title: + type: string + description: | + A title for the incident for Jira connectors. It is used for searching the contents of the knowledge base. + urgency: + type: string + description: The urgency of the incident for ServiceNow ITSM connectors. action_response_properties: title: Action response properties + description: The properties vary depending on the action type. type: object properties: actionTypeId: @@ -2484,950 +2934,19 @@ components: description: Indicates whether it is a preconfigured action. name: type: string - description: The properties vary depending on the action type. - example: - isPreconfigured: true - isDeprecated: true - actionTypeId: actionTypeId - name: name - id: id - config: {} - isMissingSecrets: true - Create connector request body properties: - title: Create connector request body properties - description: The properties vary depending on the connector type. - discriminator: - propertyName: ConnectorTypeId - oneOf: - - $ref: '#/components/schemas/create_connector_request_cases_webhook' - - $ref: '#/components/schemas/create_connector_request_email' - - $ref: '#/components/schemas/create_connector_request_index' - - $ref: '#/components/schemas/create_connector_request_jira' - - $ref: '#/components/schemas/create_connector_request_opsgenie' - - $ref: '#/components/schemas/create_connector_request_pagerduty' - - $ref: '#/components/schemas/create_connector_request_resilient' - - $ref: '#/components/schemas/create_connector_request_serverlog' - - $ref: '#/components/schemas/create_connector_request_servicenow' - - $ref: '#/components/schemas/create_connector_request_servicenow_itom' - - $ref: '#/components/schemas/create_connector_request_servicenow_sir' - - $ref: '#/components/schemas/create_connector_request_slack' - - $ref: '#/components/schemas/create_connector_request_swimlane' - - $ref: '#/components/schemas/create_connector_request_teams' - - $ref: '#/components/schemas/create_connector_request_tines' - - $ref: '#/components/schemas/create_connector_request_webhook' - - $ref: '#/components/schemas/create_connector_request_xmatters' - Unauthorized response: - title: Unauthorized response - type: object - properties: - error: - type: string - example: Unauthorized - enum: - - Unauthorized - message: - type: string - statusCode: - type: integer - example: 401 - enum: - - 401 - inline_response_404: - type: object - properties: - error: - type: string - example: Not Found - message: - type: string - example: "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not\ - \ found" - statusCode: - type: integer - example: 404 - Update connector request body properties: - title: Update connector request body properties - description: The properties vary depending on the connector type. - oneOf: - - $ref: '#/components/schemas/update_connector_request_cases_webhook' - - $ref: '#/components/schemas/update_connector_request_index' - - $ref: '#/components/schemas/update_connector_request_jira' - - $ref: '#/components/schemas/update_connector_request_opsgenie' - - $ref: '#/components/schemas/update_connector_request_resilient' - - $ref: '#/components/schemas/update_connector_request_serverlog' - - $ref: '#/components/schemas/update_connector_request_servicenow' - - $ref: '#/components/schemas/update_connector_request_servicenow_itom' - - $ref: '#/components/schemas/update_connector_request_swimlane' - inline_response_400: - type: object - properties: - error: - type: string - example: Bad Request - message: - type: string - example: "error validating action type config: [index]: expected value of\ - \ type [string] but got [undefined]" - statusCode: - type: integer - example: 400 - Not found response: - title: Not found response - type: object - properties: - error: - type: string - example: Not Found - enum: - - Not Found - message: - type: string - example: "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not\ - \ found" - statusCode: - type: integer - example: 404 - enum: - - 404 - Get connectors response body properties: - title: Get connectors response body properties - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - - referenced_by_count - type: object - properties: - connector_type_id: - $ref: '#/components/schemas/connector_types' + examples: + create_index_connector_request: + summary: Create an index connector. + value: + name: my-connector + connector_type_id: .index config: - type: object - additionalProperties: true - description: The configuration for the connector. Configuration properties - vary depending on the connector type. - nullable: true - id: - type: string - description: The identifier for the connector. - example: b0766e10-d190-11ec-b04c-776c77d14fca - is_deprecated: - $ref: '#/components/schemas/is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/is_preconfigured' - name: - type: string - description: The display name for the connector. - example: my-connector - referenced_by_count: - type: integer - description: "Indicates the number of saved objects that reference the connector.\ - \ If `is_preconfigured` is true, this value is not calculated." - example: 2 - default: 0 - description: The properties vary for each connector type. - example: - is_missing_secrets: false - is_deprecated: false - is_preconfigured: false - name: my-connector - referenced_by_count: 2 - id: b0766e10-d190-11ec-b04c-776c77d14fca - config: "" - connector_type_id: .server-log - inline_response_200: - type: object - properties: - enabled: - type: boolean - description: Indicates whether the connector type is enabled in Kibana. - example: true - enabled_in_config: - type: boolean - description: Indicates whether the connector type is enabled in the Kibana - `.yml` file. - example: true - enabled_in_license: - type: boolean - description: Indicates whether the connector is enabled in the license. - example: true - id: - $ref: '#/components/schemas/connector_types' - minimum_license_required: - type: string - description: The license that is required to use the connector type. - example: basic - name: - type: string - description: The name of the connector type. - example: Index - supported_feature_ids: - type: array - description: The Kibana features that are supported by the connector type. - example: - - alerting - - uptime - - siem - items: - $ref: '#/components/schemas/features' - example: - supported_feature_ids: - - alerting - - uptime - - siem - name: Index - enabled_in_license: true - id: .server-log - enabled_in_config: true - minimum_license_required: basic - enabled: true - Run connector request body properties: - title: Run connector request body properties - required: - - params - type: object - properties: - params: - oneOf: - - $ref: '#/components/schemas/run_connector_params_documents' - - $ref: '#/components/schemas/run_connector_params_level_message' - - title: Subaction parameters - description: Test an action that involves a subaction. - discriminator: - propertyName: subAction - oneOf: - - $ref: '#/components/schemas/run_connector_subaction_addevent' - - $ref: '#/components/schemas/run_connector_subaction_closealert' - - $ref: '#/components/schemas/run_connector_subaction_createalert' - - $ref: '#/components/schemas/run_connector_subaction_fieldsbyissuetype' - - $ref: '#/components/schemas/run_connector_subaction_getchoices' - - $ref: '#/components/schemas/run_connector_subaction_getfields' - - $ref: '#/components/schemas/run_connector_subaction_getincident' - - $ref: '#/components/schemas/run_connector_subaction_issue' - - $ref: '#/components/schemas/run_connector_subaction_issues' - - $ref: '#/components/schemas/run_connector_subaction_issuetypes' - - $ref: '#/components/schemas/run_connector_subaction_pushtoservice' - description: The properties vary depending on the connector type. - inline_response_200_1: - required: - - connector_id - - status - type: object - properties: - connector_id: - type: string - description: The identifier for the connector. - data: - oneOf: - - type: object - additionalProperties: true - description: Information returned from the action. - - type: array - description: An array of information returned from the action. - items: - type: object - status: - type: string - description: The status of the action. - enum: - - error - - ok - example: - data: "" - connector_id: connector_id - status: error - Legacy update connector request body properties: - title: Legacy update connector request body properties - type: object - properties: - config: - type: object - description: The new connector configuration. Configuration properties vary - depending on the connector type. - name: - type: string - description: The new name for the connector. - secrets: - type: object - description: The updated secrets configuration for the connector. Secrets - properties vary depending on the connector type. - description: The properties vary depending on the connector type. - Legacy create connector request properties: - title: Legacy create connector request properties - type: object - properties: - actionTypeId: - type: string - description: The connector type identifier. - config: - type: object - description: The configuration for the connector. Configuration properties - vary depending on the connector type. - name: - type: string - description: The display name for the connector. - secrets: - type: object - description: | - The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. NOTE: Remember these values. You must provide them each time you update the connector. - inline_response_200_2: - type: object - properties: - enabled: - type: boolean - description: Indicates whether the connector type is enabled in Kibana. - enabledInConfig: - type: boolean - description: Indicates whether the connector type is enabled in the Kibana - `.yml` file. - enabledInLicense: - type: boolean - description: Indicates whether the connector is enabled in the license. - example: true - id: - type: string - description: The unique identifier for the connector type. - minimumLicenseRequired: - type: string - description: The license that is required to use the connector type. - name: - type: string - description: The name of the connector type. - example: - enabledInConfig: true - name: name - enabledInLicense: true - id: id - minimumLicenseRequired: minimumLicenseRequired - enabled: true - Legacy run connector request body properties: - title: Legacy run connector request body properties - required: - - params - type: object - properties: - params: - type: object - description: The parameters of the connector. Parameter properties vary - depending on the connector type. - description: The properties vary depending on the connector type. - inline_response_200_3: - type: object - properties: - actionId: - type: string - data: - oneOf: - - type: object - additionalProperties: true - description: Information returned from the action. - - type: array - description: An array of information returned from the action. - items: - type: object - status: - type: string - description: The status of the action. - example: - data: "" - actionId: actionId - status: status - Alert identifier mapping: - title: Alert identifier mapping - required: - - fieldType - - id - - key - - name - type: object - properties: - fieldType: - type: string - description: The type of field in Swimlane. - id: - type: string - description: The identifier for the field in Swimlane. - key: - type: string - description: The key for the field in Swimlane. - name: - type: string - description: The name of the field in Swimlane. - description: Mapping for the alert ID. - Case identifier mapping: - title: Case identifier mapping - required: - - fieldType - - id - - key - - name - type: object - properties: - fieldType: - type: string - description: The type of field in Swimlane. - id: - type: string - description: The identifier for the field in Swimlane. - key: - type: string - description: The key for the field in Swimlane. - name: - type: string - description: The name of the field in Swimlane. - description: Mapping for the case ID. - Case name mapping: - title: Case name mapping - required: - - fieldType - - id - - key - - name - type: object - properties: - fieldType: - type: string - description: The type of field in Swimlane. - id: - type: string - description: The identifier for the field in Swimlane. - key: - type: string - description: The key for the field in Swimlane. - name: - type: string - description: The name of the field in Swimlane. - description: Mapping for the case name. - Case comment mapping: - title: Case comment mapping - required: - - fieldType - - id - - key - - name - type: object - properties: - fieldType: - type: string - description: The type of field in Swimlane. - id: - type: string - description: The identifier for the field in Swimlane. - key: - type: string - description: The key for the field in Swimlane. - name: - type: string - description: The name of the field in Swimlane. - description: Mapping for the case comments. - Case description mapping: - title: Case description mapping - required: - - fieldType - - id - - key - - name - type: object - properties: - fieldType: - type: string - description: The type of field in Swimlane. - id: - type: string - description: The identifier for the field in Swimlane. - key: - type: string - description: The key for the field in Swimlane. - name: - type: string - description: The name of the field in Swimlane. - description: Mapping for the case description. - Rule name mapping: - title: Rule name mapping - required: - - fieldType - - id - - key - - name - type: object - properties: - fieldType: - type: string - description: The type of field in Swimlane. - id: - type: string - description: The identifier for the field in Swimlane. - key: - type: string - description: The key for the field in Swimlane. - name: - type: string - description: The name of the field in Swimlane. - description: Mapping for the name of the alert's rule. - Severity mapping: - title: Severity mapping - required: - - fieldType - - id - - key - - name - type: object - properties: - fieldType: - type: string - description: The type of field in Swimlane. - id: - type: string - description: The identifier for the field in Swimlane. - key: - type: string - description: The key for the field in Swimlane. - name: - type: string - description: The name of the field in Swimlane. - description: Mapping for the severity. - Connector mappings properties for a Swimlane connector: - title: Connector mappings properties for a Swimlane connector - type: object - properties: - alertIdConfig: - $ref: '#/components/schemas/Alert identifier mapping' - caseIdConfig: - $ref: '#/components/schemas/Case identifier mapping' - caseNameConfig: - $ref: '#/components/schemas/Case name mapping' - commentsConfig: - $ref: '#/components/schemas/Case comment mapping' - descriptionConfig: - $ref: '#/components/schemas/Case description mapping' - ruleNameConfig: - $ref: '#/components/schemas/Rule name mapping' - severityConfig: - $ref: '#/components/schemas/Severity mapping' - description: The field mapping. - run_connector_subaction_addevent_subActionParams: - type: object - properties: - additional_info: - type: string - description: Additional information about the event. - description: - type: string - description: The details about the event. - event_class: - type: string - description: A specific instance of the source. - message_key: - type: string - description: All actions sharing this key are associated with the same ServiceNow - alert. The default value is `:`. - metric_name: - type: string - description: The name of the metric. - node: - type: string - description: The host that the event was triggered for. - resource: - type: string - description: The name of the resource. - severity: - type: string - description: The severity of the event. - source: - type: string - description: The name of the event source type. - time_of_event: - type: string - description: The time of the event. - type: - type: string - description: The type of event. - description: The set of configuration properties for the action. - run_connector_subaction_closealert_subActionParams: - required: - - alias - type: object - properties: - alias: - type: string - description: The unique identifier used for alert deduplication in Opsgenie. - The alias must match the value used when creating the alert. - note: - type: string - description: Additional information for the alert. - source: - type: string - description: The display name for the source of the alert. - user: - type: string - description: The display name for the owner. - run_connector_subaction_createalert_subActionParams_responders: - type: object - properties: - id: - type: string - description: The identifier for the entity. - name: - type: string - description: The name of the entity. - type: - type: string - description: "The type of responders, in this case `escalation`." - enum: - - escalation - - schedule - - team - - user - username: - type: string - description: A valid email address for the user. - run_connector_subaction_createalert_subActionParams_visibleTo: - required: - - type - type: object - properties: - id: - type: string - description: The identifier for the entity. - name: - type: string - description: The name of the entity. - type: - type: string - description: Valid values are `team` and `user`. - enum: - - team - - user - username: - type: string - description: The user name. This property is required only when the `type` - is `user`. - run_connector_subaction_createalert_subActionParams: - required: - - message - type: object - properties: - actions: - type: array - description: The custom actions available to the alert. - items: - type: string - alias: - type: string - description: The unique identifier used for alert deduplication in Opsgenie. - description: - type: string - description: A description that provides detailed information about the - alert. - details: - type: object - additionalProperties: true - description: The custom properties of the alert. - example: - key1: value1 - key2: value2 - entity: - type: string - description: "The domain of the alert. For example, the application or server\ - \ name." - message: - type: string - description: The alert message. - note: - type: string - description: Additional information for the alert. - priority: - type: string - description: The priority level for the alert. - enum: - - P1 - - P2 - - P3 - - P4 - - P5 - responders: - type: array - description: | - The entities to receive notifications about the alert. If `type` is `user`, either `id` or `username` is required. If `type` is `team`, either `id` or `name` is required. - items: - $ref: '#/components/schemas/run_connector_subaction_createalert_subActionParams_responders' - source: - type: string - description: The display name for the source of the alert. - tags: - type: array - description: The tags for the alert. - items: - type: string - user: - type: string - description: The display name for the owner. - visibleTo: - type: array - description: "The teams and users that the alert will be visible to without\ - \ sending a notification. Only one of `id`, `name`, or `username` is required." - items: - $ref: '#/components/schemas/run_connector_subaction_createalert_subActionParams_visibleTo' - run_connector_subaction_fieldsbyissuetype_subActionParams: - required: - - id - type: object - properties: - id: - type: string - description: The Jira issue type identifier. - example: "10024" - run_connector_subaction_getchoices_subActionParams: - required: - - fields - type: object - properties: - fields: - type: array - description: An array of fields. - items: - type: string - description: The set of configuration properties for the action. - run_connector_subaction_getincident_subActionParams: - required: - - externalId - type: object - properties: - externalId: - type: string - description: "The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier." - example: "71778" - run_connector_subaction_issue_subActionParams: - required: - - id - type: object - properties: - id: - type: string - description: The Jira issue identifier. - example: "71778" - run_connector_subaction_issues_subActionParams: - required: - - title - type: object - properties: - title: - type: string - description: The title of the Jira issue. - run_connector_subaction_pushtoservice_subActionParams_comments: - type: object - properties: - comment: - type: string - description: "A comment related to the incident. For example, describe how\ - \ to troubleshoot the issue." - commentId: - type: integer - description: A unique identifier for the comment. - run_connector_subaction_pushtoservice_subActionParams_incident: - type: object - properties: - alertId: - type: string - description: The alert identifier for Swimlane connectors. - caseId: - type: string - description: The case identifier for the incident for Swimlane connectors. - caseName: - type: string - description: The case name for the incident for Swimlane connectors. - category: - type: string - description: The category of the incident for ServiceNow ITSM and ServiceNow - SecOps connectors. - correlation_display: - type: string - description: A descriptive label of the alert for correlation purposes for - ServiceNow ITSM and ServiceNow SecOps connectors. - correlation_id: - type: string - description: | - The correlation identifier for the security incident for ServiceNow ITSM and ServiveNow SecOps connectors. Connectors using the same correlation ID are associated with the same ServiceNow incident. This value determines whether a new ServiceNow incident is created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the correlation ID value in ServiceNow. The maximum character length for this value is 100 characters. NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that ServiceNow creates a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, ServiceNow creates and continually updates a single incident record for the alert. - description: - type: string - description: "The description of the incident for Jira, ServiceNow ITSM,\ - \ ServiceNow SecOps, and Swimlane connectors." - dest_ip: - description: | - A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. - oneOf: - - type: string - - type: array - items: - type: string - externalId: - type: string - description: | - The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. If present, the incident is updated. Otherwise, a new incident is created. - impact: - type: string - description: The impact of the incident for ServiceNow ITSM connectors. - issueType: - type: integer - description: "The type of incident for Jira connectors. For example, 10006.\ - \ To obtain the list of valid values, set `subAction` to `issueTypes`." - labels: - type: array - description: | - The labels for the incident for Jira connectors. NOTE: Labels cannot contain spaces. - items: - type: string - malware_hash: - description: A list of malware hashes related to the security incident for - ServiceNow SecOps connectors. The hashes are added as observables to the - security incident. - oneOf: - - type: string - - type: array - items: - type: string - malware_url: - type: string - description: A list of malware URLs related to the security incident for - ServiceNow SecOps connectors. The URLs are added as observables to the - security incident. - oneOf: - - type: string - - type: array - items: - type: string - parent: - type: string - description: The ID or key of the parent issue for Jira connectors. Applies - only to `Sub-task` types of issues. - priority: - type: string - description: The priority of the incident in Jira and ServiceNow SecOps - connectors. - ruleName: - type: string - description: The rule name for Swimlane connectors. - severity: - type: string - description: The severity of the incident for ServiceNow ITSM and Swimlane - connectors. - short_description: - type: string - description: | - A short description of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. It is used for searching the contents of the knowledge base. - source_ip: - description: A list of source IP addresses related to the security incident - for ServiceNow SecOps connectors. The IPs are added as observables to - the security incident. - oneOf: - - type: string - - type: array - items: - type: string - subcategory: - type: string - description: The subcategory of the incident for ServiceNow ITSM and ServiceNow - SecOps connectors. - summary: - type: string - description: A summary of the incident for Jira connectors. - title: - type: string - description: | - A title for the incident for Jira connectors. It is used for searching the contents of the knowledge base. - urgency: - type: string - description: The urgency of the incident for ServiceNow ITSM connectors. - description: "Information necessary to create or update a Jira, ServiceNow ITSM,\ - \ ServiveNow SecOps, or Swimlane incident." - run_connector_subaction_pushtoservice_subActionParams: - type: object - properties: - comments: - type: array - description: "Additional information that is sent to Jira, ServiceNow ITSM,\ - \ ServiceNow SecOps, or Swimlane." - items: - $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams_comments' - incident: - $ref: '#/components/schemas/run_connector_subaction_pushtoservice_subActionParams_incident' - description: The set of configuration properties for the action. - responses: - "401": - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/Unauthorized response' - "404": - description: Object is not found. - content: - application/json: - schema: - $ref: '#/components/schemas/Not found response' - "200_actions": - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '#/components/schemas/action_response_properties' - parameters: - kbn_xsrf: - name: kbn-xsrf - in: header - description: Cross-site request forgery protection - required: true - style: simple - explode: false - schema: - type: string - space_id: - name: spaceId - in: path - description: "An identifier for the space. If `/s/` and the identifier are omitted\ - \ from the path, the default space is used." - required: true - style: simple - explode: false - schema: - type: string - example: default - connector_id: - name: connectorId - in: path - description: An identifier for the connector. - required: true - style: simple - explode: false - schema: - type: string - example: df770e30-8b8b-11ed-a780-3b746c987a81 - action_id: - name: actionId - in: path - description: An identifier for the action. - required: true - style: simple - explode: false - schema: - type: string - example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad - examples: - create_index_connector_request: - summary: Create an index connector. - value: - name: my-connector - connector_type_id: .index - config: - index: test-index - create_index_connector_response: - summary: A new index connector. - value: - id: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad - connector_type_id: .index + index: test-index + create_index_connector_response: + summary: A new index connector. + value: + id: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad + connector_type_id: .index name: my-connector config: index: test-index @@ -3455,63 +2974,63 @@ components: get_connectors_response: summary: A list of connectors value: - - id: preconfigured-email-connector - name: my-preconfigured-email-notification - connector_type_id: .email - is_preconfigured: true - is_deprecated: false - referenced_by_count: 0 - - id: e07d0c80-8b8b-11ed-a780-3b746c987a81 - name: my-index-connector - config: - index: test-index - refresh: false - executionTimeField: null - connector_type_id: .index - is_preconfigured: false - is_deprecated: false - referenced_by_count: 2 - is_missing_secrets: false + - id: preconfigured-email-connector + name: my-preconfigured-email-notification + connector_type_id: .email + is_preconfigured: true + is_deprecated: false + referenced_by_count: 0 + - id: e07d0c80-8b8b-11ed-a780-3b746c987a81 + name: my-index-connector + config: + index: test-index + refresh: false + executionTimeField: null + connector_type_id: .index + is_preconfigured: false + is_deprecated: false + referenced_by_count: 2 + is_missing_secrets: false get_connector_types_response: summary: A list of connector types value: - - id: .swimlane - name: Swimlane - enabled: true - enabled_in_config: true - enabled_in_license: true - minimum_license_required: gold - supported_feature_ids: - - alerting - - cases - - siem - - id: .index - name: Index - enabled: true - enabled_in_config: true - enabled_in_license: true - minimum_license_required: basic - supported_feature_ids: - - alerting - - uptime - - siem - - id: .server-log - name: Server log - enabled: true - enabled_in_config: true - enabled_in_license: true - minimum_license_required: basic - supported_feature_ids: - - alerting - - uptime + - id: .swimlane + name: Swimlane + enabled: true + enabled_in_config: true + enabled_in_license: true + minimum_license_required: gold + supported_feature_ids: + - alerting + - cases + - siem + - id: .index + name: Index + enabled: true + enabled_in_config: true + enabled_in_license: true + minimum_license_required: basic + supported_feature_ids: + - alerting + - uptime + - siem + - id: .server-log + name: Server log + enabled: true + enabled_in_config: true + enabled_in_license: true + minimum_license_required: basic + supported_feature_ids: + - alerting + - uptime run_index_connector_request: summary: Run an index connector. value: params: documents: - - id: my_doc_id - name: my_doc_name - message: "hello, world" + - id: my_doc_id + name: my_doc_name + message: hello, world run_jira_connector_request: summary: Run a Jira connector to retrieve the list of issue types. value: @@ -3530,8 +3049,8 @@ components: subAction: getChoices subActionParams: fields: - - severity - - urgency + - severity + - urgency run_swimlane_connector_request: summary: Run a Swimlane connector to create an incident. value: @@ -3539,10 +3058,10 @@ components: subAction: pushToService subActionParams: comments: - - commentId: 1 - comment: A comment about the incident. + - commentId: 1 + comment: A comment about the incident. incident: - caseId: "1000" + caseId: '1000' caseName: Case name description: Description of the incident. run_index_connector_response: @@ -3552,18 +3071,18 @@ components: data: errors: false items: - - create: - _id: 4JtvwYUBrcyxt2NnfW3y - _index: my-index - _primary_term: 1 - _seq_no: 0 - _shards: - failed: 0 - successful: 1 - total: 2 - _version: 1 - result: created - status: 201 + - create: + _id: 4JtvwYUBrcyxt2NnfW3y + _index: my-index + _primary_term: 1 + _seq_no: 0 + _shards: + failed: 0 + successful: 1 + total: 2 + _version: 1 + result: created + status: 201 took: 135 status: ok run_jira_connector_response: @@ -3571,18 +3090,18 @@ components: value: connector_id: b3aad810-edbe-11ec-82d1-11348ecbf4a6 data: - - id: 10024 - name: Improvement - - id: 10006 - name: Task - - id: 10007 - name: Sub-task - - id: 10025 - name: New Feature - - id: 10023 - name: Bug - - id: 10000 - name: Epic + - id: 10024 + name: Improvement + - id: 10006 + name: Task + - id: 10007 + name: Sub-task + - id: 10025 + name: New Feature + - id: 10023 + name: Bug + - id: 10000 + name: Epic status: ok run_server_log_connector_response: summary: Response from running a server log connector. @@ -3590,47 +3109,46 @@ components: connector_id: 7fc7b9a0-ecc9-11ec-8736-e7d63118c907 status: ok run_servicenow_itom_connector_response: - summary: Response from retrieving the list of choices for a ServiceNow ITOM - connector. + summary: Response from retrieving the list of choices for a ServiceNow ITOM connector. value: connector_id: 9d9be270-2fd2-11ed-b0e0-87533c532698 data: - - dependent_value: "" - element: severity - label: Critical - value: 1 - - dependent_value: "" - element: severity - label: Major - value: 2 - - dependent_value: "" - element: severity - label: Minor - value: 3 - - dependent_value: "" - element: severity - label: Warning - value: 4 - - dependent_value: "" - element: severity - label: OK - value: 5 - - dependent_value: "" - element: severity - label: Clear - value: 0 - - dependent_value: "" - element: urgency - label: 1 - High - value: 1 - - dependent_value: "" - element: urgency - label: 2 - Medium - value: 2 - - dependent_value: "" - element: urgency - label: 3 - Low - value: 3 + - dependent_value: '' + element: severity + label: Critical + value: 1 + - dependent_value: '' + element: severity + label: Major + value: 2 + - dependent_value: '' + element: severity + label: Minor + value: 3 + - dependent_value: '' + element: severity + label: Warning + value: 4 + - dependent_value: '' + element: severity + label: OK + value: 5 + - dependent_value: '' + element: severity + label: Clear + value: 0 + - dependent_value: '' + element: urgency + label: 1 - High + value: 1 + - dependent_value: '' + element: urgency + label: 2 - Medium + value: 2 + - dependent_value: '' + element: urgency + label: 3 - Low + value: 3 status: ok run_swimlane_connector_response: summary: Response from creating a Swimlane incident. @@ -3640,16 +3158,59 @@ components: id: aKPmBHWzmdRQtx6Mx title: TEST-457 url: https://elastic.swimlane.url.us/record/aNcL2xniGHGpa2AHb/aKPmBHWzmdRQtx6Mx - pushedDate: 2022-09-08T16:52:27.866Z + pushedDate: '2022-09-08T16:52:27.866Z' comments: - - commentId: 1 - pushedDate: 2022-09-08T16:52:27.865Z + - commentId: 1 + pushedDate: '2022-09-08T16:52:27.865Z' status: ok - securitySchemes: - basicAuth: - type: http - scheme: basic - apiKeyAuth: - type: apiKey - name: ApiKey - in: header + responses: + '401': + description: Authorization information is missing or invalid. + content: + application/json: + schema: + type: object + title: Unauthorized response + properties: + error: + type: string + example: Unauthorized + enum: + - Unauthorized + message: + type: string + statusCode: + type: integer + example: 401 + enum: + - 401 + '404': + description: Object is not found. + content: + application/json: + schema: + type: object + title: Not found response + properties: + error: + type: string + example: Not Found + enum: + - Not Found + message: + type: string + example: Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found + statusCode: + type: integer + example: 404 + enum: + - 404 + 200_actions: + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/action_response_properties' +security: + - basicAuth: [] + - apiKeyAuth: [] diff --git a/generated/connectors/oas_cfg_gen.go b/generated/connectors/oas_cfg_gen.go new file mode 100644 index 000000000..3d39a4e9d --- /dev/null +++ b/generated/connectors/oas_cfg_gen.go @@ -0,0 +1,277 @@ +// Code generated by ogen, DO NOT EDIT. + +package connectors + +import ( + "net/http" + + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/instrument" + "go.opentelemetry.io/otel/trace" + + ht "github.com/ogen-go/ogen/http" + "github.com/ogen-go/ogen/middleware" + "github.com/ogen-go/ogen/ogenerrors" + "github.com/ogen-go/ogen/otelogen" +) + +var ( + // Allocate option closure once. + clientSpanKind = trace.WithSpanKind(trace.SpanKindClient) + // Allocate option closure once. + serverSpanKind = trace.WithSpanKind(trace.SpanKindServer) +) + +type ( + optionFunc[C any] func(*C) + otelOptionFunc func(*otelConfig) +) + +type otelConfig struct { + TracerProvider trace.TracerProvider + Tracer trace.Tracer + MeterProvider metric.MeterProvider + Meter metric.Meter +} + +func (cfg *otelConfig) initOTEL() { + if cfg.TracerProvider == nil { + cfg.TracerProvider = otel.GetTracerProvider() + } + if cfg.MeterProvider == nil { + cfg.MeterProvider = metric.NewNoopMeterProvider() + } + cfg.Tracer = cfg.TracerProvider.Tracer(otelogen.Name, + trace.WithInstrumentationVersion(otelogen.SemVersion()), + ) + cfg.Meter = cfg.MeterProvider.Meter(otelogen.Name) +} + +// ErrorHandler is error handler. +type ErrorHandler = ogenerrors.ErrorHandler + +type serverConfig struct { + otelConfig + NotFound http.HandlerFunc + MethodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string) + ErrorHandler ErrorHandler + Prefix string + Middleware Middleware + MaxMultipartMemory int64 +} + +// ServerOption is server config option. +type ServerOption interface { + applyServer(*serverConfig) +} + +var _ = []ServerOption{ + (optionFunc[serverConfig])(nil), + (otelOptionFunc)(nil), +} + +func (o optionFunc[C]) applyServer(c *C) { + o(c) +} + +func (o otelOptionFunc) applyServer(c *serverConfig) { + o(&c.otelConfig) +} + +func newServerConfig(opts ...ServerOption) serverConfig { + cfg := serverConfig{ + NotFound: http.NotFound, + MethodNotAllowed: func(w http.ResponseWriter, r *http.Request, allowed string) { + w.Header().Set("Allow", allowed) + w.WriteHeader(http.StatusMethodNotAllowed) + }, + ErrorHandler: ogenerrors.DefaultErrorHandler, + Middleware: nil, + MaxMultipartMemory: 32 << 20, // 32 MB + } + for _, opt := range opts { + opt.applyServer(&cfg) + } + cfg.initOTEL() + return cfg +} + +type baseServer struct { + cfg serverConfig + requests instrument.Int64Counter + errors instrument.Int64Counter + duration instrument.Int64Histogram +} + +func (s baseServer) notFound(w http.ResponseWriter, r *http.Request) { + s.cfg.NotFound(w, r) +} + +func (s baseServer) notAllowed(w http.ResponseWriter, r *http.Request, allowed string) { + s.cfg.MethodNotAllowed(w, r, allowed) +} + +func (cfg serverConfig) baseServer() (s baseServer, err error) { + s = baseServer{cfg: cfg} + if s.requests, err = s.cfg.Meter.Int64Counter(otelogen.ServerRequestCount); err != nil { + return s, err + } + if s.errors, err = s.cfg.Meter.Int64Counter(otelogen.ServerErrorsCount); err != nil { + return s, err + } + if s.duration, err = s.cfg.Meter.Int64Histogram(otelogen.ServerDuration); err != nil { + return s, err + } + return s, nil +} + +type clientConfig struct { + otelConfig + Client ht.Client +} + +// ClientOption is client config option. +type ClientOption interface { + applyClient(*clientConfig) +} + +var _ = []ClientOption{ + (optionFunc[clientConfig])(nil), + (otelOptionFunc)(nil), +} + +func (o optionFunc[C]) applyClient(c *C) { + o(c) +} + +func (o otelOptionFunc) applyClient(c *clientConfig) { + o(&c.otelConfig) +} + +func newClientConfig(opts ...ClientOption) clientConfig { + cfg := clientConfig{ + Client: http.DefaultClient, + } + for _, opt := range opts { + opt.applyClient(&cfg) + } + cfg.initOTEL() + return cfg +} + +type baseClient struct { + cfg clientConfig + requests instrument.Int64Counter + errors instrument.Int64Counter + duration instrument.Int64Histogram +} + +func (cfg clientConfig) baseClient() (c baseClient, err error) { + c = baseClient{cfg: cfg} + if c.requests, err = c.cfg.Meter.Int64Counter(otelogen.ClientRequestCount); err != nil { + return c, err + } + if c.errors, err = c.cfg.Meter.Int64Counter(otelogen.ClientErrorsCount); err != nil { + return c, err + } + if c.duration, err = c.cfg.Meter.Int64Histogram(otelogen.ClientDuration); err != nil { + return c, err + } + return c, nil +} + +// Option is config option. +type Option interface { + ServerOption + ClientOption +} + +// WithTracerProvider specifies a tracer provider to use for creating a tracer. +// +// If none is specified, the global provider is used. +func WithTracerProvider(provider trace.TracerProvider) Option { + return otelOptionFunc(func(cfg *otelConfig) { + if provider != nil { + cfg.TracerProvider = provider + } + }) +} + +// WithMeterProvider specifies a meter provider to use for creating a meter. +// +// If none is specified, the metric.NewNoopMeterProvider is used. +func WithMeterProvider(provider metric.MeterProvider) Option { + return otelOptionFunc(func(cfg *otelConfig) { + if provider != nil { + cfg.MeterProvider = provider + } + }) +} + +// WithClient specifies http client to use. +func WithClient(client ht.Client) ClientOption { + return optionFunc[clientConfig](func(cfg *clientConfig) { + if client != nil { + cfg.Client = client + } + }) +} + +// WithNotFound specifies Not Found handler to use. +func WithNotFound(notFound http.HandlerFunc) ServerOption { + return optionFunc[serverConfig](func(cfg *serverConfig) { + if notFound != nil { + cfg.NotFound = notFound + } + }) +} + +// WithMethodNotAllowed specifies Method Not Allowed handler to use. +func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption { + return optionFunc[serverConfig](func(cfg *serverConfig) { + if methodNotAllowed != nil { + cfg.MethodNotAllowed = methodNotAllowed + } + }) +} + +// WithErrorHandler specifies error handler to use. +func WithErrorHandler(h ErrorHandler) ServerOption { + return optionFunc[serverConfig](func(cfg *serverConfig) { + if h != nil { + cfg.ErrorHandler = h + } + }) +} + +// WithPathPrefix specifies server path prefix. +func WithPathPrefix(prefix string) ServerOption { + return optionFunc[serverConfig](func(cfg *serverConfig) { + cfg.Prefix = prefix + }) +} + +// WithMiddleware specifies middlewares to use. +func WithMiddleware(m ...Middleware) ServerOption { + return optionFunc[serverConfig](func(cfg *serverConfig) { + switch len(m) { + case 0: + cfg.Middleware = nil + case 1: + cfg.Middleware = m[0] + default: + cfg.Middleware = middleware.ChainMiddlewares(m...) + } + }) +} + +// WithMaxMultipartMemory specifies limit of memory for storing file parts. +// File parts which can't be stored in memory will be stored on disk in temporary files. +func WithMaxMultipartMemory(max int64) ServerOption { + return optionFunc[serverConfig](func(cfg *serverConfig) { + if max > 0 { + cfg.MaxMultipartMemory = max + } + }) +} diff --git a/generated/connectors/oas_client_gen.go b/generated/connectors/oas_client_gen.go new file mode 100644 index 000000000..0d3cc6db2 --- /dev/null +++ b/generated/connectors/oas_client_gen.go @@ -0,0 +1,2113 @@ +// Code generated by ogen, DO NOT EDIT. + +package connectors + +import ( + "context" + "net/url" + "strings" + "time" + + "github.com/go-faster/errors" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/trace" + + "github.com/ogen-go/ogen/conv" + ht "github.com/ogen-go/ogen/http" + "github.com/ogen-go/ogen/ogenerrors" + "github.com/ogen-go/ogen/otelogen" + "github.com/ogen-go/ogen/uri" +) + +// Client implements OAS client. +type Client struct { + serverURL *url.URL + sec SecuritySource + baseClient +} + +var _ Handler = struct { + *Client +}{} + +func trimTrailingSlashes(u *url.URL) { + u.Path = strings.TrimRight(u.Path, "/") + u.RawPath = strings.TrimRight(u.RawPath, "/") +} + +// NewClient initializes new Client defined by OAS. +func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error) { + u, err := url.Parse(serverURL) + if err != nil { + return nil, err + } + trimTrailingSlashes(u) + + c, err := newClientConfig(opts...).baseClient() + if err != nil { + return nil, err + } + return &Client{ + serverURL: u, + sec: sec, + baseClient: c, + }, nil +} + +type serverURLKey struct{} + +// WithServerURL sets context key to override server URL. +func WithServerURL(ctx context.Context, u *url.URL) context.Context { + return context.WithValue(ctx, serverURLKey{}, u) +} + +func (c *Client) requestURL(ctx context.Context) *url.URL { + u, ok := ctx.Value(serverURLKey{}).(*url.URL) + if !ok { + return c.serverURL + } + return u +} + +// CreateConnector invokes createConnector operation. +// +// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** +// section of the Kibana feature privileges. +// +// POST /s/{spaceId}/api/actions/connector +func (c *Client) CreateConnector(ctx context.Context, request CreateConnectorReq, params CreateConnectorParams) (CreateConnectorRes, error) { + res, err := c.sendCreateConnector(ctx, request, params) + _ = res + return res, err +} + +func (c *Client) sendCreateConnector(ctx context.Context, request CreateConnectorReq, params CreateConnectorParams) (res CreateConnectorRes, err error) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("createConnector"), + } + // Validate request before sending. + if err := func() error { + if err := request.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "validate") + } + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, otelAttrs...) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "CreateConnector", + trace.WithAttributes(otelAttrs...), + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, otelAttrs...) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [3]string + pathParts[0] = "/s/" + { + // Encode "spaceId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "spaceId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.SpaceId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/api/actions/connector" + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "POST", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + if err := encodeCreateConnectorRequest(request, r); err != nil { + return res, errors.Wrap(err, "encode request") + } + + stage = "EncodeHeaderParams" + h := uri.NewHeaderEncoder(r.Header) + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "kbn-xsrf", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + return e.EncodeValue(conv.StringToString(params.KbnXSRF)) + }); err != nil { + return res, errors.Wrap(err, "encode header") + } + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:BasicAuth" + switch err := c.securityBasicAuth(ctx, "CreateConnector", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"BasicAuth\"") + } + } + { + stage = "Security:ApiKeyAuth" + switch err := c.securityApiKeyAuth(ctx, "CreateConnector", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 1 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"ApiKeyAuth\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, errors.New("no security requirement satisfied") + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeCreateConnectorResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + +// DeleteConnector invokes deleteConnector operation. +// +// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** +// section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be +// recovered. +// +// DELETE /s/{spaceId}/api/actions/connector/{connectorId} +func (c *Client) DeleteConnector(ctx context.Context, params DeleteConnectorParams) (DeleteConnectorRes, error) { + res, err := c.sendDeleteConnector(ctx, params) + _ = res + return res, err +} + +func (c *Client) sendDeleteConnector(ctx context.Context, params DeleteConnectorParams) (res DeleteConnectorRes, err error) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("deleteConnector"), + } + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, otelAttrs...) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "DeleteConnector", + trace.WithAttributes(otelAttrs...), + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, otelAttrs...) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [4]string + pathParts[0] = "/s/" + { + // Encode "spaceId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "spaceId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.SpaceId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/api/actions/connector/" + { + // Encode "connectorId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "connectorId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.ConnectorId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[3] = encoded + } + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "DELETE", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + + stage = "EncodeHeaderParams" + h := uri.NewHeaderEncoder(r.Header) + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "kbn-xsrf", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + return e.EncodeValue(conv.StringToString(params.KbnXSRF)) + }); err != nil { + return res, errors.Wrap(err, "encode header") + } + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:BasicAuth" + switch err := c.securityBasicAuth(ctx, "DeleteConnector", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"BasicAuth\"") + } + } + { + stage = "Security:ApiKeyAuth" + switch err := c.securityApiKeyAuth(ctx, "DeleteConnector", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 1 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"ApiKeyAuth\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, errors.New("no security requirement satisfied") + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeDeleteConnectorResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + +// GetConnector invokes getConnector operation. +// +// You must have `read` privileges for the **Actions and Connectors** feature in the **Management** +// section of the Kibana feature privileges. +// +// GET /s/{spaceId}/api/actions/connector/{connectorId} +func (c *Client) GetConnector(ctx context.Context, params GetConnectorParams) (GetConnectorRes, error) { + res, err := c.sendGetConnector(ctx, params) + _ = res + return res, err +} + +func (c *Client) sendGetConnector(ctx context.Context, params GetConnectorParams) (res GetConnectorRes, err error) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("getConnector"), + } + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, otelAttrs...) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "GetConnector", + trace.WithAttributes(otelAttrs...), + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, otelAttrs...) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [4]string + pathParts[0] = "/s/" + { + // Encode "spaceId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "spaceId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.SpaceId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/api/actions/connector/" + { + // Encode "connectorId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "connectorId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.ConnectorId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[3] = encoded + } + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "GET", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:BasicAuth" + switch err := c.securityBasicAuth(ctx, "GetConnector", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"BasicAuth\"") + } + } + { + stage = "Security:ApiKeyAuth" + switch err := c.securityApiKeyAuth(ctx, "GetConnector", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 1 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"ApiKeyAuth\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, errors.New("no security requirement satisfied") + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeGetConnectorResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + +// GetConnectorTypes invokes getConnectorTypes operation. +// +// You do not need any Kibana feature privileges to run this API. +// +// GET /s/{spaceId}/api/actions/connector_types +func (c *Client) GetConnectorTypes(ctx context.Context, params GetConnectorTypesParams) (GetConnectorTypesRes, error) { + res, err := c.sendGetConnectorTypes(ctx, params) + _ = res + return res, err +} + +func (c *Client) sendGetConnectorTypes(ctx context.Context, params GetConnectorTypesParams) (res GetConnectorTypesRes, err error) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("getConnectorTypes"), + } + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, otelAttrs...) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "GetConnectorTypes", + trace.WithAttributes(otelAttrs...), + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, otelAttrs...) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [3]string + pathParts[0] = "/s/" + { + // Encode "spaceId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "spaceId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.SpaceId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/api/actions/connector_types" + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeQueryParams" + q := uri.NewQueryEncoder() + { + // Encode "feature_id" parameter. + cfg := uri.QueryParameterEncodingConfig{ + Name: "feature_id", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := params.FeatureID.Get(); ok { + return e.EncodeValue(conv.StringToString(string(val))) + } + return nil + }); err != nil { + return res, errors.Wrap(err, "encode query") + } + } + u.RawQuery = q.Values().Encode() + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "GET", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:BasicAuth" + switch err := c.securityBasicAuth(ctx, "GetConnectorTypes", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"BasicAuth\"") + } + } + { + stage = "Security:ApiKeyAuth" + switch err := c.securityApiKeyAuth(ctx, "GetConnectorTypes", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 1 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"ApiKeyAuth\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, errors.New("no security requirement satisfied") + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeGetConnectorTypesResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + +// GetConnectors invokes getConnectors operation. +// +// You must have `read` privileges for the **Actions and Connectors** feature in the **Management** +// section of the Kibana feature privileges. +// +// GET /s/{spaceId}/api/actions/connectors +func (c *Client) GetConnectors(ctx context.Context, params GetConnectorsParams) (GetConnectorsRes, error) { + res, err := c.sendGetConnectors(ctx, params) + _ = res + return res, err +} + +func (c *Client) sendGetConnectors(ctx context.Context, params GetConnectorsParams) (res GetConnectorsRes, err error) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("getConnectors"), + } + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, otelAttrs...) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "GetConnectors", + trace.WithAttributes(otelAttrs...), + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, otelAttrs...) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [3]string + pathParts[0] = "/s/" + { + // Encode "spaceId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "spaceId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.SpaceId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/api/actions/connectors" + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "GET", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:BasicAuth" + switch err := c.securityBasicAuth(ctx, "GetConnectors", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"BasicAuth\"") + } + } + { + stage = "Security:ApiKeyAuth" + switch err := c.securityApiKeyAuth(ctx, "GetConnectors", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 1 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"ApiKeyAuth\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, errors.New("no security requirement satisfied") + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeGetConnectorsResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + +// LegacyCreateConnector invokes legacyCreateConnector operation. +// +// Deprecated in 7.13.0. Use the create connector API instead. +// +// Deprecated: schema marks this operation as deprecated. +// +// POST /s/{spaceId}/api/actions +func (c *Client) LegacyCreateConnector(ctx context.Context, request *LegacyCreateConnectorReq, params LegacyCreateConnectorParams) (LegacyCreateConnectorRes, error) { + res, err := c.sendLegacyCreateConnector(ctx, request, params) + _ = res + return res, err +} + +func (c *Client) sendLegacyCreateConnector(ctx context.Context, request *LegacyCreateConnectorReq, params LegacyCreateConnectorParams) (res LegacyCreateConnectorRes, err error) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("legacyCreateConnector"), + } + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, otelAttrs...) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "LegacyCreateConnector", + trace.WithAttributes(otelAttrs...), + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, otelAttrs...) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [3]string + pathParts[0] = "/s/" + { + // Encode "spaceId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "spaceId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.SpaceId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/api/actions" + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "POST", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + if err := encodeLegacyCreateConnectorRequest(request, r); err != nil { + return res, errors.Wrap(err, "encode request") + } + + stage = "EncodeHeaderParams" + h := uri.NewHeaderEncoder(r.Header) + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "kbn-xsrf", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + return e.EncodeValue(conv.StringToString(params.KbnXSRF)) + }); err != nil { + return res, errors.Wrap(err, "encode header") + } + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:BasicAuth" + switch err := c.securityBasicAuth(ctx, "LegacyCreateConnector", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"BasicAuth\"") + } + } + { + stage = "Security:ApiKeyAuth" + switch err := c.securityApiKeyAuth(ctx, "LegacyCreateConnector", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 1 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"ApiKeyAuth\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, errors.New("no security requirement satisfied") + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeLegacyCreateConnectorResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + +// LegacyDeleteConnector invokes legacyDeleteConnector operation. +// +// Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, +// it cannot be recovered. +// +// Deprecated: schema marks this operation as deprecated. +// +// DELETE /s/{spaceId}/api/actions/action/{actionId} +func (c *Client) LegacyDeleteConnector(ctx context.Context, params LegacyDeleteConnectorParams) (LegacyDeleteConnectorRes, error) { + res, err := c.sendLegacyDeleteConnector(ctx, params) + _ = res + return res, err +} + +func (c *Client) sendLegacyDeleteConnector(ctx context.Context, params LegacyDeleteConnectorParams) (res LegacyDeleteConnectorRes, err error) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("legacyDeleteConnector"), + } + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, otelAttrs...) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "LegacyDeleteConnector", + trace.WithAttributes(otelAttrs...), + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, otelAttrs...) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [4]string + pathParts[0] = "/s/" + { + // Encode "spaceId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "spaceId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.SpaceId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/api/actions/action/" + { + // Encode "actionId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "actionId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.ActionId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[3] = encoded + } + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "DELETE", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + + stage = "EncodeHeaderParams" + h := uri.NewHeaderEncoder(r.Header) + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "kbn-xsrf", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + return e.EncodeValue(conv.StringToString(params.KbnXSRF)) + }); err != nil { + return res, errors.Wrap(err, "encode header") + } + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:BasicAuth" + switch err := c.securityBasicAuth(ctx, "LegacyDeleteConnector", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"BasicAuth\"") + } + } + { + stage = "Security:ApiKeyAuth" + switch err := c.securityApiKeyAuth(ctx, "LegacyDeleteConnector", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 1 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"ApiKeyAuth\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, errors.New("no security requirement satisfied") + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeLegacyDeleteConnectorResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + +// LegacyGetConnector invokes legacyGetConnector operation. +// +// Deprecated in 7.13.0. Use the get connector API instead. +// +// Deprecated: schema marks this operation as deprecated. +// +// GET /s/{spaceId}/api/actions/action/{actionId} +func (c *Client) LegacyGetConnector(ctx context.Context, params LegacyGetConnectorParams) (LegacyGetConnectorRes, error) { + res, err := c.sendLegacyGetConnector(ctx, params) + _ = res + return res, err +} + +func (c *Client) sendLegacyGetConnector(ctx context.Context, params LegacyGetConnectorParams) (res LegacyGetConnectorRes, err error) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("legacyGetConnector"), + } + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, otelAttrs...) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "LegacyGetConnector", + trace.WithAttributes(otelAttrs...), + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, otelAttrs...) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [4]string + pathParts[0] = "/s/" + { + // Encode "spaceId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "spaceId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.SpaceId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/api/actions/action/" + { + // Encode "actionId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "actionId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.ActionId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[3] = encoded + } + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "GET", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:BasicAuth" + switch err := c.securityBasicAuth(ctx, "LegacyGetConnector", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"BasicAuth\"") + } + } + { + stage = "Security:ApiKeyAuth" + switch err := c.securityApiKeyAuth(ctx, "LegacyGetConnector", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 1 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"ApiKeyAuth\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, errors.New("no security requirement satisfied") + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeLegacyGetConnectorResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + +// LegacyGetConnectorTypes invokes legacyGetConnectorTypes operation. +// +// Deprecated in 7.13.0. Use the get all connector types API instead. +// +// Deprecated: schema marks this operation as deprecated. +// +// GET /s/{spaceId}/api/actions/list_action_types +func (c *Client) LegacyGetConnectorTypes(ctx context.Context, params LegacyGetConnectorTypesParams) (LegacyGetConnectorTypesRes, error) { + res, err := c.sendLegacyGetConnectorTypes(ctx, params) + _ = res + return res, err +} + +func (c *Client) sendLegacyGetConnectorTypes(ctx context.Context, params LegacyGetConnectorTypesParams) (res LegacyGetConnectorTypesRes, err error) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("legacyGetConnectorTypes"), + } + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, otelAttrs...) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "LegacyGetConnectorTypes", + trace.WithAttributes(otelAttrs...), + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, otelAttrs...) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [3]string + pathParts[0] = "/s/" + { + // Encode "spaceId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "spaceId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.SpaceId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/api/actions/list_action_types" + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "GET", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:BasicAuth" + switch err := c.securityBasicAuth(ctx, "LegacyGetConnectorTypes", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"BasicAuth\"") + } + } + { + stage = "Security:ApiKeyAuth" + switch err := c.securityApiKeyAuth(ctx, "LegacyGetConnectorTypes", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 1 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"ApiKeyAuth\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, errors.New("no security requirement satisfied") + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeLegacyGetConnectorTypesResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + +// LegacyGetConnectors invokes legacyGetConnectors operation. +// +// Deprecated in 7.13.0. Use the get all connectors API instead. +// +// Deprecated: schema marks this operation as deprecated. +// +// GET /s/{spaceId}/api/actions +func (c *Client) LegacyGetConnectors(ctx context.Context, params LegacyGetConnectorsParams) (LegacyGetConnectorsRes, error) { + res, err := c.sendLegacyGetConnectors(ctx, params) + _ = res + return res, err +} + +func (c *Client) sendLegacyGetConnectors(ctx context.Context, params LegacyGetConnectorsParams) (res LegacyGetConnectorsRes, err error) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("legacyGetConnectors"), + } + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, otelAttrs...) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "LegacyGetConnectors", + trace.WithAttributes(otelAttrs...), + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, otelAttrs...) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [3]string + pathParts[0] = "/s/" + { + // Encode "spaceId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "spaceId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.SpaceId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/api/actions" + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "GET", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:BasicAuth" + switch err := c.securityBasicAuth(ctx, "LegacyGetConnectors", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"BasicAuth\"") + } + } + { + stage = "Security:ApiKeyAuth" + switch err := c.securityApiKeyAuth(ctx, "LegacyGetConnectors", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 1 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"ApiKeyAuth\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, errors.New("no security requirement satisfied") + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeLegacyGetConnectorsResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + +// LegacyRunConnector invokes legacyRunConnector operation. +// +// Deprecated in 7.13.0. Use the run connector API instead. +// +// Deprecated: schema marks this operation as deprecated. +// +// POST /s/{spaceId}/api/actions/action/{actionId}/_execute +func (c *Client) LegacyRunConnector(ctx context.Context, request *LegacyRunConnectorReq, params LegacyRunConnectorParams) (LegacyRunConnectorRes, error) { + res, err := c.sendLegacyRunConnector(ctx, request, params) + _ = res + return res, err +} + +func (c *Client) sendLegacyRunConnector(ctx context.Context, request *LegacyRunConnectorReq, params LegacyRunConnectorParams) (res LegacyRunConnectorRes, err error) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("legacyRunConnector"), + } + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, otelAttrs...) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "LegacyRunConnector", + trace.WithAttributes(otelAttrs...), + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, otelAttrs...) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [5]string + pathParts[0] = "/s/" + { + // Encode "spaceId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "spaceId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.SpaceId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/api/actions/action/" + { + // Encode "actionId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "actionId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.ActionId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[3] = encoded + } + pathParts[4] = "/_execute" + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "POST", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + if err := encodeLegacyRunConnectorRequest(request, r); err != nil { + return res, errors.Wrap(err, "encode request") + } + + stage = "EncodeHeaderParams" + h := uri.NewHeaderEncoder(r.Header) + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "kbn-xsrf", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + return e.EncodeValue(conv.StringToString(params.KbnXSRF)) + }); err != nil { + return res, errors.Wrap(err, "encode header") + } + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:BasicAuth" + switch err := c.securityBasicAuth(ctx, "LegacyRunConnector", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"BasicAuth\"") + } + } + { + stage = "Security:ApiKeyAuth" + switch err := c.securityApiKeyAuth(ctx, "LegacyRunConnector", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 1 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"ApiKeyAuth\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, errors.New("no security requirement satisfied") + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeLegacyRunConnectorResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + +// LegacyUpdateConnector invokes legacyUpdateConnector operation. +// +// Deprecated in 7.13.0. Use the update connector API instead. +// +// Deprecated: schema marks this operation as deprecated. +// +// PUT /s/{spaceId}/api/actions/action/{actionId} +func (c *Client) LegacyUpdateConnector(ctx context.Context, request *LegacyUpdateConnectorReq, params LegacyUpdateConnectorParams) (LegacyUpdateConnectorRes, error) { + res, err := c.sendLegacyUpdateConnector(ctx, request, params) + _ = res + return res, err +} + +func (c *Client) sendLegacyUpdateConnector(ctx context.Context, request *LegacyUpdateConnectorReq, params LegacyUpdateConnectorParams) (res LegacyUpdateConnectorRes, err error) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("legacyUpdateConnector"), + } + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, otelAttrs...) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "LegacyUpdateConnector", + trace.WithAttributes(otelAttrs...), + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, otelAttrs...) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [4]string + pathParts[0] = "/s/" + { + // Encode "spaceId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "spaceId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.SpaceId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/api/actions/action/" + { + // Encode "actionId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "actionId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.ActionId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[3] = encoded + } + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "PUT", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + if err := encodeLegacyUpdateConnectorRequest(request, r); err != nil { + return res, errors.Wrap(err, "encode request") + } + + stage = "EncodeHeaderParams" + h := uri.NewHeaderEncoder(r.Header) + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "kbn-xsrf", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + return e.EncodeValue(conv.StringToString(params.KbnXSRF)) + }); err != nil { + return res, errors.Wrap(err, "encode header") + } + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:BasicAuth" + switch err := c.securityBasicAuth(ctx, "LegacyUpdateConnector", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"BasicAuth\"") + } + } + { + stage = "Security:ApiKeyAuth" + switch err := c.securityApiKeyAuth(ctx, "LegacyUpdateConnector", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 1 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"ApiKeyAuth\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, errors.New("no security requirement satisfied") + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeLegacyUpdateConnectorResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + +// UpdateConnector invokes updateConnector operation. +// +// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** +// section of the Kibana feature privileges. +// +// PUT /s/{spaceId}/api/actions/connector/{connectorId} +func (c *Client) UpdateConnector(ctx context.Context, request UpdateConnectorReq, params UpdateConnectorParams) (UpdateConnectorRes, error) { + res, err := c.sendUpdateConnector(ctx, request, params) + _ = res + return res, err +} + +func (c *Client) sendUpdateConnector(ctx context.Context, request UpdateConnectorReq, params UpdateConnectorParams) (res UpdateConnectorRes, err error) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("updateConnector"), + } + // Validate request before sending. + if err := func() error { + if err := request.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return res, errors.Wrap(err, "validate") + } + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, otelAttrs...) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "UpdateConnector", + trace.WithAttributes(otelAttrs...), + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, otelAttrs...) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [4]string + pathParts[0] = "/s/" + { + // Encode "spaceId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "spaceId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.SpaceId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/api/actions/connector/" + { + // Encode "connectorId" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "connectorId", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.ConnectorId)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[3] = encoded + } + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "PUT", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + if err := encodeUpdateConnectorRequest(request, r); err != nil { + return res, errors.Wrap(err, "encode request") + } + + stage = "EncodeHeaderParams" + h := uri.NewHeaderEncoder(r.Header) + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "kbn-xsrf", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + return e.EncodeValue(conv.StringToString(params.KbnXSRF)) + }); err != nil { + return res, errors.Wrap(err, "encode header") + } + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:BasicAuth" + switch err := c.securityBasicAuth(ctx, "UpdateConnector", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"BasicAuth\"") + } + } + { + stage = "Security:ApiKeyAuth" + switch err := c.securityApiKeyAuth(ctx, "UpdateConnector", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 1 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"ApiKeyAuth\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, errors.New("no security requirement satisfied") + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeUpdateConnectorResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} diff --git a/generated/connectors/oas_defaults_gen.go b/generated/connectors/oas_defaults_gen.go new file mode 100644 index 000000000..085b77475 --- /dev/null +++ b/generated/connectors/oas_defaults_gen.go @@ -0,0 +1,62 @@ +// Code generated by ogen, DO NOT EDIT. + +package connectors + +// setDefaults set default value of fields. +func (s *ConfigPropertiesCasesWebhook) setDefaults() { + { + val := ConfigPropertiesCasesWebhookCreateCommentMethod("put") + s.CreateCommentMethod.SetTo(val) + } + { + val := ConfigPropertiesCasesWebhookCreateIncidentMethod("post") + s.CreateIncidentMethod.SetTo(val) + } + { + val := bool(true) + s.HasAuth.SetTo(val) + } + { + val := ConfigPropertiesCasesWebhookUpdateIncidentMethod("put") + s.UpdateIncidentMethod.SetTo(val) + } +} + +// setDefaults set default value of fields. +func (s *ConfigPropertiesIndex) setDefaults() { + { + s.ExecutionTimeField.Null = true + } + { + val := bool(false) + s.Refresh.SetTo(val) + } +} + +// setDefaults set default value of fields. +func (s *ConfigPropertiesServicenow) setDefaults() { + { + val := bool(false) + s.IsOAuth.SetTo(val) + } + { + val := bool(true) + s.UsesTableApi.SetTo(val) + } +} + +// setDefaults set default value of fields. +func (s *ConfigPropertiesServicenowItom) setDefaults() { + { + val := bool(false) + s.IsOAuth.SetTo(val) + } +} + +// setDefaults set default value of fields. +func (s *GetConnectorsOKItem) setDefaults() { + { + val := int(0) + s.ReferencedByCount = val + } +} diff --git a/generated/connectors/oas_handlers_gen.go b/generated/connectors/oas_handlers_gen.go new file mode 100644 index 000000000..6a509e88e --- /dev/null +++ b/generated/connectors/oas_handlers_gen.go @@ -0,0 +1,2306 @@ +// Code generated by ogen, DO NOT EDIT. + +package connectors + +import ( + "context" + "net/http" + "time" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + "go.opentelemetry.io/otel/trace" + + "github.com/ogen-go/ogen/middleware" + "github.com/ogen-go/ogen/ogenerrors" + "github.com/ogen-go/ogen/otelogen" +) + +// handleCreateConnectorRequest handles createConnector operation. +// +// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** +// section of the Kibana feature privileges. +// +// POST /s/{spaceId}/api/actions/connector +func (s *Server) handleCreateConnectorRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("createConnector"), + semconv.HTTPMethodKey.String("POST"), + semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/connector"), + } + + // Start a span for this request. + ctx, span := s.cfg.Tracer.Start(r.Context(), "CreateConnector", + trace.WithAttributes(otelAttrs...), + serverSpanKind, + ) + defer span.End() + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + s.requests.Add(ctx, 1, otelAttrs...) + + var ( + recordError = func(stage string, err error) { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + s.errors.Add(ctx, 1, otelAttrs...) + } + err error + opErrContext = ogenerrors.OperationContext{ + Name: "CreateConnector", + ID: "createConnector", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityBasicAuth(ctx, "CreateConnector", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "BasicAuth", + Err: err, + } + recordError("Security:BasicAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + { + sctx, ok, err := s.securityApiKeyAuth(ctx, "CreateConnector", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "ApiKeyAuth", + Err: err, + } + recordError("Security:ApiKeyAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 1 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + params, err := decodeCreateConnectorParams(args, argsEscaped, r) + if err != nil { + err = &ogenerrors.DecodeParamsError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeParams", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + request, close, err := s.decodeCreateConnectorRequest(r) + if err != nil { + err = &ogenerrors.DecodeRequestError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeRequest", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + defer func() { + if err := close(); err != nil { + recordError("CloseRequest", err) + } + }() + + var response CreateConnectorRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: "CreateConnector", + OperationID: "createConnector", + Body: request, + Params: middleware.Parameters{ + { + Name: "kbn-xsrf", + In: "header", + }: params.KbnXSRF, + { + Name: "spaceId", + In: "path", + }: params.SpaceId, + }, + Raw: r, + } + + type ( + Request = CreateConnectorReq + Params = CreateConnectorParams + Response = CreateConnectorRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + unpackCreateConnectorParams, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.CreateConnector(ctx, request, params) + return response, err + }, + ) + } else { + response, err = s.h.CreateConnector(ctx, request, params) + } + if err != nil { + recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeCreateConnectorResponse(response, w, span); err != nil { + recordError("EncodeResponse", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } +} + +// handleDeleteConnectorRequest handles deleteConnector operation. +// +// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** +// section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be +// recovered. +// +// DELETE /s/{spaceId}/api/actions/connector/{connectorId} +func (s *Server) handleDeleteConnectorRequest(args [2]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("deleteConnector"), + semconv.HTTPMethodKey.String("DELETE"), + semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/connector/{connectorId}"), + } + + // Start a span for this request. + ctx, span := s.cfg.Tracer.Start(r.Context(), "DeleteConnector", + trace.WithAttributes(otelAttrs...), + serverSpanKind, + ) + defer span.End() + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + s.requests.Add(ctx, 1, otelAttrs...) + + var ( + recordError = func(stage string, err error) { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + s.errors.Add(ctx, 1, otelAttrs...) + } + err error + opErrContext = ogenerrors.OperationContext{ + Name: "DeleteConnector", + ID: "deleteConnector", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityBasicAuth(ctx, "DeleteConnector", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "BasicAuth", + Err: err, + } + recordError("Security:BasicAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + { + sctx, ok, err := s.securityApiKeyAuth(ctx, "DeleteConnector", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "ApiKeyAuth", + Err: err, + } + recordError("Security:ApiKeyAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 1 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + params, err := decodeDeleteConnectorParams(args, argsEscaped, r) + if err != nil { + err = &ogenerrors.DecodeParamsError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeParams", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + var response DeleteConnectorRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: "DeleteConnector", + OperationID: "deleteConnector", + Body: nil, + Params: middleware.Parameters{ + { + Name: "kbn-xsrf", + In: "header", + }: params.KbnXSRF, + { + Name: "connectorId", + In: "path", + }: params.ConnectorId, + { + Name: "spaceId", + In: "path", + }: params.SpaceId, + }, + Raw: r, + } + + type ( + Request = struct{} + Params = DeleteConnectorParams + Response = DeleteConnectorRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + unpackDeleteConnectorParams, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.DeleteConnector(ctx, params) + return response, err + }, + ) + } else { + response, err = s.h.DeleteConnector(ctx, params) + } + if err != nil { + recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeDeleteConnectorResponse(response, w, span); err != nil { + recordError("EncodeResponse", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } +} + +// handleGetConnectorRequest handles getConnector operation. +// +// You must have `read` privileges for the **Actions and Connectors** feature in the **Management** +// section of the Kibana feature privileges. +// +// GET /s/{spaceId}/api/actions/connector/{connectorId} +func (s *Server) handleGetConnectorRequest(args [2]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("getConnector"), + semconv.HTTPMethodKey.String("GET"), + semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/connector/{connectorId}"), + } + + // Start a span for this request. + ctx, span := s.cfg.Tracer.Start(r.Context(), "GetConnector", + trace.WithAttributes(otelAttrs...), + serverSpanKind, + ) + defer span.End() + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + s.requests.Add(ctx, 1, otelAttrs...) + + var ( + recordError = func(stage string, err error) { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + s.errors.Add(ctx, 1, otelAttrs...) + } + err error + opErrContext = ogenerrors.OperationContext{ + Name: "GetConnector", + ID: "getConnector", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityBasicAuth(ctx, "GetConnector", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "BasicAuth", + Err: err, + } + recordError("Security:BasicAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + { + sctx, ok, err := s.securityApiKeyAuth(ctx, "GetConnector", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "ApiKeyAuth", + Err: err, + } + recordError("Security:ApiKeyAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 1 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + params, err := decodeGetConnectorParams(args, argsEscaped, r) + if err != nil { + err = &ogenerrors.DecodeParamsError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeParams", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + var response GetConnectorRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: "GetConnector", + OperationID: "getConnector", + Body: nil, + Params: middleware.Parameters{ + { + Name: "connectorId", + In: "path", + }: params.ConnectorId, + { + Name: "spaceId", + In: "path", + }: params.SpaceId, + }, + Raw: r, + } + + type ( + Request = struct{} + Params = GetConnectorParams + Response = GetConnectorRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + unpackGetConnectorParams, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.GetConnector(ctx, params) + return response, err + }, + ) + } else { + response, err = s.h.GetConnector(ctx, params) + } + if err != nil { + recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeGetConnectorResponse(response, w, span); err != nil { + recordError("EncodeResponse", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } +} + +// handleGetConnectorTypesRequest handles getConnectorTypes operation. +// +// You do not need any Kibana feature privileges to run this API. +// +// GET /s/{spaceId}/api/actions/connector_types +func (s *Server) handleGetConnectorTypesRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("getConnectorTypes"), + semconv.HTTPMethodKey.String("GET"), + semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/connector_types"), + } + + // Start a span for this request. + ctx, span := s.cfg.Tracer.Start(r.Context(), "GetConnectorTypes", + trace.WithAttributes(otelAttrs...), + serverSpanKind, + ) + defer span.End() + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + s.requests.Add(ctx, 1, otelAttrs...) + + var ( + recordError = func(stage string, err error) { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + s.errors.Add(ctx, 1, otelAttrs...) + } + err error + opErrContext = ogenerrors.OperationContext{ + Name: "GetConnectorTypes", + ID: "getConnectorTypes", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityBasicAuth(ctx, "GetConnectorTypes", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "BasicAuth", + Err: err, + } + recordError("Security:BasicAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + { + sctx, ok, err := s.securityApiKeyAuth(ctx, "GetConnectorTypes", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "ApiKeyAuth", + Err: err, + } + recordError("Security:ApiKeyAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 1 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + params, err := decodeGetConnectorTypesParams(args, argsEscaped, r) + if err != nil { + err = &ogenerrors.DecodeParamsError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeParams", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + var response GetConnectorTypesRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: "GetConnectorTypes", + OperationID: "getConnectorTypes", + Body: nil, + Params: middleware.Parameters{ + { + Name: "spaceId", + In: "path", + }: params.SpaceId, + { + Name: "feature_id", + In: "query", + }: params.FeatureID, + }, + Raw: r, + } + + type ( + Request = struct{} + Params = GetConnectorTypesParams + Response = GetConnectorTypesRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + unpackGetConnectorTypesParams, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.GetConnectorTypes(ctx, params) + return response, err + }, + ) + } else { + response, err = s.h.GetConnectorTypes(ctx, params) + } + if err != nil { + recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeGetConnectorTypesResponse(response, w, span); err != nil { + recordError("EncodeResponse", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } +} + +// handleGetConnectorsRequest handles getConnectors operation. +// +// You must have `read` privileges for the **Actions and Connectors** feature in the **Management** +// section of the Kibana feature privileges. +// +// GET /s/{spaceId}/api/actions/connectors +func (s *Server) handleGetConnectorsRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("getConnectors"), + semconv.HTTPMethodKey.String("GET"), + semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/connectors"), + } + + // Start a span for this request. + ctx, span := s.cfg.Tracer.Start(r.Context(), "GetConnectors", + trace.WithAttributes(otelAttrs...), + serverSpanKind, + ) + defer span.End() + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + s.requests.Add(ctx, 1, otelAttrs...) + + var ( + recordError = func(stage string, err error) { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + s.errors.Add(ctx, 1, otelAttrs...) + } + err error + opErrContext = ogenerrors.OperationContext{ + Name: "GetConnectors", + ID: "getConnectors", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityBasicAuth(ctx, "GetConnectors", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "BasicAuth", + Err: err, + } + recordError("Security:BasicAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + { + sctx, ok, err := s.securityApiKeyAuth(ctx, "GetConnectors", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "ApiKeyAuth", + Err: err, + } + recordError("Security:ApiKeyAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 1 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + params, err := decodeGetConnectorsParams(args, argsEscaped, r) + if err != nil { + err = &ogenerrors.DecodeParamsError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeParams", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + var response GetConnectorsRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: "GetConnectors", + OperationID: "getConnectors", + Body: nil, + Params: middleware.Parameters{ + { + Name: "spaceId", + In: "path", + }: params.SpaceId, + }, + Raw: r, + } + + type ( + Request = struct{} + Params = GetConnectorsParams + Response = GetConnectorsRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + unpackGetConnectorsParams, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.GetConnectors(ctx, params) + return response, err + }, + ) + } else { + response, err = s.h.GetConnectors(ctx, params) + } + if err != nil { + recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeGetConnectorsResponse(response, w, span); err != nil { + recordError("EncodeResponse", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } +} + +// handleLegacyCreateConnectorRequest handles legacyCreateConnector operation. +// +// Deprecated in 7.13.0. Use the create connector API instead. +// +// Deprecated: schema marks this operation as deprecated. +// +// POST /s/{spaceId}/api/actions +func (s *Server) handleLegacyCreateConnectorRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("legacyCreateConnector"), + semconv.HTTPMethodKey.String("POST"), + semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions"), + } + + // Start a span for this request. + ctx, span := s.cfg.Tracer.Start(r.Context(), "LegacyCreateConnector", + trace.WithAttributes(otelAttrs...), + serverSpanKind, + ) + defer span.End() + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + s.requests.Add(ctx, 1, otelAttrs...) + + var ( + recordError = func(stage string, err error) { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + s.errors.Add(ctx, 1, otelAttrs...) + } + err error + opErrContext = ogenerrors.OperationContext{ + Name: "LegacyCreateConnector", + ID: "legacyCreateConnector", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityBasicAuth(ctx, "LegacyCreateConnector", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "BasicAuth", + Err: err, + } + recordError("Security:BasicAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + { + sctx, ok, err := s.securityApiKeyAuth(ctx, "LegacyCreateConnector", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "ApiKeyAuth", + Err: err, + } + recordError("Security:ApiKeyAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 1 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + params, err := decodeLegacyCreateConnectorParams(args, argsEscaped, r) + if err != nil { + err = &ogenerrors.DecodeParamsError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeParams", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + request, close, err := s.decodeLegacyCreateConnectorRequest(r) + if err != nil { + err = &ogenerrors.DecodeRequestError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeRequest", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + defer func() { + if err := close(); err != nil { + recordError("CloseRequest", err) + } + }() + + var response LegacyCreateConnectorRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: "LegacyCreateConnector", + OperationID: "legacyCreateConnector", + Body: request, + Params: middleware.Parameters{ + { + Name: "kbn-xsrf", + In: "header", + }: params.KbnXSRF, + { + Name: "spaceId", + In: "path", + }: params.SpaceId, + }, + Raw: r, + } + + type ( + Request = *LegacyCreateConnectorReq + Params = LegacyCreateConnectorParams + Response = LegacyCreateConnectorRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + unpackLegacyCreateConnectorParams, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.LegacyCreateConnector(ctx, request, params) + return response, err + }, + ) + } else { + response, err = s.h.LegacyCreateConnector(ctx, request, params) + } + if err != nil { + recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeLegacyCreateConnectorResponse(response, w, span); err != nil { + recordError("EncodeResponse", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } +} + +// handleLegacyDeleteConnectorRequest handles legacyDeleteConnector operation. +// +// Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, +// it cannot be recovered. +// +// Deprecated: schema marks this operation as deprecated. +// +// DELETE /s/{spaceId}/api/actions/action/{actionId} +func (s *Server) handleLegacyDeleteConnectorRequest(args [2]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("legacyDeleteConnector"), + semconv.HTTPMethodKey.String("DELETE"), + semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/action/{actionId}"), + } + + // Start a span for this request. + ctx, span := s.cfg.Tracer.Start(r.Context(), "LegacyDeleteConnector", + trace.WithAttributes(otelAttrs...), + serverSpanKind, + ) + defer span.End() + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + s.requests.Add(ctx, 1, otelAttrs...) + + var ( + recordError = func(stage string, err error) { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + s.errors.Add(ctx, 1, otelAttrs...) + } + err error + opErrContext = ogenerrors.OperationContext{ + Name: "LegacyDeleteConnector", + ID: "legacyDeleteConnector", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityBasicAuth(ctx, "LegacyDeleteConnector", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "BasicAuth", + Err: err, + } + recordError("Security:BasicAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + { + sctx, ok, err := s.securityApiKeyAuth(ctx, "LegacyDeleteConnector", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "ApiKeyAuth", + Err: err, + } + recordError("Security:ApiKeyAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 1 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + params, err := decodeLegacyDeleteConnectorParams(args, argsEscaped, r) + if err != nil { + err = &ogenerrors.DecodeParamsError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeParams", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + var response LegacyDeleteConnectorRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: "LegacyDeleteConnector", + OperationID: "legacyDeleteConnector", + Body: nil, + Params: middleware.Parameters{ + { + Name: "kbn-xsrf", + In: "header", + }: params.KbnXSRF, + { + Name: "actionId", + In: "path", + }: params.ActionId, + { + Name: "spaceId", + In: "path", + }: params.SpaceId, + }, + Raw: r, + } + + type ( + Request = struct{} + Params = LegacyDeleteConnectorParams + Response = LegacyDeleteConnectorRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + unpackLegacyDeleteConnectorParams, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.LegacyDeleteConnector(ctx, params) + return response, err + }, + ) + } else { + response, err = s.h.LegacyDeleteConnector(ctx, params) + } + if err != nil { + recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeLegacyDeleteConnectorResponse(response, w, span); err != nil { + recordError("EncodeResponse", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } +} + +// handleLegacyGetConnectorRequest handles legacyGetConnector operation. +// +// Deprecated in 7.13.0. Use the get connector API instead. +// +// Deprecated: schema marks this operation as deprecated. +// +// GET /s/{spaceId}/api/actions/action/{actionId} +func (s *Server) handleLegacyGetConnectorRequest(args [2]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("legacyGetConnector"), + semconv.HTTPMethodKey.String("GET"), + semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/action/{actionId}"), + } + + // Start a span for this request. + ctx, span := s.cfg.Tracer.Start(r.Context(), "LegacyGetConnector", + trace.WithAttributes(otelAttrs...), + serverSpanKind, + ) + defer span.End() + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + s.requests.Add(ctx, 1, otelAttrs...) + + var ( + recordError = func(stage string, err error) { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + s.errors.Add(ctx, 1, otelAttrs...) + } + err error + opErrContext = ogenerrors.OperationContext{ + Name: "LegacyGetConnector", + ID: "legacyGetConnector", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityBasicAuth(ctx, "LegacyGetConnector", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "BasicAuth", + Err: err, + } + recordError("Security:BasicAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + { + sctx, ok, err := s.securityApiKeyAuth(ctx, "LegacyGetConnector", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "ApiKeyAuth", + Err: err, + } + recordError("Security:ApiKeyAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 1 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + params, err := decodeLegacyGetConnectorParams(args, argsEscaped, r) + if err != nil { + err = &ogenerrors.DecodeParamsError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeParams", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + var response LegacyGetConnectorRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: "LegacyGetConnector", + OperationID: "legacyGetConnector", + Body: nil, + Params: middleware.Parameters{ + { + Name: "actionId", + In: "path", + }: params.ActionId, + { + Name: "spaceId", + In: "path", + }: params.SpaceId, + }, + Raw: r, + } + + type ( + Request = struct{} + Params = LegacyGetConnectorParams + Response = LegacyGetConnectorRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + unpackLegacyGetConnectorParams, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.LegacyGetConnector(ctx, params) + return response, err + }, + ) + } else { + response, err = s.h.LegacyGetConnector(ctx, params) + } + if err != nil { + recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeLegacyGetConnectorResponse(response, w, span); err != nil { + recordError("EncodeResponse", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } +} + +// handleLegacyGetConnectorTypesRequest handles legacyGetConnectorTypes operation. +// +// Deprecated in 7.13.0. Use the get all connector types API instead. +// +// Deprecated: schema marks this operation as deprecated. +// +// GET /s/{spaceId}/api/actions/list_action_types +func (s *Server) handleLegacyGetConnectorTypesRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("legacyGetConnectorTypes"), + semconv.HTTPMethodKey.String("GET"), + semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/list_action_types"), + } + + // Start a span for this request. + ctx, span := s.cfg.Tracer.Start(r.Context(), "LegacyGetConnectorTypes", + trace.WithAttributes(otelAttrs...), + serverSpanKind, + ) + defer span.End() + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + s.requests.Add(ctx, 1, otelAttrs...) + + var ( + recordError = func(stage string, err error) { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + s.errors.Add(ctx, 1, otelAttrs...) + } + err error + opErrContext = ogenerrors.OperationContext{ + Name: "LegacyGetConnectorTypes", + ID: "legacyGetConnectorTypes", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityBasicAuth(ctx, "LegacyGetConnectorTypes", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "BasicAuth", + Err: err, + } + recordError("Security:BasicAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + { + sctx, ok, err := s.securityApiKeyAuth(ctx, "LegacyGetConnectorTypes", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "ApiKeyAuth", + Err: err, + } + recordError("Security:ApiKeyAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 1 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + params, err := decodeLegacyGetConnectorTypesParams(args, argsEscaped, r) + if err != nil { + err = &ogenerrors.DecodeParamsError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeParams", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + var response LegacyGetConnectorTypesRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: "LegacyGetConnectorTypes", + OperationID: "legacyGetConnectorTypes", + Body: nil, + Params: middleware.Parameters{ + { + Name: "spaceId", + In: "path", + }: params.SpaceId, + }, + Raw: r, + } + + type ( + Request = struct{} + Params = LegacyGetConnectorTypesParams + Response = LegacyGetConnectorTypesRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + unpackLegacyGetConnectorTypesParams, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.LegacyGetConnectorTypes(ctx, params) + return response, err + }, + ) + } else { + response, err = s.h.LegacyGetConnectorTypes(ctx, params) + } + if err != nil { + recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeLegacyGetConnectorTypesResponse(response, w, span); err != nil { + recordError("EncodeResponse", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } +} + +// handleLegacyGetConnectorsRequest handles legacyGetConnectors operation. +// +// Deprecated in 7.13.0. Use the get all connectors API instead. +// +// Deprecated: schema marks this operation as deprecated. +// +// GET /s/{spaceId}/api/actions +func (s *Server) handleLegacyGetConnectorsRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("legacyGetConnectors"), + semconv.HTTPMethodKey.String("GET"), + semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions"), + } + + // Start a span for this request. + ctx, span := s.cfg.Tracer.Start(r.Context(), "LegacyGetConnectors", + trace.WithAttributes(otelAttrs...), + serverSpanKind, + ) + defer span.End() + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + s.requests.Add(ctx, 1, otelAttrs...) + + var ( + recordError = func(stage string, err error) { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + s.errors.Add(ctx, 1, otelAttrs...) + } + err error + opErrContext = ogenerrors.OperationContext{ + Name: "LegacyGetConnectors", + ID: "legacyGetConnectors", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityBasicAuth(ctx, "LegacyGetConnectors", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "BasicAuth", + Err: err, + } + recordError("Security:BasicAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + { + sctx, ok, err := s.securityApiKeyAuth(ctx, "LegacyGetConnectors", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "ApiKeyAuth", + Err: err, + } + recordError("Security:ApiKeyAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 1 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + params, err := decodeLegacyGetConnectorsParams(args, argsEscaped, r) + if err != nil { + err = &ogenerrors.DecodeParamsError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeParams", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + var response LegacyGetConnectorsRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: "LegacyGetConnectors", + OperationID: "legacyGetConnectors", + Body: nil, + Params: middleware.Parameters{ + { + Name: "spaceId", + In: "path", + }: params.SpaceId, + }, + Raw: r, + } + + type ( + Request = struct{} + Params = LegacyGetConnectorsParams + Response = LegacyGetConnectorsRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + unpackLegacyGetConnectorsParams, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.LegacyGetConnectors(ctx, params) + return response, err + }, + ) + } else { + response, err = s.h.LegacyGetConnectors(ctx, params) + } + if err != nil { + recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeLegacyGetConnectorsResponse(response, w, span); err != nil { + recordError("EncodeResponse", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } +} + +// handleLegacyRunConnectorRequest handles legacyRunConnector operation. +// +// Deprecated in 7.13.0. Use the run connector API instead. +// +// Deprecated: schema marks this operation as deprecated. +// +// POST /s/{spaceId}/api/actions/action/{actionId}/_execute +func (s *Server) handleLegacyRunConnectorRequest(args [2]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("legacyRunConnector"), + semconv.HTTPMethodKey.String("POST"), + semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/action/{actionId}/_execute"), + } + + // Start a span for this request. + ctx, span := s.cfg.Tracer.Start(r.Context(), "LegacyRunConnector", + trace.WithAttributes(otelAttrs...), + serverSpanKind, + ) + defer span.End() + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + s.requests.Add(ctx, 1, otelAttrs...) + + var ( + recordError = func(stage string, err error) { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + s.errors.Add(ctx, 1, otelAttrs...) + } + err error + opErrContext = ogenerrors.OperationContext{ + Name: "LegacyRunConnector", + ID: "legacyRunConnector", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityBasicAuth(ctx, "LegacyRunConnector", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "BasicAuth", + Err: err, + } + recordError("Security:BasicAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + { + sctx, ok, err := s.securityApiKeyAuth(ctx, "LegacyRunConnector", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "ApiKeyAuth", + Err: err, + } + recordError("Security:ApiKeyAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 1 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + params, err := decodeLegacyRunConnectorParams(args, argsEscaped, r) + if err != nil { + err = &ogenerrors.DecodeParamsError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeParams", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + request, close, err := s.decodeLegacyRunConnectorRequest(r) + if err != nil { + err = &ogenerrors.DecodeRequestError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeRequest", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + defer func() { + if err := close(); err != nil { + recordError("CloseRequest", err) + } + }() + + var response LegacyRunConnectorRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: "LegacyRunConnector", + OperationID: "legacyRunConnector", + Body: request, + Params: middleware.Parameters{ + { + Name: "kbn-xsrf", + In: "header", + }: params.KbnXSRF, + { + Name: "actionId", + In: "path", + }: params.ActionId, + { + Name: "spaceId", + In: "path", + }: params.SpaceId, + }, + Raw: r, + } + + type ( + Request = *LegacyRunConnectorReq + Params = LegacyRunConnectorParams + Response = LegacyRunConnectorRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + unpackLegacyRunConnectorParams, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.LegacyRunConnector(ctx, request, params) + return response, err + }, + ) + } else { + response, err = s.h.LegacyRunConnector(ctx, request, params) + } + if err != nil { + recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeLegacyRunConnectorResponse(response, w, span); err != nil { + recordError("EncodeResponse", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } +} + +// handleLegacyUpdateConnectorRequest handles legacyUpdateConnector operation. +// +// Deprecated in 7.13.0. Use the update connector API instead. +// +// Deprecated: schema marks this operation as deprecated. +// +// PUT /s/{spaceId}/api/actions/action/{actionId} +func (s *Server) handleLegacyUpdateConnectorRequest(args [2]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("legacyUpdateConnector"), + semconv.HTTPMethodKey.String("PUT"), + semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/action/{actionId}"), + } + + // Start a span for this request. + ctx, span := s.cfg.Tracer.Start(r.Context(), "LegacyUpdateConnector", + trace.WithAttributes(otelAttrs...), + serverSpanKind, + ) + defer span.End() + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + s.requests.Add(ctx, 1, otelAttrs...) + + var ( + recordError = func(stage string, err error) { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + s.errors.Add(ctx, 1, otelAttrs...) + } + err error + opErrContext = ogenerrors.OperationContext{ + Name: "LegacyUpdateConnector", + ID: "legacyUpdateConnector", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityBasicAuth(ctx, "LegacyUpdateConnector", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "BasicAuth", + Err: err, + } + recordError("Security:BasicAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + { + sctx, ok, err := s.securityApiKeyAuth(ctx, "LegacyUpdateConnector", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "ApiKeyAuth", + Err: err, + } + recordError("Security:ApiKeyAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 1 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + params, err := decodeLegacyUpdateConnectorParams(args, argsEscaped, r) + if err != nil { + err = &ogenerrors.DecodeParamsError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeParams", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + request, close, err := s.decodeLegacyUpdateConnectorRequest(r) + if err != nil { + err = &ogenerrors.DecodeRequestError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeRequest", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + defer func() { + if err := close(); err != nil { + recordError("CloseRequest", err) + } + }() + + var response LegacyUpdateConnectorRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: "LegacyUpdateConnector", + OperationID: "legacyUpdateConnector", + Body: request, + Params: middleware.Parameters{ + { + Name: "kbn-xsrf", + In: "header", + }: params.KbnXSRF, + { + Name: "actionId", + In: "path", + }: params.ActionId, + { + Name: "spaceId", + In: "path", + }: params.SpaceId, + }, + Raw: r, + } + + type ( + Request = *LegacyUpdateConnectorReq + Params = LegacyUpdateConnectorParams + Response = LegacyUpdateConnectorRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + unpackLegacyUpdateConnectorParams, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.LegacyUpdateConnector(ctx, request, params) + return response, err + }, + ) + } else { + response, err = s.h.LegacyUpdateConnector(ctx, request, params) + } + if err != nil { + recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeLegacyUpdateConnectorResponse(response, w, span); err != nil { + recordError("EncodeResponse", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } +} + +// handleUpdateConnectorRequest handles updateConnector operation. +// +// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** +// section of the Kibana feature privileges. +// +// PUT /s/{spaceId}/api/actions/connector/{connectorId} +func (s *Server) handleUpdateConnectorRequest(args [2]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("updateConnector"), + semconv.HTTPMethodKey.String("PUT"), + semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/connector/{connectorId}"), + } + + // Start a span for this request. + ctx, span := s.cfg.Tracer.Start(r.Context(), "UpdateConnector", + trace.WithAttributes(otelAttrs...), + serverSpanKind, + ) + defer span.End() + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) + }() + + // Increment request counter. + s.requests.Add(ctx, 1, otelAttrs...) + + var ( + recordError = func(stage string, err error) { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + s.errors.Add(ctx, 1, otelAttrs...) + } + err error + opErrContext = ogenerrors.OperationContext{ + Name: "UpdateConnector", + ID: "updateConnector", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityBasicAuth(ctx, "UpdateConnector", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "BasicAuth", + Err: err, + } + recordError("Security:BasicAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + { + sctx, ok, err := s.securityApiKeyAuth(ctx, "UpdateConnector", r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "ApiKeyAuth", + Err: err, + } + recordError("Security:ApiKeyAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 1 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + {0b00000010}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + params, err := decodeUpdateConnectorParams(args, argsEscaped, r) + if err != nil { + err = &ogenerrors.DecodeParamsError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeParams", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + request, close, err := s.decodeUpdateConnectorRequest(r) + if err != nil { + err = &ogenerrors.DecodeRequestError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeRequest", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + defer func() { + if err := close(); err != nil { + recordError("CloseRequest", err) + } + }() + + var response UpdateConnectorRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: "UpdateConnector", + OperationID: "updateConnector", + Body: request, + Params: middleware.Parameters{ + { + Name: "kbn-xsrf", + In: "header", + }: params.KbnXSRF, + { + Name: "connectorId", + In: "path", + }: params.ConnectorId, + { + Name: "spaceId", + In: "path", + }: params.SpaceId, + }, + Raw: r, + } + + type ( + Request = UpdateConnectorReq + Params = UpdateConnectorParams + Response = UpdateConnectorRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + unpackUpdateConnectorParams, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.UpdateConnector(ctx, request, params) + return response, err + }, + ) + } else { + response, err = s.h.UpdateConnector(ctx, request, params) + } + if err != nil { + recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeUpdateConnectorResponse(response, w, span); err != nil { + recordError("EncodeResponse", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } +} diff --git a/generated/connectors/oas_interfaces_gen.go b/generated/connectors/oas_interfaces_gen.go new file mode 100644 index 000000000..840a11a9f --- /dev/null +++ b/generated/connectors/oas_interfaces_gen.go @@ -0,0 +1,54 @@ +// Code generated by ogen, DO NOT EDIT. +package connectors + +type CreateConnectorRes interface { + createConnectorRes() +} + +type DeleteConnectorRes interface { + deleteConnectorRes() +} + +type GetConnectorRes interface { + getConnectorRes() +} + +type GetConnectorTypesRes interface { + getConnectorTypesRes() +} + +type GetConnectorsRes interface { + getConnectorsRes() +} + +type LegacyCreateConnectorRes interface { + legacyCreateConnectorRes() +} + +type LegacyDeleteConnectorRes interface { + legacyDeleteConnectorRes() +} + +type LegacyGetConnectorRes interface { + legacyGetConnectorRes() +} + +type LegacyGetConnectorTypesRes interface { + legacyGetConnectorTypesRes() +} + +type LegacyGetConnectorsRes interface { + legacyGetConnectorsRes() +} + +type LegacyRunConnectorRes interface { + legacyRunConnectorRes() +} + +type LegacyUpdateConnectorRes interface { + legacyUpdateConnectorRes() +} + +type UpdateConnectorRes interface { + updateConnectorRes() +} diff --git a/generated/connectors/oas_json_gen.go b/generated/connectors/oas_json_gen.go new file mode 100644 index 000000000..5049d04a0 --- /dev/null +++ b/generated/connectors/oas_json_gen.go @@ -0,0 +1,14411 @@ +// Code generated by ogen, DO NOT EDIT. + +package connectors + +import ( + "math/bits" + "strconv" + + "github.com/go-faster/errors" + "github.com/go-faster/jx" + + "github.com/ogen-go/ogen/validate" +) + +// Encode implements json.Marshaler. +func (s *ActionResponseProperties) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ActionResponseProperties) encodeFields(e *jx.Encoder) { + { + if s.ActionTypeId.Set { + e.FieldStart("actionTypeId") + s.ActionTypeId.Encode(e) + } + } + { + if s.Config != nil { + e.FieldStart("config") + s.Config.Encode(e) + } + } + { + if s.ID.Set { + e.FieldStart("id") + s.ID.Encode(e) + } + } + { + if s.IsDeprecated.Set { + e.FieldStart("isDeprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("isMissingSecrets") + s.IsMissingSecrets.Encode(e) + } + } + { + if s.IsPreconfigured.Set { + e.FieldStart("isPreconfigured") + s.IsPreconfigured.Encode(e) + } + } + { + if s.Name.Set { + e.FieldStart("name") + s.Name.Encode(e) + } + } +} + +var jsonFieldsNameOfActionResponseProperties = [7]string{ + 0: "actionTypeId", + 1: "config", + 2: "id", + 3: "isDeprecated", + 4: "isMissingSecrets", + 5: "isPreconfigured", + 6: "name", +} + +// Decode decodes ActionResponseProperties from json. +func (s *ActionResponseProperties) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ActionResponseProperties to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "actionTypeId": + if err := func() error { + s.ActionTypeId.Reset() + if err := s.ActionTypeId.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"actionTypeId\"") + } + case "config": + if err := func() error { + s.Config = nil + var elem ActionResponsePropertiesConfig + if err := elem.Decode(d); err != nil { + return err + } + s.Config = &elem + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "id": + if err := func() error { + s.ID.Reset() + if err := s.ID.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "isDeprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"isDeprecated\"") + } + case "isMissingSecrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"isMissingSecrets\"") + } + case "isPreconfigured": + if err := func() error { + s.IsPreconfigured.Reset() + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"isPreconfigured\"") + } + case "name": + if err := func() error { + s.Name.Reset() + if err := s.Name.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ActionResponseProperties") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ActionResponseProperties) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ActionResponseProperties) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ActionResponsePropertiesConfig) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ActionResponsePropertiesConfig) encodeFields(e *jx.Encoder) { +} + +var jsonFieldsNameOfActionResponsePropertiesConfig = [0]string{} + +// Decode decodes ActionResponsePropertiesConfig from json. +func (s *ActionResponsePropertiesConfig) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ActionResponsePropertiesConfig to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ActionResponsePropertiesConfig") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ActionResponsePropertiesConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ActionResponsePropertiesConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConfigPropertiesCasesWebhook) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConfigPropertiesCasesWebhook) encodeFields(e *jx.Encoder) { + { + if s.CreateCommentJson.Set { + e.FieldStart("createCommentJson") + s.CreateCommentJson.Encode(e) + } + } + { + if s.CreateCommentMethod.Set { + e.FieldStart("createCommentMethod") + s.CreateCommentMethod.Encode(e) + } + } + { + if s.CreateCommentUrl.Set { + e.FieldStart("createCommentUrl") + s.CreateCommentUrl.Encode(e) + } + } + { + e.FieldStart("createIncidentJson") + e.Str(s.CreateIncidentJson) + } + { + if s.CreateIncidentMethod.Set { + e.FieldStart("createIncidentMethod") + s.CreateIncidentMethod.Encode(e) + } + } + { + e.FieldStart("createIncidentResponseKey") + e.Str(s.CreateIncidentResponseKey) + } + { + e.FieldStart("createIncidentUrl") + e.Str(s.CreateIncidentUrl) + } + { + e.FieldStart("getIncidentResponseExternalTitleKey") + e.Str(s.GetIncidentResponseExternalTitleKey) + } + { + e.FieldStart("getIncidentUrl") + e.Str(s.GetIncidentUrl) + } + { + if s.HasAuth.Set { + e.FieldStart("hasAuth") + s.HasAuth.Encode(e) + } + } + { + if s.Headers.Set { + e.FieldStart("headers") + s.Headers.Encode(e) + } + } + { + e.FieldStart("updateIncidentJson") + e.Str(s.UpdateIncidentJson) + } + { + if s.UpdateIncidentMethod.Set { + e.FieldStart("updateIncidentMethod") + s.UpdateIncidentMethod.Encode(e) + } + } + { + e.FieldStart("updateIncidentUrl") + e.Str(s.UpdateIncidentUrl) + } + { + e.FieldStart("viewIncidentUrl") + e.Str(s.ViewIncidentUrl) + } +} + +var jsonFieldsNameOfConfigPropertiesCasesWebhook = [15]string{ + 0: "createCommentJson", + 1: "createCommentMethod", + 2: "createCommentUrl", + 3: "createIncidentJson", + 4: "createIncidentMethod", + 5: "createIncidentResponseKey", + 6: "createIncidentUrl", + 7: "getIncidentResponseExternalTitleKey", + 8: "getIncidentUrl", + 9: "hasAuth", + 10: "headers", + 11: "updateIncidentJson", + 12: "updateIncidentMethod", + 13: "updateIncidentUrl", + 14: "viewIncidentUrl", +} + +// Decode decodes ConfigPropertiesCasesWebhook from json. +func (s *ConfigPropertiesCasesWebhook) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesCasesWebhook to nil") + } + var requiredBitSet [2]uint8 + s.setDefaults() + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "createCommentJson": + if err := func() error { + s.CreateCommentJson.Reset() + if err := s.CreateCommentJson.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"createCommentJson\"") + } + case "createCommentMethod": + if err := func() error { + s.CreateCommentMethod.Reset() + if err := s.CreateCommentMethod.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"createCommentMethod\"") + } + case "createCommentUrl": + if err := func() error { + s.CreateCommentUrl.Reset() + if err := s.CreateCommentUrl.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"createCommentUrl\"") + } + case "createIncidentJson": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + v, err := d.Str() + s.CreateIncidentJson = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"createIncidentJson\"") + } + case "createIncidentMethod": + if err := func() error { + s.CreateIncidentMethod.Reset() + if err := s.CreateIncidentMethod.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"createIncidentMethod\"") + } + case "createIncidentResponseKey": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + v, err := d.Str() + s.CreateIncidentResponseKey = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"createIncidentResponseKey\"") + } + case "createIncidentUrl": + requiredBitSet[0] |= 1 << 6 + if err := func() error { + v, err := d.Str() + s.CreateIncidentUrl = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"createIncidentUrl\"") + } + case "getIncidentResponseExternalTitleKey": + requiredBitSet[0] |= 1 << 7 + if err := func() error { + v, err := d.Str() + s.GetIncidentResponseExternalTitleKey = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"getIncidentResponseExternalTitleKey\"") + } + case "getIncidentUrl": + requiredBitSet[1] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.GetIncidentUrl = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"getIncidentUrl\"") + } + case "hasAuth": + if err := func() error { + s.HasAuth.Reset() + if err := s.HasAuth.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"hasAuth\"") + } + case "headers": + if err := func() error { + s.Headers.Reset() + if err := s.Headers.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"headers\"") + } + case "updateIncidentJson": + requiredBitSet[1] |= 1 << 3 + if err := func() error { + v, err := d.Str() + s.UpdateIncidentJson = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"updateIncidentJson\"") + } + case "updateIncidentMethod": + if err := func() error { + s.UpdateIncidentMethod.Reset() + if err := s.UpdateIncidentMethod.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"updateIncidentMethod\"") + } + case "updateIncidentUrl": + requiredBitSet[1] |= 1 << 5 + if err := func() error { + v, err := d.Str() + s.UpdateIncidentUrl = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"updateIncidentUrl\"") + } + case "viewIncidentUrl": + requiredBitSet[1] |= 1 << 6 + if err := func() error { + v, err := d.Str() + s.ViewIncidentUrl = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"viewIncidentUrl\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesCasesWebhook") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [2]uint8{ + 0b11101000, + 0b01101001, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConfigPropertiesCasesWebhook) { + name = jsonFieldsNameOfConfigPropertiesCasesWebhook[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConfigPropertiesCasesWebhook) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesCasesWebhook) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ConfigPropertiesCasesWebhookCreateCommentMethod as json. +func (s ConfigPropertiesCasesWebhookCreateCommentMethod) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes ConfigPropertiesCasesWebhookCreateCommentMethod from json. +func (s *ConfigPropertiesCasesWebhookCreateCommentMethod) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesCasesWebhookCreateCommentMethod to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch ConfigPropertiesCasesWebhookCreateCommentMethod(v) { + case ConfigPropertiesCasesWebhookCreateCommentMethodPatch: + *s = ConfigPropertiesCasesWebhookCreateCommentMethodPatch + case ConfigPropertiesCasesWebhookCreateCommentMethodPost: + *s = ConfigPropertiesCasesWebhookCreateCommentMethodPost + case ConfigPropertiesCasesWebhookCreateCommentMethodPut: + *s = ConfigPropertiesCasesWebhookCreateCommentMethodPut + default: + *s = ConfigPropertiesCasesWebhookCreateCommentMethod(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s ConfigPropertiesCasesWebhookCreateCommentMethod) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesCasesWebhookCreateCommentMethod) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ConfigPropertiesCasesWebhookCreateIncidentMethod as json. +func (s ConfigPropertiesCasesWebhookCreateIncidentMethod) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes ConfigPropertiesCasesWebhookCreateIncidentMethod from json. +func (s *ConfigPropertiesCasesWebhookCreateIncidentMethod) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesCasesWebhookCreateIncidentMethod to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch ConfigPropertiesCasesWebhookCreateIncidentMethod(v) { + case ConfigPropertiesCasesWebhookCreateIncidentMethodPatch: + *s = ConfigPropertiesCasesWebhookCreateIncidentMethodPatch + case ConfigPropertiesCasesWebhookCreateIncidentMethodPost: + *s = ConfigPropertiesCasesWebhookCreateIncidentMethodPost + case ConfigPropertiesCasesWebhookCreateIncidentMethodPut: + *s = ConfigPropertiesCasesWebhookCreateIncidentMethodPut + default: + *s = ConfigPropertiesCasesWebhookCreateIncidentMethod(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s ConfigPropertiesCasesWebhookCreateIncidentMethod) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesCasesWebhookCreateIncidentMethod) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ConfigPropertiesCasesWebhookUpdateIncidentMethod as json. +func (s ConfigPropertiesCasesWebhookUpdateIncidentMethod) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes ConfigPropertiesCasesWebhookUpdateIncidentMethod from json. +func (s *ConfigPropertiesCasesWebhookUpdateIncidentMethod) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesCasesWebhookUpdateIncidentMethod to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch ConfigPropertiesCasesWebhookUpdateIncidentMethod(v) { + case ConfigPropertiesCasesWebhookUpdateIncidentMethodPatch: + *s = ConfigPropertiesCasesWebhookUpdateIncidentMethodPatch + case ConfigPropertiesCasesWebhookUpdateIncidentMethodPost: + *s = ConfigPropertiesCasesWebhookUpdateIncidentMethodPost + case ConfigPropertiesCasesWebhookUpdateIncidentMethodPut: + *s = ConfigPropertiesCasesWebhookUpdateIncidentMethodPut + default: + *s = ConfigPropertiesCasesWebhookUpdateIncidentMethod(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s ConfigPropertiesCasesWebhookUpdateIncidentMethod) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesCasesWebhookUpdateIncidentMethod) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s ConfigPropertiesEmail) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields implements json.Marshaler. +func (s ConfigPropertiesEmail) encodeFields(e *jx.Encoder) { + for k, elem := range s { + e.FieldStart(k) + + if len(elem) != 0 { + e.Raw(elem) + } + } +} + +// Decode decodes ConfigPropertiesEmail from json. +func (s *ConfigPropertiesEmail) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesEmail to nil") + } + m := s.init() + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + var elem jx.Raw + if err := func() error { + v, err := d.RawAppend(nil) + elem = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrapf(err, "decode field %q", k) + } + m[string(k)] = elem + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesEmail") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s ConfigPropertiesEmail) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesEmail) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConfigPropertiesIndex) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConfigPropertiesIndex) encodeFields(e *jx.Encoder) { + { + if s.ExecutionTimeField.Set { + e.FieldStart("executionTimeField") + s.ExecutionTimeField.Encode(e) + } + } + { + e.FieldStart("index") + e.Str(s.Index) + } + { + if s.Refresh.Set { + e.FieldStart("refresh") + s.Refresh.Encode(e) + } + } +} + +var jsonFieldsNameOfConfigPropertiesIndex = [3]string{ + 0: "executionTimeField", + 1: "index", + 2: "refresh", +} + +// Decode decodes ConfigPropertiesIndex from json. +func (s *ConfigPropertiesIndex) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesIndex to nil") + } + var requiredBitSet [1]uint8 + s.setDefaults() + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "executionTimeField": + if err := func() error { + s.ExecutionTimeField.Reset() + if err := s.ExecutionTimeField.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"executionTimeField\"") + } + case "index": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Index = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"index\"") + } + case "refresh": + if err := func() error { + s.Refresh.Reset() + if err := s.Refresh.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"refresh\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesIndex") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000010, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConfigPropertiesIndex) { + name = jsonFieldsNameOfConfigPropertiesIndex[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConfigPropertiesIndex) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesIndex) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConfigPropertiesJira) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConfigPropertiesJira) encodeFields(e *jx.Encoder) { + { + e.FieldStart("apiUrl") + e.Str(s.ApiUrl) + } + { + e.FieldStart("projectKey") + e.Str(s.ProjectKey) + } +} + +var jsonFieldsNameOfConfigPropertiesJira = [2]string{ + 0: "apiUrl", + 1: "projectKey", +} + +// Decode decodes ConfigPropertiesJira from json. +func (s *ConfigPropertiesJira) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesJira to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "apiUrl": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.ApiUrl = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"apiUrl\"") + } + case "projectKey": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ProjectKey = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"projectKey\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesJira") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConfigPropertiesJira) { + name = jsonFieldsNameOfConfigPropertiesJira[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConfigPropertiesJira) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesJira) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConfigPropertiesOpsgenie) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConfigPropertiesOpsgenie) encodeFields(e *jx.Encoder) { + { + e.FieldStart("apiUrl") + e.Str(s.ApiUrl) + } +} + +var jsonFieldsNameOfConfigPropertiesOpsgenie = [1]string{ + 0: "apiUrl", +} + +// Decode decodes ConfigPropertiesOpsgenie from json. +func (s *ConfigPropertiesOpsgenie) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesOpsgenie to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "apiUrl": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.ApiUrl = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"apiUrl\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesOpsgenie") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000001, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConfigPropertiesOpsgenie) { + name = jsonFieldsNameOfConfigPropertiesOpsgenie[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConfigPropertiesOpsgenie) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesOpsgenie) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s ConfigPropertiesPagerduty) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields implements json.Marshaler. +func (s ConfigPropertiesPagerduty) encodeFields(e *jx.Encoder) { + for k, elem := range s { + e.FieldStart(k) + + if len(elem) != 0 { + e.Raw(elem) + } + } +} + +// Decode decodes ConfigPropertiesPagerduty from json. +func (s *ConfigPropertiesPagerduty) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesPagerduty to nil") + } + m := s.init() + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + var elem jx.Raw + if err := func() error { + v, err := d.RawAppend(nil) + elem = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrapf(err, "decode field %q", k) + } + m[string(k)] = elem + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesPagerduty") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s ConfigPropertiesPagerduty) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesPagerduty) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConfigPropertiesResilient) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConfigPropertiesResilient) encodeFields(e *jx.Encoder) { + { + e.FieldStart("apiUrl") + e.Str(s.ApiUrl) + } + { + e.FieldStart("orgId") + e.Str(s.OrgId) + } +} + +var jsonFieldsNameOfConfigPropertiesResilient = [2]string{ + 0: "apiUrl", + 1: "orgId", +} + +// Decode decodes ConfigPropertiesResilient from json. +func (s *ConfigPropertiesResilient) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesResilient to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "apiUrl": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.ApiUrl = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"apiUrl\"") + } + case "orgId": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.OrgId = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"orgId\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesResilient") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConfigPropertiesResilient) { + name = jsonFieldsNameOfConfigPropertiesResilient[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConfigPropertiesResilient) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesResilient) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConfigPropertiesServicenow) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConfigPropertiesServicenow) encodeFields(e *jx.Encoder) { + { + e.FieldStart("apiUrl") + e.Str(s.ApiUrl) + } + { + if s.ClientId.Set { + e.FieldStart("clientId") + s.ClientId.Encode(e) + } + } + { + if s.IsOAuth.Set { + e.FieldStart("isOAuth") + s.IsOAuth.Encode(e) + } + } + { + if s.JwtKeyId.Set { + e.FieldStart("jwtKeyId") + s.JwtKeyId.Encode(e) + } + } + { + if s.UserIdentifierValue.Set { + e.FieldStart("userIdentifierValue") + s.UserIdentifierValue.Encode(e) + } + } + { + if s.UsesTableApi.Set { + e.FieldStart("usesTableApi") + s.UsesTableApi.Encode(e) + } + } +} + +var jsonFieldsNameOfConfigPropertiesServicenow = [6]string{ + 0: "apiUrl", + 1: "clientId", + 2: "isOAuth", + 3: "jwtKeyId", + 4: "userIdentifierValue", + 5: "usesTableApi", +} + +// Decode decodes ConfigPropertiesServicenow from json. +func (s *ConfigPropertiesServicenow) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesServicenow to nil") + } + var requiredBitSet [1]uint8 + s.setDefaults() + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "apiUrl": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.ApiUrl = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"apiUrl\"") + } + case "clientId": + if err := func() error { + s.ClientId.Reset() + if err := s.ClientId.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"clientId\"") + } + case "isOAuth": + if err := func() error { + s.IsOAuth.Reset() + if err := s.IsOAuth.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"isOAuth\"") + } + case "jwtKeyId": + if err := func() error { + s.JwtKeyId.Reset() + if err := s.JwtKeyId.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"jwtKeyId\"") + } + case "userIdentifierValue": + if err := func() error { + s.UserIdentifierValue.Reset() + if err := s.UserIdentifierValue.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"userIdentifierValue\"") + } + case "usesTableApi": + if err := func() error { + s.UsesTableApi.Reset() + if err := s.UsesTableApi.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"usesTableApi\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesServicenow") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000001, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConfigPropertiesServicenow) { + name = jsonFieldsNameOfConfigPropertiesServicenow[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConfigPropertiesServicenow) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesServicenow) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConfigPropertiesServicenowItom) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConfigPropertiesServicenowItom) encodeFields(e *jx.Encoder) { + { + e.FieldStart("apiUrl") + e.Str(s.ApiUrl) + } + { + if s.ClientId.Set { + e.FieldStart("clientId") + s.ClientId.Encode(e) + } + } + { + if s.IsOAuth.Set { + e.FieldStart("isOAuth") + s.IsOAuth.Encode(e) + } + } + { + if s.JwtKeyId.Set { + e.FieldStart("jwtKeyId") + s.JwtKeyId.Encode(e) + } + } + { + if s.UserIdentifierValue.Set { + e.FieldStart("userIdentifierValue") + s.UserIdentifierValue.Encode(e) + } + } +} + +var jsonFieldsNameOfConfigPropertiesServicenowItom = [5]string{ + 0: "apiUrl", + 1: "clientId", + 2: "isOAuth", + 3: "jwtKeyId", + 4: "userIdentifierValue", +} + +// Decode decodes ConfigPropertiesServicenowItom from json. +func (s *ConfigPropertiesServicenowItom) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesServicenowItom to nil") + } + var requiredBitSet [1]uint8 + s.setDefaults() + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "apiUrl": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.ApiUrl = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"apiUrl\"") + } + case "clientId": + if err := func() error { + s.ClientId.Reset() + if err := s.ClientId.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"clientId\"") + } + case "isOAuth": + if err := func() error { + s.IsOAuth.Reset() + if err := s.IsOAuth.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"isOAuth\"") + } + case "jwtKeyId": + if err := func() error { + s.JwtKeyId.Reset() + if err := s.JwtKeyId.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"jwtKeyId\"") + } + case "userIdentifierValue": + if err := func() error { + s.UserIdentifierValue.Reset() + if err := s.UserIdentifierValue.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"userIdentifierValue\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesServicenowItom") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000001, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConfigPropertiesServicenowItom) { + name = jsonFieldsNameOfConfigPropertiesServicenowItom[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConfigPropertiesServicenowItom) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesServicenowItom) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConfigPropertiesSwimlane) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConfigPropertiesSwimlane) encodeFields(e *jx.Encoder) { + { + e.FieldStart("apiUrl") + e.Str(s.ApiUrl) + } + { + e.FieldStart("appId") + e.Str(s.AppId) + } + { + e.FieldStart("connectorType") + s.ConnectorType.Encode(e) + } + { + if s.Mappings.Set { + e.FieldStart("mappings") + s.Mappings.Encode(e) + } + } +} + +var jsonFieldsNameOfConfigPropertiesSwimlane = [4]string{ + 0: "apiUrl", + 1: "appId", + 2: "connectorType", + 3: "mappings", +} + +// Decode decodes ConfigPropertiesSwimlane from json. +func (s *ConfigPropertiesSwimlane) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesSwimlane to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "apiUrl": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.ApiUrl = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"apiUrl\"") + } + case "appId": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.AppId = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"appId\"") + } + case "connectorType": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.ConnectorType.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"connectorType\"") + } + case "mappings": + if err := func() error { + s.Mappings.Reset() + if err := s.Mappings.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"mappings\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesSwimlane") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConfigPropertiesSwimlane) { + name = jsonFieldsNameOfConfigPropertiesSwimlane[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConfigPropertiesSwimlane) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesSwimlane) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ConfigPropertiesSwimlaneConnectorType as json. +func (s ConfigPropertiesSwimlaneConnectorType) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes ConfigPropertiesSwimlaneConnectorType from json. +func (s *ConfigPropertiesSwimlaneConnectorType) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesSwimlaneConnectorType to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch ConfigPropertiesSwimlaneConnectorType(v) { + case ConfigPropertiesSwimlaneConnectorTypeAll: + *s = ConfigPropertiesSwimlaneConnectorTypeAll + case ConfigPropertiesSwimlaneConnectorTypeAlerts: + *s = ConfigPropertiesSwimlaneConnectorTypeAlerts + case ConfigPropertiesSwimlaneConnectorTypeCases: + *s = ConfigPropertiesSwimlaneConnectorTypeCases + default: + *s = ConfigPropertiesSwimlaneConnectorType(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s ConfigPropertiesSwimlaneConnectorType) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesSwimlaneConnectorType) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConfigPropertiesSwimlaneMappings) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConfigPropertiesSwimlaneMappings) encodeFields(e *jx.Encoder) { + { + if s.AlertIdConfig.Set { + e.FieldStart("alertIdConfig") + s.AlertIdConfig.Encode(e) + } + } + { + if s.CaseIdConfig.Set { + e.FieldStart("caseIdConfig") + s.CaseIdConfig.Encode(e) + } + } + { + if s.CaseNameConfig.Set { + e.FieldStart("caseNameConfig") + s.CaseNameConfig.Encode(e) + } + } + { + if s.CommentsConfig.Set { + e.FieldStart("commentsConfig") + s.CommentsConfig.Encode(e) + } + } + { + if s.DescriptionConfig.Set { + e.FieldStart("descriptionConfig") + s.DescriptionConfig.Encode(e) + } + } + { + if s.RuleNameConfig.Set { + e.FieldStart("ruleNameConfig") + s.RuleNameConfig.Encode(e) + } + } + { + if s.SeverityConfig.Set { + e.FieldStart("severityConfig") + s.SeverityConfig.Encode(e) + } + } +} + +var jsonFieldsNameOfConfigPropertiesSwimlaneMappings = [7]string{ + 0: "alertIdConfig", + 1: "caseIdConfig", + 2: "caseNameConfig", + 3: "commentsConfig", + 4: "descriptionConfig", + 5: "ruleNameConfig", + 6: "severityConfig", +} + +// Decode decodes ConfigPropertiesSwimlaneMappings from json. +func (s *ConfigPropertiesSwimlaneMappings) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesSwimlaneMappings to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "alertIdConfig": + if err := func() error { + s.AlertIdConfig.Reset() + if err := s.AlertIdConfig.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"alertIdConfig\"") + } + case "caseIdConfig": + if err := func() error { + s.CaseIdConfig.Reset() + if err := s.CaseIdConfig.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"caseIdConfig\"") + } + case "caseNameConfig": + if err := func() error { + s.CaseNameConfig.Reset() + if err := s.CaseNameConfig.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"caseNameConfig\"") + } + case "commentsConfig": + if err := func() error { + s.CommentsConfig.Reset() + if err := s.CommentsConfig.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"commentsConfig\"") + } + case "descriptionConfig": + if err := func() error { + s.DescriptionConfig.Reset() + if err := s.DescriptionConfig.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"descriptionConfig\"") + } + case "ruleNameConfig": + if err := func() error { + s.RuleNameConfig.Reset() + if err := s.RuleNameConfig.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"ruleNameConfig\"") + } + case "severityConfig": + if err := func() error { + s.SeverityConfig.Reset() + if err := s.SeverityConfig.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"severityConfig\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesSwimlaneMappings") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConfigPropertiesSwimlaneMappings) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesSwimlaneMappings) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) encodeFields(e *jx.Encoder) { + { + e.FieldStart("fieldType") + e.Str(s.FieldType) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + e.FieldStart("key") + e.Str(s.Key) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConfigPropertiesSwimlaneMappingsAlertIdConfig = [4]string{ + 0: "fieldType", + 1: "id", + 2: "key", + 3: "name", +} + +// Decode decodes ConfigPropertiesSwimlaneMappingsAlertIdConfig from json. +func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesSwimlaneMappingsAlertIdConfig to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "fieldType": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.FieldType = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"fieldType\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "key": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := d.Str() + s.Key = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"key\"") + } + case "name": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesSwimlaneMappingsAlertIdConfig") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00001111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConfigPropertiesSwimlaneMappingsAlertIdConfig) { + name = jsonFieldsNameOfConfigPropertiesSwimlaneMappingsAlertIdConfig[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) encodeFields(e *jx.Encoder) { + { + e.FieldStart("fieldType") + e.Str(s.FieldType) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + e.FieldStart("key") + e.Str(s.Key) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConfigPropertiesSwimlaneMappingsCaseIdConfig = [4]string{ + 0: "fieldType", + 1: "id", + 2: "key", + 3: "name", +} + +// Decode decodes ConfigPropertiesSwimlaneMappingsCaseIdConfig from json. +func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesSwimlaneMappingsCaseIdConfig to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "fieldType": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.FieldType = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"fieldType\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "key": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := d.Str() + s.Key = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"key\"") + } + case "name": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesSwimlaneMappingsCaseIdConfig") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00001111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConfigPropertiesSwimlaneMappingsCaseIdConfig) { + name = jsonFieldsNameOfConfigPropertiesSwimlaneMappingsCaseIdConfig[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) encodeFields(e *jx.Encoder) { + { + e.FieldStart("fieldType") + e.Str(s.FieldType) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + e.FieldStart("key") + e.Str(s.Key) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConfigPropertiesSwimlaneMappingsCaseNameConfig = [4]string{ + 0: "fieldType", + 1: "id", + 2: "key", + 3: "name", +} + +// Decode decodes ConfigPropertiesSwimlaneMappingsCaseNameConfig from json. +func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesSwimlaneMappingsCaseNameConfig to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "fieldType": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.FieldType = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"fieldType\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "key": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := d.Str() + s.Key = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"key\"") + } + case "name": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesSwimlaneMappingsCaseNameConfig") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00001111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConfigPropertiesSwimlaneMappingsCaseNameConfig) { + name = jsonFieldsNameOfConfigPropertiesSwimlaneMappingsCaseNameConfig[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) encodeFields(e *jx.Encoder) { + { + e.FieldStart("fieldType") + e.Str(s.FieldType) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + e.FieldStart("key") + e.Str(s.Key) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConfigPropertiesSwimlaneMappingsCommentsConfig = [4]string{ + 0: "fieldType", + 1: "id", + 2: "key", + 3: "name", +} + +// Decode decodes ConfigPropertiesSwimlaneMappingsCommentsConfig from json. +func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesSwimlaneMappingsCommentsConfig to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "fieldType": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.FieldType = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"fieldType\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "key": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := d.Str() + s.Key = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"key\"") + } + case "name": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesSwimlaneMappingsCommentsConfig") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00001111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConfigPropertiesSwimlaneMappingsCommentsConfig) { + name = jsonFieldsNameOfConfigPropertiesSwimlaneMappingsCommentsConfig[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) encodeFields(e *jx.Encoder) { + { + e.FieldStart("fieldType") + e.Str(s.FieldType) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + e.FieldStart("key") + e.Str(s.Key) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConfigPropertiesSwimlaneMappingsDescriptionConfig = [4]string{ + 0: "fieldType", + 1: "id", + 2: "key", + 3: "name", +} + +// Decode decodes ConfigPropertiesSwimlaneMappingsDescriptionConfig from json. +func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesSwimlaneMappingsDescriptionConfig to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "fieldType": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.FieldType = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"fieldType\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "key": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := d.Str() + s.Key = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"key\"") + } + case "name": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesSwimlaneMappingsDescriptionConfig") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00001111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConfigPropertiesSwimlaneMappingsDescriptionConfig) { + name = jsonFieldsNameOfConfigPropertiesSwimlaneMappingsDescriptionConfig[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) encodeFields(e *jx.Encoder) { + { + e.FieldStart("fieldType") + e.Str(s.FieldType) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + e.FieldStart("key") + e.Str(s.Key) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConfigPropertiesSwimlaneMappingsRuleNameConfig = [4]string{ + 0: "fieldType", + 1: "id", + 2: "key", + 3: "name", +} + +// Decode decodes ConfigPropertiesSwimlaneMappingsRuleNameConfig from json. +func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesSwimlaneMappingsRuleNameConfig to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "fieldType": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.FieldType = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"fieldType\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "key": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := d.Str() + s.Key = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"key\"") + } + case "name": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesSwimlaneMappingsRuleNameConfig") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00001111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConfigPropertiesSwimlaneMappingsRuleNameConfig) { + name = jsonFieldsNameOfConfigPropertiesSwimlaneMappingsRuleNameConfig[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) encodeFields(e *jx.Encoder) { + { + e.FieldStart("fieldType") + e.Str(s.FieldType) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + e.FieldStart("key") + e.Str(s.Key) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConfigPropertiesSwimlaneMappingsSeverityConfig = [4]string{ + 0: "fieldType", + 1: "id", + 2: "key", + 3: "name", +} + +// Decode decodes ConfigPropertiesSwimlaneMappingsSeverityConfig from json. +func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesSwimlaneMappingsSeverityConfig to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "fieldType": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.FieldType = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"fieldType\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "key": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := d.Str() + s.Key = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"key\"") + } + case "name": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesSwimlaneMappingsSeverityConfig") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00001111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConfigPropertiesSwimlaneMappingsSeverityConfig) { + name = jsonFieldsNameOfConfigPropertiesSwimlaneMappingsSeverityConfig[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s ConfigPropertiesTines) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields implements json.Marshaler. +func (s ConfigPropertiesTines) encodeFields(e *jx.Encoder) { + for k, elem := range s { + e.FieldStart(k) + + if len(elem) != 0 { + e.Raw(elem) + } + } +} + +// Decode decodes ConfigPropertiesTines from json. +func (s *ConfigPropertiesTines) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesTines to nil") + } + m := s.init() + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + var elem jx.Raw + if err := func() error { + v, err := d.RawAppend(nil) + elem = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrapf(err, "decode field %q", k) + } + m[string(k)] = elem + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesTines") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s ConfigPropertiesTines) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesTines) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s ConfigPropertiesWebhook) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields implements json.Marshaler. +func (s ConfigPropertiesWebhook) encodeFields(e *jx.Encoder) { + for k, elem := range s { + e.FieldStart(k) + + if len(elem) != 0 { + e.Raw(elem) + } + } +} + +// Decode decodes ConfigPropertiesWebhook from json. +func (s *ConfigPropertiesWebhook) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesWebhook to nil") + } + m := s.init() + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + var elem jx.Raw + if err := func() error { + v, err := d.RawAppend(nil) + elem = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrapf(err, "decode field %q", k) + } + m[string(k)] = elem + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesWebhook") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s ConfigPropertiesWebhook) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesWebhook) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s ConfigPropertiesXmatters) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields implements json.Marshaler. +func (s ConfigPropertiesXmatters) encodeFields(e *jx.Encoder) { + for k, elem := range s { + e.FieldStart(k) + + if len(elem) != 0 { + e.Raw(elem) + } + } +} + +// Decode decodes ConfigPropertiesXmatters from json. +func (s *ConfigPropertiesXmatters) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConfigPropertiesXmatters to nil") + } + m := s.init() + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + var elem jx.Raw + if err := func() error { + v, err := d.RawAppend(nil) + elem = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrapf(err, "decode field %q", k) + } + m[string(k)] = elem + return nil + }); err != nil { + return errors.Wrap(err, "decode ConfigPropertiesXmatters") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s ConfigPropertiesXmatters) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConfigPropertiesXmatters) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ConnectorResponseProperties as json. +func (s ConnectorResponseProperties) Encode(e *jx.Encoder) { + switch s.Type { + case ConnectorResponsePropertiesCasesWebhookConnectorResponseProperties: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".cases-webhook") + s.ConnectorResponsePropertiesCasesWebhook.encodeFields(e) + e.ObjEnd() + case ConnectorResponsePropertiesEmailConnectorResponseProperties: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".email") + s.ConnectorResponsePropertiesEmail.encodeFields(e) + e.ObjEnd() + case ConnectorResponsePropertiesIndexConnectorResponseProperties: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".index") + s.ConnectorResponsePropertiesIndex.encodeFields(e) + e.ObjEnd() + case ConnectorResponsePropertiesJiraConnectorResponseProperties: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".jira") + s.ConnectorResponsePropertiesJira.encodeFields(e) + e.ObjEnd() + case ConnectorResponsePropertiesOpsgenieConnectorResponseProperties: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".opsgenie") + s.ConnectorResponsePropertiesOpsgenie.encodeFields(e) + e.ObjEnd() + case ConnectorResponsePropertiesPagerdutyConnectorResponseProperties: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".pagerduty") + s.ConnectorResponsePropertiesPagerduty.encodeFields(e) + e.ObjEnd() + case ConnectorResponsePropertiesResilientConnectorResponseProperties: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".resilient") + s.ConnectorResponsePropertiesResilient.encodeFields(e) + e.ObjEnd() + case ConnectorResponsePropertiesServerlogConnectorResponseProperties: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".server-log") + s.ConnectorResponsePropertiesServerlog.encodeFields(e) + e.ObjEnd() + case ConnectorResponsePropertiesServicenowConnectorResponseProperties: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".servicenow") + s.ConnectorResponsePropertiesServicenow.encodeFields(e) + e.ObjEnd() + case ConnectorResponsePropertiesServicenowItomConnectorResponseProperties: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".servicenow-itom") + s.ConnectorResponsePropertiesServicenowItom.encodeFields(e) + e.ObjEnd() + case ConnectorResponsePropertiesServicenowSirConnectorResponseProperties: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".servicenow-sir") + s.ConnectorResponsePropertiesServicenowSir.encodeFields(e) + e.ObjEnd() + case ConnectorResponsePropertiesSlackConnectorResponseProperties: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".slack") + s.ConnectorResponsePropertiesSlack.encodeFields(e) + e.ObjEnd() + case ConnectorResponsePropertiesSwimlaneConnectorResponseProperties: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".swimlane") + s.ConnectorResponsePropertiesSwimlane.encodeFields(e) + e.ObjEnd() + case ConnectorResponsePropertiesTeamsConnectorResponseProperties: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".teams") + s.ConnectorResponsePropertiesTeams.encodeFields(e) + e.ObjEnd() + case ConnectorResponsePropertiesTinesConnectorResponseProperties: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".tines") + s.ConnectorResponsePropertiesTines.encodeFields(e) + e.ObjEnd() + case ConnectorResponsePropertiesWebhookConnectorResponseProperties: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".webhook") + s.ConnectorResponsePropertiesWebhook.encodeFields(e) + e.ObjEnd() + case ConnectorResponsePropertiesXmattersConnectorResponseProperties: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".xmatters") + s.ConnectorResponsePropertiesXmatters.encodeFields(e) + e.ObjEnd() + } +} + +// Decode decodes ConnectorResponseProperties from json. +func (s *ConnectorResponseProperties) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponseProperties to nil") + } + // Sum type discriminator. + if typ := d.Next(); typ != jx.Object { + return errors.Errorf("unexpected json type %q", typ) + } + + var found bool + if err := d.Capture(func(d *jx.Decoder) error { + return d.ObjBytes(func(d *jx.Decoder, key []byte) error { + if found { + return d.Skip() + } + switch string(key) { + case "connector_type_id": + typ, err := d.Str() + if err != nil { + return err + } + switch typ { + case ".cases-webhook": + s.Type = ConnectorResponsePropertiesCasesWebhookConnectorResponseProperties + found = true + case ".email": + s.Type = ConnectorResponsePropertiesEmailConnectorResponseProperties + found = true + case ".index": + s.Type = ConnectorResponsePropertiesIndexConnectorResponseProperties + found = true + case ".jira": + s.Type = ConnectorResponsePropertiesJiraConnectorResponseProperties + found = true + case ".opsgenie": + s.Type = ConnectorResponsePropertiesOpsgenieConnectorResponseProperties + found = true + case ".pagerduty": + s.Type = ConnectorResponsePropertiesPagerdutyConnectorResponseProperties + found = true + case ".resilient": + s.Type = ConnectorResponsePropertiesResilientConnectorResponseProperties + found = true + case ".server-log": + s.Type = ConnectorResponsePropertiesServerlogConnectorResponseProperties + found = true + case ".servicenow": + s.Type = ConnectorResponsePropertiesServicenowConnectorResponseProperties + found = true + case ".servicenow-itom": + s.Type = ConnectorResponsePropertiesServicenowItomConnectorResponseProperties + found = true + case ".servicenow-sir": + s.Type = ConnectorResponsePropertiesServicenowSirConnectorResponseProperties + found = true + case ".slack": + s.Type = ConnectorResponsePropertiesSlackConnectorResponseProperties + found = true + case ".swimlane": + s.Type = ConnectorResponsePropertiesSwimlaneConnectorResponseProperties + found = true + case ".teams": + s.Type = ConnectorResponsePropertiesTeamsConnectorResponseProperties + found = true + case ".tines": + s.Type = ConnectorResponsePropertiesTinesConnectorResponseProperties + found = true + case ".webhook": + s.Type = ConnectorResponsePropertiesWebhookConnectorResponseProperties + found = true + case ".xmatters": + s.Type = ConnectorResponsePropertiesXmattersConnectorResponseProperties + found = true + default: + return errors.Errorf("unknown type %s", typ) + } + return nil + } + return d.Skip() + }) + }); err != nil { + return errors.Wrap(err, "capture") + } + if !found { + return errors.New("unable to detect sum type variant") + } + switch s.Type { + case ConnectorResponsePropertiesCasesWebhookConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesCasesWebhook.Decode(d); err != nil { + return err + } + case ConnectorResponsePropertiesEmailConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesEmail.Decode(d); err != nil { + return err + } + case ConnectorResponsePropertiesIndexConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesIndex.Decode(d); err != nil { + return err + } + case ConnectorResponsePropertiesJiraConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesJira.Decode(d); err != nil { + return err + } + case ConnectorResponsePropertiesOpsgenieConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesOpsgenie.Decode(d); err != nil { + return err + } + case ConnectorResponsePropertiesPagerdutyConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesPagerduty.Decode(d); err != nil { + return err + } + case ConnectorResponsePropertiesResilientConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesResilient.Decode(d); err != nil { + return err + } + case ConnectorResponsePropertiesServerlogConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesServerlog.Decode(d); err != nil { + return err + } + case ConnectorResponsePropertiesServicenowConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesServicenow.Decode(d); err != nil { + return err + } + case ConnectorResponsePropertiesServicenowItomConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesServicenowItom.Decode(d); err != nil { + return err + } + case ConnectorResponsePropertiesServicenowSirConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesServicenowSir.Decode(d); err != nil { + return err + } + case ConnectorResponsePropertiesSlackConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesSlack.Decode(d); err != nil { + return err + } + case ConnectorResponsePropertiesSwimlaneConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesSwimlane.Decode(d); err != nil { + return err + } + case ConnectorResponsePropertiesTeamsConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesTeams.Decode(d); err != nil { + return err + } + case ConnectorResponsePropertiesTinesConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesTines.Decode(d); err != nil { + return err + } + case ConnectorResponsePropertiesWebhookConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesWebhook.Decode(d); err != nil { + return err + } + case ConnectorResponsePropertiesXmattersConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesXmatters.Decode(d); err != nil { + return err + } + default: + return errors.Errorf("inferred invalid type: %s", s.Type) + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s ConnectorResponseProperties) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponseProperties) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConnectorResponsePropertiesCasesWebhook) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConnectorResponsePropertiesCasesWebhook) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + if s.IsDeprecated.Set { + e.FieldStart("is_deprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("is_missing_secrets") + s.IsMissingSecrets.Encode(e) + } + } + { + e.FieldStart("is_preconfigured") + s.IsPreconfigured.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConnectorResponsePropertiesCasesWebhook = [6]string{ + 0: "config", + 1: "id", + 2: "is_deprecated", + 3: "is_missing_secrets", + 4: "is_preconfigured", + 5: "name", +} + +// Decode decodes ConnectorResponsePropertiesCasesWebhook from json. +func (s *ConnectorResponsePropertiesCasesWebhook) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponsePropertiesCasesWebhook to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "is_deprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_deprecated\"") + } + case "is_missing_secrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_missing_secrets\"") + } + case "is_preconfigured": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_preconfigured\"") + } + case "name": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConnectorResponsePropertiesCasesWebhook") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00110011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesCasesWebhook) { + name = jsonFieldsNameOfConnectorResponsePropertiesCasesWebhook[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConnectorResponsePropertiesCasesWebhook) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponsePropertiesCasesWebhook) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConnectorResponsePropertiesEmail) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConnectorResponsePropertiesEmail) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + if s.IsDeprecated.Set { + e.FieldStart("is_deprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("is_missing_secrets") + s.IsMissingSecrets.Encode(e) + } + } + { + e.FieldStart("is_preconfigured") + s.IsPreconfigured.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConnectorResponsePropertiesEmail = [6]string{ + 0: "config", + 1: "id", + 2: "is_deprecated", + 3: "is_missing_secrets", + 4: "is_preconfigured", + 5: "name", +} + +// Decode decodes ConnectorResponsePropertiesEmail from json. +func (s *ConnectorResponsePropertiesEmail) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponsePropertiesEmail to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "is_deprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_deprecated\"") + } + case "is_missing_secrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_missing_secrets\"") + } + case "is_preconfigured": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_preconfigured\"") + } + case "name": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConnectorResponsePropertiesEmail") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00110011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesEmail) { + name = jsonFieldsNameOfConnectorResponsePropertiesEmail[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConnectorResponsePropertiesEmail) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponsePropertiesEmail) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConnectorResponsePropertiesIndex) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConnectorResponsePropertiesIndex) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + if s.IsDeprecated.Set { + e.FieldStart("is_deprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("is_missing_secrets") + s.IsMissingSecrets.Encode(e) + } + } + { + e.FieldStart("is_preconfigured") + s.IsPreconfigured.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConnectorResponsePropertiesIndex = [6]string{ + 0: "config", + 1: "id", + 2: "is_deprecated", + 3: "is_missing_secrets", + 4: "is_preconfigured", + 5: "name", +} + +// Decode decodes ConnectorResponsePropertiesIndex from json. +func (s *ConnectorResponsePropertiesIndex) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponsePropertiesIndex to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "is_deprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_deprecated\"") + } + case "is_missing_secrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_missing_secrets\"") + } + case "is_preconfigured": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_preconfigured\"") + } + case "name": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConnectorResponsePropertiesIndex") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00110011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesIndex) { + name = jsonFieldsNameOfConnectorResponsePropertiesIndex[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConnectorResponsePropertiesIndex) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponsePropertiesIndex) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConnectorResponsePropertiesJira) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConnectorResponsePropertiesJira) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + if s.IsDeprecated.Set { + e.FieldStart("is_deprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("is_missing_secrets") + s.IsMissingSecrets.Encode(e) + } + } + { + e.FieldStart("is_preconfigured") + s.IsPreconfigured.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConnectorResponsePropertiesJira = [6]string{ + 0: "config", + 1: "id", + 2: "is_deprecated", + 3: "is_missing_secrets", + 4: "is_preconfigured", + 5: "name", +} + +// Decode decodes ConnectorResponsePropertiesJira from json. +func (s *ConnectorResponsePropertiesJira) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponsePropertiesJira to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "is_deprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_deprecated\"") + } + case "is_missing_secrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_missing_secrets\"") + } + case "is_preconfigured": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_preconfigured\"") + } + case "name": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConnectorResponsePropertiesJira") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00110011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesJira) { + name = jsonFieldsNameOfConnectorResponsePropertiesJira[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConnectorResponsePropertiesJira) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponsePropertiesJira) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConnectorResponsePropertiesOpsgenie) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConnectorResponsePropertiesOpsgenie) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + if s.IsDeprecated.Set { + e.FieldStart("is_deprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("is_missing_secrets") + s.IsMissingSecrets.Encode(e) + } + } + { + e.FieldStart("is_preconfigured") + s.IsPreconfigured.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConnectorResponsePropertiesOpsgenie = [6]string{ + 0: "config", + 1: "id", + 2: "is_deprecated", + 3: "is_missing_secrets", + 4: "is_preconfigured", + 5: "name", +} + +// Decode decodes ConnectorResponsePropertiesOpsgenie from json. +func (s *ConnectorResponsePropertiesOpsgenie) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponsePropertiesOpsgenie to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "is_deprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_deprecated\"") + } + case "is_missing_secrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_missing_secrets\"") + } + case "is_preconfigured": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_preconfigured\"") + } + case "name": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConnectorResponsePropertiesOpsgenie") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00110011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesOpsgenie) { + name = jsonFieldsNameOfConnectorResponsePropertiesOpsgenie[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConnectorResponsePropertiesOpsgenie) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponsePropertiesOpsgenie) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConnectorResponsePropertiesPagerduty) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConnectorResponsePropertiesPagerduty) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + if s.IsDeprecated.Set { + e.FieldStart("is_deprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("is_missing_secrets") + s.IsMissingSecrets.Encode(e) + } + } + { + e.FieldStart("is_preconfigured") + s.IsPreconfigured.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConnectorResponsePropertiesPagerduty = [6]string{ + 0: "config", + 1: "id", + 2: "is_deprecated", + 3: "is_missing_secrets", + 4: "is_preconfigured", + 5: "name", +} + +// Decode decodes ConnectorResponsePropertiesPagerduty from json. +func (s *ConnectorResponsePropertiesPagerduty) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponsePropertiesPagerduty to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "is_deprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_deprecated\"") + } + case "is_missing_secrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_missing_secrets\"") + } + case "is_preconfigured": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_preconfigured\"") + } + case "name": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConnectorResponsePropertiesPagerduty") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00110011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesPagerduty) { + name = jsonFieldsNameOfConnectorResponsePropertiesPagerduty[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConnectorResponsePropertiesPagerduty) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponsePropertiesPagerduty) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConnectorResponsePropertiesResilient) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConnectorResponsePropertiesResilient) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + if s.IsDeprecated.Set { + e.FieldStart("is_deprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("is_missing_secrets") + s.IsMissingSecrets.Encode(e) + } + } + { + e.FieldStart("is_preconfigured") + s.IsPreconfigured.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConnectorResponsePropertiesResilient = [6]string{ + 0: "config", + 1: "id", + 2: "is_deprecated", + 3: "is_missing_secrets", + 4: "is_preconfigured", + 5: "name", +} + +// Decode decodes ConnectorResponsePropertiesResilient from json. +func (s *ConnectorResponsePropertiesResilient) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponsePropertiesResilient to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "is_deprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_deprecated\"") + } + case "is_missing_secrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_missing_secrets\"") + } + case "is_preconfigured": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_preconfigured\"") + } + case "name": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConnectorResponsePropertiesResilient") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00110011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesResilient) { + name = jsonFieldsNameOfConnectorResponsePropertiesResilient[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConnectorResponsePropertiesResilient) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponsePropertiesResilient) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConnectorResponsePropertiesServerlog) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConnectorResponsePropertiesServerlog) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + if s.Config == nil { + e.Null() + } else { + s.Config.Encode(e) + } + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + if s.IsDeprecated.Set { + e.FieldStart("is_deprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("is_missing_secrets") + s.IsMissingSecrets.Encode(e) + } + } + { + e.FieldStart("is_preconfigured") + s.IsPreconfigured.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConnectorResponsePropertiesServerlog = [6]string{ + 0: "config", + 1: "id", + 2: "is_deprecated", + 3: "is_missing_secrets", + 4: "is_preconfigured", + 5: "name", +} + +// Decode decodes ConnectorResponsePropertiesServerlog from json. +func (s *ConnectorResponsePropertiesServerlog) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponsePropertiesServerlog to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + s.Config = nil + var elem ConnectorResponsePropertiesServerlogConfig + if err := elem.Decode(d); err != nil { + return err + } + s.Config = &elem + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "is_deprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_deprecated\"") + } + case "is_missing_secrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_missing_secrets\"") + } + case "is_preconfigured": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_preconfigured\"") + } + case "name": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConnectorResponsePropertiesServerlog") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00110011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesServerlog) { + name = jsonFieldsNameOfConnectorResponsePropertiesServerlog[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConnectorResponsePropertiesServerlog) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponsePropertiesServerlog) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConnectorResponsePropertiesServerlogConfig) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConnectorResponsePropertiesServerlogConfig) encodeFields(e *jx.Encoder) { +} + +var jsonFieldsNameOfConnectorResponsePropertiesServerlogConfig = [0]string{} + +// Decode decodes ConnectorResponsePropertiesServerlogConfig from json. +func (s *ConnectorResponsePropertiesServerlogConfig) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponsePropertiesServerlogConfig to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConnectorResponsePropertiesServerlogConfig") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConnectorResponsePropertiesServerlogConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponsePropertiesServerlogConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConnectorResponsePropertiesServicenow) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConnectorResponsePropertiesServicenow) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + if s.IsDeprecated.Set { + e.FieldStart("is_deprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("is_missing_secrets") + s.IsMissingSecrets.Encode(e) + } + } + { + e.FieldStart("is_preconfigured") + s.IsPreconfigured.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConnectorResponsePropertiesServicenow = [6]string{ + 0: "config", + 1: "id", + 2: "is_deprecated", + 3: "is_missing_secrets", + 4: "is_preconfigured", + 5: "name", +} + +// Decode decodes ConnectorResponsePropertiesServicenow from json. +func (s *ConnectorResponsePropertiesServicenow) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponsePropertiesServicenow to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "is_deprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_deprecated\"") + } + case "is_missing_secrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_missing_secrets\"") + } + case "is_preconfigured": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_preconfigured\"") + } + case "name": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConnectorResponsePropertiesServicenow") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00110011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesServicenow) { + name = jsonFieldsNameOfConnectorResponsePropertiesServicenow[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConnectorResponsePropertiesServicenow) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponsePropertiesServicenow) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConnectorResponsePropertiesServicenowItom) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConnectorResponsePropertiesServicenowItom) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + if s.IsDeprecated.Set { + e.FieldStart("is_deprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("is_missing_secrets") + s.IsMissingSecrets.Encode(e) + } + } + { + e.FieldStart("is_preconfigured") + s.IsPreconfigured.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConnectorResponsePropertiesServicenowItom = [6]string{ + 0: "config", + 1: "id", + 2: "is_deprecated", + 3: "is_missing_secrets", + 4: "is_preconfigured", + 5: "name", +} + +// Decode decodes ConnectorResponsePropertiesServicenowItom from json. +func (s *ConnectorResponsePropertiesServicenowItom) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponsePropertiesServicenowItom to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "is_deprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_deprecated\"") + } + case "is_missing_secrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_missing_secrets\"") + } + case "is_preconfigured": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_preconfigured\"") + } + case "name": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConnectorResponsePropertiesServicenowItom") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00110011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesServicenowItom) { + name = jsonFieldsNameOfConnectorResponsePropertiesServicenowItom[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConnectorResponsePropertiesServicenowItom) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponsePropertiesServicenowItom) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConnectorResponsePropertiesServicenowSir) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConnectorResponsePropertiesServicenowSir) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + if s.IsDeprecated.Set { + e.FieldStart("is_deprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("is_missing_secrets") + s.IsMissingSecrets.Encode(e) + } + } + { + e.FieldStart("is_preconfigured") + s.IsPreconfigured.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConnectorResponsePropertiesServicenowSir = [6]string{ + 0: "config", + 1: "id", + 2: "is_deprecated", + 3: "is_missing_secrets", + 4: "is_preconfigured", + 5: "name", +} + +// Decode decodes ConnectorResponsePropertiesServicenowSir from json. +func (s *ConnectorResponsePropertiesServicenowSir) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponsePropertiesServicenowSir to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "is_deprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_deprecated\"") + } + case "is_missing_secrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_missing_secrets\"") + } + case "is_preconfigured": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_preconfigured\"") + } + case "name": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConnectorResponsePropertiesServicenowSir") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00110011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesServicenowSir) { + name = jsonFieldsNameOfConnectorResponsePropertiesServicenowSir[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConnectorResponsePropertiesServicenowSir) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponsePropertiesServicenowSir) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConnectorResponsePropertiesSlack) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConnectorResponsePropertiesSlack) encodeFields(e *jx.Encoder) { + { + e.FieldStart("id") + e.Str(s.ID) + } + { + if s.IsDeprecated.Set { + e.FieldStart("is_deprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("is_missing_secrets") + s.IsMissingSecrets.Encode(e) + } + } + { + e.FieldStart("is_preconfigured") + s.IsPreconfigured.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConnectorResponsePropertiesSlack = [5]string{ + 0: "id", + 1: "is_deprecated", + 2: "is_missing_secrets", + 3: "is_preconfigured", + 4: "name", +} + +// Decode decodes ConnectorResponsePropertiesSlack from json. +func (s *ConnectorResponsePropertiesSlack) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponsePropertiesSlack to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "id": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "is_deprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_deprecated\"") + } + case "is_missing_secrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_missing_secrets\"") + } + case "is_preconfigured": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_preconfigured\"") + } + case "name": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConnectorResponsePropertiesSlack") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00011001, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesSlack) { + name = jsonFieldsNameOfConnectorResponsePropertiesSlack[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConnectorResponsePropertiesSlack) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponsePropertiesSlack) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConnectorResponsePropertiesSwimlane) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConnectorResponsePropertiesSwimlane) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + if s.IsDeprecated.Set { + e.FieldStart("is_deprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("is_missing_secrets") + s.IsMissingSecrets.Encode(e) + } + } + { + e.FieldStart("is_preconfigured") + s.IsPreconfigured.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConnectorResponsePropertiesSwimlane = [6]string{ + 0: "config", + 1: "id", + 2: "is_deprecated", + 3: "is_missing_secrets", + 4: "is_preconfigured", + 5: "name", +} + +// Decode decodes ConnectorResponsePropertiesSwimlane from json. +func (s *ConnectorResponsePropertiesSwimlane) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponsePropertiesSwimlane to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "is_deprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_deprecated\"") + } + case "is_missing_secrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_missing_secrets\"") + } + case "is_preconfigured": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_preconfigured\"") + } + case "name": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConnectorResponsePropertiesSwimlane") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00110011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesSwimlane) { + name = jsonFieldsNameOfConnectorResponsePropertiesSwimlane[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConnectorResponsePropertiesSwimlane) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponsePropertiesSwimlane) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConnectorResponsePropertiesTeams) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConnectorResponsePropertiesTeams) encodeFields(e *jx.Encoder) { + { + e.FieldStart("id") + e.Str(s.ID) + } + { + if s.IsDeprecated.Set { + e.FieldStart("is_deprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("is_missing_secrets") + s.IsMissingSecrets.Encode(e) + } + } + { + e.FieldStart("is_preconfigured") + s.IsPreconfigured.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConnectorResponsePropertiesTeams = [5]string{ + 0: "id", + 1: "is_deprecated", + 2: "is_missing_secrets", + 3: "is_preconfigured", + 4: "name", +} + +// Decode decodes ConnectorResponsePropertiesTeams from json. +func (s *ConnectorResponsePropertiesTeams) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponsePropertiesTeams to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "id": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "is_deprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_deprecated\"") + } + case "is_missing_secrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_missing_secrets\"") + } + case "is_preconfigured": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_preconfigured\"") + } + case "name": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConnectorResponsePropertiesTeams") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00011001, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesTeams) { + name = jsonFieldsNameOfConnectorResponsePropertiesTeams[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConnectorResponsePropertiesTeams) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponsePropertiesTeams) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConnectorResponsePropertiesTines) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConnectorResponsePropertiesTines) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + if s.IsDeprecated.Set { + e.FieldStart("is_deprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("is_missing_secrets") + s.IsMissingSecrets.Encode(e) + } + } + { + e.FieldStart("is_preconfigured") + s.IsPreconfigured.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConnectorResponsePropertiesTines = [6]string{ + 0: "config", + 1: "id", + 2: "is_deprecated", + 3: "is_missing_secrets", + 4: "is_preconfigured", + 5: "name", +} + +// Decode decodes ConnectorResponsePropertiesTines from json. +func (s *ConnectorResponsePropertiesTines) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponsePropertiesTines to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "is_deprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_deprecated\"") + } + case "is_missing_secrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_missing_secrets\"") + } + case "is_preconfigured": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_preconfigured\"") + } + case "name": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConnectorResponsePropertiesTines") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00110011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesTines) { + name = jsonFieldsNameOfConnectorResponsePropertiesTines[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConnectorResponsePropertiesTines) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponsePropertiesTines) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConnectorResponsePropertiesWebhook) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConnectorResponsePropertiesWebhook) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + if s.IsDeprecated.Set { + e.FieldStart("is_deprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("is_missing_secrets") + s.IsMissingSecrets.Encode(e) + } + } + { + e.FieldStart("is_preconfigured") + s.IsPreconfigured.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConnectorResponsePropertiesWebhook = [6]string{ + 0: "config", + 1: "id", + 2: "is_deprecated", + 3: "is_missing_secrets", + 4: "is_preconfigured", + 5: "name", +} + +// Decode decodes ConnectorResponsePropertiesWebhook from json. +func (s *ConnectorResponsePropertiesWebhook) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponsePropertiesWebhook to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "is_deprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_deprecated\"") + } + case "is_missing_secrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_missing_secrets\"") + } + case "is_preconfigured": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_preconfigured\"") + } + case "name": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConnectorResponsePropertiesWebhook") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00110011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesWebhook) { + name = jsonFieldsNameOfConnectorResponsePropertiesWebhook[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConnectorResponsePropertiesWebhook) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponsePropertiesWebhook) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ConnectorResponsePropertiesXmatters) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ConnectorResponsePropertiesXmatters) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + if s.IsDeprecated.Set { + e.FieldStart("is_deprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("is_missing_secrets") + s.IsMissingSecrets.Encode(e) + } + } + { + e.FieldStart("is_preconfigured") + s.IsPreconfigured.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfConnectorResponsePropertiesXmatters = [6]string{ + 0: "config", + 1: "id", + 2: "is_deprecated", + 3: "is_missing_secrets", + 4: "is_preconfigured", + 5: "name", +} + +// Decode decodes ConnectorResponsePropertiesXmatters from json. +func (s *ConnectorResponsePropertiesXmatters) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorResponsePropertiesXmatters to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "is_deprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_deprecated\"") + } + case "is_missing_secrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_missing_secrets\"") + } + case "is_preconfigured": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_preconfigured\"") + } + case "name": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ConnectorResponsePropertiesXmatters") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00110011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesXmatters) { + name = jsonFieldsNameOfConnectorResponsePropertiesXmatters[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ConnectorResponsePropertiesXmatters) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorResponsePropertiesXmatters) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ConnectorTypes as json. +func (s ConnectorTypes) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes ConnectorTypes from json. +func (s *ConnectorTypes) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ConnectorTypes to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch ConnectorTypes(v) { + case ConnectorTypesDotCasesMinusWebhook: + *s = ConnectorTypesDotCasesMinusWebhook + case ConnectorTypesDotEmail: + *s = ConnectorTypesDotEmail + case ConnectorTypesDotIndex: + *s = ConnectorTypesDotIndex + case ConnectorTypesDotJira: + *s = ConnectorTypesDotJira + case ConnectorTypesDotOpsgenie: + *s = ConnectorTypesDotOpsgenie + case ConnectorTypesDotPagerduty: + *s = ConnectorTypesDotPagerduty + case ConnectorTypesDotResilient: + *s = ConnectorTypesDotResilient + case ConnectorTypesDotServicenow: + *s = ConnectorTypesDotServicenow + case ConnectorTypesDotServicenowMinusItom: + *s = ConnectorTypesDotServicenowMinusItom + case ConnectorTypesDotServicenowMinusSir: + *s = ConnectorTypesDotServicenowMinusSir + case ConnectorTypesDotServerMinusLog: + *s = ConnectorTypesDotServerMinusLog + case ConnectorTypesDotSlack: + *s = ConnectorTypesDotSlack + case ConnectorTypesDotSwimlane: + *s = ConnectorTypesDotSwimlane + case ConnectorTypesDotTeams: + *s = ConnectorTypesDotTeams + case ConnectorTypesDotTines: + *s = ConnectorTypesDotTines + case ConnectorTypesDotWebhook: + *s = ConnectorTypesDotWebhook + case ConnectorTypesDotXmatters: + *s = ConnectorTypesDotXmatters + default: + *s = ConnectorTypes(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s ConnectorTypes) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ConnectorTypes) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes CreateConnectorReq as json. +func (s CreateConnectorReq) Encode(e *jx.Encoder) { + switch s.Type { + case CreateConnectorRequestCasesWebhookCreateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".cases-webhook") + s.CreateConnectorRequestCasesWebhook.encodeFields(e) + e.ObjEnd() + case CreateConnectorRequestEmailCreateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".email") + s.CreateConnectorRequestEmail.encodeFields(e) + e.ObjEnd() + case CreateConnectorRequestIndexCreateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".index") + s.CreateConnectorRequestIndex.encodeFields(e) + e.ObjEnd() + case CreateConnectorRequestJiraCreateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".jira") + s.CreateConnectorRequestJira.encodeFields(e) + e.ObjEnd() + case CreateConnectorRequestOpsgenieCreateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".opsgenie") + s.CreateConnectorRequestOpsgenie.encodeFields(e) + e.ObjEnd() + case CreateConnectorRequestPagerdutyCreateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".pagerduty") + s.CreateConnectorRequestPagerduty.encodeFields(e) + e.ObjEnd() + case CreateConnectorRequestResilientCreateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".resilient") + s.CreateConnectorRequestResilient.encodeFields(e) + e.ObjEnd() + case CreateConnectorRequestServerlogCreateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".server-log") + s.CreateConnectorRequestServerlog.encodeFields(e) + e.ObjEnd() + case CreateConnectorRequestServicenowCreateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".servicenow") + s.CreateConnectorRequestServicenow.encodeFields(e) + e.ObjEnd() + case CreateConnectorRequestServicenowItomCreateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".servicenow-itom") + s.CreateConnectorRequestServicenowItom.encodeFields(e) + e.ObjEnd() + case CreateConnectorRequestServicenowSirCreateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".servicenow-sir") + s.CreateConnectorRequestServicenowSir.encodeFields(e) + e.ObjEnd() + case CreateConnectorRequestSlackCreateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".slack") + s.CreateConnectorRequestSlack.encodeFields(e) + e.ObjEnd() + case CreateConnectorRequestSwimlaneCreateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".swimlane") + s.CreateConnectorRequestSwimlane.encodeFields(e) + e.ObjEnd() + case CreateConnectorRequestTeamsCreateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".teams") + s.CreateConnectorRequestTeams.encodeFields(e) + e.ObjEnd() + case CreateConnectorRequestTinesCreateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".tines") + s.CreateConnectorRequestTines.encodeFields(e) + e.ObjEnd() + case CreateConnectorRequestWebhookCreateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".webhook") + s.CreateConnectorRequestWebhook.encodeFields(e) + e.ObjEnd() + case CreateConnectorRequestXmattersCreateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".xmatters") + s.CreateConnectorRequestXmatters.encodeFields(e) + e.ObjEnd() + } +} + +// Decode decodes CreateConnectorReq from json. +func (s *CreateConnectorReq) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateConnectorReq to nil") + } + // Sum type discriminator. + if typ := d.Next(); typ != jx.Object { + return errors.Errorf("unexpected json type %q", typ) + } + + var found bool + if err := d.Capture(func(d *jx.Decoder) error { + return d.ObjBytes(func(d *jx.Decoder, key []byte) error { + if found { + return d.Skip() + } + switch string(key) { + case "connector_type_id": + typ, err := d.Str() + if err != nil { + return err + } + switch typ { + case ".cases-webhook": + s.Type = CreateConnectorRequestCasesWebhookCreateConnectorReq + found = true + case ".email": + s.Type = CreateConnectorRequestEmailCreateConnectorReq + found = true + case ".index": + s.Type = CreateConnectorRequestIndexCreateConnectorReq + found = true + case ".jira": + s.Type = CreateConnectorRequestJiraCreateConnectorReq + found = true + case ".opsgenie": + s.Type = CreateConnectorRequestOpsgenieCreateConnectorReq + found = true + case ".pagerduty": + s.Type = CreateConnectorRequestPagerdutyCreateConnectorReq + found = true + case ".resilient": + s.Type = CreateConnectorRequestResilientCreateConnectorReq + found = true + case ".server-log": + s.Type = CreateConnectorRequestServerlogCreateConnectorReq + found = true + case ".servicenow": + s.Type = CreateConnectorRequestServicenowCreateConnectorReq + found = true + case ".servicenow-itom": + s.Type = CreateConnectorRequestServicenowItomCreateConnectorReq + found = true + case ".servicenow-sir": + s.Type = CreateConnectorRequestServicenowSirCreateConnectorReq + found = true + case ".slack": + s.Type = CreateConnectorRequestSlackCreateConnectorReq + found = true + case ".swimlane": + s.Type = CreateConnectorRequestSwimlaneCreateConnectorReq + found = true + case ".teams": + s.Type = CreateConnectorRequestTeamsCreateConnectorReq + found = true + case ".tines": + s.Type = CreateConnectorRequestTinesCreateConnectorReq + found = true + case ".webhook": + s.Type = CreateConnectorRequestWebhookCreateConnectorReq + found = true + case ".xmatters": + s.Type = CreateConnectorRequestXmattersCreateConnectorReq + found = true + default: + return errors.Errorf("unknown type %s", typ) + } + return nil + } + return d.Skip() + }) + }); err != nil { + return errors.Wrap(err, "capture") + } + if !found { + return errors.New("unable to detect sum type variant") + } + switch s.Type { + case CreateConnectorRequestCasesWebhookCreateConnectorReq: + if err := s.CreateConnectorRequestCasesWebhook.Decode(d); err != nil { + return err + } + case CreateConnectorRequestEmailCreateConnectorReq: + if err := s.CreateConnectorRequestEmail.Decode(d); err != nil { + return err + } + case CreateConnectorRequestIndexCreateConnectorReq: + if err := s.CreateConnectorRequestIndex.Decode(d); err != nil { + return err + } + case CreateConnectorRequestJiraCreateConnectorReq: + if err := s.CreateConnectorRequestJira.Decode(d); err != nil { + return err + } + case CreateConnectorRequestOpsgenieCreateConnectorReq: + if err := s.CreateConnectorRequestOpsgenie.Decode(d); err != nil { + return err + } + case CreateConnectorRequestPagerdutyCreateConnectorReq: + if err := s.CreateConnectorRequestPagerduty.Decode(d); err != nil { + return err + } + case CreateConnectorRequestResilientCreateConnectorReq: + if err := s.CreateConnectorRequestResilient.Decode(d); err != nil { + return err + } + case CreateConnectorRequestServerlogCreateConnectorReq: + if err := s.CreateConnectorRequestServerlog.Decode(d); err != nil { + return err + } + case CreateConnectorRequestServicenowCreateConnectorReq: + if err := s.CreateConnectorRequestServicenow.Decode(d); err != nil { + return err + } + case CreateConnectorRequestServicenowItomCreateConnectorReq: + if err := s.CreateConnectorRequestServicenowItom.Decode(d); err != nil { + return err + } + case CreateConnectorRequestServicenowSirCreateConnectorReq: + if err := s.CreateConnectorRequestServicenowSir.Decode(d); err != nil { + return err + } + case CreateConnectorRequestSlackCreateConnectorReq: + if err := s.CreateConnectorRequestSlack.Decode(d); err != nil { + return err + } + case CreateConnectorRequestSwimlaneCreateConnectorReq: + if err := s.CreateConnectorRequestSwimlane.Decode(d); err != nil { + return err + } + case CreateConnectorRequestTeamsCreateConnectorReq: + if err := s.CreateConnectorRequestTeams.Decode(d); err != nil { + return err + } + case CreateConnectorRequestTinesCreateConnectorReq: + if err := s.CreateConnectorRequestTines.Decode(d); err != nil { + return err + } + case CreateConnectorRequestWebhookCreateConnectorReq: + if err := s.CreateConnectorRequestWebhook.Decode(d); err != nil { + return err + } + case CreateConnectorRequestXmattersCreateConnectorReq: + if err := s.CreateConnectorRequestXmatters.Decode(d); err != nil { + return err + } + default: + return errors.Errorf("inferred invalid type: %s", s.Type) + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s CreateConnectorReq) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateConnectorReq) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateConnectorRequestCasesWebhook) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateConnectorRequestCasesWebhook) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + if s.Secrets.Set { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } + } +} + +var jsonFieldsNameOfCreateConnectorRequestCasesWebhook = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes CreateConnectorRequestCasesWebhook from json. +func (s *CreateConnectorRequestCasesWebhook) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateConnectorRequestCasesWebhook to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + if err := func() error { + s.Secrets.Reset() + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateConnectorRequestCasesWebhook") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestCasesWebhook) { + name = jsonFieldsNameOfCreateConnectorRequestCasesWebhook[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateConnectorRequestCasesWebhook) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateConnectorRequestCasesWebhook) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateConnectorRequestEmail) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateConnectorRequestEmail) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfCreateConnectorRequestEmail = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes CreateConnectorRequestEmail from json. +func (s *CreateConnectorRequestEmail) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateConnectorRequestEmail to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateConnectorRequestEmail") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestEmail) { + name = jsonFieldsNameOfCreateConnectorRequestEmail[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateConnectorRequestEmail) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateConnectorRequestEmail) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateConnectorRequestIndex) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateConnectorRequestIndex) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfCreateConnectorRequestIndex = [2]string{ + 0: "config", + 1: "name", +} + +// Decode decodes CreateConnectorRequestIndex from json. +func (s *CreateConnectorRequestIndex) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateConnectorRequestIndex to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateConnectorRequestIndex") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestIndex) { + name = jsonFieldsNameOfCreateConnectorRequestIndex[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateConnectorRequestIndex) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateConnectorRequestIndex) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateConnectorRequestJira) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateConnectorRequestJira) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfCreateConnectorRequestJira = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes CreateConnectorRequestJira from json. +func (s *CreateConnectorRequestJira) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateConnectorRequestJira to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateConnectorRequestJira") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestJira) { + name = jsonFieldsNameOfCreateConnectorRequestJira[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateConnectorRequestJira) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateConnectorRequestJira) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateConnectorRequestOpsgenie) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateConnectorRequestOpsgenie) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfCreateConnectorRequestOpsgenie = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes CreateConnectorRequestOpsgenie from json. +func (s *CreateConnectorRequestOpsgenie) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateConnectorRequestOpsgenie to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateConnectorRequestOpsgenie") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestOpsgenie) { + name = jsonFieldsNameOfCreateConnectorRequestOpsgenie[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateConnectorRequestOpsgenie) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateConnectorRequestOpsgenie) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateConnectorRequestPagerduty) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateConnectorRequestPagerduty) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfCreateConnectorRequestPagerduty = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes CreateConnectorRequestPagerduty from json. +func (s *CreateConnectorRequestPagerduty) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateConnectorRequestPagerduty to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateConnectorRequestPagerduty") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestPagerduty) { + name = jsonFieldsNameOfCreateConnectorRequestPagerduty[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateConnectorRequestPagerduty) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateConnectorRequestPagerduty) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateConnectorRequestResilient) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateConnectorRequestResilient) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfCreateConnectorRequestResilient = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes CreateConnectorRequestResilient from json. +func (s *CreateConnectorRequestResilient) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateConnectorRequestResilient to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateConnectorRequestResilient") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestResilient) { + name = jsonFieldsNameOfCreateConnectorRequestResilient[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateConnectorRequestResilient) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateConnectorRequestResilient) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateConnectorRequestServerlog) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateConnectorRequestServerlog) encodeFields(e *jx.Encoder) { + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfCreateConnectorRequestServerlog = [1]string{ + 0: "name", +} + +// Decode decodes CreateConnectorRequestServerlog from json. +func (s *CreateConnectorRequestServerlog) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateConnectorRequestServerlog to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "name": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateConnectorRequestServerlog") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000001, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestServerlog) { + name = jsonFieldsNameOfCreateConnectorRequestServerlog[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateConnectorRequestServerlog) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateConnectorRequestServerlog) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateConnectorRequestServicenow) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateConnectorRequestServicenow) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfCreateConnectorRequestServicenow = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes CreateConnectorRequestServicenow from json. +func (s *CreateConnectorRequestServicenow) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateConnectorRequestServicenow to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateConnectorRequestServicenow") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestServicenow) { + name = jsonFieldsNameOfCreateConnectorRequestServicenow[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateConnectorRequestServicenow) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateConnectorRequestServicenow) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateConnectorRequestServicenowItom) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateConnectorRequestServicenowItom) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfCreateConnectorRequestServicenowItom = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes CreateConnectorRequestServicenowItom from json. +func (s *CreateConnectorRequestServicenowItom) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateConnectorRequestServicenowItom to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateConnectorRequestServicenowItom") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestServicenowItom) { + name = jsonFieldsNameOfCreateConnectorRequestServicenowItom[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateConnectorRequestServicenowItom) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateConnectorRequestServicenowItom) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateConnectorRequestServicenowSir) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateConnectorRequestServicenowSir) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfCreateConnectorRequestServicenowSir = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes CreateConnectorRequestServicenowSir from json. +func (s *CreateConnectorRequestServicenowSir) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateConnectorRequestServicenowSir to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateConnectorRequestServicenowSir") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestServicenowSir) { + name = jsonFieldsNameOfCreateConnectorRequestServicenowSir[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateConnectorRequestServicenowSir) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateConnectorRequestServicenowSir) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateConnectorRequestSlack) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateConnectorRequestSlack) encodeFields(e *jx.Encoder) { + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfCreateConnectorRequestSlack = [2]string{ + 0: "name", + 1: "secrets", +} + +// Decode decodes CreateConnectorRequestSlack from json. +func (s *CreateConnectorRequestSlack) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateConnectorRequestSlack to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "name": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateConnectorRequestSlack") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestSlack) { + name = jsonFieldsNameOfCreateConnectorRequestSlack[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateConnectorRequestSlack) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateConnectorRequestSlack) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateConnectorRequestSwimlane) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateConnectorRequestSwimlane) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfCreateConnectorRequestSwimlane = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes CreateConnectorRequestSwimlane from json. +func (s *CreateConnectorRequestSwimlane) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateConnectorRequestSwimlane to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateConnectorRequestSwimlane") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestSwimlane) { + name = jsonFieldsNameOfCreateConnectorRequestSwimlane[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateConnectorRequestSwimlane) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateConnectorRequestSwimlane) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateConnectorRequestTeams) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateConnectorRequestTeams) encodeFields(e *jx.Encoder) { + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfCreateConnectorRequestTeams = [2]string{ + 0: "name", + 1: "secrets", +} + +// Decode decodes CreateConnectorRequestTeams from json. +func (s *CreateConnectorRequestTeams) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateConnectorRequestTeams to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "name": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateConnectorRequestTeams") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestTeams) { + name = jsonFieldsNameOfCreateConnectorRequestTeams[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateConnectorRequestTeams) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateConnectorRequestTeams) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateConnectorRequestTines) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateConnectorRequestTines) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfCreateConnectorRequestTines = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes CreateConnectorRequestTines from json. +func (s *CreateConnectorRequestTines) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateConnectorRequestTines to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateConnectorRequestTines") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestTines) { + name = jsonFieldsNameOfCreateConnectorRequestTines[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateConnectorRequestTines) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateConnectorRequestTines) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateConnectorRequestWebhook) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateConnectorRequestWebhook) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfCreateConnectorRequestWebhook = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes CreateConnectorRequestWebhook from json. +func (s *CreateConnectorRequestWebhook) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateConnectorRequestWebhook to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateConnectorRequestWebhook") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestWebhook) { + name = jsonFieldsNameOfCreateConnectorRequestWebhook[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateConnectorRequestWebhook) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateConnectorRequestWebhook) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateConnectorRequestXmatters) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateConnectorRequestXmatters) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfCreateConnectorRequestXmatters = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes CreateConnectorRequestXmatters from json. +func (s *CreateConnectorRequestXmatters) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateConnectorRequestXmatters to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateConnectorRequestXmatters") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestXmatters) { + name = jsonFieldsNameOfCreateConnectorRequestXmatters[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateConnectorRequestXmatters) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateConnectorRequestXmatters) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *DeleteConnectorNotFound) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *DeleteConnectorNotFound) encodeFields(e *jx.Encoder) { + { + if s.Error.Set { + e.FieldStart("error") + s.Error.Encode(e) + } + } + { + if s.Message.Set { + e.FieldStart("message") + s.Message.Encode(e) + } + } + { + if s.StatusCode.Set { + e.FieldStart("statusCode") + s.StatusCode.Encode(e) + } + } +} + +var jsonFieldsNameOfDeleteConnectorNotFound = [3]string{ + 0: "error", + 1: "message", + 2: "statusCode", +} + +// Decode decodes DeleteConnectorNotFound from json. +func (s *DeleteConnectorNotFound) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode DeleteConnectorNotFound to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "error": + if err := func() error { + s.Error.Reset() + if err := s.Error.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"error\"") + } + case "message": + if err := func() error { + s.Message.Reset() + if err := s.Message.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"message\"") + } + case "statusCode": + if err := func() error { + s.StatusCode.Reset() + if err := s.StatusCode.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"statusCode\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode DeleteConnectorNotFound") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *DeleteConnectorNotFound) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *DeleteConnectorNotFound) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes Features as json. +func (s Features) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes Features from json. +func (s *Features) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode Features to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch Features(v) { + case FeaturesAlerting: + *s = FeaturesAlerting + case FeaturesCases: + *s = FeaturesCases + case FeaturesUptime: + *s = FeaturesUptime + case FeaturesSiem: + *s = FeaturesSiem + default: + *s = Features(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s Features) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *Features) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *GetConnectorNotFound) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *GetConnectorNotFound) encodeFields(e *jx.Encoder) { + { + if s.Error.Set { + e.FieldStart("error") + s.Error.Encode(e) + } + } + { + if s.Message.Set { + e.FieldStart("message") + s.Message.Encode(e) + } + } + { + if s.StatusCode.Set { + e.FieldStart("statusCode") + s.StatusCode.Encode(e) + } + } +} + +var jsonFieldsNameOfGetConnectorNotFound = [3]string{ + 0: "error", + 1: "message", + 2: "statusCode", +} + +// Decode decodes GetConnectorNotFound from json. +func (s *GetConnectorNotFound) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetConnectorNotFound to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "error": + if err := func() error { + s.Error.Reset() + if err := s.Error.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"error\"") + } + case "message": + if err := func() error { + s.Message.Reset() + if err := s.Message.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"message\"") + } + case "statusCode": + if err := func() error { + s.StatusCode.Reset() + if err := s.StatusCode.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"statusCode\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode GetConnectorNotFound") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *GetConnectorNotFound) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetConnectorNotFound) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes GetConnectorTypesOKApplicationJSON as json. +func (s GetConnectorTypesOKApplicationJSON) Encode(e *jx.Encoder) { + unwrapped := []GetConnectorTypesOKItem(s) + + e.ArrStart() + for _, elem := range unwrapped { + elem.Encode(e) + } + e.ArrEnd() +} + +// Decode decodes GetConnectorTypesOKApplicationJSON from json. +func (s *GetConnectorTypesOKApplicationJSON) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetConnectorTypesOKApplicationJSON to nil") + } + var unwrapped []GetConnectorTypesOKItem + if err := func() error { + unwrapped = make([]GetConnectorTypesOKItem, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem GetConnectorTypesOKItem + if err := elem.Decode(d); err != nil { + return err + } + unwrapped = append(unwrapped, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "alias") + } + *s = GetConnectorTypesOKApplicationJSON(unwrapped) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s GetConnectorTypesOKApplicationJSON) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetConnectorTypesOKApplicationJSON) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *GetConnectorTypesOKItem) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *GetConnectorTypesOKItem) encodeFields(e *jx.Encoder) { + { + if s.Enabled.Set { + e.FieldStart("enabled") + s.Enabled.Encode(e) + } + } + { + if s.EnabledInConfig.Set { + e.FieldStart("enabled_in_config") + s.EnabledInConfig.Encode(e) + } + } + { + if s.EnabledInLicense.Set { + e.FieldStart("enabled_in_license") + s.EnabledInLicense.Encode(e) + } + } + { + if s.ID.Set { + e.FieldStart("id") + s.ID.Encode(e) + } + } + { + if s.MinimumLicenseRequired.Set { + e.FieldStart("minimum_license_required") + s.MinimumLicenseRequired.Encode(e) + } + } + { + if s.Name.Set { + e.FieldStart("name") + s.Name.Encode(e) + } + } + { + if s.SupportedFeatureIds != nil { + e.FieldStart("supported_feature_ids") + e.ArrStart() + for _, elem := range s.SupportedFeatureIds { + elem.Encode(e) + } + e.ArrEnd() + } + } +} + +var jsonFieldsNameOfGetConnectorTypesOKItem = [7]string{ + 0: "enabled", + 1: "enabled_in_config", + 2: "enabled_in_license", + 3: "id", + 4: "minimum_license_required", + 5: "name", + 6: "supported_feature_ids", +} + +// Decode decodes GetConnectorTypesOKItem from json. +func (s *GetConnectorTypesOKItem) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetConnectorTypesOKItem to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "enabled": + if err := func() error { + s.Enabled.Reset() + if err := s.Enabled.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"enabled\"") + } + case "enabled_in_config": + if err := func() error { + s.EnabledInConfig.Reset() + if err := s.EnabledInConfig.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"enabled_in_config\"") + } + case "enabled_in_license": + if err := func() error { + s.EnabledInLicense.Reset() + if err := s.EnabledInLicense.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"enabled_in_license\"") + } + case "id": + if err := func() error { + s.ID.Reset() + if err := s.ID.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "minimum_license_required": + if err := func() error { + s.MinimumLicenseRequired.Reset() + if err := s.MinimumLicenseRequired.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"minimum_license_required\"") + } + case "name": + if err := func() error { + s.Name.Reset() + if err := s.Name.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "supported_feature_ids": + if err := func() error { + s.SupportedFeatureIds = make([]Features, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem Features + if err := elem.Decode(d); err != nil { + return err + } + s.SupportedFeatureIds = append(s.SupportedFeatureIds, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"supported_feature_ids\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode GetConnectorTypesOKItem") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *GetConnectorTypesOKItem) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetConnectorTypesOKItem) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes GetConnectorsOKApplicationJSON as json. +func (s GetConnectorsOKApplicationJSON) Encode(e *jx.Encoder) { + unwrapped := []GetConnectorsOKItem(s) + + e.ArrStart() + for _, elem := range unwrapped { + elem.Encode(e) + } + e.ArrEnd() +} + +// Decode decodes GetConnectorsOKApplicationJSON from json. +func (s *GetConnectorsOKApplicationJSON) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetConnectorsOKApplicationJSON to nil") + } + var unwrapped []GetConnectorsOKItem + if err := func() error { + unwrapped = make([]GetConnectorsOKItem, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem GetConnectorsOKItem + if err := elem.Decode(d); err != nil { + return err + } + unwrapped = append(unwrapped, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "alias") + } + *s = GetConnectorsOKApplicationJSON(unwrapped) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s GetConnectorsOKApplicationJSON) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetConnectorsOKApplicationJSON) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *GetConnectorsOKItem) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *GetConnectorsOKItem) encodeFields(e *jx.Encoder) { + { + e.FieldStart("connector_type_id") + s.ConnectorTypeID.Encode(e) + } + { + if s.Config.Set { + e.FieldStart("config") + s.Config.Encode(e) + } + } + { + e.FieldStart("id") + e.Str(s.ID) + } + { + if s.IsDeprecated.Set { + e.FieldStart("is_deprecated") + s.IsDeprecated.Encode(e) + } + } + { + if s.IsMissingSecrets.Set { + e.FieldStart("is_missing_secrets") + s.IsMissingSecrets.Encode(e) + } + } + { + e.FieldStart("is_preconfigured") + s.IsPreconfigured.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("referenced_by_count") + e.Int(s.ReferencedByCount) + } +} + +var jsonFieldsNameOfGetConnectorsOKItem = [8]string{ + 0: "connector_type_id", + 1: "config", + 2: "id", + 3: "is_deprecated", + 4: "is_missing_secrets", + 5: "is_preconfigured", + 6: "name", + 7: "referenced_by_count", +} + +// Decode decodes GetConnectorsOKItem from json. +func (s *GetConnectorsOKItem) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetConnectorsOKItem to nil") + } + var requiredBitSet [1]uint8 + s.setDefaults() + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "connector_type_id": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.ConnectorTypeID.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"connector_type_id\"") + } + case "config": + if err := func() error { + s.Config.Reset() + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "id": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := d.Str() + s.ID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "is_deprecated": + if err := func() error { + s.IsDeprecated.Reset() + if err := s.IsDeprecated.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_deprecated\"") + } + case "is_missing_secrets": + if err := func() error { + s.IsMissingSecrets.Reset() + if err := s.IsMissingSecrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_missing_secrets\"") + } + case "is_preconfigured": + requiredBitSet[0] |= 1 << 5 + if err := func() error { + if err := s.IsPreconfigured.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"is_preconfigured\"") + } + case "name": + requiredBitSet[0] |= 1 << 6 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "referenced_by_count": + requiredBitSet[0] |= 1 << 7 + if err := func() error { + v, err := d.Int() + s.ReferencedByCount = int(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"referenced_by_count\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode GetConnectorsOKItem") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b11100101, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfGetConnectorsOKItem) { + name = jsonFieldsNameOfGetConnectorsOKItem[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *GetConnectorsOKItem) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetConnectorsOKItem) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s GetConnectorsOKItemConfig) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields implements json.Marshaler. +func (s GetConnectorsOKItemConfig) encodeFields(e *jx.Encoder) { + for k, elem := range s { + e.FieldStart(k) + + if len(elem) != 0 { + e.Raw(elem) + } + } +} + +// Decode decodes GetConnectorsOKItemConfig from json. +func (s *GetConnectorsOKItemConfig) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode GetConnectorsOKItemConfig to nil") + } + m := s.init() + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + var elem jx.Raw + if err := func() error { + v, err := d.RawAppend(nil) + elem = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrapf(err, "decode field %q", k) + } + m[string(k)] = elem + return nil + }); err != nil { + return errors.Wrap(err, "decode GetConnectorsOKItemConfig") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s GetConnectorsOKItemConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *GetConnectorsOKItemConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes IsDeprecated as json. +func (s IsDeprecated) Encode(e *jx.Encoder) { + unwrapped := bool(s) + + e.Bool(unwrapped) +} + +// Decode decodes IsDeprecated from json. +func (s *IsDeprecated) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode IsDeprecated to nil") + } + var unwrapped bool + if err := func() error { + v, err := d.Bool() + unwrapped = bool(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "alias") + } + *s = IsDeprecated(unwrapped) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s IsDeprecated) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *IsDeprecated) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes IsMissingSecrets as json. +func (s IsMissingSecrets) Encode(e *jx.Encoder) { + unwrapped := bool(s) + + e.Bool(unwrapped) +} + +// Decode decodes IsMissingSecrets from json. +func (s *IsMissingSecrets) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode IsMissingSecrets to nil") + } + var unwrapped bool + if err := func() error { + v, err := d.Bool() + unwrapped = bool(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "alias") + } + *s = IsMissingSecrets(unwrapped) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s IsMissingSecrets) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *IsMissingSecrets) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes IsPreconfigured as json. +func (s IsPreconfigured) Encode(e *jx.Encoder) { + unwrapped := bool(s) + + e.Bool(unwrapped) +} + +// Decode decodes IsPreconfigured from json. +func (s *IsPreconfigured) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode IsPreconfigured to nil") + } + var unwrapped bool + if err := func() error { + v, err := d.Bool() + unwrapped = bool(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "alias") + } + *s = IsPreconfigured(unwrapped) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s IsPreconfigured) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *IsPreconfigured) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *LegacyCreateConnectorReq) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *LegacyCreateConnectorReq) encodeFields(e *jx.Encoder) { + { + if s.ActionTypeId.Set { + e.FieldStart("actionTypeId") + s.ActionTypeId.Encode(e) + } + } + { + if s.Config != nil { + e.FieldStart("config") + s.Config.Encode(e) + } + } + { + if s.Name.Set { + e.FieldStart("name") + s.Name.Encode(e) + } + } + { + if s.Secrets != nil { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } + } +} + +var jsonFieldsNameOfLegacyCreateConnectorReq = [4]string{ + 0: "actionTypeId", + 1: "config", + 2: "name", + 3: "secrets", +} + +// Decode decodes LegacyCreateConnectorReq from json. +func (s *LegacyCreateConnectorReq) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode LegacyCreateConnectorReq to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "actionTypeId": + if err := func() error { + s.ActionTypeId.Reset() + if err := s.ActionTypeId.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"actionTypeId\"") + } + case "config": + if err := func() error { + s.Config = nil + var elem LegacyCreateConnectorReqConfig + if err := elem.Decode(d); err != nil { + return err + } + s.Config = &elem + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + if err := func() error { + s.Name.Reset() + if err := s.Name.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + if err := func() error { + s.Secrets = nil + var elem LegacyCreateConnectorReqSecrets + if err := elem.Decode(d); err != nil { + return err + } + s.Secrets = &elem + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode LegacyCreateConnectorReq") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *LegacyCreateConnectorReq) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *LegacyCreateConnectorReq) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *LegacyCreateConnectorReqConfig) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *LegacyCreateConnectorReqConfig) encodeFields(e *jx.Encoder) { +} + +var jsonFieldsNameOfLegacyCreateConnectorReqConfig = [0]string{} + +// Decode decodes LegacyCreateConnectorReqConfig from json. +func (s *LegacyCreateConnectorReqConfig) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode LegacyCreateConnectorReqConfig to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode LegacyCreateConnectorReqConfig") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *LegacyCreateConnectorReqConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *LegacyCreateConnectorReqConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *LegacyCreateConnectorReqSecrets) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *LegacyCreateConnectorReqSecrets) encodeFields(e *jx.Encoder) { +} + +var jsonFieldsNameOfLegacyCreateConnectorReqSecrets = [0]string{} + +// Decode decodes LegacyCreateConnectorReqSecrets from json. +func (s *LegacyCreateConnectorReqSecrets) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode LegacyCreateConnectorReqSecrets to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode LegacyCreateConnectorReqSecrets") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *LegacyCreateConnectorReqSecrets) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *LegacyCreateConnectorReqSecrets) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes LegacyGetConnectorTypesOKApplicationJSON as json. +func (s LegacyGetConnectorTypesOKApplicationJSON) Encode(e *jx.Encoder) { + unwrapped := []LegacyGetConnectorTypesOKItem(s) + + e.ArrStart() + for _, elem := range unwrapped { + elem.Encode(e) + } + e.ArrEnd() +} + +// Decode decodes LegacyGetConnectorTypesOKApplicationJSON from json. +func (s *LegacyGetConnectorTypesOKApplicationJSON) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode LegacyGetConnectorTypesOKApplicationJSON to nil") + } + var unwrapped []LegacyGetConnectorTypesOKItem + if err := func() error { + unwrapped = make([]LegacyGetConnectorTypesOKItem, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem LegacyGetConnectorTypesOKItem + if err := elem.Decode(d); err != nil { + return err + } + unwrapped = append(unwrapped, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "alias") + } + *s = LegacyGetConnectorTypesOKApplicationJSON(unwrapped) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s LegacyGetConnectorTypesOKApplicationJSON) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *LegacyGetConnectorTypesOKApplicationJSON) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *LegacyGetConnectorTypesOKItem) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *LegacyGetConnectorTypesOKItem) encodeFields(e *jx.Encoder) { + { + if s.Enabled.Set { + e.FieldStart("enabled") + s.Enabled.Encode(e) + } + } + { + if s.EnabledInConfig.Set { + e.FieldStart("enabledInConfig") + s.EnabledInConfig.Encode(e) + } + } + { + if s.EnabledInLicense.Set { + e.FieldStart("enabledInLicense") + s.EnabledInLicense.Encode(e) + } + } + { + if s.ID.Set { + e.FieldStart("id") + s.ID.Encode(e) + } + } + { + if s.MinimumLicenseRequired.Set { + e.FieldStart("minimumLicenseRequired") + s.MinimumLicenseRequired.Encode(e) + } + } + { + if s.Name.Set { + e.FieldStart("name") + s.Name.Encode(e) + } + } +} + +var jsonFieldsNameOfLegacyGetConnectorTypesOKItem = [6]string{ + 0: "enabled", + 1: "enabledInConfig", + 2: "enabledInLicense", + 3: "id", + 4: "minimumLicenseRequired", + 5: "name", +} + +// Decode decodes LegacyGetConnectorTypesOKItem from json. +func (s *LegacyGetConnectorTypesOKItem) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode LegacyGetConnectorTypesOKItem to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "enabled": + if err := func() error { + s.Enabled.Reset() + if err := s.Enabled.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"enabled\"") + } + case "enabledInConfig": + if err := func() error { + s.EnabledInConfig.Reset() + if err := s.EnabledInConfig.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"enabledInConfig\"") + } + case "enabledInLicense": + if err := func() error { + s.EnabledInLicense.Reset() + if err := s.EnabledInLicense.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"enabledInLicense\"") + } + case "id": + if err := func() error { + s.ID.Reset() + if err := s.ID.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "minimumLicenseRequired": + if err := func() error { + s.MinimumLicenseRequired.Reset() + if err := s.MinimumLicenseRequired.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"minimumLicenseRequired\"") + } + case "name": + if err := func() error { + s.Name.Reset() + if err := s.Name.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode LegacyGetConnectorTypesOKItem") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *LegacyGetConnectorTypesOKItem) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *LegacyGetConnectorTypesOKItem) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes LegacyGetConnectorsOKApplicationJSON as json. +func (s LegacyGetConnectorsOKApplicationJSON) Encode(e *jx.Encoder) { + unwrapped := []ActionResponseProperties(s) + + e.ArrStart() + for _, elem := range unwrapped { + elem.Encode(e) + } + e.ArrEnd() +} + +// Decode decodes LegacyGetConnectorsOKApplicationJSON from json. +func (s *LegacyGetConnectorsOKApplicationJSON) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode LegacyGetConnectorsOKApplicationJSON to nil") + } + var unwrapped []ActionResponseProperties + if err := func() error { + unwrapped = make([]ActionResponseProperties, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem ActionResponseProperties + if err := elem.Decode(d); err != nil { + return err + } + unwrapped = append(unwrapped, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "alias") + } + *s = LegacyGetConnectorsOKApplicationJSON(unwrapped) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s LegacyGetConnectorsOKApplicationJSON) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *LegacyGetConnectorsOKApplicationJSON) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *LegacyRunConnectorOK) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *LegacyRunConnectorOK) encodeFields(e *jx.Encoder) { + { + if s.ActionId.Set { + e.FieldStart("actionId") + s.ActionId.Encode(e) + } + } + { + if s.Data.Set { + e.FieldStart("data") + s.Data.Encode(e) + } + } + { + if s.Status.Set { + e.FieldStart("status") + s.Status.Encode(e) + } + } +} + +var jsonFieldsNameOfLegacyRunConnectorOK = [3]string{ + 0: "actionId", + 1: "data", + 2: "status", +} + +// Decode decodes LegacyRunConnectorOK from json. +func (s *LegacyRunConnectorOK) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode LegacyRunConnectorOK to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "actionId": + if err := func() error { + s.ActionId.Reset() + if err := s.ActionId.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"actionId\"") + } + case "data": + if err := func() error { + s.Data.Reset() + if err := s.Data.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"data\"") + } + case "status": + if err := func() error { + s.Status.Reset() + if err := s.Status.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"status\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode LegacyRunConnectorOK") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *LegacyRunConnectorOK) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *LegacyRunConnectorOK) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes LegacyRunConnectorOKData as json. +func (s LegacyRunConnectorOKData) Encode(e *jx.Encoder) { + switch s.Type { + case LegacyRunConnectorOKData0LegacyRunConnectorOKData: + s.LegacyRunConnectorOKData0.Encode(e) + case LegacyRunConnectorOKData1ItemArrayLegacyRunConnectorOKData: + e.ArrStart() + for _, elem := range s.LegacyRunConnectorOKData1ItemArray { + elem.Encode(e) + } + e.ArrEnd() + } +} + +// Decode decodes LegacyRunConnectorOKData from json. +func (s *LegacyRunConnectorOKData) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode LegacyRunConnectorOKData to nil") + } + // Sum type type_discriminator. + switch t := d.Next(); t { + case jx.Array: + s.LegacyRunConnectorOKData1ItemArray = make([]LegacyRunConnectorOKData1Item, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem LegacyRunConnectorOKData1Item + if err := elem.Decode(d); err != nil { + return err + } + s.LegacyRunConnectorOKData1ItemArray = append(s.LegacyRunConnectorOKData1ItemArray, elem) + return nil + }); err != nil { + return err + } + s.Type = LegacyRunConnectorOKData1ItemArrayLegacyRunConnectorOKData + case jx.Object: + if err := s.LegacyRunConnectorOKData0.Decode(d); err != nil { + return err + } + s.Type = LegacyRunConnectorOKData0LegacyRunConnectorOKData + default: + return errors.Errorf("unexpected json type %q", t) + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s LegacyRunConnectorOKData) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *LegacyRunConnectorOKData) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s LegacyRunConnectorOKData0) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields implements json.Marshaler. +func (s LegacyRunConnectorOKData0) encodeFields(e *jx.Encoder) { + for k, elem := range s { + e.FieldStart(k) + + if len(elem) != 0 { + e.Raw(elem) + } + } +} + +// Decode decodes LegacyRunConnectorOKData0 from json. +func (s *LegacyRunConnectorOKData0) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode LegacyRunConnectorOKData0 to nil") + } + m := s.init() + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + var elem jx.Raw + if err := func() error { + v, err := d.RawAppend(nil) + elem = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrapf(err, "decode field %q", k) + } + m[string(k)] = elem + return nil + }); err != nil { + return errors.Wrap(err, "decode LegacyRunConnectorOKData0") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s LegacyRunConnectorOKData0) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *LegacyRunConnectorOKData0) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *LegacyRunConnectorOKData1Item) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *LegacyRunConnectorOKData1Item) encodeFields(e *jx.Encoder) { +} + +var jsonFieldsNameOfLegacyRunConnectorOKData1Item = [0]string{} + +// Decode decodes LegacyRunConnectorOKData1Item from json. +func (s *LegacyRunConnectorOKData1Item) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode LegacyRunConnectorOKData1Item to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode LegacyRunConnectorOKData1Item") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *LegacyRunConnectorOKData1Item) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *LegacyRunConnectorOKData1Item) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *LegacyRunConnectorReq) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *LegacyRunConnectorReq) encodeFields(e *jx.Encoder) { + { + e.FieldStart("params") + s.Params.Encode(e) + } +} + +var jsonFieldsNameOfLegacyRunConnectorReq = [1]string{ + 0: "params", +} + +// Decode decodes LegacyRunConnectorReq from json. +func (s *LegacyRunConnectorReq) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode LegacyRunConnectorReq to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "params": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Params.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"params\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode LegacyRunConnectorReq") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000001, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfLegacyRunConnectorReq) { + name = jsonFieldsNameOfLegacyRunConnectorReq[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *LegacyRunConnectorReq) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *LegacyRunConnectorReq) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *LegacyRunConnectorReqParams) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *LegacyRunConnectorReqParams) encodeFields(e *jx.Encoder) { +} + +var jsonFieldsNameOfLegacyRunConnectorReqParams = [0]string{} + +// Decode decodes LegacyRunConnectorReqParams from json. +func (s *LegacyRunConnectorReqParams) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode LegacyRunConnectorReqParams to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode LegacyRunConnectorReqParams") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *LegacyRunConnectorReqParams) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *LegacyRunConnectorReqParams) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *LegacyUpdateConnectorReq) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *LegacyUpdateConnectorReq) encodeFields(e *jx.Encoder) { + { + if s.Config != nil { + e.FieldStart("config") + s.Config.Encode(e) + } + } + { + if s.Name.Set { + e.FieldStart("name") + s.Name.Encode(e) + } + } + { + if s.Secrets != nil { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } + } +} + +var jsonFieldsNameOfLegacyUpdateConnectorReq = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes LegacyUpdateConnectorReq from json. +func (s *LegacyUpdateConnectorReq) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode LegacyUpdateConnectorReq to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + if err := func() error { + s.Config = nil + var elem LegacyUpdateConnectorReqConfig + if err := elem.Decode(d); err != nil { + return err + } + s.Config = &elem + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + if err := func() error { + s.Name.Reset() + if err := s.Name.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + if err := func() error { + s.Secrets = nil + var elem LegacyUpdateConnectorReqSecrets + if err := elem.Decode(d); err != nil { + return err + } + s.Secrets = &elem + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode LegacyUpdateConnectorReq") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *LegacyUpdateConnectorReq) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *LegacyUpdateConnectorReq) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *LegacyUpdateConnectorReqConfig) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *LegacyUpdateConnectorReqConfig) encodeFields(e *jx.Encoder) { +} + +var jsonFieldsNameOfLegacyUpdateConnectorReqConfig = [0]string{} + +// Decode decodes LegacyUpdateConnectorReqConfig from json. +func (s *LegacyUpdateConnectorReqConfig) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode LegacyUpdateConnectorReqConfig to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode LegacyUpdateConnectorReqConfig") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *LegacyUpdateConnectorReqConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *LegacyUpdateConnectorReqConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *LegacyUpdateConnectorReqSecrets) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *LegacyUpdateConnectorReqSecrets) encodeFields(e *jx.Encoder) { +} + +var jsonFieldsNameOfLegacyUpdateConnectorReqSecrets = [0]string{} + +// Decode decodes LegacyUpdateConnectorReqSecrets from json. +func (s *LegacyUpdateConnectorReqSecrets) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode LegacyUpdateConnectorReqSecrets to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode LegacyUpdateConnectorReqSecrets") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *LegacyUpdateConnectorReqSecrets) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *LegacyUpdateConnectorReqSecrets) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes bool as json. +func (o OptBool) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Bool(bool(o.Value)) +} + +// Decode decodes bool from json. +func (o *OptBool) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptBool to nil") + } + o.Set = true + v, err := d.Bool() + if err != nil { + return err + } + o.Value = bool(v) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptBool) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptBool) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ConfigPropertiesCasesWebhookCreateCommentMethod as json. +func (o OptConfigPropertiesCasesWebhookCreateCommentMethod) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Str(string(o.Value)) +} + +// Decode decodes ConfigPropertiesCasesWebhookCreateCommentMethod from json. +func (o *OptConfigPropertiesCasesWebhookCreateCommentMethod) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptConfigPropertiesCasesWebhookCreateCommentMethod to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptConfigPropertiesCasesWebhookCreateCommentMethod) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptConfigPropertiesCasesWebhookCreateCommentMethod) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ConfigPropertiesCasesWebhookCreateIncidentMethod as json. +func (o OptConfigPropertiesCasesWebhookCreateIncidentMethod) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Str(string(o.Value)) +} + +// Decode decodes ConfigPropertiesCasesWebhookCreateIncidentMethod from json. +func (o *OptConfigPropertiesCasesWebhookCreateIncidentMethod) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptConfigPropertiesCasesWebhookCreateIncidentMethod to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptConfigPropertiesCasesWebhookCreateIncidentMethod) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptConfigPropertiesCasesWebhookCreateIncidentMethod) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ConfigPropertiesCasesWebhookUpdateIncidentMethod as json. +func (o OptConfigPropertiesCasesWebhookUpdateIncidentMethod) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Str(string(o.Value)) +} + +// Decode decodes ConfigPropertiesCasesWebhookUpdateIncidentMethod from json. +func (o *OptConfigPropertiesCasesWebhookUpdateIncidentMethod) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptConfigPropertiesCasesWebhookUpdateIncidentMethod to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptConfigPropertiesCasesWebhookUpdateIncidentMethod) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptConfigPropertiesCasesWebhookUpdateIncidentMethod) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ConfigPropertiesSwimlaneMappings as json. +func (o OptConfigPropertiesSwimlaneMappings) Encode(e *jx.Encoder) { + if !o.Set { + return + } + o.Value.Encode(e) +} + +// Decode decodes ConfigPropertiesSwimlaneMappings from json. +func (o *OptConfigPropertiesSwimlaneMappings) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptConfigPropertiesSwimlaneMappings to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptConfigPropertiesSwimlaneMappings) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptConfigPropertiesSwimlaneMappings) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ConfigPropertiesSwimlaneMappingsAlertIdConfig as json. +func (o OptConfigPropertiesSwimlaneMappingsAlertIdConfig) Encode(e *jx.Encoder) { + if !o.Set { + return + } + o.Value.Encode(e) +} + +// Decode decodes ConfigPropertiesSwimlaneMappingsAlertIdConfig from json. +func (o *OptConfigPropertiesSwimlaneMappingsAlertIdConfig) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptConfigPropertiesSwimlaneMappingsAlertIdConfig to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptConfigPropertiesSwimlaneMappingsAlertIdConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptConfigPropertiesSwimlaneMappingsAlertIdConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ConfigPropertiesSwimlaneMappingsCaseIdConfig as json. +func (o OptConfigPropertiesSwimlaneMappingsCaseIdConfig) Encode(e *jx.Encoder) { + if !o.Set { + return + } + o.Value.Encode(e) +} + +// Decode decodes ConfigPropertiesSwimlaneMappingsCaseIdConfig from json. +func (o *OptConfigPropertiesSwimlaneMappingsCaseIdConfig) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptConfigPropertiesSwimlaneMappingsCaseIdConfig to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptConfigPropertiesSwimlaneMappingsCaseIdConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptConfigPropertiesSwimlaneMappingsCaseIdConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ConfigPropertiesSwimlaneMappingsCaseNameConfig as json. +func (o OptConfigPropertiesSwimlaneMappingsCaseNameConfig) Encode(e *jx.Encoder) { + if !o.Set { + return + } + o.Value.Encode(e) +} + +// Decode decodes ConfigPropertiesSwimlaneMappingsCaseNameConfig from json. +func (o *OptConfigPropertiesSwimlaneMappingsCaseNameConfig) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptConfigPropertiesSwimlaneMappingsCaseNameConfig to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptConfigPropertiesSwimlaneMappingsCaseNameConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptConfigPropertiesSwimlaneMappingsCaseNameConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ConfigPropertiesSwimlaneMappingsCommentsConfig as json. +func (o OptConfigPropertiesSwimlaneMappingsCommentsConfig) Encode(e *jx.Encoder) { + if !o.Set { + return + } + o.Value.Encode(e) +} + +// Decode decodes ConfigPropertiesSwimlaneMappingsCommentsConfig from json. +func (o *OptConfigPropertiesSwimlaneMappingsCommentsConfig) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptConfigPropertiesSwimlaneMappingsCommentsConfig to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptConfigPropertiesSwimlaneMappingsCommentsConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptConfigPropertiesSwimlaneMappingsCommentsConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ConfigPropertiesSwimlaneMappingsDescriptionConfig as json. +func (o OptConfigPropertiesSwimlaneMappingsDescriptionConfig) Encode(e *jx.Encoder) { + if !o.Set { + return + } + o.Value.Encode(e) +} + +// Decode decodes ConfigPropertiesSwimlaneMappingsDescriptionConfig from json. +func (o *OptConfigPropertiesSwimlaneMappingsDescriptionConfig) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptConfigPropertiesSwimlaneMappingsDescriptionConfig to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptConfigPropertiesSwimlaneMappingsDescriptionConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptConfigPropertiesSwimlaneMappingsDescriptionConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ConfigPropertiesSwimlaneMappingsRuleNameConfig as json. +func (o OptConfigPropertiesSwimlaneMappingsRuleNameConfig) Encode(e *jx.Encoder) { + if !o.Set { + return + } + o.Value.Encode(e) +} + +// Decode decodes ConfigPropertiesSwimlaneMappingsRuleNameConfig from json. +func (o *OptConfigPropertiesSwimlaneMappingsRuleNameConfig) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptConfigPropertiesSwimlaneMappingsRuleNameConfig to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptConfigPropertiesSwimlaneMappingsRuleNameConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptConfigPropertiesSwimlaneMappingsRuleNameConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ConfigPropertiesSwimlaneMappingsSeverityConfig as json. +func (o OptConfigPropertiesSwimlaneMappingsSeverityConfig) Encode(e *jx.Encoder) { + if !o.Set { + return + } + o.Value.Encode(e) +} + +// Decode decodes ConfigPropertiesSwimlaneMappingsSeverityConfig from json. +func (o *OptConfigPropertiesSwimlaneMappingsSeverityConfig) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptConfigPropertiesSwimlaneMappingsSeverityConfig to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptConfigPropertiesSwimlaneMappingsSeverityConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptConfigPropertiesSwimlaneMappingsSeverityConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ConnectorTypes as json. +func (o OptConnectorTypes) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Str(string(o.Value)) +} + +// Decode decodes ConnectorTypes from json. +func (o *OptConnectorTypes) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptConnectorTypes to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptConnectorTypes) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptConnectorTypes) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes int as json. +func (o OptInt) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Int(int(o.Value)) +} + +// Decode decodes int from json. +func (o *OptInt) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptInt to nil") + } + o.Set = true + v, err := d.Int() + if err != nil { + return err + } + o.Value = int(v) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptInt) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptInt) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes IsDeprecated as json. +func (o OptIsDeprecated) Encode(e *jx.Encoder) { + if !o.Set { + return + } + o.Value.Encode(e) +} + +// Decode decodes IsDeprecated from json. +func (o *OptIsDeprecated) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptIsDeprecated to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptIsDeprecated) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptIsDeprecated) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes IsMissingSecrets as json. +func (o OptIsMissingSecrets) Encode(e *jx.Encoder) { + if !o.Set { + return + } + o.Value.Encode(e) +} + +// Decode decodes IsMissingSecrets from json. +func (o *OptIsMissingSecrets) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptIsMissingSecrets to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptIsMissingSecrets) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptIsMissingSecrets) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes LegacyRunConnectorOKData as json. +func (o OptLegacyRunConnectorOKData) Encode(e *jx.Encoder) { + if !o.Set { + return + } + o.Value.Encode(e) +} + +// Decode decodes LegacyRunConnectorOKData from json. +func (o *OptLegacyRunConnectorOKData) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptLegacyRunConnectorOKData to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptLegacyRunConnectorOKData) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptLegacyRunConnectorOKData) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes GetConnectorsOKItemConfig as json. +func (o OptNilGetConnectorsOKItemConfig) Encode(e *jx.Encoder) { + if !o.Set { + return + } + if o.Null { + e.Null() + return + } + o.Value.Encode(e) +} + +// Decode decodes GetConnectorsOKItemConfig from json. +func (o *OptNilGetConnectorsOKItemConfig) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptNilGetConnectorsOKItemConfig to nil") + } + if d.Next() == jx.Null { + if err := d.Null(); err != nil { + return err + } + + var v GetConnectorsOKItemConfig + o.Value = v + o.Set = true + o.Null = true + return nil + } + o.Set = true + o.Null = false + o.Value = make(GetConnectorsOKItemConfig) + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptNilGetConnectorsOKItemConfig) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptNilGetConnectorsOKItemConfig) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes string as json. +func (o OptNilString) Encode(e *jx.Encoder) { + if !o.Set { + return + } + if o.Null { + e.Null() + return + } + e.Str(string(o.Value)) +} + +// Decode decodes string from json. +func (o *OptNilString) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptNilString to nil") + } + if d.Next() == jx.Null { + if err := d.Null(); err != nil { + return err + } + + var v string + o.Value = v + o.Set = true + o.Null = true + return nil + } + o.Set = true + o.Null = false + v, err := d.Str() + if err != nil { + return err + } + o.Value = string(v) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptNilString) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptNilString) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes R401Error as json. +func (o OptR401Error) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Str(string(o.Value)) +} + +// Decode decodes R401Error from json. +func (o *OptR401Error) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptR401Error to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptR401Error) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptR401Error) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes R401StatusCode as json. +func (o OptR401StatusCode) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Int(int(o.Value)) +} + +// Decode decodes R401StatusCode from json. +func (o *OptR401StatusCode) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptR401StatusCode to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptR401StatusCode) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptR401StatusCode) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes R404Error as json. +func (o OptR404Error) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Str(string(o.Value)) +} + +// Decode decodes R404Error from json. +func (o *OptR404Error) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptR404Error to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptR404Error) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptR404Error) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes R404StatusCode as json. +func (o OptR404StatusCode) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Int(int(o.Value)) +} + +// Decode decodes R404StatusCode from json. +func (o *OptR404StatusCode) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptR404StatusCode to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptR404StatusCode) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptR404StatusCode) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes SecretsPropertiesCasesWebhook as json. +func (o OptSecretsPropertiesCasesWebhook) Encode(e *jx.Encoder) { + if !o.Set { + return + } + o.Value.Encode(e) +} + +// Decode decodes SecretsPropertiesCasesWebhook from json. +func (o *OptSecretsPropertiesCasesWebhook) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptSecretsPropertiesCasesWebhook to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptSecretsPropertiesCasesWebhook) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptSecretsPropertiesCasesWebhook) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes string as json. +func (o OptString) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Str(string(o.Value)) +} + +// Decode decodes string from json. +func (o *OptString) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptString to nil") + } + o.Set = true + v, err := d.Str() + if err != nil { + return err + } + o.Value = string(v) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptString) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptString) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *R401) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *R401) encodeFields(e *jx.Encoder) { + { + if s.Error.Set { + e.FieldStart("error") + s.Error.Encode(e) + } + } + { + if s.Message.Set { + e.FieldStart("message") + s.Message.Encode(e) + } + } + { + if s.StatusCode.Set { + e.FieldStart("statusCode") + s.StatusCode.Encode(e) + } + } +} + +var jsonFieldsNameOfR401 = [3]string{ + 0: "error", + 1: "message", + 2: "statusCode", +} + +// Decode decodes R401 from json. +func (s *R401) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode R401 to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "error": + if err := func() error { + s.Error.Reset() + if err := s.Error.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"error\"") + } + case "message": + if err := func() error { + s.Message.Reset() + if err := s.Message.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"message\"") + } + case "statusCode": + if err := func() error { + s.StatusCode.Reset() + if err := s.StatusCode.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"statusCode\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode R401") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *R401) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *R401) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes R401Error as json. +func (s R401Error) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes R401Error from json. +func (s *R401Error) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode R401Error to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch R401Error(v) { + case R401ErrorUnauthorized: + *s = R401ErrorUnauthorized + default: + *s = R401Error(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s R401Error) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *R401Error) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes R401StatusCode as json. +func (s R401StatusCode) Encode(e *jx.Encoder) { + e.Int(int(s)) +} + +// Decode decodes R401StatusCode from json. +func (s *R401StatusCode) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode R401StatusCode to nil") + } + v, err := d.Int() + if err != nil { + return err + } + *s = R401StatusCode(v) + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s R401StatusCode) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *R401StatusCode) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *R404) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *R404) encodeFields(e *jx.Encoder) { + { + if s.Error.Set { + e.FieldStart("error") + s.Error.Encode(e) + } + } + { + if s.Message.Set { + e.FieldStart("message") + s.Message.Encode(e) + } + } + { + if s.StatusCode.Set { + e.FieldStart("statusCode") + s.StatusCode.Encode(e) + } + } +} + +var jsonFieldsNameOfR404 = [3]string{ + 0: "error", + 1: "message", + 2: "statusCode", +} + +// Decode decodes R404 from json. +func (s *R404) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode R404 to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "error": + if err := func() error { + s.Error.Reset() + if err := s.Error.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"error\"") + } + case "message": + if err := func() error { + s.Message.Reset() + if err := s.Message.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"message\"") + } + case "statusCode": + if err := func() error { + s.StatusCode.Reset() + if err := s.StatusCode.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"statusCode\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode R404") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *R404) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *R404) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes R404Error as json. +func (s R404Error) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes R404Error from json. +func (s *R404Error) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode R404Error to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch R404Error(v) { + case R404ErrorNotFound: + *s = R404ErrorNotFound + default: + *s = R404Error(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s R404Error) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *R404Error) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes R404StatusCode as json. +func (s R404StatusCode) Encode(e *jx.Encoder) { + e.Int(int(s)) +} + +// Decode decodes R404StatusCode from json. +func (s *R404StatusCode) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode R404StatusCode to nil") + } + v, err := d.Int() + if err != nil { + return err + } + *s = R404StatusCode(v) + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s R404StatusCode) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *R404StatusCode) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *SecretsPropertiesCasesWebhook) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *SecretsPropertiesCasesWebhook) encodeFields(e *jx.Encoder) { + { + if s.Password.Set { + e.FieldStart("password") + s.Password.Encode(e) + } + } + { + if s.User.Set { + e.FieldStart("user") + s.User.Encode(e) + } + } +} + +var jsonFieldsNameOfSecretsPropertiesCasesWebhook = [2]string{ + 0: "password", + 1: "user", +} + +// Decode decodes SecretsPropertiesCasesWebhook from json. +func (s *SecretsPropertiesCasesWebhook) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode SecretsPropertiesCasesWebhook to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "password": + if err := func() error { + s.Password.Reset() + if err := s.Password.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"password\"") + } + case "user": + if err := func() error { + s.User.Reset() + if err := s.User.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"user\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode SecretsPropertiesCasesWebhook") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *SecretsPropertiesCasesWebhook) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *SecretsPropertiesCasesWebhook) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s SecretsPropertiesEmail) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields implements json.Marshaler. +func (s SecretsPropertiesEmail) encodeFields(e *jx.Encoder) { + for k, elem := range s { + e.FieldStart(k) + + if len(elem) != 0 { + e.Raw(elem) + } + } +} + +// Decode decodes SecretsPropertiesEmail from json. +func (s *SecretsPropertiesEmail) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode SecretsPropertiesEmail to nil") + } + m := s.init() + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + var elem jx.Raw + if err := func() error { + v, err := d.RawAppend(nil) + elem = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrapf(err, "decode field %q", k) + } + m[string(k)] = elem + return nil + }); err != nil { + return errors.Wrap(err, "decode SecretsPropertiesEmail") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s SecretsPropertiesEmail) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *SecretsPropertiesEmail) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *SecretsPropertiesJira) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *SecretsPropertiesJira) encodeFields(e *jx.Encoder) { + { + e.FieldStart("apiToken") + e.Str(s.ApiToken) + } + { + e.FieldStart("email") + e.Str(s.Email) + } +} + +var jsonFieldsNameOfSecretsPropertiesJira = [2]string{ + 0: "apiToken", + 1: "email", +} + +// Decode decodes SecretsPropertiesJira from json. +func (s *SecretsPropertiesJira) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode SecretsPropertiesJira to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "apiToken": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.ApiToken = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"apiToken\"") + } + case "email": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Email = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"email\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode SecretsPropertiesJira") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfSecretsPropertiesJira) { + name = jsonFieldsNameOfSecretsPropertiesJira[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *SecretsPropertiesJira) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *SecretsPropertiesJira) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *SecretsPropertiesOpsgenie) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *SecretsPropertiesOpsgenie) encodeFields(e *jx.Encoder) { + { + e.FieldStart("apiKey") + e.Str(s.ApiKey) + } +} + +var jsonFieldsNameOfSecretsPropertiesOpsgenie = [1]string{ + 0: "apiKey", +} + +// Decode decodes SecretsPropertiesOpsgenie from json. +func (s *SecretsPropertiesOpsgenie) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode SecretsPropertiesOpsgenie to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "apiKey": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.ApiKey = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"apiKey\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode SecretsPropertiesOpsgenie") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000001, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfSecretsPropertiesOpsgenie) { + name = jsonFieldsNameOfSecretsPropertiesOpsgenie[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *SecretsPropertiesOpsgenie) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *SecretsPropertiesOpsgenie) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s SecretsPropertiesPagerduty) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields implements json.Marshaler. +func (s SecretsPropertiesPagerduty) encodeFields(e *jx.Encoder) { + for k, elem := range s { + e.FieldStart(k) + + if len(elem) != 0 { + e.Raw(elem) + } + } +} + +// Decode decodes SecretsPropertiesPagerduty from json. +func (s *SecretsPropertiesPagerduty) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode SecretsPropertiesPagerduty to nil") + } + m := s.init() + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + var elem jx.Raw + if err := func() error { + v, err := d.RawAppend(nil) + elem = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrapf(err, "decode field %q", k) + } + m[string(k)] = elem + return nil + }); err != nil { + return errors.Wrap(err, "decode SecretsPropertiesPagerduty") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s SecretsPropertiesPagerduty) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *SecretsPropertiesPagerduty) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *SecretsPropertiesResilient) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *SecretsPropertiesResilient) encodeFields(e *jx.Encoder) { + { + e.FieldStart("apiKeyId") + e.Str(s.ApiKeyId) + } + { + e.FieldStart("apiKeySecret") + e.Str(s.ApiKeySecret) + } +} + +var jsonFieldsNameOfSecretsPropertiesResilient = [2]string{ + 0: "apiKeyId", + 1: "apiKeySecret", +} + +// Decode decodes SecretsPropertiesResilient from json. +func (s *SecretsPropertiesResilient) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode SecretsPropertiesResilient to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "apiKeyId": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.ApiKeyId = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"apiKeyId\"") + } + case "apiKeySecret": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.ApiKeySecret = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"apiKeySecret\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode SecretsPropertiesResilient") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfSecretsPropertiesResilient) { + name = jsonFieldsNameOfSecretsPropertiesResilient[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *SecretsPropertiesResilient) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *SecretsPropertiesResilient) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *SecretsPropertiesServicenow) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *SecretsPropertiesServicenow) encodeFields(e *jx.Encoder) { + { + if s.ClientSecret.Set { + e.FieldStart("clientSecret") + s.ClientSecret.Encode(e) + } + } + { + if s.Password.Set { + e.FieldStart("password") + s.Password.Encode(e) + } + } + { + if s.PrivateKey.Set { + e.FieldStart("privateKey") + s.PrivateKey.Encode(e) + } + } + { + if s.PrivateKeyPassword.Set { + e.FieldStart("privateKeyPassword") + s.PrivateKeyPassword.Encode(e) + } + } + { + if s.Username.Set { + e.FieldStart("username") + s.Username.Encode(e) + } + } +} + +var jsonFieldsNameOfSecretsPropertiesServicenow = [5]string{ + 0: "clientSecret", + 1: "password", + 2: "privateKey", + 3: "privateKeyPassword", + 4: "username", +} + +// Decode decodes SecretsPropertiesServicenow from json. +func (s *SecretsPropertiesServicenow) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode SecretsPropertiesServicenow to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "clientSecret": + if err := func() error { + s.ClientSecret.Reset() + if err := s.ClientSecret.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"clientSecret\"") + } + case "password": + if err := func() error { + s.Password.Reset() + if err := s.Password.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"password\"") + } + case "privateKey": + if err := func() error { + s.PrivateKey.Reset() + if err := s.PrivateKey.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"privateKey\"") + } + case "privateKeyPassword": + if err := func() error { + s.PrivateKeyPassword.Reset() + if err := s.PrivateKeyPassword.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"privateKeyPassword\"") + } + case "username": + if err := func() error { + s.Username.Reset() + if err := s.Username.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"username\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode SecretsPropertiesServicenow") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *SecretsPropertiesServicenow) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *SecretsPropertiesServicenow) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s SecretsPropertiesSlack) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields implements json.Marshaler. +func (s SecretsPropertiesSlack) encodeFields(e *jx.Encoder) { + for k, elem := range s { + e.FieldStart(k) + + if len(elem) != 0 { + e.Raw(elem) + } + } +} + +// Decode decodes SecretsPropertiesSlack from json. +func (s *SecretsPropertiesSlack) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode SecretsPropertiesSlack to nil") + } + m := s.init() + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + var elem jx.Raw + if err := func() error { + v, err := d.RawAppend(nil) + elem = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrapf(err, "decode field %q", k) + } + m[string(k)] = elem + return nil + }); err != nil { + return errors.Wrap(err, "decode SecretsPropertiesSlack") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s SecretsPropertiesSlack) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *SecretsPropertiesSlack) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *SecretsPropertiesSwimlane) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *SecretsPropertiesSwimlane) encodeFields(e *jx.Encoder) { + { + if s.ApiToken.Set { + e.FieldStart("apiToken") + s.ApiToken.Encode(e) + } + } +} + +var jsonFieldsNameOfSecretsPropertiesSwimlane = [1]string{ + 0: "apiToken", +} + +// Decode decodes SecretsPropertiesSwimlane from json. +func (s *SecretsPropertiesSwimlane) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode SecretsPropertiesSwimlane to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "apiToken": + if err := func() error { + s.ApiToken.Reset() + if err := s.ApiToken.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"apiToken\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode SecretsPropertiesSwimlane") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *SecretsPropertiesSwimlane) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *SecretsPropertiesSwimlane) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s SecretsPropertiesTeams) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields implements json.Marshaler. +func (s SecretsPropertiesTeams) encodeFields(e *jx.Encoder) { + for k, elem := range s { + e.FieldStart(k) + + if len(elem) != 0 { + e.Raw(elem) + } + } +} + +// Decode decodes SecretsPropertiesTeams from json. +func (s *SecretsPropertiesTeams) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode SecretsPropertiesTeams to nil") + } + m := s.init() + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + var elem jx.Raw + if err := func() error { + v, err := d.RawAppend(nil) + elem = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrapf(err, "decode field %q", k) + } + m[string(k)] = elem + return nil + }); err != nil { + return errors.Wrap(err, "decode SecretsPropertiesTeams") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s SecretsPropertiesTeams) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *SecretsPropertiesTeams) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s SecretsPropertiesTines) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields implements json.Marshaler. +func (s SecretsPropertiesTines) encodeFields(e *jx.Encoder) { + for k, elem := range s { + e.FieldStart(k) + + if len(elem) != 0 { + e.Raw(elem) + } + } +} + +// Decode decodes SecretsPropertiesTines from json. +func (s *SecretsPropertiesTines) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode SecretsPropertiesTines to nil") + } + m := s.init() + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + var elem jx.Raw + if err := func() error { + v, err := d.RawAppend(nil) + elem = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrapf(err, "decode field %q", k) + } + m[string(k)] = elem + return nil + }); err != nil { + return errors.Wrap(err, "decode SecretsPropertiesTines") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s SecretsPropertiesTines) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *SecretsPropertiesTines) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s SecretsPropertiesWebhook) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields implements json.Marshaler. +func (s SecretsPropertiesWebhook) encodeFields(e *jx.Encoder) { + for k, elem := range s { + e.FieldStart(k) + + if len(elem) != 0 { + e.Raw(elem) + } + } +} + +// Decode decodes SecretsPropertiesWebhook from json. +func (s *SecretsPropertiesWebhook) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode SecretsPropertiesWebhook to nil") + } + m := s.init() + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + var elem jx.Raw + if err := func() error { + v, err := d.RawAppend(nil) + elem = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrapf(err, "decode field %q", k) + } + m[string(k)] = elem + return nil + }); err != nil { + return errors.Wrap(err, "decode SecretsPropertiesWebhook") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s SecretsPropertiesWebhook) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *SecretsPropertiesWebhook) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s SecretsPropertiesXmatters) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields implements json.Marshaler. +func (s SecretsPropertiesXmatters) encodeFields(e *jx.Encoder) { + for k, elem := range s { + e.FieldStart(k) + + if len(elem) != 0 { + e.Raw(elem) + } + } +} + +// Decode decodes SecretsPropertiesXmatters from json. +func (s *SecretsPropertiesXmatters) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode SecretsPropertiesXmatters to nil") + } + m := s.init() + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + var elem jx.Raw + if err := func() error { + v, err := d.RawAppend(nil) + elem = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrapf(err, "decode field %q", k) + } + m[string(k)] = elem + return nil + }); err != nil { + return errors.Wrap(err, "decode SecretsPropertiesXmatters") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s SecretsPropertiesXmatters) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *SecretsPropertiesXmatters) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *UpdateConnectorBadRequest) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *UpdateConnectorBadRequest) encodeFields(e *jx.Encoder) { + { + if s.Error.Set { + e.FieldStart("error") + s.Error.Encode(e) + } + } + { + if s.Message.Set { + e.FieldStart("message") + s.Message.Encode(e) + } + } + { + if s.StatusCode.Set { + e.FieldStart("statusCode") + s.StatusCode.Encode(e) + } + } +} + +var jsonFieldsNameOfUpdateConnectorBadRequest = [3]string{ + 0: "error", + 1: "message", + 2: "statusCode", +} + +// Decode decodes UpdateConnectorBadRequest from json. +func (s *UpdateConnectorBadRequest) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode UpdateConnectorBadRequest to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "error": + if err := func() error { + s.Error.Reset() + if err := s.Error.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"error\"") + } + case "message": + if err := func() error { + s.Message.Reset() + if err := s.Message.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"message\"") + } + case "statusCode": + if err := func() error { + s.StatusCode.Reset() + if err := s.StatusCode.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"statusCode\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode UpdateConnectorBadRequest") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *UpdateConnectorBadRequest) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *UpdateConnectorBadRequest) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes UpdateConnectorReq as json. +func (s UpdateConnectorReq) Encode(e *jx.Encoder) { + switch s.Type { + case UpdateConnectorRequestCasesWebhookUpdateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".cases-webhook") + s.UpdateConnectorRequestCasesWebhook.encodeFields(e) + e.ObjEnd() + case UpdateConnectorRequestIndexUpdateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".index") + s.UpdateConnectorRequestIndex.encodeFields(e) + e.ObjEnd() + case UpdateConnectorRequestJiraUpdateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".jira") + s.UpdateConnectorRequestJira.encodeFields(e) + e.ObjEnd() + case UpdateConnectorRequestOpsgenieUpdateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".opsgenie") + s.UpdateConnectorRequestOpsgenie.encodeFields(e) + e.ObjEnd() + case UpdateConnectorRequestResilientUpdateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".resilient") + s.UpdateConnectorRequestResilient.encodeFields(e) + e.ObjEnd() + case UpdateConnectorRequestServerlogUpdateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".server-log") + s.UpdateConnectorRequestServerlog.encodeFields(e) + e.ObjEnd() + case UpdateConnectorRequestServicenowUpdateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".servicenow") + s.UpdateConnectorRequestServicenow.encodeFields(e) + e.ObjEnd() + case UpdateConnectorRequestServicenowItomUpdateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".servicenow-itom") + s.UpdateConnectorRequestServicenowItom.encodeFields(e) + e.ObjEnd() + case UpdateConnectorRequestSwimlaneUpdateConnectorReq: + e.ObjStart() + e.FieldStart("connector_type_id") + e.Str(".swimlane") + s.UpdateConnectorRequestSwimlane.encodeFields(e) + e.ObjEnd() + } +} + +// Decode decodes UpdateConnectorReq from json. +func (s *UpdateConnectorReq) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode UpdateConnectorReq to nil") + } + // Sum type discriminator. + if typ := d.Next(); typ != jx.Object { + return errors.Errorf("unexpected json type %q", typ) + } + + var found bool + if err := d.Capture(func(d *jx.Decoder) error { + return d.ObjBytes(func(d *jx.Decoder, key []byte) error { + if found { + return d.Skip() + } + switch string(key) { + case "connector_type_id": + typ, err := d.Str() + if err != nil { + return err + } + switch typ { + case ".cases-webhook": + s.Type = UpdateConnectorRequestCasesWebhookUpdateConnectorReq + found = true + case ".index": + s.Type = UpdateConnectorRequestIndexUpdateConnectorReq + found = true + case ".jira": + s.Type = UpdateConnectorRequestJiraUpdateConnectorReq + found = true + case ".opsgenie": + s.Type = UpdateConnectorRequestOpsgenieUpdateConnectorReq + found = true + case ".resilient": + s.Type = UpdateConnectorRequestResilientUpdateConnectorReq + found = true + case ".server-log": + s.Type = UpdateConnectorRequestServerlogUpdateConnectorReq + found = true + case ".servicenow": + s.Type = UpdateConnectorRequestServicenowUpdateConnectorReq + found = true + case ".servicenow-itom": + s.Type = UpdateConnectorRequestServicenowItomUpdateConnectorReq + found = true + case ".swimlane": + s.Type = UpdateConnectorRequestSwimlaneUpdateConnectorReq + found = true + default: + return errors.Errorf("unknown type %s", typ) + } + return nil + } + return d.Skip() + }) + }); err != nil { + return errors.Wrap(err, "capture") + } + if !found { + return errors.New("unable to detect sum type variant") + } + switch s.Type { + case UpdateConnectorRequestCasesWebhookUpdateConnectorReq: + if err := s.UpdateConnectorRequestCasesWebhook.Decode(d); err != nil { + return err + } + case UpdateConnectorRequestIndexUpdateConnectorReq: + if err := s.UpdateConnectorRequestIndex.Decode(d); err != nil { + return err + } + case UpdateConnectorRequestJiraUpdateConnectorReq: + if err := s.UpdateConnectorRequestJira.Decode(d); err != nil { + return err + } + case UpdateConnectorRequestOpsgenieUpdateConnectorReq: + if err := s.UpdateConnectorRequestOpsgenie.Decode(d); err != nil { + return err + } + case UpdateConnectorRequestResilientUpdateConnectorReq: + if err := s.UpdateConnectorRequestResilient.Decode(d); err != nil { + return err + } + case UpdateConnectorRequestServerlogUpdateConnectorReq: + if err := s.UpdateConnectorRequestServerlog.Decode(d); err != nil { + return err + } + case UpdateConnectorRequestServicenowUpdateConnectorReq: + if err := s.UpdateConnectorRequestServicenow.Decode(d); err != nil { + return err + } + case UpdateConnectorRequestServicenowItomUpdateConnectorReq: + if err := s.UpdateConnectorRequestServicenowItom.Decode(d); err != nil { + return err + } + case UpdateConnectorRequestSwimlaneUpdateConnectorReq: + if err := s.UpdateConnectorRequestSwimlane.Decode(d); err != nil { + return err + } + default: + return errors.Errorf("inferred invalid type: %s", s.Type) + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s UpdateConnectorReq) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *UpdateConnectorReq) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *UpdateConnectorRequestCasesWebhook) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *UpdateConnectorRequestCasesWebhook) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + if s.Secrets.Set { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } + } +} + +var jsonFieldsNameOfUpdateConnectorRequestCasesWebhook = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes UpdateConnectorRequestCasesWebhook from json. +func (s *UpdateConnectorRequestCasesWebhook) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode UpdateConnectorRequestCasesWebhook to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + if err := func() error { + s.Secrets.Reset() + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode UpdateConnectorRequestCasesWebhook") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfUpdateConnectorRequestCasesWebhook) { + name = jsonFieldsNameOfUpdateConnectorRequestCasesWebhook[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *UpdateConnectorRequestCasesWebhook) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *UpdateConnectorRequestCasesWebhook) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *UpdateConnectorRequestIndex) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *UpdateConnectorRequestIndex) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfUpdateConnectorRequestIndex = [2]string{ + 0: "config", + 1: "name", +} + +// Decode decodes UpdateConnectorRequestIndex from json. +func (s *UpdateConnectorRequestIndex) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode UpdateConnectorRequestIndex to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode UpdateConnectorRequestIndex") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfUpdateConnectorRequestIndex) { + name = jsonFieldsNameOfUpdateConnectorRequestIndex[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *UpdateConnectorRequestIndex) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *UpdateConnectorRequestIndex) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *UpdateConnectorRequestJira) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *UpdateConnectorRequestJira) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfUpdateConnectorRequestJira = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes UpdateConnectorRequestJira from json. +func (s *UpdateConnectorRequestJira) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode UpdateConnectorRequestJira to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode UpdateConnectorRequestJira") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfUpdateConnectorRequestJira) { + name = jsonFieldsNameOfUpdateConnectorRequestJira[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *UpdateConnectorRequestJira) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *UpdateConnectorRequestJira) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *UpdateConnectorRequestOpsgenie) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *UpdateConnectorRequestOpsgenie) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfUpdateConnectorRequestOpsgenie = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes UpdateConnectorRequestOpsgenie from json. +func (s *UpdateConnectorRequestOpsgenie) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode UpdateConnectorRequestOpsgenie to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode UpdateConnectorRequestOpsgenie") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfUpdateConnectorRequestOpsgenie) { + name = jsonFieldsNameOfUpdateConnectorRequestOpsgenie[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *UpdateConnectorRequestOpsgenie) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *UpdateConnectorRequestOpsgenie) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *UpdateConnectorRequestResilient) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *UpdateConnectorRequestResilient) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfUpdateConnectorRequestResilient = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes UpdateConnectorRequestResilient from json. +func (s *UpdateConnectorRequestResilient) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode UpdateConnectorRequestResilient to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode UpdateConnectorRequestResilient") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfUpdateConnectorRequestResilient) { + name = jsonFieldsNameOfUpdateConnectorRequestResilient[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *UpdateConnectorRequestResilient) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *UpdateConnectorRequestResilient) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *UpdateConnectorRequestServerlog) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *UpdateConnectorRequestServerlog) encodeFields(e *jx.Encoder) { + { + e.FieldStart("name") + e.Str(s.Name) + } +} + +var jsonFieldsNameOfUpdateConnectorRequestServerlog = [1]string{ + 0: "name", +} + +// Decode decodes UpdateConnectorRequestServerlog from json. +func (s *UpdateConnectorRequestServerlog) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode UpdateConnectorRequestServerlog to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "name": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode UpdateConnectorRequestServerlog") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000001, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfUpdateConnectorRequestServerlog) { + name = jsonFieldsNameOfUpdateConnectorRequestServerlog[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *UpdateConnectorRequestServerlog) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *UpdateConnectorRequestServerlog) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *UpdateConnectorRequestServicenow) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *UpdateConnectorRequestServicenow) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfUpdateConnectorRequestServicenow = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes UpdateConnectorRequestServicenow from json. +func (s *UpdateConnectorRequestServicenow) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode UpdateConnectorRequestServicenow to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode UpdateConnectorRequestServicenow") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfUpdateConnectorRequestServicenow) { + name = jsonFieldsNameOfUpdateConnectorRequestServicenow[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *UpdateConnectorRequestServicenow) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *UpdateConnectorRequestServicenow) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *UpdateConnectorRequestServicenowItom) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *UpdateConnectorRequestServicenowItom) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfUpdateConnectorRequestServicenowItom = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes UpdateConnectorRequestServicenowItom from json. +func (s *UpdateConnectorRequestServicenowItom) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode UpdateConnectorRequestServicenowItom to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode UpdateConnectorRequestServicenowItom") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfUpdateConnectorRequestServicenowItom) { + name = jsonFieldsNameOfUpdateConnectorRequestServicenowItom[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *UpdateConnectorRequestServicenowItom) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *UpdateConnectorRequestServicenowItom) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *UpdateConnectorRequestSwimlane) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *UpdateConnectorRequestSwimlane) encodeFields(e *jx.Encoder) { + { + e.FieldStart("config") + s.Config.Encode(e) + } + { + e.FieldStart("name") + e.Str(s.Name) + } + { + e.FieldStart("secrets") + s.Secrets.Encode(e) + } +} + +var jsonFieldsNameOfUpdateConnectorRequestSwimlane = [3]string{ + 0: "config", + 1: "name", + 2: "secrets", +} + +// Decode decodes UpdateConnectorRequestSwimlane from json. +func (s *UpdateConnectorRequestSwimlane) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode UpdateConnectorRequestSwimlane to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "config": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Config.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"config\"") + } + case "name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Name = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"name\"") + } + case "secrets": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + if err := s.Secrets.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"secrets\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode UpdateConnectorRequestSwimlane") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfUpdateConnectorRequestSwimlane) { + name = jsonFieldsNameOfUpdateConnectorRequestSwimlane[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *UpdateConnectorRequestSwimlane) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *UpdateConnectorRequestSwimlane) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} diff --git a/generated/connectors/oas_middleware_gen.go b/generated/connectors/oas_middleware_gen.go new file mode 100644 index 000000000..ada1fd0c6 --- /dev/null +++ b/generated/connectors/oas_middleware_gen.go @@ -0,0 +1,10 @@ +// Code generated by ogen, DO NOT EDIT. + +package connectors + +import ( + "github.com/ogen-go/ogen/middleware" +) + +// Middleware is middleware type. +type Middleware = middleware.Middleware diff --git a/generated/connectors/oas_parameters_gen.go b/generated/connectors/oas_parameters_gen.go new file mode 100644 index 000000000..9fe6bc9d0 --- /dev/null +++ b/generated/connectors/oas_parameters_gen.go @@ -0,0 +1,1642 @@ +// Code generated by ogen, DO NOT EDIT. + +package connectors + +import ( + "net/http" + "net/url" + + "github.com/go-faster/errors" + + "github.com/ogen-go/ogen/conv" + "github.com/ogen-go/ogen/middleware" + "github.com/ogen-go/ogen/ogenerrors" + "github.com/ogen-go/ogen/uri" + "github.com/ogen-go/ogen/validate" +) + +// CreateConnectorParams is parameters of createConnector operation. +type CreateConnectorParams struct { + // Cross-site request forgery protection. + KbnXSRF string + // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default + // space is used. + SpaceId string +} + +func unpackCreateConnectorParams(packed middleware.Parameters) (params CreateConnectorParams) { + { + key := middleware.ParameterKey{ + Name: "kbn-xsrf", + In: "header", + } + params.KbnXSRF = packed[key].(string) + } + { + key := middleware.ParameterKey{ + Name: "spaceId", + In: "path", + } + params.SpaceId = packed[key].(string) + } + return params +} + +func decodeCreateConnectorParams(args [1]string, argsEscaped bool, r *http.Request) (params CreateConnectorParams, _ error) { + h := uri.NewHeaderDecoder(r.Header) + // Decode header: kbn-xsrf. + if err := func() error { + cfg := uri.HeaderParameterDecodingConfig{ + Name: "kbn-xsrf", + Explode: false, + } + if err := h.HasParam(cfg); err == nil { + if err := h.DecodeParam(cfg, func(d uri.Decoder) error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.KbnXSRF = c + return nil + }); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "kbn-xsrf", + In: "header", + Err: err, + } + } + // Decode path: spaceId. + if err := func() error { + param := args[0] + if argsEscaped { + unescaped, err := url.PathUnescape(args[0]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "spaceId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.SpaceId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "spaceId", + In: "path", + Err: err, + } + } + return params, nil +} + +// DeleteConnectorParams is parameters of deleteConnector operation. +type DeleteConnectorParams struct { + // Cross-site request forgery protection. + KbnXSRF string + // An identifier for the connector. + ConnectorId string + // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default + // space is used. + SpaceId string +} + +func unpackDeleteConnectorParams(packed middleware.Parameters) (params DeleteConnectorParams) { + { + key := middleware.ParameterKey{ + Name: "kbn-xsrf", + In: "header", + } + params.KbnXSRF = packed[key].(string) + } + { + key := middleware.ParameterKey{ + Name: "connectorId", + In: "path", + } + params.ConnectorId = packed[key].(string) + } + { + key := middleware.ParameterKey{ + Name: "spaceId", + In: "path", + } + params.SpaceId = packed[key].(string) + } + return params +} + +func decodeDeleteConnectorParams(args [2]string, argsEscaped bool, r *http.Request) (params DeleteConnectorParams, _ error) { + h := uri.NewHeaderDecoder(r.Header) + // Decode header: kbn-xsrf. + if err := func() error { + cfg := uri.HeaderParameterDecodingConfig{ + Name: "kbn-xsrf", + Explode: false, + } + if err := h.HasParam(cfg); err == nil { + if err := h.DecodeParam(cfg, func(d uri.Decoder) error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.KbnXSRF = c + return nil + }); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "kbn-xsrf", + In: "header", + Err: err, + } + } + // Decode path: connectorId. + if err := func() error { + param := args[1] + if argsEscaped { + unescaped, err := url.PathUnescape(args[1]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "connectorId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.ConnectorId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "connectorId", + In: "path", + Err: err, + } + } + // Decode path: spaceId. + if err := func() error { + param := args[0] + if argsEscaped { + unescaped, err := url.PathUnescape(args[0]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "spaceId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.SpaceId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "spaceId", + In: "path", + Err: err, + } + } + return params, nil +} + +// GetConnectorParams is parameters of getConnector operation. +type GetConnectorParams struct { + // An identifier for the connector. + ConnectorId string + // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default + // space is used. + SpaceId string +} + +func unpackGetConnectorParams(packed middleware.Parameters) (params GetConnectorParams) { + { + key := middleware.ParameterKey{ + Name: "connectorId", + In: "path", + } + params.ConnectorId = packed[key].(string) + } + { + key := middleware.ParameterKey{ + Name: "spaceId", + In: "path", + } + params.SpaceId = packed[key].(string) + } + return params +} + +func decodeGetConnectorParams(args [2]string, argsEscaped bool, r *http.Request) (params GetConnectorParams, _ error) { + // Decode path: connectorId. + if err := func() error { + param := args[1] + if argsEscaped { + unescaped, err := url.PathUnescape(args[1]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "connectorId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.ConnectorId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "connectorId", + In: "path", + Err: err, + } + } + // Decode path: spaceId. + if err := func() error { + param := args[0] + if argsEscaped { + unescaped, err := url.PathUnescape(args[0]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "spaceId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.SpaceId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "spaceId", + In: "path", + Err: err, + } + } + return params, nil +} + +// GetConnectorTypesParams is parameters of getConnectorTypes operation. +type GetConnectorTypesParams struct { + // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default + // space is used. + SpaceId string + // A filter to limit the retrieved connector types to those that support a specific feature (such as + // alerting or cases). + FeatureID OptFeatures +} + +func unpackGetConnectorTypesParams(packed middleware.Parameters) (params GetConnectorTypesParams) { + { + key := middleware.ParameterKey{ + Name: "spaceId", + In: "path", + } + params.SpaceId = packed[key].(string) + } + { + key := middleware.ParameterKey{ + Name: "feature_id", + In: "query", + } + if v, ok := packed[key]; ok { + params.FeatureID = v.(OptFeatures) + } + } + return params +} + +func decodeGetConnectorTypesParams(args [1]string, argsEscaped bool, r *http.Request) (params GetConnectorTypesParams, _ error) { + q := uri.NewQueryDecoder(r.URL.Query()) + // Decode path: spaceId. + if err := func() error { + param := args[0] + if argsEscaped { + unescaped, err := url.PathUnescape(args[0]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "spaceId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.SpaceId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "spaceId", + In: "path", + Err: err, + } + } + // Decode query: feature_id. + if err := func() error { + cfg := uri.QueryParameterDecodingConfig{ + Name: "feature_id", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.HasParam(cfg); err == nil { + if err := q.DecodeParam(cfg, func(d uri.Decoder) error { + var paramsDotFeatureIDVal Features + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + paramsDotFeatureIDVal = Features(c) + return nil + }(); err != nil { + return err + } + params.FeatureID.SetTo(paramsDotFeatureIDVal) + return nil + }); err != nil { + return err + } + if err := func() error { + if params.FeatureID.Set { + if err := func() error { + if err := params.FeatureID.Value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "feature_id", + In: "query", + Err: err, + } + } + return params, nil +} + +// GetConnectorsParams is parameters of getConnectors operation. +type GetConnectorsParams struct { + // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default + // space is used. + SpaceId string +} + +func unpackGetConnectorsParams(packed middleware.Parameters) (params GetConnectorsParams) { + { + key := middleware.ParameterKey{ + Name: "spaceId", + In: "path", + } + params.SpaceId = packed[key].(string) + } + return params +} + +func decodeGetConnectorsParams(args [1]string, argsEscaped bool, r *http.Request) (params GetConnectorsParams, _ error) { + // Decode path: spaceId. + if err := func() error { + param := args[0] + if argsEscaped { + unescaped, err := url.PathUnescape(args[0]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "spaceId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.SpaceId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "spaceId", + In: "path", + Err: err, + } + } + return params, nil +} + +// LegacyCreateConnectorParams is parameters of legacyCreateConnector operation. +type LegacyCreateConnectorParams struct { + // Cross-site request forgery protection. + KbnXSRF string + // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default + // space is used. + SpaceId string +} + +func unpackLegacyCreateConnectorParams(packed middleware.Parameters) (params LegacyCreateConnectorParams) { + { + key := middleware.ParameterKey{ + Name: "kbn-xsrf", + In: "header", + } + params.KbnXSRF = packed[key].(string) + } + { + key := middleware.ParameterKey{ + Name: "spaceId", + In: "path", + } + params.SpaceId = packed[key].(string) + } + return params +} + +func decodeLegacyCreateConnectorParams(args [1]string, argsEscaped bool, r *http.Request) (params LegacyCreateConnectorParams, _ error) { + h := uri.NewHeaderDecoder(r.Header) + // Decode header: kbn-xsrf. + if err := func() error { + cfg := uri.HeaderParameterDecodingConfig{ + Name: "kbn-xsrf", + Explode: false, + } + if err := h.HasParam(cfg); err == nil { + if err := h.DecodeParam(cfg, func(d uri.Decoder) error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.KbnXSRF = c + return nil + }); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "kbn-xsrf", + In: "header", + Err: err, + } + } + // Decode path: spaceId. + if err := func() error { + param := args[0] + if argsEscaped { + unescaped, err := url.PathUnescape(args[0]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "spaceId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.SpaceId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "spaceId", + In: "path", + Err: err, + } + } + return params, nil +} + +// LegacyDeleteConnectorParams is parameters of legacyDeleteConnector operation. +type LegacyDeleteConnectorParams struct { + // Cross-site request forgery protection. + KbnXSRF string + // An identifier for the action. + ActionId string + // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default + // space is used. + SpaceId string +} + +func unpackLegacyDeleteConnectorParams(packed middleware.Parameters) (params LegacyDeleteConnectorParams) { + { + key := middleware.ParameterKey{ + Name: "kbn-xsrf", + In: "header", + } + params.KbnXSRF = packed[key].(string) + } + { + key := middleware.ParameterKey{ + Name: "actionId", + In: "path", + } + params.ActionId = packed[key].(string) + } + { + key := middleware.ParameterKey{ + Name: "spaceId", + In: "path", + } + params.SpaceId = packed[key].(string) + } + return params +} + +func decodeLegacyDeleteConnectorParams(args [2]string, argsEscaped bool, r *http.Request) (params LegacyDeleteConnectorParams, _ error) { + h := uri.NewHeaderDecoder(r.Header) + // Decode header: kbn-xsrf. + if err := func() error { + cfg := uri.HeaderParameterDecodingConfig{ + Name: "kbn-xsrf", + Explode: false, + } + if err := h.HasParam(cfg); err == nil { + if err := h.DecodeParam(cfg, func(d uri.Decoder) error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.KbnXSRF = c + return nil + }); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "kbn-xsrf", + In: "header", + Err: err, + } + } + // Decode path: actionId. + if err := func() error { + param := args[1] + if argsEscaped { + unescaped, err := url.PathUnescape(args[1]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "actionId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.ActionId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "actionId", + In: "path", + Err: err, + } + } + // Decode path: spaceId. + if err := func() error { + param := args[0] + if argsEscaped { + unescaped, err := url.PathUnescape(args[0]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "spaceId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.SpaceId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "spaceId", + In: "path", + Err: err, + } + } + return params, nil +} + +// LegacyGetConnectorParams is parameters of legacyGetConnector operation. +type LegacyGetConnectorParams struct { + // An identifier for the action. + ActionId string + // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default + // space is used. + SpaceId string +} + +func unpackLegacyGetConnectorParams(packed middleware.Parameters) (params LegacyGetConnectorParams) { + { + key := middleware.ParameterKey{ + Name: "actionId", + In: "path", + } + params.ActionId = packed[key].(string) + } + { + key := middleware.ParameterKey{ + Name: "spaceId", + In: "path", + } + params.SpaceId = packed[key].(string) + } + return params +} + +func decodeLegacyGetConnectorParams(args [2]string, argsEscaped bool, r *http.Request) (params LegacyGetConnectorParams, _ error) { + // Decode path: actionId. + if err := func() error { + param := args[1] + if argsEscaped { + unescaped, err := url.PathUnescape(args[1]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "actionId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.ActionId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "actionId", + In: "path", + Err: err, + } + } + // Decode path: spaceId. + if err := func() error { + param := args[0] + if argsEscaped { + unescaped, err := url.PathUnescape(args[0]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "spaceId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.SpaceId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "spaceId", + In: "path", + Err: err, + } + } + return params, nil +} + +// LegacyGetConnectorTypesParams is parameters of legacyGetConnectorTypes operation. +type LegacyGetConnectorTypesParams struct { + // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default + // space is used. + SpaceId string +} + +func unpackLegacyGetConnectorTypesParams(packed middleware.Parameters) (params LegacyGetConnectorTypesParams) { + { + key := middleware.ParameterKey{ + Name: "spaceId", + In: "path", + } + params.SpaceId = packed[key].(string) + } + return params +} + +func decodeLegacyGetConnectorTypesParams(args [1]string, argsEscaped bool, r *http.Request) (params LegacyGetConnectorTypesParams, _ error) { + // Decode path: spaceId. + if err := func() error { + param := args[0] + if argsEscaped { + unescaped, err := url.PathUnescape(args[0]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "spaceId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.SpaceId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "spaceId", + In: "path", + Err: err, + } + } + return params, nil +} + +// LegacyGetConnectorsParams is parameters of legacyGetConnectors operation. +type LegacyGetConnectorsParams struct { + // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default + // space is used. + SpaceId string +} + +func unpackLegacyGetConnectorsParams(packed middleware.Parameters) (params LegacyGetConnectorsParams) { + { + key := middleware.ParameterKey{ + Name: "spaceId", + In: "path", + } + params.SpaceId = packed[key].(string) + } + return params +} + +func decodeLegacyGetConnectorsParams(args [1]string, argsEscaped bool, r *http.Request) (params LegacyGetConnectorsParams, _ error) { + // Decode path: spaceId. + if err := func() error { + param := args[0] + if argsEscaped { + unescaped, err := url.PathUnescape(args[0]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "spaceId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.SpaceId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "spaceId", + In: "path", + Err: err, + } + } + return params, nil +} + +// LegacyRunConnectorParams is parameters of legacyRunConnector operation. +type LegacyRunConnectorParams struct { + // Cross-site request forgery protection. + KbnXSRF string + // An identifier for the action. + ActionId string + // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default + // space is used. + SpaceId string +} + +func unpackLegacyRunConnectorParams(packed middleware.Parameters) (params LegacyRunConnectorParams) { + { + key := middleware.ParameterKey{ + Name: "kbn-xsrf", + In: "header", + } + params.KbnXSRF = packed[key].(string) + } + { + key := middleware.ParameterKey{ + Name: "actionId", + In: "path", + } + params.ActionId = packed[key].(string) + } + { + key := middleware.ParameterKey{ + Name: "spaceId", + In: "path", + } + params.SpaceId = packed[key].(string) + } + return params +} + +func decodeLegacyRunConnectorParams(args [2]string, argsEscaped bool, r *http.Request) (params LegacyRunConnectorParams, _ error) { + h := uri.NewHeaderDecoder(r.Header) + // Decode header: kbn-xsrf. + if err := func() error { + cfg := uri.HeaderParameterDecodingConfig{ + Name: "kbn-xsrf", + Explode: false, + } + if err := h.HasParam(cfg); err == nil { + if err := h.DecodeParam(cfg, func(d uri.Decoder) error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.KbnXSRF = c + return nil + }); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "kbn-xsrf", + In: "header", + Err: err, + } + } + // Decode path: actionId. + if err := func() error { + param := args[1] + if argsEscaped { + unescaped, err := url.PathUnescape(args[1]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "actionId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.ActionId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "actionId", + In: "path", + Err: err, + } + } + // Decode path: spaceId. + if err := func() error { + param := args[0] + if argsEscaped { + unescaped, err := url.PathUnescape(args[0]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "spaceId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.SpaceId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "spaceId", + In: "path", + Err: err, + } + } + return params, nil +} + +// LegacyUpdateConnectorParams is parameters of legacyUpdateConnector operation. +type LegacyUpdateConnectorParams struct { + // Cross-site request forgery protection. + KbnXSRF string + // An identifier for the action. + ActionId string + // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default + // space is used. + SpaceId string +} + +func unpackLegacyUpdateConnectorParams(packed middleware.Parameters) (params LegacyUpdateConnectorParams) { + { + key := middleware.ParameterKey{ + Name: "kbn-xsrf", + In: "header", + } + params.KbnXSRF = packed[key].(string) + } + { + key := middleware.ParameterKey{ + Name: "actionId", + In: "path", + } + params.ActionId = packed[key].(string) + } + { + key := middleware.ParameterKey{ + Name: "spaceId", + In: "path", + } + params.SpaceId = packed[key].(string) + } + return params +} + +func decodeLegacyUpdateConnectorParams(args [2]string, argsEscaped bool, r *http.Request) (params LegacyUpdateConnectorParams, _ error) { + h := uri.NewHeaderDecoder(r.Header) + // Decode header: kbn-xsrf. + if err := func() error { + cfg := uri.HeaderParameterDecodingConfig{ + Name: "kbn-xsrf", + Explode: false, + } + if err := h.HasParam(cfg); err == nil { + if err := h.DecodeParam(cfg, func(d uri.Decoder) error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.KbnXSRF = c + return nil + }); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "kbn-xsrf", + In: "header", + Err: err, + } + } + // Decode path: actionId. + if err := func() error { + param := args[1] + if argsEscaped { + unescaped, err := url.PathUnescape(args[1]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "actionId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.ActionId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "actionId", + In: "path", + Err: err, + } + } + // Decode path: spaceId. + if err := func() error { + param := args[0] + if argsEscaped { + unescaped, err := url.PathUnescape(args[0]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "spaceId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.SpaceId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "spaceId", + In: "path", + Err: err, + } + } + return params, nil +} + +// UpdateConnectorParams is parameters of updateConnector operation. +type UpdateConnectorParams struct { + // Cross-site request forgery protection. + KbnXSRF string + // An identifier for the connector. + ConnectorId string + // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default + // space is used. + SpaceId string +} + +func unpackUpdateConnectorParams(packed middleware.Parameters) (params UpdateConnectorParams) { + { + key := middleware.ParameterKey{ + Name: "kbn-xsrf", + In: "header", + } + params.KbnXSRF = packed[key].(string) + } + { + key := middleware.ParameterKey{ + Name: "connectorId", + In: "path", + } + params.ConnectorId = packed[key].(string) + } + { + key := middleware.ParameterKey{ + Name: "spaceId", + In: "path", + } + params.SpaceId = packed[key].(string) + } + return params +} + +func decodeUpdateConnectorParams(args [2]string, argsEscaped bool, r *http.Request) (params UpdateConnectorParams, _ error) { + h := uri.NewHeaderDecoder(r.Header) + // Decode header: kbn-xsrf. + if err := func() error { + cfg := uri.HeaderParameterDecodingConfig{ + Name: "kbn-xsrf", + Explode: false, + } + if err := h.HasParam(cfg); err == nil { + if err := h.DecodeParam(cfg, func(d uri.Decoder) error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.KbnXSRF = c + return nil + }); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "kbn-xsrf", + In: "header", + Err: err, + } + } + // Decode path: connectorId. + if err := func() error { + param := args[1] + if argsEscaped { + unescaped, err := url.PathUnescape(args[1]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "connectorId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.ConnectorId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "connectorId", + In: "path", + Err: err, + } + } + // Decode path: spaceId. + if err := func() error { + param := args[0] + if argsEscaped { + unescaped, err := url.PathUnescape(args[0]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "spaceId", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.SpaceId = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "spaceId", + In: "path", + Err: err, + } + } + return params, nil +} diff --git a/generated/connectors/oas_request_decoders_gen.go b/generated/connectors/oas_request_decoders_gen.go new file mode 100644 index 000000000..dc622b548 --- /dev/null +++ b/generated/connectors/oas_request_decoders_gen.go @@ -0,0 +1,347 @@ +// Code generated by ogen, DO NOT EDIT. + +package connectors + +import ( + "io" + "mime" + "net/http" + + "github.com/go-faster/errors" + "github.com/go-faster/jx" + "go.uber.org/multierr" + + "github.com/ogen-go/ogen/ogenerrors" + "github.com/ogen-go/ogen/validate" +) + +func (s *Server) decodeCreateConnectorRequest(r *http.Request) ( + req CreateConnectorReq, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = multierr.Append(merr, c()) + } + return merr + } + defer func() { + if rerr != nil { + rerr = multierr.Append(rerr, close()) + } + }() + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, close, validate.ErrBodyRequired + } + buf, err := io.ReadAll(r.Body) + if err != nil { + return req, close, err + } + + if len(buf) == 0 { + return req, close, validate.ErrBodyRequired + } + + d := jx.DecodeBytes(buf) + + var request CreateConnectorReq + if err := func() error { + if err := request.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err + } + if err := func() error { + if err := request.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return req, close, errors.Wrap(err, "validate") + } + return request, close, nil + default: + return req, close, validate.InvalidContentType(ct) + } +} + +func (s *Server) decodeLegacyCreateConnectorRequest(r *http.Request) ( + req *LegacyCreateConnectorReq, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = multierr.Append(merr, c()) + } + return merr + } + defer func() { + if rerr != nil { + rerr = multierr.Append(rerr, close()) + } + }() + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, close, validate.ErrBodyRequired + } + buf, err := io.ReadAll(r.Body) + if err != nil { + return req, close, err + } + + if len(buf) == 0 { + return req, close, validate.ErrBodyRequired + } + + d := jx.DecodeBytes(buf) + + var request LegacyCreateConnectorReq + if err := func() error { + if err := request.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err + } + return &request, close, nil + default: + return req, close, validate.InvalidContentType(ct) + } +} + +func (s *Server) decodeLegacyRunConnectorRequest(r *http.Request) ( + req *LegacyRunConnectorReq, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = multierr.Append(merr, c()) + } + return merr + } + defer func() { + if rerr != nil { + rerr = multierr.Append(rerr, close()) + } + }() + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, close, validate.ErrBodyRequired + } + buf, err := io.ReadAll(r.Body) + if err != nil { + return req, close, err + } + + if len(buf) == 0 { + return req, close, validate.ErrBodyRequired + } + + d := jx.DecodeBytes(buf) + + var request LegacyRunConnectorReq + if err := func() error { + if err := request.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err + } + return &request, close, nil + default: + return req, close, validate.InvalidContentType(ct) + } +} + +func (s *Server) decodeLegacyUpdateConnectorRequest(r *http.Request) ( + req *LegacyUpdateConnectorReq, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = multierr.Append(merr, c()) + } + return merr + } + defer func() { + if rerr != nil { + rerr = multierr.Append(rerr, close()) + } + }() + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, close, validate.ErrBodyRequired + } + buf, err := io.ReadAll(r.Body) + if err != nil { + return req, close, err + } + + if len(buf) == 0 { + return req, close, validate.ErrBodyRequired + } + + d := jx.DecodeBytes(buf) + + var request LegacyUpdateConnectorReq + if err := func() error { + if err := request.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err + } + return &request, close, nil + default: + return req, close, validate.InvalidContentType(ct) + } +} + +func (s *Server) decodeUpdateConnectorRequest(r *http.Request) ( + req UpdateConnectorReq, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = multierr.Append(merr, c()) + } + return merr + } + defer func() { + if rerr != nil { + rerr = multierr.Append(rerr, close()) + } + }() + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, close, validate.ErrBodyRequired + } + buf, err := io.ReadAll(r.Body) + if err != nil { + return req, close, err + } + + if len(buf) == 0 { + return req, close, validate.ErrBodyRequired + } + + d := jx.DecodeBytes(buf) + + var request UpdateConnectorReq + if err := func() error { + if err := request.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, close, err + } + if err := func() error { + if err := request.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return req, close, errors.Wrap(err, "validate") + } + return request, close, nil + default: + return req, close, validate.InvalidContentType(ct) + } +} diff --git a/generated/connectors/oas_request_encoders_gen.go b/generated/connectors/oas_request_encoders_gen.go new file mode 100644 index 000000000..ce7797465 --- /dev/null +++ b/generated/connectors/oas_request_encoders_gen.go @@ -0,0 +1,82 @@ +// Code generated by ogen, DO NOT EDIT. + +package connectors + +import ( + "bytes" + "net/http" + + "github.com/go-faster/jx" + + ht "github.com/ogen-go/ogen/http" +) + +func encodeCreateConnectorRequest( + req CreateConnectorReq, + r *http.Request, +) error { + const contentType = "application/json" + e := jx.GetEncoder() + { + req.Encode(e) + } + encoded := e.Bytes() + ht.SetBody(r, bytes.NewReader(encoded), contentType) + return nil +} + +func encodeLegacyCreateConnectorRequest( + req *LegacyCreateConnectorReq, + r *http.Request, +) error { + const contentType = "application/json" + e := jx.GetEncoder() + { + req.Encode(e) + } + encoded := e.Bytes() + ht.SetBody(r, bytes.NewReader(encoded), contentType) + return nil +} + +func encodeLegacyRunConnectorRequest( + req *LegacyRunConnectorReq, + r *http.Request, +) error { + const contentType = "application/json" + e := jx.GetEncoder() + { + req.Encode(e) + } + encoded := e.Bytes() + ht.SetBody(r, bytes.NewReader(encoded), contentType) + return nil +} + +func encodeLegacyUpdateConnectorRequest( + req *LegacyUpdateConnectorReq, + r *http.Request, +) error { + const contentType = "application/json" + e := jx.GetEncoder() + { + req.Encode(e) + } + encoded := e.Bytes() + ht.SetBody(r, bytes.NewReader(encoded), contentType) + return nil +} + +func encodeUpdateConnectorRequest( + req UpdateConnectorReq, + r *http.Request, +) error { + const contentType = "application/json" + e := jx.GetEncoder() + { + req.Encode(e) + } + encoded := e.Bytes() + ht.SetBody(r, bytes.NewReader(encoded), contentType) + return nil +} diff --git a/generated/connectors/oas_response_decoders_gen.go b/generated/connectors/oas_response_decoders_gen.go new file mode 100644 index 000000000..862a21260 --- /dev/null +++ b/generated/connectors/oas_response_decoders_gen.go @@ -0,0 +1,1079 @@ +// Code generated by ogen, DO NOT EDIT. + +package connectors + +import ( + "io" + "mime" + "net/http" + + "github.com/go-faster/errors" + "github.com/go-faster/jx" + + "github.com/ogen-go/ogen/ogenerrors" + "github.com/ogen-go/ogen/validate" +) + +func decodeCreateConnectorResponse(resp *http.Response) (res CreateConnectorRes, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response ConnectorResponseProperties + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 401: + // Code 401. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response R401 + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodeDeleteConnectorResponse(resp *http.Response) (res DeleteConnectorRes, _ error) { + switch resp.StatusCode { + case 204: + // Code 204. + return &DeleteConnectorNoContent{}, nil + case 401: + // Code 401. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response R401 + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 404: + // Code 404. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response DeleteConnectorNotFound + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodeGetConnectorResponse(resp *http.Response) (res GetConnectorRes, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response ConnectorResponseProperties + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 401: + // Code 401. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response R401 + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 404: + // Code 404. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response GetConnectorNotFound + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodeGetConnectorTypesResponse(resp *http.Response) (res GetConnectorTypesRes, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response GetConnectorTypesOKApplicationJSON + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 401: + // Code 401. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response R401 + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodeGetConnectorsResponse(resp *http.Response) (res GetConnectorsRes, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response GetConnectorsOKApplicationJSON + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 401: + // Code 401. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response R401 + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodeLegacyCreateConnectorResponse(resp *http.Response) (res LegacyCreateConnectorRes, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response ActionResponseProperties + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 401: + // Code 401. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response R401 + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodeLegacyDeleteConnectorResponse(resp *http.Response) (res LegacyDeleteConnectorRes, _ error) { + switch resp.StatusCode { + case 204: + // Code 204. + return &LegacyDeleteConnectorNoContent{}, nil + case 401: + // Code 401. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response R401 + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodeLegacyGetConnectorResponse(resp *http.Response) (res LegacyGetConnectorRes, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response ActionResponseProperties + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 401: + // Code 401. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response R401 + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodeLegacyGetConnectorTypesResponse(resp *http.Response) (res LegacyGetConnectorTypesRes, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response LegacyGetConnectorTypesOKApplicationJSON + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 401: + // Code 401. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response R401 + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodeLegacyGetConnectorsResponse(resp *http.Response) (res LegacyGetConnectorsRes, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response LegacyGetConnectorsOKApplicationJSON + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 401: + // Code 401. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response R401 + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodeLegacyRunConnectorResponse(resp *http.Response) (res LegacyRunConnectorRes, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response LegacyRunConnectorOK + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 401: + // Code 401. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response R401 + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodeLegacyUpdateConnectorResponse(resp *http.Response) (res LegacyUpdateConnectorRes, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response ActionResponseProperties + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 404: + // Code 404. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response R404 + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} + +func decodeUpdateConnectorResponse(resp *http.Response) (res UpdateConnectorRes, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response ConnectorResponseProperties + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 400: + // Code 400. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response UpdateConnectorBadRequest + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 401: + // Code 401. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response R401 + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + case 404: + // Code 404. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response R404 + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + return res, validate.UnexpectedStatusCode(resp.StatusCode) +} diff --git a/generated/connectors/oas_response_encoders_gen.go b/generated/connectors/oas_response_encoders_gen.go new file mode 100644 index 000000000..38785c381 --- /dev/null +++ b/generated/connectors/oas_response_encoders_gen.go @@ -0,0 +1,451 @@ +// Code generated by ogen, DO NOT EDIT. + +package connectors + +import ( + "net/http" + + "github.com/go-faster/errors" + "github.com/go-faster/jx" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/trace" +) + +func encodeCreateConnectorResponse(response CreateConnectorRes, w http.ResponseWriter, span trace.Span) error { + switch response := response.(type) { + case *ConnectorResponseProperties: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + span.SetStatus(codes.Ok, http.StatusText(200)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + case *R401: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + span.SetStatus(codes.Error, http.StatusText(401)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeDeleteConnectorResponse(response DeleteConnectorRes, w http.ResponseWriter, span trace.Span) error { + switch response := response.(type) { + case *DeleteConnectorNoContent: + w.WriteHeader(204) + span.SetStatus(codes.Ok, http.StatusText(204)) + + return nil + + case *R401: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + span.SetStatus(codes.Error, http.StatusText(401)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + case *DeleteConnectorNotFound: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(404) + span.SetStatus(codes.Error, http.StatusText(404)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeGetConnectorResponse(response GetConnectorRes, w http.ResponseWriter, span trace.Span) error { + switch response := response.(type) { + case *ConnectorResponseProperties: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + span.SetStatus(codes.Ok, http.StatusText(200)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + case *R401: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + span.SetStatus(codes.Error, http.StatusText(401)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + case *GetConnectorNotFound: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(404) + span.SetStatus(codes.Error, http.StatusText(404)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeGetConnectorTypesResponse(response GetConnectorTypesRes, w http.ResponseWriter, span trace.Span) error { + switch response := response.(type) { + case *GetConnectorTypesOKApplicationJSON: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + span.SetStatus(codes.Ok, http.StatusText(200)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + case *R401: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + span.SetStatus(codes.Error, http.StatusText(401)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeGetConnectorsResponse(response GetConnectorsRes, w http.ResponseWriter, span trace.Span) error { + switch response := response.(type) { + case *GetConnectorsOKApplicationJSON: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + span.SetStatus(codes.Ok, http.StatusText(200)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + case *R401: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + span.SetStatus(codes.Error, http.StatusText(401)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeLegacyCreateConnectorResponse(response LegacyCreateConnectorRes, w http.ResponseWriter, span trace.Span) error { + switch response := response.(type) { + case *ActionResponseProperties: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + span.SetStatus(codes.Ok, http.StatusText(200)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + case *R401: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + span.SetStatus(codes.Error, http.StatusText(401)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeLegacyDeleteConnectorResponse(response LegacyDeleteConnectorRes, w http.ResponseWriter, span trace.Span) error { + switch response := response.(type) { + case *LegacyDeleteConnectorNoContent: + w.WriteHeader(204) + span.SetStatus(codes.Ok, http.StatusText(204)) + + return nil + + case *R401: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + span.SetStatus(codes.Error, http.StatusText(401)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeLegacyGetConnectorResponse(response LegacyGetConnectorRes, w http.ResponseWriter, span trace.Span) error { + switch response := response.(type) { + case *ActionResponseProperties: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + span.SetStatus(codes.Ok, http.StatusText(200)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + case *R401: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + span.SetStatus(codes.Error, http.StatusText(401)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeLegacyGetConnectorTypesResponse(response LegacyGetConnectorTypesRes, w http.ResponseWriter, span trace.Span) error { + switch response := response.(type) { + case *LegacyGetConnectorTypesOKApplicationJSON: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + span.SetStatus(codes.Ok, http.StatusText(200)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + case *R401: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + span.SetStatus(codes.Error, http.StatusText(401)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeLegacyGetConnectorsResponse(response LegacyGetConnectorsRes, w http.ResponseWriter, span trace.Span) error { + switch response := response.(type) { + case *LegacyGetConnectorsOKApplicationJSON: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + span.SetStatus(codes.Ok, http.StatusText(200)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + case *R401: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + span.SetStatus(codes.Error, http.StatusText(401)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeLegacyRunConnectorResponse(response LegacyRunConnectorRes, w http.ResponseWriter, span trace.Span) error { + switch response := response.(type) { + case *LegacyRunConnectorOK: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + span.SetStatus(codes.Ok, http.StatusText(200)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + case *R401: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + span.SetStatus(codes.Error, http.StatusText(401)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeLegacyUpdateConnectorResponse(response LegacyUpdateConnectorRes, w http.ResponseWriter, span trace.Span) error { + switch response := response.(type) { + case *ActionResponseProperties: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + span.SetStatus(codes.Ok, http.StatusText(200)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + case *R404: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(404) + span.SetStatus(codes.Error, http.StatusText(404)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeUpdateConnectorResponse(response UpdateConnectorRes, w http.ResponseWriter, span trace.Span) error { + switch response := response.(type) { + case *ConnectorResponseProperties: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + span.SetStatus(codes.Ok, http.StatusText(200)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + case *UpdateConnectorBadRequest: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + span.SetStatus(codes.Error, http.StatusText(400)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + case *R401: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + span.SetStatus(codes.Error, http.StatusText(401)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + case *R404: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(404) + span.SetStatus(codes.Error, http.StatusText(404)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} diff --git a/generated/connectors/oas_router_gen.go b/generated/connectors/oas_router_gen.go new file mode 100644 index 000000000..87287e9b8 --- /dev/null +++ b/generated/connectors/oas_router_gen.go @@ -0,0 +1,611 @@ +// Code generated by ogen, DO NOT EDIT. + +package connectors + +import ( + "net/http" + "net/url" + "strings" + + "github.com/ogen-go/ogen/uri" +) + +// ServeHTTP serves http request as defined by OpenAPI v3 specification, +// calling handler that matches the path or returning not found error. +func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { + elem := r.URL.Path + elemIsEscaped := false + if rawPath := r.URL.RawPath; rawPath != "" { + if normalized, ok := uri.NormalizeEscapedPath(rawPath); ok { + elem = normalized + elemIsEscaped = strings.ContainsRune(elem, '%') + } + } + if prefix := s.cfg.Prefix; len(prefix) > 0 { + if strings.HasPrefix(elem, prefix) { + // Cut prefix from the path. + elem = strings.TrimPrefix(elem, prefix) + } else { + // Prefix doesn't match. + s.notFound(w, r) + return + } + } + if len(elem) == 0 { + s.notFound(w, r) + return + } + args := [2]string{} + + // Static code generated router with unwrapped path search. + switch { + default: + if len(elem) == 0 { + break + } + switch elem[0] { + case '/': // Prefix: "/s/" + if l := len("/s/"); len(elem) >= l && elem[0:l] == "/s/" { + elem = elem[l:] + } else { + break + } + + // Param: "spaceId" + // Match until "/" + idx := strings.IndexByte(elem, '/') + if idx < 0 { + idx = len(elem) + } + args[0] = elem[:idx] + elem = elem[idx:] + + if len(elem) == 0 { + break + } + switch elem[0] { + case '/': // Prefix: "/api/actions" + if l := len("/api/actions"); len(elem) >= l && elem[0:l] == "/api/actions" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + switch r.Method { + case "GET": + s.handleLegacyGetConnectorsRequest([1]string{ + args[0], + }, elemIsEscaped, w, r) + case "POST": + s.handleLegacyCreateConnectorRequest([1]string{ + args[0], + }, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, "GET,POST") + } + + return + } + switch elem[0] { + case '/': // Prefix: "/" + if l := len("/"); len(elem) >= l && elem[0:l] == "/" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + break + } + switch elem[0] { + case 'a': // Prefix: "action/" + if l := len("action/"); len(elem) >= l && elem[0:l] == "action/" { + elem = elem[l:] + } else { + break + } + + // Param: "actionId" + // Match until "/" + idx := strings.IndexByte(elem, '/') + if idx < 0 { + idx = len(elem) + } + args[1] = elem[:idx] + elem = elem[idx:] + + if len(elem) == 0 { + switch r.Method { + case "DELETE": + s.handleLegacyDeleteConnectorRequest([2]string{ + args[0], + args[1], + }, elemIsEscaped, w, r) + case "GET": + s.handleLegacyGetConnectorRequest([2]string{ + args[0], + args[1], + }, elemIsEscaped, w, r) + case "PUT": + s.handleLegacyUpdateConnectorRequest([2]string{ + args[0], + args[1], + }, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, "DELETE,GET,PUT") + } + + return + } + switch elem[0] { + case '/': // Prefix: "/_execute" + if l := len("/_execute"); len(elem) >= l && elem[0:l] == "/_execute" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + // Leaf node. + switch r.Method { + case "POST": + s.handleLegacyRunConnectorRequest([2]string{ + args[0], + args[1], + }, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, "POST") + } + + return + } + } + case 'c': // Prefix: "connector" + if l := len("connector"); len(elem) >= l && elem[0:l] == "connector" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + switch r.Method { + case "POST": + s.handleCreateConnectorRequest([1]string{ + args[0], + }, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, "POST") + } + + return + } + switch elem[0] { + case '/': // Prefix: "/" + if l := len("/"); len(elem) >= l && elem[0:l] == "/" { + elem = elem[l:] + } else { + break + } + + // Param: "connectorId" + // Leaf parameter + args[1] = elem + elem = "" + + if len(elem) == 0 { + // Leaf node. + switch r.Method { + case "DELETE": + s.handleDeleteConnectorRequest([2]string{ + args[0], + args[1], + }, elemIsEscaped, w, r) + case "GET": + s.handleGetConnectorRequest([2]string{ + args[0], + args[1], + }, elemIsEscaped, w, r) + case "PUT": + s.handleUpdateConnectorRequest([2]string{ + args[0], + args[1], + }, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, "DELETE,GET,PUT") + } + + return + } + case '_': // Prefix: "_types" + if l := len("_types"); len(elem) >= l && elem[0:l] == "_types" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + // Leaf node. + switch r.Method { + case "GET": + s.handleGetConnectorTypesRequest([1]string{ + args[0], + }, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, "GET") + } + + return + } + case 's': // Prefix: "s" + if l := len("s"); len(elem) >= l && elem[0:l] == "s" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + // Leaf node. + switch r.Method { + case "GET": + s.handleGetConnectorsRequest([1]string{ + args[0], + }, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, "GET") + } + + return + } + } + case 'l': // Prefix: "list_action_types" + if l := len("list_action_types"); len(elem) >= l && elem[0:l] == "list_action_types" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + // Leaf node. + switch r.Method { + case "GET": + s.handleLegacyGetConnectorTypesRequest([1]string{ + args[0], + }, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, "GET") + } + + return + } + } + } + } + } + } + s.notFound(w, r) +} + +// Route is route object. +type Route struct { + name string + operationID string + pathPattern string + count int + args [2]string +} + +// Name returns ogen operation name. +// +// It is guaranteed to be unique and not empty. +func (r Route) Name() string { + return r.name +} + +// OperationID returns OpenAPI operationId. +func (r Route) OperationID() string { + return r.operationID +} + +// PathPattern returns OpenAPI path. +func (r Route) PathPattern() string { + return r.pathPattern +} + +// Args returns parsed arguments. +func (r Route) Args() []string { + return r.args[:r.count] +} + +// FindRoute finds Route for given method and path. +// +// Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead. +func (s *Server) FindRoute(method, path string) (Route, bool) { + return s.FindPath(method, &url.URL{Path: path}) +} + +// FindPath finds Route for given method and URL. +func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool) { + var ( + elem = u.Path + args = r.args + ) + if rawPath := u.RawPath; rawPath != "" { + if normalized, ok := uri.NormalizeEscapedPath(rawPath); ok { + elem = normalized + } + defer func() { + for i, arg := range r.args[:r.count] { + if unescaped, err := url.PathUnescape(arg); err == nil { + r.args[i] = unescaped + } + } + }() + } + + // Static code generated router with unwrapped path search. + switch { + default: + if len(elem) == 0 { + break + } + switch elem[0] { + case '/': // Prefix: "/s/" + if l := len("/s/"); len(elem) >= l && elem[0:l] == "/s/" { + elem = elem[l:] + } else { + break + } + + // Param: "spaceId" + // Match until "/" + idx := strings.IndexByte(elem, '/') + if idx < 0 { + idx = len(elem) + } + args[0] = elem[:idx] + elem = elem[idx:] + + if len(elem) == 0 { + break + } + switch elem[0] { + case '/': // Prefix: "/api/actions" + if l := len("/api/actions"); len(elem) >= l && elem[0:l] == "/api/actions" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + switch method { + case "GET": + r.name = "LegacyGetConnectors" + r.operationID = "legacyGetConnectors" + r.pathPattern = "/s/{spaceId}/api/actions" + r.args = args + r.count = 1 + return r, true + case "POST": + r.name = "LegacyCreateConnector" + r.operationID = "legacyCreateConnector" + r.pathPattern = "/s/{spaceId}/api/actions" + r.args = args + r.count = 1 + return r, true + default: + return + } + } + switch elem[0] { + case '/': // Prefix: "/" + if l := len("/"); len(elem) >= l && elem[0:l] == "/" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + break + } + switch elem[0] { + case 'a': // Prefix: "action/" + if l := len("action/"); len(elem) >= l && elem[0:l] == "action/" { + elem = elem[l:] + } else { + break + } + + // Param: "actionId" + // Match until "/" + idx := strings.IndexByte(elem, '/') + if idx < 0 { + idx = len(elem) + } + args[1] = elem[:idx] + elem = elem[idx:] + + if len(elem) == 0 { + switch method { + case "DELETE": + r.name = "LegacyDeleteConnector" + r.operationID = "legacyDeleteConnector" + r.pathPattern = "/s/{spaceId}/api/actions/action/{actionId}" + r.args = args + r.count = 2 + return r, true + case "GET": + r.name = "LegacyGetConnector" + r.operationID = "legacyGetConnector" + r.pathPattern = "/s/{spaceId}/api/actions/action/{actionId}" + r.args = args + r.count = 2 + return r, true + case "PUT": + r.name = "LegacyUpdateConnector" + r.operationID = "legacyUpdateConnector" + r.pathPattern = "/s/{spaceId}/api/actions/action/{actionId}" + r.args = args + r.count = 2 + return r, true + default: + return + } + } + switch elem[0] { + case '/': // Prefix: "/_execute" + if l := len("/_execute"); len(elem) >= l && elem[0:l] == "/_execute" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + switch method { + case "POST": + // Leaf: LegacyRunConnector + r.name = "LegacyRunConnector" + r.operationID = "legacyRunConnector" + r.pathPattern = "/s/{spaceId}/api/actions/action/{actionId}/_execute" + r.args = args + r.count = 2 + return r, true + default: + return + } + } + } + case 'c': // Prefix: "connector" + if l := len("connector"); len(elem) >= l && elem[0:l] == "connector" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + switch method { + case "POST": + r.name = "CreateConnector" + r.operationID = "createConnector" + r.pathPattern = "/s/{spaceId}/api/actions/connector" + r.args = args + r.count = 1 + return r, true + default: + return + } + } + switch elem[0] { + case '/': // Prefix: "/" + if l := len("/"); len(elem) >= l && elem[0:l] == "/" { + elem = elem[l:] + } else { + break + } + + // Param: "connectorId" + // Leaf parameter + args[1] = elem + elem = "" + + if len(elem) == 0 { + switch method { + case "DELETE": + // Leaf: DeleteConnector + r.name = "DeleteConnector" + r.operationID = "deleteConnector" + r.pathPattern = "/s/{spaceId}/api/actions/connector/{connectorId}" + r.args = args + r.count = 2 + return r, true + case "GET": + // Leaf: GetConnector + r.name = "GetConnector" + r.operationID = "getConnector" + r.pathPattern = "/s/{spaceId}/api/actions/connector/{connectorId}" + r.args = args + r.count = 2 + return r, true + case "PUT": + // Leaf: UpdateConnector + r.name = "UpdateConnector" + r.operationID = "updateConnector" + r.pathPattern = "/s/{spaceId}/api/actions/connector/{connectorId}" + r.args = args + r.count = 2 + return r, true + default: + return + } + } + case '_': // Prefix: "_types" + if l := len("_types"); len(elem) >= l && elem[0:l] == "_types" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + switch method { + case "GET": + // Leaf: GetConnectorTypes + r.name = "GetConnectorTypes" + r.operationID = "getConnectorTypes" + r.pathPattern = "/s/{spaceId}/api/actions/connector_types" + r.args = args + r.count = 1 + return r, true + default: + return + } + } + case 's': // Prefix: "s" + if l := len("s"); len(elem) >= l && elem[0:l] == "s" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + switch method { + case "GET": + // Leaf: GetConnectors + r.name = "GetConnectors" + r.operationID = "getConnectors" + r.pathPattern = "/s/{spaceId}/api/actions/connectors" + r.args = args + r.count = 1 + return r, true + default: + return + } + } + } + case 'l': // Prefix: "list_action_types" + if l := len("list_action_types"); len(elem) >= l && elem[0:l] == "list_action_types" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + switch method { + case "GET": + // Leaf: LegacyGetConnectorTypes + r.name = "LegacyGetConnectorTypes" + r.operationID = "legacyGetConnectorTypes" + r.pathPattern = "/s/{spaceId}/api/actions/list_action_types" + r.args = args + r.count = 1 + return r, true + default: + return + } + } + } + } + } + } + } + return r, false +} diff --git a/generated/connectors/oas_schemas_gen.go b/generated/connectors/oas_schemas_gen.go new file mode 100644 index 000000000..c6e4a1054 --- /dev/null +++ b/generated/connectors/oas_schemas_gen.go @@ -0,0 +1,8193 @@ +// Code generated by ogen, DO NOT EDIT. + +package connectors + +import ( + "github.com/go-faster/errors" + "github.com/go-faster/jx" +) + +// The properties vary depending on the action type. +// Ref: #/components/schemas/action_response_properties +type ActionResponseProperties struct { + ActionTypeId OptString `json:"actionTypeId"` + Config *ActionResponsePropertiesConfig `json:"config"` + ID OptString `json:"id"` + // Indicates whether the action type is deprecated. + IsDeprecated OptBool `json:"isDeprecated"` + // Indicates whether secrets are missing for the action. + IsMissingSecrets OptBool `json:"isMissingSecrets"` + // Indicates whether it is a preconfigured action. + IsPreconfigured OptBool `json:"isPreconfigured"` + Name OptString `json:"name"` +} + +// GetActionTypeId returns the value of ActionTypeId. +func (s *ActionResponseProperties) GetActionTypeId() OptString { + return s.ActionTypeId +} + +// GetConfig returns the value of Config. +func (s *ActionResponseProperties) GetConfig() *ActionResponsePropertiesConfig { + return s.Config +} + +// GetID returns the value of ID. +func (s *ActionResponseProperties) GetID() OptString { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *ActionResponseProperties) GetIsDeprecated() OptBool { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *ActionResponseProperties) GetIsMissingSecrets() OptBool { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *ActionResponseProperties) GetIsPreconfigured() OptBool { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *ActionResponseProperties) GetName() OptString { + return s.Name +} + +// SetActionTypeId sets the value of ActionTypeId. +func (s *ActionResponseProperties) SetActionTypeId(val OptString) { + s.ActionTypeId = val +} + +// SetConfig sets the value of Config. +func (s *ActionResponseProperties) SetConfig(val *ActionResponsePropertiesConfig) { + s.Config = val +} + +// SetID sets the value of ID. +func (s *ActionResponseProperties) SetID(val OptString) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *ActionResponseProperties) SetIsDeprecated(val OptBool) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *ActionResponseProperties) SetIsMissingSecrets(val OptBool) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *ActionResponseProperties) SetIsPreconfigured(val OptBool) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *ActionResponseProperties) SetName(val OptString) { + s.Name = val +} + +func (*ActionResponseProperties) legacyCreateConnectorRes() {} +func (*ActionResponseProperties) legacyGetConnectorRes() {} +func (*ActionResponseProperties) legacyUpdateConnectorRes() {} + +type ActionResponsePropertiesConfig struct{} + +type ApiKeyAuth struct { + APIKey string +} + +// GetAPIKey returns the value of APIKey. +func (s *ApiKeyAuth) GetAPIKey() string { + return s.APIKey +} + +// SetAPIKey sets the value of APIKey. +func (s *ApiKeyAuth) SetAPIKey(val string) { + s.APIKey = val +} + +type BasicAuth struct { + Username string + Password string +} + +// GetUsername returns the value of Username. +func (s *BasicAuth) GetUsername() string { + return s.Username +} + +// GetPassword returns the value of Password. +func (s *BasicAuth) GetPassword() string { + return s.Password +} + +// SetUsername sets the value of Username. +func (s *BasicAuth) SetUsername(val string) { + s.Username = val +} + +// SetPassword sets the value of Password. +func (s *BasicAuth) SetPassword(val string) { + s.Password = val +} + +// Defines properties for connectors when type is `.cases-webhook`. +// Ref: #/components/schemas/config_properties_cases_webhook +type ConfigPropertiesCasesWebhook struct { + // A JSON payload sent to the create comment URL to create a case comment. You can use variables to + // add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache + // template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON + // is not validated when you create the connector. The JSON is validated once the Mustache variables + // have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding + // the Mustache variables, so the later validation will pass. + CreateCommentJson OptString `json:"createCommentJson"` + // The REST API HTTP request method to create a case comment in the third-party system. Valid values + // are `patch`, `post`, and `put`. + CreateCommentMethod OptConfigPropertiesCasesWebhookCreateCommentMethod `json:"createCommentMethod"` + // The REST API URL to create a case comment by ID in the third-party system. You can use a variable + // to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts + // setting`, add the hostname to the allowed hosts. + CreateCommentUrl OptString `json:"createCommentUrl"` + // A JSON payload sent to the create case URL to create a case. You can use variables to add case + // data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache + // template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), + // the JSON is not validated when you create the connector. The JSON is validated after the Mustache + // variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid + // future validation errors; disregard Mustache variables during your review. + CreateIncidentJson string `json:"createIncidentJson"` + // The REST API HTTP request method to create a case in the third-party system. Valid values are + // `patch`, `post`, and `put`. + CreateIncidentMethod OptConfigPropertiesCasesWebhookCreateIncidentMethod `json:"createIncidentMethod"` + // The JSON key in the create case response that contains the external case ID. + CreateIncidentResponseKey string `json:"createIncidentResponseKey"` + // The REST API URL to create a case in the third-party system. If you are using the `xpack.actions. + // allowedHosts` setting, add the hostname to the allowed hosts. + CreateIncidentUrl string `json:"createIncidentUrl"` + // The JSON key in get case response that contains the external case title. + GetIncidentResponseExternalTitleKey string `json:"getIncidentResponseExternalTitleKey"` + // The REST API URL to get the case by ID from the third-party system. If you are using the `xpack. + // actions.allowedHosts` setting, add the hostname to the allowed hosts. You can use a variable to + // add the external system ID to the URL. Due to Mustache template variables (the text enclosed in + // triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the + // connector. The JSON is validated after the Mustache variables have been placed when REST method + // runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later + // validation will pass. + GetIncidentUrl string `json:"getIncidentUrl"` + // If true, a username and password for login type authentication must be provided. + HasAuth OptBool `json:"hasAuth"` + // A set of key-value pairs sent as headers with the request URLs for the create case, update case, + // get case, and create comment methods. + Headers OptString `json:"headers"` + // The JSON payload sent to the update case URL to update the case. You can use variables to add + // Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due + // to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case. + // title}}}`), the JSON is not validated when you create the connector. The JSON is validated after + // the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is + // valid to avoid future validation errors; disregard Mustache variables during your review. + UpdateIncidentJson string `json:"updateIncidentJson"` + // The REST API HTTP request method to update the case in the third-party system. Valid values are + // `patch`, `post`, and `put`. + UpdateIncidentMethod OptConfigPropertiesCasesWebhookUpdateIncidentMethod `json:"updateIncidentMethod"` + // The REST API URL to update the case by ID in the third-party system. You can use a variable to add + // the external system ID to the URL. If you are using the `xpack.actions.allowedHosts` setting, add + // the hostname to the allowed hosts. + UpdateIncidentUrl string `json:"updateIncidentUrl"` + // The URL to view the case in the external system. You can use variables to add the external system + // ID or external system title to the URL. + ViewIncidentUrl string `json:"viewIncidentUrl"` +} + +// GetCreateCommentJson returns the value of CreateCommentJson. +func (s *ConfigPropertiesCasesWebhook) GetCreateCommentJson() OptString { + return s.CreateCommentJson +} + +// GetCreateCommentMethod returns the value of CreateCommentMethod. +func (s *ConfigPropertiesCasesWebhook) GetCreateCommentMethod() OptConfigPropertiesCasesWebhookCreateCommentMethod { + return s.CreateCommentMethod +} + +// GetCreateCommentUrl returns the value of CreateCommentUrl. +func (s *ConfigPropertiesCasesWebhook) GetCreateCommentUrl() OptString { + return s.CreateCommentUrl +} + +// GetCreateIncidentJson returns the value of CreateIncidentJson. +func (s *ConfigPropertiesCasesWebhook) GetCreateIncidentJson() string { + return s.CreateIncidentJson +} + +// GetCreateIncidentMethod returns the value of CreateIncidentMethod. +func (s *ConfigPropertiesCasesWebhook) GetCreateIncidentMethod() OptConfigPropertiesCasesWebhookCreateIncidentMethod { + return s.CreateIncidentMethod +} + +// GetCreateIncidentResponseKey returns the value of CreateIncidentResponseKey. +func (s *ConfigPropertiesCasesWebhook) GetCreateIncidentResponseKey() string { + return s.CreateIncidentResponseKey +} + +// GetCreateIncidentUrl returns the value of CreateIncidentUrl. +func (s *ConfigPropertiesCasesWebhook) GetCreateIncidentUrl() string { + return s.CreateIncidentUrl +} + +// GetGetIncidentResponseExternalTitleKey returns the value of GetIncidentResponseExternalTitleKey. +func (s *ConfigPropertiesCasesWebhook) GetGetIncidentResponseExternalTitleKey() string { + return s.GetIncidentResponseExternalTitleKey +} + +// GetGetIncidentUrl returns the value of GetIncidentUrl. +func (s *ConfigPropertiesCasesWebhook) GetGetIncidentUrl() string { + return s.GetIncidentUrl +} + +// GetHasAuth returns the value of HasAuth. +func (s *ConfigPropertiesCasesWebhook) GetHasAuth() OptBool { + return s.HasAuth +} + +// GetHeaders returns the value of Headers. +func (s *ConfigPropertiesCasesWebhook) GetHeaders() OptString { + return s.Headers +} + +// GetUpdateIncidentJson returns the value of UpdateIncidentJson. +func (s *ConfigPropertiesCasesWebhook) GetUpdateIncidentJson() string { + return s.UpdateIncidentJson +} + +// GetUpdateIncidentMethod returns the value of UpdateIncidentMethod. +func (s *ConfigPropertiesCasesWebhook) GetUpdateIncidentMethod() OptConfigPropertiesCasesWebhookUpdateIncidentMethod { + return s.UpdateIncidentMethod +} + +// GetUpdateIncidentUrl returns the value of UpdateIncidentUrl. +func (s *ConfigPropertiesCasesWebhook) GetUpdateIncidentUrl() string { + return s.UpdateIncidentUrl +} + +// GetViewIncidentUrl returns the value of ViewIncidentUrl. +func (s *ConfigPropertiesCasesWebhook) GetViewIncidentUrl() string { + return s.ViewIncidentUrl +} + +// SetCreateCommentJson sets the value of CreateCommentJson. +func (s *ConfigPropertiesCasesWebhook) SetCreateCommentJson(val OptString) { + s.CreateCommentJson = val +} + +// SetCreateCommentMethod sets the value of CreateCommentMethod. +func (s *ConfigPropertiesCasesWebhook) SetCreateCommentMethod(val OptConfigPropertiesCasesWebhookCreateCommentMethod) { + s.CreateCommentMethod = val +} + +// SetCreateCommentUrl sets the value of CreateCommentUrl. +func (s *ConfigPropertiesCasesWebhook) SetCreateCommentUrl(val OptString) { + s.CreateCommentUrl = val +} + +// SetCreateIncidentJson sets the value of CreateIncidentJson. +func (s *ConfigPropertiesCasesWebhook) SetCreateIncidentJson(val string) { + s.CreateIncidentJson = val +} + +// SetCreateIncidentMethod sets the value of CreateIncidentMethod. +func (s *ConfigPropertiesCasesWebhook) SetCreateIncidentMethod(val OptConfigPropertiesCasesWebhookCreateIncidentMethod) { + s.CreateIncidentMethod = val +} + +// SetCreateIncidentResponseKey sets the value of CreateIncidentResponseKey. +func (s *ConfigPropertiesCasesWebhook) SetCreateIncidentResponseKey(val string) { + s.CreateIncidentResponseKey = val +} + +// SetCreateIncidentUrl sets the value of CreateIncidentUrl. +func (s *ConfigPropertiesCasesWebhook) SetCreateIncidentUrl(val string) { + s.CreateIncidentUrl = val +} + +// SetGetIncidentResponseExternalTitleKey sets the value of GetIncidentResponseExternalTitleKey. +func (s *ConfigPropertiesCasesWebhook) SetGetIncidentResponseExternalTitleKey(val string) { + s.GetIncidentResponseExternalTitleKey = val +} + +// SetGetIncidentUrl sets the value of GetIncidentUrl. +func (s *ConfigPropertiesCasesWebhook) SetGetIncidentUrl(val string) { + s.GetIncidentUrl = val +} + +// SetHasAuth sets the value of HasAuth. +func (s *ConfigPropertiesCasesWebhook) SetHasAuth(val OptBool) { + s.HasAuth = val +} + +// SetHeaders sets the value of Headers. +func (s *ConfigPropertiesCasesWebhook) SetHeaders(val OptString) { + s.Headers = val +} + +// SetUpdateIncidentJson sets the value of UpdateIncidentJson. +func (s *ConfigPropertiesCasesWebhook) SetUpdateIncidentJson(val string) { + s.UpdateIncidentJson = val +} + +// SetUpdateIncidentMethod sets the value of UpdateIncidentMethod. +func (s *ConfigPropertiesCasesWebhook) SetUpdateIncidentMethod(val OptConfigPropertiesCasesWebhookUpdateIncidentMethod) { + s.UpdateIncidentMethod = val +} + +// SetUpdateIncidentUrl sets the value of UpdateIncidentUrl. +func (s *ConfigPropertiesCasesWebhook) SetUpdateIncidentUrl(val string) { + s.UpdateIncidentUrl = val +} + +// SetViewIncidentUrl sets the value of ViewIncidentUrl. +func (s *ConfigPropertiesCasesWebhook) SetViewIncidentUrl(val string) { + s.ViewIncidentUrl = val +} + +// The REST API HTTP request method to create a case comment in the third-party system. Valid values +// are `patch`, `post`, and `put`. +type ConfigPropertiesCasesWebhookCreateCommentMethod string + +const ( + ConfigPropertiesCasesWebhookCreateCommentMethodPatch ConfigPropertiesCasesWebhookCreateCommentMethod = "patch" + ConfigPropertiesCasesWebhookCreateCommentMethodPost ConfigPropertiesCasesWebhookCreateCommentMethod = "post" + ConfigPropertiesCasesWebhookCreateCommentMethodPut ConfigPropertiesCasesWebhookCreateCommentMethod = "put" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConfigPropertiesCasesWebhookCreateCommentMethod) MarshalText() ([]byte, error) { + switch s { + case ConfigPropertiesCasesWebhookCreateCommentMethodPatch: + return []byte(s), nil + case ConfigPropertiesCasesWebhookCreateCommentMethodPost: + return []byte(s), nil + case ConfigPropertiesCasesWebhookCreateCommentMethodPut: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConfigPropertiesCasesWebhookCreateCommentMethod) UnmarshalText(data []byte) error { + switch ConfigPropertiesCasesWebhookCreateCommentMethod(data) { + case ConfigPropertiesCasesWebhookCreateCommentMethodPatch: + *s = ConfigPropertiesCasesWebhookCreateCommentMethodPatch + return nil + case ConfigPropertiesCasesWebhookCreateCommentMethodPost: + *s = ConfigPropertiesCasesWebhookCreateCommentMethodPost + return nil + case ConfigPropertiesCasesWebhookCreateCommentMethodPut: + *s = ConfigPropertiesCasesWebhookCreateCommentMethodPut + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The REST API HTTP request method to create a case in the third-party system. Valid values are +// `patch`, `post`, and `put`. +type ConfigPropertiesCasesWebhookCreateIncidentMethod string + +const ( + ConfigPropertiesCasesWebhookCreateIncidentMethodPatch ConfigPropertiesCasesWebhookCreateIncidentMethod = "patch" + ConfigPropertiesCasesWebhookCreateIncidentMethodPost ConfigPropertiesCasesWebhookCreateIncidentMethod = "post" + ConfigPropertiesCasesWebhookCreateIncidentMethodPut ConfigPropertiesCasesWebhookCreateIncidentMethod = "put" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConfigPropertiesCasesWebhookCreateIncidentMethod) MarshalText() ([]byte, error) { + switch s { + case ConfigPropertiesCasesWebhookCreateIncidentMethodPatch: + return []byte(s), nil + case ConfigPropertiesCasesWebhookCreateIncidentMethodPost: + return []byte(s), nil + case ConfigPropertiesCasesWebhookCreateIncidentMethodPut: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConfigPropertiesCasesWebhookCreateIncidentMethod) UnmarshalText(data []byte) error { + switch ConfigPropertiesCasesWebhookCreateIncidentMethod(data) { + case ConfigPropertiesCasesWebhookCreateIncidentMethodPatch: + *s = ConfigPropertiesCasesWebhookCreateIncidentMethodPatch + return nil + case ConfigPropertiesCasesWebhookCreateIncidentMethodPost: + *s = ConfigPropertiesCasesWebhookCreateIncidentMethodPost + return nil + case ConfigPropertiesCasesWebhookCreateIncidentMethodPut: + *s = ConfigPropertiesCasesWebhookCreateIncidentMethodPut + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The REST API HTTP request method to update the case in the third-party system. Valid values are +// `patch`, `post`, and `put`. +type ConfigPropertiesCasesWebhookUpdateIncidentMethod string + +const ( + ConfigPropertiesCasesWebhookUpdateIncidentMethodPatch ConfigPropertiesCasesWebhookUpdateIncidentMethod = "patch" + ConfigPropertiesCasesWebhookUpdateIncidentMethodPost ConfigPropertiesCasesWebhookUpdateIncidentMethod = "post" + ConfigPropertiesCasesWebhookUpdateIncidentMethodPut ConfigPropertiesCasesWebhookUpdateIncidentMethod = "put" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConfigPropertiesCasesWebhookUpdateIncidentMethod) MarshalText() ([]byte, error) { + switch s { + case ConfigPropertiesCasesWebhookUpdateIncidentMethodPatch: + return []byte(s), nil + case ConfigPropertiesCasesWebhookUpdateIncidentMethodPost: + return []byte(s), nil + case ConfigPropertiesCasesWebhookUpdateIncidentMethodPut: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConfigPropertiesCasesWebhookUpdateIncidentMethod) UnmarshalText(data []byte) error { + switch ConfigPropertiesCasesWebhookUpdateIncidentMethod(data) { + case ConfigPropertiesCasesWebhookUpdateIncidentMethodPatch: + *s = ConfigPropertiesCasesWebhookUpdateIncidentMethodPatch + return nil + case ConfigPropertiesCasesWebhookUpdateIncidentMethodPost: + *s = ConfigPropertiesCasesWebhookUpdateIncidentMethodPost + return nil + case ConfigPropertiesCasesWebhookUpdateIncidentMethodPut: + *s = ConfigPropertiesCasesWebhookUpdateIncidentMethodPut + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// Defines properties for connectors when type is `.email`. +// Ref: #/components/schemas/config_properties_email +type ConfigPropertiesEmail map[string]jx.Raw + +func (s *ConfigPropertiesEmail) init() ConfigPropertiesEmail { + m := *s + if m == nil { + m = map[string]jx.Raw{} + *s = m + } + return m +} + +// Defines properties for connectors when type is `.index`. +// Ref: #/components/schemas/config_properties_index +type ConfigPropertiesIndex struct { + // Specifies a field that will contain the time the alert condition was detected. + ExecutionTimeField OptNilString `json:"executionTimeField"` + // The Elasticsearch index to be written to. + Index string `json:"index"` + // The refresh policy for the write request, which affects when changes are made visible to search. + // Refer to the refresh setting for Elasticsearch document APIs. + Refresh OptBool `json:"refresh"` +} + +// GetExecutionTimeField returns the value of ExecutionTimeField. +func (s *ConfigPropertiesIndex) GetExecutionTimeField() OptNilString { + return s.ExecutionTimeField +} + +// GetIndex returns the value of Index. +func (s *ConfigPropertiesIndex) GetIndex() string { + return s.Index +} + +// GetRefresh returns the value of Refresh. +func (s *ConfigPropertiesIndex) GetRefresh() OptBool { + return s.Refresh +} + +// SetExecutionTimeField sets the value of ExecutionTimeField. +func (s *ConfigPropertiesIndex) SetExecutionTimeField(val OptNilString) { + s.ExecutionTimeField = val +} + +// SetIndex sets the value of Index. +func (s *ConfigPropertiesIndex) SetIndex(val string) { + s.Index = val +} + +// SetRefresh sets the value of Refresh. +func (s *ConfigPropertiesIndex) SetRefresh(val OptBool) { + s.Refresh = val +} + +// Defines properties for connectors when type is `.jira`. +// Ref: #/components/schemas/config_properties_jira +type ConfigPropertiesJira struct { + // The Jira instance URL. + ApiUrl string `json:"apiUrl"` + // The Jira project key. + ProjectKey string `json:"projectKey"` +} + +// GetApiUrl returns the value of ApiUrl. +func (s *ConfigPropertiesJira) GetApiUrl() string { + return s.ApiUrl +} + +// GetProjectKey returns the value of ProjectKey. +func (s *ConfigPropertiesJira) GetProjectKey() string { + return s.ProjectKey +} + +// SetApiUrl sets the value of ApiUrl. +func (s *ConfigPropertiesJira) SetApiUrl(val string) { + s.ApiUrl = val +} + +// SetProjectKey sets the value of ProjectKey. +func (s *ConfigPropertiesJira) SetProjectKey(val string) { + s.ProjectKey = val +} + +// Defines properties for connectors when type is `.opsgenie`. +// Ref: #/components/schemas/config_properties_opsgenie +type ConfigPropertiesOpsgenie struct { + // The Opsgenie URL. For example, `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`. If you + // are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. + ApiUrl string `json:"apiUrl"` +} + +// GetApiUrl returns the value of ApiUrl. +func (s *ConfigPropertiesOpsgenie) GetApiUrl() string { + return s.ApiUrl +} + +// SetApiUrl sets the value of ApiUrl. +func (s *ConfigPropertiesOpsgenie) SetApiUrl(val string) { + s.ApiUrl = val +} + +// Defines properties for connectors when type is `.pagerduty`. +// Ref: #/components/schemas/config_properties_pagerduty +type ConfigPropertiesPagerduty map[string]jx.Raw + +func (s *ConfigPropertiesPagerduty) init() ConfigPropertiesPagerduty { + m := *s + if m == nil { + m = map[string]jx.Raw{} + *s = m + } + return m +} + +// Defines properties for connectors when type is `.resilient`. +// Ref: #/components/schemas/config_properties_resilient +type ConfigPropertiesResilient struct { + // The IBM Resilient instance URL. + ApiUrl string `json:"apiUrl"` + // The IBM Resilient organization ID. + OrgId string `json:"orgId"` +} + +// GetApiUrl returns the value of ApiUrl. +func (s *ConfigPropertiesResilient) GetApiUrl() string { + return s.ApiUrl +} + +// GetOrgId returns the value of OrgId. +func (s *ConfigPropertiesResilient) GetOrgId() string { + return s.OrgId +} + +// SetApiUrl sets the value of ApiUrl. +func (s *ConfigPropertiesResilient) SetApiUrl(val string) { + s.ApiUrl = val +} + +// SetOrgId sets the value of OrgId. +func (s *ConfigPropertiesResilient) SetOrgId(val string) { + s.OrgId = val +} + +// Defines properties for connectors when type is `.servicenow`. +// Ref: #/components/schemas/config_properties_servicenow +type ConfigPropertiesServicenow struct { + // The ServiceNow instance URL. + ApiUrl string `json:"apiUrl"` + // The client ID assigned to your OAuth application. This property is required when `isOAuth` is + // `true`. + ClientId OptString `json:"clientId"` + // The type of authentication to use. The default value is false, which means basic authentication is + // used instead of open authorization (OAuth). + IsOAuth OptBool `json:"isOAuth"` + // The key identifier assigned to the JWT verifier map of your OAuth application. This property is + // required when `isOAuth` is `true`. + JwtKeyId OptString `json:"jwtKeyId"` + // The identifier to use for OAuth authentication. This identifier should be the user field you + // selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow + // instance. For example, if the selected user field is `Email`, the user identifier should be the + // user's email address. This property is required when `isOAuth` is `true`. + UserIdentifierValue OptString `json:"userIdentifierValue"` + // Determines whether the connector uses the Table API or the Import Set API. This property is + // supported only for ServiceNow ITSM and ServiceNow SecOps connectors. NOTE: If this property is + // set to `false`, the Elastic application should be installed in ServiceNow. + UsesTableApi OptBool `json:"usesTableApi"` +} + +// GetApiUrl returns the value of ApiUrl. +func (s *ConfigPropertiesServicenow) GetApiUrl() string { + return s.ApiUrl +} + +// GetClientId returns the value of ClientId. +func (s *ConfigPropertiesServicenow) GetClientId() OptString { + return s.ClientId +} + +// GetIsOAuth returns the value of IsOAuth. +func (s *ConfigPropertiesServicenow) GetIsOAuth() OptBool { + return s.IsOAuth +} + +// GetJwtKeyId returns the value of JwtKeyId. +func (s *ConfigPropertiesServicenow) GetJwtKeyId() OptString { + return s.JwtKeyId +} + +// GetUserIdentifierValue returns the value of UserIdentifierValue. +func (s *ConfigPropertiesServicenow) GetUserIdentifierValue() OptString { + return s.UserIdentifierValue +} + +// GetUsesTableApi returns the value of UsesTableApi. +func (s *ConfigPropertiesServicenow) GetUsesTableApi() OptBool { + return s.UsesTableApi +} + +// SetApiUrl sets the value of ApiUrl. +func (s *ConfigPropertiesServicenow) SetApiUrl(val string) { + s.ApiUrl = val +} + +// SetClientId sets the value of ClientId. +func (s *ConfigPropertiesServicenow) SetClientId(val OptString) { + s.ClientId = val +} + +// SetIsOAuth sets the value of IsOAuth. +func (s *ConfigPropertiesServicenow) SetIsOAuth(val OptBool) { + s.IsOAuth = val +} + +// SetJwtKeyId sets the value of JwtKeyId. +func (s *ConfigPropertiesServicenow) SetJwtKeyId(val OptString) { + s.JwtKeyId = val +} + +// SetUserIdentifierValue sets the value of UserIdentifierValue. +func (s *ConfigPropertiesServicenow) SetUserIdentifierValue(val OptString) { + s.UserIdentifierValue = val +} + +// SetUsesTableApi sets the value of UsesTableApi. +func (s *ConfigPropertiesServicenow) SetUsesTableApi(val OptBool) { + s.UsesTableApi = val +} + +// Defines properties for connectors when type is `.servicenow`. +// Ref: #/components/schemas/config_properties_servicenow_itom +type ConfigPropertiesServicenowItom struct { + // The ServiceNow instance URL. + ApiUrl string `json:"apiUrl"` + // The client ID assigned to your OAuth application. This property is required when `isOAuth` is + // `true`. + ClientId OptString `json:"clientId"` + // The type of authentication to use. The default value is false, which means basic authentication is + // used instead of open authorization (OAuth). + IsOAuth OptBool `json:"isOAuth"` + // The key identifier assigned to the JWT verifier map of your OAuth application. This property is + // required when `isOAuth` is `true`. + JwtKeyId OptString `json:"jwtKeyId"` + // The identifier to use for OAuth authentication. This identifier should be the user field you + // selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow + // instance. For example, if the selected user field is `Email`, the user identifier should be the + // user's email address. This property is required when `isOAuth` is `true`. + UserIdentifierValue OptString `json:"userIdentifierValue"` +} + +// GetApiUrl returns the value of ApiUrl. +func (s *ConfigPropertiesServicenowItom) GetApiUrl() string { + return s.ApiUrl +} + +// GetClientId returns the value of ClientId. +func (s *ConfigPropertiesServicenowItom) GetClientId() OptString { + return s.ClientId +} + +// GetIsOAuth returns the value of IsOAuth. +func (s *ConfigPropertiesServicenowItom) GetIsOAuth() OptBool { + return s.IsOAuth +} + +// GetJwtKeyId returns the value of JwtKeyId. +func (s *ConfigPropertiesServicenowItom) GetJwtKeyId() OptString { + return s.JwtKeyId +} + +// GetUserIdentifierValue returns the value of UserIdentifierValue. +func (s *ConfigPropertiesServicenowItom) GetUserIdentifierValue() OptString { + return s.UserIdentifierValue +} + +// SetApiUrl sets the value of ApiUrl. +func (s *ConfigPropertiesServicenowItom) SetApiUrl(val string) { + s.ApiUrl = val +} + +// SetClientId sets the value of ClientId. +func (s *ConfigPropertiesServicenowItom) SetClientId(val OptString) { + s.ClientId = val +} + +// SetIsOAuth sets the value of IsOAuth. +func (s *ConfigPropertiesServicenowItom) SetIsOAuth(val OptBool) { + s.IsOAuth = val +} + +// SetJwtKeyId sets the value of JwtKeyId. +func (s *ConfigPropertiesServicenowItom) SetJwtKeyId(val OptString) { + s.JwtKeyId = val +} + +// SetUserIdentifierValue sets the value of UserIdentifierValue. +func (s *ConfigPropertiesServicenowItom) SetUserIdentifierValue(val OptString) { + s.UserIdentifierValue = val +} + +// Defines properties for connectors when type is `.swimlane`. +// Ref: #/components/schemas/config_properties_swimlane +type ConfigPropertiesSwimlane struct { + // The Swimlane instance URL. + ApiUrl string `json:"apiUrl"` + // The Swimlane application ID. + AppId string `json:"appId"` + // The type of connector. Valid values are `all`, `alerts`, and `cases`. + ConnectorType ConfigPropertiesSwimlaneConnectorType `json:"connectorType"` + // The field mapping. + Mappings OptConfigPropertiesSwimlaneMappings `json:"mappings"` +} + +// GetApiUrl returns the value of ApiUrl. +func (s *ConfigPropertiesSwimlane) GetApiUrl() string { + return s.ApiUrl +} + +// GetAppId returns the value of AppId. +func (s *ConfigPropertiesSwimlane) GetAppId() string { + return s.AppId +} + +// GetConnectorType returns the value of ConnectorType. +func (s *ConfigPropertiesSwimlane) GetConnectorType() ConfigPropertiesSwimlaneConnectorType { + return s.ConnectorType +} + +// GetMappings returns the value of Mappings. +func (s *ConfigPropertiesSwimlane) GetMappings() OptConfigPropertiesSwimlaneMappings { + return s.Mappings +} + +// SetApiUrl sets the value of ApiUrl. +func (s *ConfigPropertiesSwimlane) SetApiUrl(val string) { + s.ApiUrl = val +} + +// SetAppId sets the value of AppId. +func (s *ConfigPropertiesSwimlane) SetAppId(val string) { + s.AppId = val +} + +// SetConnectorType sets the value of ConnectorType. +func (s *ConfigPropertiesSwimlane) SetConnectorType(val ConfigPropertiesSwimlaneConnectorType) { + s.ConnectorType = val +} + +// SetMappings sets the value of Mappings. +func (s *ConfigPropertiesSwimlane) SetMappings(val OptConfigPropertiesSwimlaneMappings) { + s.Mappings = val +} + +// The type of connector. Valid values are `all`, `alerts`, and `cases`. +type ConfigPropertiesSwimlaneConnectorType string + +const ( + ConfigPropertiesSwimlaneConnectorTypeAll ConfigPropertiesSwimlaneConnectorType = "all" + ConfigPropertiesSwimlaneConnectorTypeAlerts ConfigPropertiesSwimlaneConnectorType = "alerts" + ConfigPropertiesSwimlaneConnectorTypeCases ConfigPropertiesSwimlaneConnectorType = "cases" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConfigPropertiesSwimlaneConnectorType) MarshalText() ([]byte, error) { + switch s { + case ConfigPropertiesSwimlaneConnectorTypeAll: + return []byte(s), nil + case ConfigPropertiesSwimlaneConnectorTypeAlerts: + return []byte(s), nil + case ConfigPropertiesSwimlaneConnectorTypeCases: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConfigPropertiesSwimlaneConnectorType) UnmarshalText(data []byte) error { + switch ConfigPropertiesSwimlaneConnectorType(data) { + case ConfigPropertiesSwimlaneConnectorTypeAll: + *s = ConfigPropertiesSwimlaneConnectorTypeAll + return nil + case ConfigPropertiesSwimlaneConnectorTypeAlerts: + *s = ConfigPropertiesSwimlaneConnectorTypeAlerts + return nil + case ConfigPropertiesSwimlaneConnectorTypeCases: + *s = ConfigPropertiesSwimlaneConnectorTypeCases + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The field mapping. +type ConfigPropertiesSwimlaneMappings struct { + // Mapping for the alert ID. + AlertIdConfig OptConfigPropertiesSwimlaneMappingsAlertIdConfig `json:"alertIdConfig"` + // Mapping for the case ID. + CaseIdConfig OptConfigPropertiesSwimlaneMappingsCaseIdConfig `json:"caseIdConfig"` + // Mapping for the case name. + CaseNameConfig OptConfigPropertiesSwimlaneMappingsCaseNameConfig `json:"caseNameConfig"` + // Mapping for the case comments. + CommentsConfig OptConfigPropertiesSwimlaneMappingsCommentsConfig `json:"commentsConfig"` + // Mapping for the case description. + DescriptionConfig OptConfigPropertiesSwimlaneMappingsDescriptionConfig `json:"descriptionConfig"` + // Mapping for the name of the alert's rule. + RuleNameConfig OptConfigPropertiesSwimlaneMappingsRuleNameConfig `json:"ruleNameConfig"` + // Mapping for the severity. + SeverityConfig OptConfigPropertiesSwimlaneMappingsSeverityConfig `json:"severityConfig"` +} + +// GetAlertIdConfig returns the value of AlertIdConfig. +func (s *ConfigPropertiesSwimlaneMappings) GetAlertIdConfig() OptConfigPropertiesSwimlaneMappingsAlertIdConfig { + return s.AlertIdConfig +} + +// GetCaseIdConfig returns the value of CaseIdConfig. +func (s *ConfigPropertiesSwimlaneMappings) GetCaseIdConfig() OptConfigPropertiesSwimlaneMappingsCaseIdConfig { + return s.CaseIdConfig +} + +// GetCaseNameConfig returns the value of CaseNameConfig. +func (s *ConfigPropertiesSwimlaneMappings) GetCaseNameConfig() OptConfigPropertiesSwimlaneMappingsCaseNameConfig { + return s.CaseNameConfig +} + +// GetCommentsConfig returns the value of CommentsConfig. +func (s *ConfigPropertiesSwimlaneMappings) GetCommentsConfig() OptConfigPropertiesSwimlaneMappingsCommentsConfig { + return s.CommentsConfig +} + +// GetDescriptionConfig returns the value of DescriptionConfig. +func (s *ConfigPropertiesSwimlaneMappings) GetDescriptionConfig() OptConfigPropertiesSwimlaneMappingsDescriptionConfig { + return s.DescriptionConfig +} + +// GetRuleNameConfig returns the value of RuleNameConfig. +func (s *ConfigPropertiesSwimlaneMappings) GetRuleNameConfig() OptConfigPropertiesSwimlaneMappingsRuleNameConfig { + return s.RuleNameConfig +} + +// GetSeverityConfig returns the value of SeverityConfig. +func (s *ConfigPropertiesSwimlaneMappings) GetSeverityConfig() OptConfigPropertiesSwimlaneMappingsSeverityConfig { + return s.SeverityConfig +} + +// SetAlertIdConfig sets the value of AlertIdConfig. +func (s *ConfigPropertiesSwimlaneMappings) SetAlertIdConfig(val OptConfigPropertiesSwimlaneMappingsAlertIdConfig) { + s.AlertIdConfig = val +} + +// SetCaseIdConfig sets the value of CaseIdConfig. +func (s *ConfigPropertiesSwimlaneMappings) SetCaseIdConfig(val OptConfigPropertiesSwimlaneMappingsCaseIdConfig) { + s.CaseIdConfig = val +} + +// SetCaseNameConfig sets the value of CaseNameConfig. +func (s *ConfigPropertiesSwimlaneMappings) SetCaseNameConfig(val OptConfigPropertiesSwimlaneMappingsCaseNameConfig) { + s.CaseNameConfig = val +} + +// SetCommentsConfig sets the value of CommentsConfig. +func (s *ConfigPropertiesSwimlaneMappings) SetCommentsConfig(val OptConfigPropertiesSwimlaneMappingsCommentsConfig) { + s.CommentsConfig = val +} + +// SetDescriptionConfig sets the value of DescriptionConfig. +func (s *ConfigPropertiesSwimlaneMappings) SetDescriptionConfig(val OptConfigPropertiesSwimlaneMappingsDescriptionConfig) { + s.DescriptionConfig = val +} + +// SetRuleNameConfig sets the value of RuleNameConfig. +func (s *ConfigPropertiesSwimlaneMappings) SetRuleNameConfig(val OptConfigPropertiesSwimlaneMappingsRuleNameConfig) { + s.RuleNameConfig = val +} + +// SetSeverityConfig sets the value of SeverityConfig. +func (s *ConfigPropertiesSwimlaneMappings) SetSeverityConfig(val OptConfigPropertiesSwimlaneMappingsSeverityConfig) { + s.SeverityConfig = val +} + +// Mapping for the alert ID. +type ConfigPropertiesSwimlaneMappingsAlertIdConfig struct { + // The type of field in Swimlane. + FieldType string `json:"fieldType"` + // The identifier for the field in Swimlane. + ID string `json:"id"` + // The key for the field in Swimlane. + Key string `json:"key"` + // The name of the field in Swimlane. + Name string `json:"name"` +} + +// GetFieldType returns the value of FieldType. +func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) GetFieldType() string { + return s.FieldType +} + +// GetID returns the value of ID. +func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) GetID() string { + return s.ID +} + +// GetKey returns the value of Key. +func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) GetKey() string { + return s.Key +} + +// GetName returns the value of Name. +func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) GetName() string { + return s.Name +} + +// SetFieldType sets the value of FieldType. +func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) SetFieldType(val string) { + s.FieldType = val +} + +// SetID sets the value of ID. +func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) SetID(val string) { + s.ID = val +} + +// SetKey sets the value of Key. +func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) SetKey(val string) { + s.Key = val +} + +// SetName sets the value of Name. +func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) SetName(val string) { + s.Name = val +} + +// Mapping for the case ID. +type ConfigPropertiesSwimlaneMappingsCaseIdConfig struct { + // The type of field in Swimlane. + FieldType string `json:"fieldType"` + // The identifier for the field in Swimlane. + ID string `json:"id"` + // The key for the field in Swimlane. + Key string `json:"key"` + // The name of the field in Swimlane. + Name string `json:"name"` +} + +// GetFieldType returns the value of FieldType. +func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) GetFieldType() string { + return s.FieldType +} + +// GetID returns the value of ID. +func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) GetID() string { + return s.ID +} + +// GetKey returns the value of Key. +func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) GetKey() string { + return s.Key +} + +// GetName returns the value of Name. +func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) GetName() string { + return s.Name +} + +// SetFieldType sets the value of FieldType. +func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) SetFieldType(val string) { + s.FieldType = val +} + +// SetID sets the value of ID. +func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) SetID(val string) { + s.ID = val +} + +// SetKey sets the value of Key. +func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) SetKey(val string) { + s.Key = val +} + +// SetName sets the value of Name. +func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) SetName(val string) { + s.Name = val +} + +// Mapping for the case name. +type ConfigPropertiesSwimlaneMappingsCaseNameConfig struct { + // The type of field in Swimlane. + FieldType string `json:"fieldType"` + // The identifier for the field in Swimlane. + ID string `json:"id"` + // The key for the field in Swimlane. + Key string `json:"key"` + // The name of the field in Swimlane. + Name string `json:"name"` +} + +// GetFieldType returns the value of FieldType. +func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) GetFieldType() string { + return s.FieldType +} + +// GetID returns the value of ID. +func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) GetID() string { + return s.ID +} + +// GetKey returns the value of Key. +func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) GetKey() string { + return s.Key +} + +// GetName returns the value of Name. +func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) GetName() string { + return s.Name +} + +// SetFieldType sets the value of FieldType. +func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) SetFieldType(val string) { + s.FieldType = val +} + +// SetID sets the value of ID. +func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) SetID(val string) { + s.ID = val +} + +// SetKey sets the value of Key. +func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) SetKey(val string) { + s.Key = val +} + +// SetName sets the value of Name. +func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) SetName(val string) { + s.Name = val +} + +// Mapping for the case comments. +type ConfigPropertiesSwimlaneMappingsCommentsConfig struct { + // The type of field in Swimlane. + FieldType string `json:"fieldType"` + // The identifier for the field in Swimlane. + ID string `json:"id"` + // The key for the field in Swimlane. + Key string `json:"key"` + // The name of the field in Swimlane. + Name string `json:"name"` +} + +// GetFieldType returns the value of FieldType. +func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) GetFieldType() string { + return s.FieldType +} + +// GetID returns the value of ID. +func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) GetID() string { + return s.ID +} + +// GetKey returns the value of Key. +func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) GetKey() string { + return s.Key +} + +// GetName returns the value of Name. +func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) GetName() string { + return s.Name +} + +// SetFieldType sets the value of FieldType. +func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) SetFieldType(val string) { + s.FieldType = val +} + +// SetID sets the value of ID. +func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) SetID(val string) { + s.ID = val +} + +// SetKey sets the value of Key. +func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) SetKey(val string) { + s.Key = val +} + +// SetName sets the value of Name. +func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) SetName(val string) { + s.Name = val +} + +// Mapping for the case description. +type ConfigPropertiesSwimlaneMappingsDescriptionConfig struct { + // The type of field in Swimlane. + FieldType string `json:"fieldType"` + // The identifier for the field in Swimlane. + ID string `json:"id"` + // The key for the field in Swimlane. + Key string `json:"key"` + // The name of the field in Swimlane. + Name string `json:"name"` +} + +// GetFieldType returns the value of FieldType. +func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) GetFieldType() string { + return s.FieldType +} + +// GetID returns the value of ID. +func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) GetID() string { + return s.ID +} + +// GetKey returns the value of Key. +func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) GetKey() string { + return s.Key +} + +// GetName returns the value of Name. +func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) GetName() string { + return s.Name +} + +// SetFieldType sets the value of FieldType. +func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) SetFieldType(val string) { + s.FieldType = val +} + +// SetID sets the value of ID. +func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) SetID(val string) { + s.ID = val +} + +// SetKey sets the value of Key. +func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) SetKey(val string) { + s.Key = val +} + +// SetName sets the value of Name. +func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) SetName(val string) { + s.Name = val +} + +// Mapping for the name of the alert's rule. +type ConfigPropertiesSwimlaneMappingsRuleNameConfig struct { + // The type of field in Swimlane. + FieldType string `json:"fieldType"` + // The identifier for the field in Swimlane. + ID string `json:"id"` + // The key for the field in Swimlane. + Key string `json:"key"` + // The name of the field in Swimlane. + Name string `json:"name"` +} + +// GetFieldType returns the value of FieldType. +func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) GetFieldType() string { + return s.FieldType +} + +// GetID returns the value of ID. +func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) GetID() string { + return s.ID +} + +// GetKey returns the value of Key. +func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) GetKey() string { + return s.Key +} + +// GetName returns the value of Name. +func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) GetName() string { + return s.Name +} + +// SetFieldType sets the value of FieldType. +func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) SetFieldType(val string) { + s.FieldType = val +} + +// SetID sets the value of ID. +func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) SetID(val string) { + s.ID = val +} + +// SetKey sets the value of Key. +func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) SetKey(val string) { + s.Key = val +} + +// SetName sets the value of Name. +func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) SetName(val string) { + s.Name = val +} + +// Mapping for the severity. +type ConfigPropertiesSwimlaneMappingsSeverityConfig struct { + // The type of field in Swimlane. + FieldType string `json:"fieldType"` + // The identifier for the field in Swimlane. + ID string `json:"id"` + // The key for the field in Swimlane. + Key string `json:"key"` + // The name of the field in Swimlane. + Name string `json:"name"` +} + +// GetFieldType returns the value of FieldType. +func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) GetFieldType() string { + return s.FieldType +} + +// GetID returns the value of ID. +func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) GetID() string { + return s.ID +} + +// GetKey returns the value of Key. +func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) GetKey() string { + return s.Key +} + +// GetName returns the value of Name. +func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) GetName() string { + return s.Name +} + +// SetFieldType sets the value of FieldType. +func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) SetFieldType(val string) { + s.FieldType = val +} + +// SetID sets the value of ID. +func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) SetID(val string) { + s.ID = val +} + +// SetKey sets the value of Key. +func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) SetKey(val string) { + s.Key = val +} + +// SetName sets the value of Name. +func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) SetName(val string) { + s.Name = val +} + +// Defines properties for connectors when type is `.tines`. +// Ref: #/components/schemas/config_properties_tines +type ConfigPropertiesTines map[string]jx.Raw + +func (s *ConfigPropertiesTines) init() ConfigPropertiesTines { + m := *s + if m == nil { + m = map[string]jx.Raw{} + *s = m + } + return m +} + +// Defines properties for connectors when type is `.webhook`. +// Ref: #/components/schemas/config_properties_webhook +type ConfigPropertiesWebhook map[string]jx.Raw + +func (s *ConfigPropertiesWebhook) init() ConfigPropertiesWebhook { + m := *s + if m == nil { + m = map[string]jx.Raw{} + *s = m + } + return m +} + +// Defines properties for connectors when type is `.xmatters`. +// Ref: #/components/schemas/config_properties_xmatters +type ConfigPropertiesXmatters map[string]jx.Raw + +func (s *ConfigPropertiesXmatters) init() ConfigPropertiesXmatters { + m := *s + if m == nil { + m = map[string]jx.Raw{} + *s = m + } + return m +} + +// The properties vary depending on the connector type. +// Ref: #/components/schemas/connector_response_properties +// ConnectorResponseProperties represents sum type. +type ConnectorResponseProperties struct { + Type ConnectorResponsePropertiesType // switch on this field + ConnectorResponsePropertiesCasesWebhook ConnectorResponsePropertiesCasesWebhook + ConnectorResponsePropertiesEmail ConnectorResponsePropertiesEmail + ConnectorResponsePropertiesIndex ConnectorResponsePropertiesIndex + ConnectorResponsePropertiesJira ConnectorResponsePropertiesJira + ConnectorResponsePropertiesOpsgenie ConnectorResponsePropertiesOpsgenie + ConnectorResponsePropertiesPagerduty ConnectorResponsePropertiesPagerduty + ConnectorResponsePropertiesResilient ConnectorResponsePropertiesResilient + ConnectorResponsePropertiesServerlog ConnectorResponsePropertiesServerlog + ConnectorResponsePropertiesServicenow ConnectorResponsePropertiesServicenow + ConnectorResponsePropertiesServicenowItom ConnectorResponsePropertiesServicenowItom + ConnectorResponsePropertiesServicenowSir ConnectorResponsePropertiesServicenowSir + ConnectorResponsePropertiesSlack ConnectorResponsePropertiesSlack + ConnectorResponsePropertiesSwimlane ConnectorResponsePropertiesSwimlane + ConnectorResponsePropertiesTeams ConnectorResponsePropertiesTeams + ConnectorResponsePropertiesTines ConnectorResponsePropertiesTines + ConnectorResponsePropertiesWebhook ConnectorResponsePropertiesWebhook + ConnectorResponsePropertiesXmatters ConnectorResponsePropertiesXmatters +} + +// ConnectorResponsePropertiesType is oneOf type of ConnectorResponseProperties. +type ConnectorResponsePropertiesType string + +// Possible values for ConnectorResponsePropertiesType. +const ( + ConnectorResponsePropertiesCasesWebhookConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesCasesWebhook" + ConnectorResponsePropertiesEmailConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesEmail" + ConnectorResponsePropertiesIndexConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesIndex" + ConnectorResponsePropertiesJiraConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesJira" + ConnectorResponsePropertiesOpsgenieConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesOpsgenie" + ConnectorResponsePropertiesPagerdutyConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesPagerduty" + ConnectorResponsePropertiesResilientConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesResilient" + ConnectorResponsePropertiesServerlogConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesServerlog" + ConnectorResponsePropertiesServicenowConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesServicenow" + ConnectorResponsePropertiesServicenowItomConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesServicenowItom" + ConnectorResponsePropertiesServicenowSirConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesServicenowSir" + ConnectorResponsePropertiesSlackConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesSlack" + ConnectorResponsePropertiesSwimlaneConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesSwimlane" + ConnectorResponsePropertiesTeamsConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesTeams" + ConnectorResponsePropertiesTinesConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesTines" + ConnectorResponsePropertiesWebhookConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesWebhook" + ConnectorResponsePropertiesXmattersConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesXmatters" +) + +// IsConnectorResponsePropertiesCasesWebhook reports whether ConnectorResponseProperties is ConnectorResponsePropertiesCasesWebhook. +func (s ConnectorResponseProperties) IsConnectorResponsePropertiesCasesWebhook() bool { + return s.Type == ConnectorResponsePropertiesCasesWebhookConnectorResponseProperties +} + +// IsConnectorResponsePropertiesEmail reports whether ConnectorResponseProperties is ConnectorResponsePropertiesEmail. +func (s ConnectorResponseProperties) IsConnectorResponsePropertiesEmail() bool { + return s.Type == ConnectorResponsePropertiesEmailConnectorResponseProperties +} + +// IsConnectorResponsePropertiesIndex reports whether ConnectorResponseProperties is ConnectorResponsePropertiesIndex. +func (s ConnectorResponseProperties) IsConnectorResponsePropertiesIndex() bool { + return s.Type == ConnectorResponsePropertiesIndexConnectorResponseProperties +} + +// IsConnectorResponsePropertiesJira reports whether ConnectorResponseProperties is ConnectorResponsePropertiesJira. +func (s ConnectorResponseProperties) IsConnectorResponsePropertiesJira() bool { + return s.Type == ConnectorResponsePropertiesJiraConnectorResponseProperties +} + +// IsConnectorResponsePropertiesOpsgenie reports whether ConnectorResponseProperties is ConnectorResponsePropertiesOpsgenie. +func (s ConnectorResponseProperties) IsConnectorResponsePropertiesOpsgenie() bool { + return s.Type == ConnectorResponsePropertiesOpsgenieConnectorResponseProperties +} + +// IsConnectorResponsePropertiesPagerduty reports whether ConnectorResponseProperties is ConnectorResponsePropertiesPagerduty. +func (s ConnectorResponseProperties) IsConnectorResponsePropertiesPagerduty() bool { + return s.Type == ConnectorResponsePropertiesPagerdutyConnectorResponseProperties +} + +// IsConnectorResponsePropertiesResilient reports whether ConnectorResponseProperties is ConnectorResponsePropertiesResilient. +func (s ConnectorResponseProperties) IsConnectorResponsePropertiesResilient() bool { + return s.Type == ConnectorResponsePropertiesResilientConnectorResponseProperties +} + +// IsConnectorResponsePropertiesServerlog reports whether ConnectorResponseProperties is ConnectorResponsePropertiesServerlog. +func (s ConnectorResponseProperties) IsConnectorResponsePropertiesServerlog() bool { + return s.Type == ConnectorResponsePropertiesServerlogConnectorResponseProperties +} + +// IsConnectorResponsePropertiesServicenow reports whether ConnectorResponseProperties is ConnectorResponsePropertiesServicenow. +func (s ConnectorResponseProperties) IsConnectorResponsePropertiesServicenow() bool { + return s.Type == ConnectorResponsePropertiesServicenowConnectorResponseProperties +} + +// IsConnectorResponsePropertiesServicenowItom reports whether ConnectorResponseProperties is ConnectorResponsePropertiesServicenowItom. +func (s ConnectorResponseProperties) IsConnectorResponsePropertiesServicenowItom() bool { + return s.Type == ConnectorResponsePropertiesServicenowItomConnectorResponseProperties +} + +// IsConnectorResponsePropertiesServicenowSir reports whether ConnectorResponseProperties is ConnectorResponsePropertiesServicenowSir. +func (s ConnectorResponseProperties) IsConnectorResponsePropertiesServicenowSir() bool { + return s.Type == ConnectorResponsePropertiesServicenowSirConnectorResponseProperties +} + +// IsConnectorResponsePropertiesSlack reports whether ConnectorResponseProperties is ConnectorResponsePropertiesSlack. +func (s ConnectorResponseProperties) IsConnectorResponsePropertiesSlack() bool { + return s.Type == ConnectorResponsePropertiesSlackConnectorResponseProperties +} + +// IsConnectorResponsePropertiesSwimlane reports whether ConnectorResponseProperties is ConnectorResponsePropertiesSwimlane. +func (s ConnectorResponseProperties) IsConnectorResponsePropertiesSwimlane() bool { + return s.Type == ConnectorResponsePropertiesSwimlaneConnectorResponseProperties +} + +// IsConnectorResponsePropertiesTeams reports whether ConnectorResponseProperties is ConnectorResponsePropertiesTeams. +func (s ConnectorResponseProperties) IsConnectorResponsePropertiesTeams() bool { + return s.Type == ConnectorResponsePropertiesTeamsConnectorResponseProperties +} + +// IsConnectorResponsePropertiesTines reports whether ConnectorResponseProperties is ConnectorResponsePropertiesTines. +func (s ConnectorResponseProperties) IsConnectorResponsePropertiesTines() bool { + return s.Type == ConnectorResponsePropertiesTinesConnectorResponseProperties +} + +// IsConnectorResponsePropertiesWebhook reports whether ConnectorResponseProperties is ConnectorResponsePropertiesWebhook. +func (s ConnectorResponseProperties) IsConnectorResponsePropertiesWebhook() bool { + return s.Type == ConnectorResponsePropertiesWebhookConnectorResponseProperties +} + +// IsConnectorResponsePropertiesXmatters reports whether ConnectorResponseProperties is ConnectorResponsePropertiesXmatters. +func (s ConnectorResponseProperties) IsConnectorResponsePropertiesXmatters() bool { + return s.Type == ConnectorResponsePropertiesXmattersConnectorResponseProperties +} + +// SetConnectorResponsePropertiesCasesWebhook sets ConnectorResponseProperties to ConnectorResponsePropertiesCasesWebhook. +func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesCasesWebhook(v ConnectorResponsePropertiesCasesWebhook) { + s.Type = ConnectorResponsePropertiesCasesWebhookConnectorResponseProperties + s.ConnectorResponsePropertiesCasesWebhook = v +} + +// GetConnectorResponsePropertiesCasesWebhook returns ConnectorResponsePropertiesCasesWebhook and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesCasesWebhook. +func (s ConnectorResponseProperties) GetConnectorResponsePropertiesCasesWebhook() (v ConnectorResponsePropertiesCasesWebhook, ok bool) { + if !s.IsConnectorResponsePropertiesCasesWebhook() { + return v, false + } + return s.ConnectorResponsePropertiesCasesWebhook, true +} + +// NewConnectorResponsePropertiesCasesWebhookConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesCasesWebhook. +func NewConnectorResponsePropertiesCasesWebhookConnectorResponseProperties(v ConnectorResponsePropertiesCasesWebhook) ConnectorResponseProperties { + var s ConnectorResponseProperties + s.SetConnectorResponsePropertiesCasesWebhook(v) + return s +} + +// SetConnectorResponsePropertiesEmail sets ConnectorResponseProperties to ConnectorResponsePropertiesEmail. +func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesEmail(v ConnectorResponsePropertiesEmail) { + s.Type = ConnectorResponsePropertiesEmailConnectorResponseProperties + s.ConnectorResponsePropertiesEmail = v +} + +// GetConnectorResponsePropertiesEmail returns ConnectorResponsePropertiesEmail and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesEmail. +func (s ConnectorResponseProperties) GetConnectorResponsePropertiesEmail() (v ConnectorResponsePropertiesEmail, ok bool) { + if !s.IsConnectorResponsePropertiesEmail() { + return v, false + } + return s.ConnectorResponsePropertiesEmail, true +} + +// NewConnectorResponsePropertiesEmailConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesEmail. +func NewConnectorResponsePropertiesEmailConnectorResponseProperties(v ConnectorResponsePropertiesEmail) ConnectorResponseProperties { + var s ConnectorResponseProperties + s.SetConnectorResponsePropertiesEmail(v) + return s +} + +// SetConnectorResponsePropertiesIndex sets ConnectorResponseProperties to ConnectorResponsePropertiesIndex. +func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesIndex(v ConnectorResponsePropertiesIndex) { + s.Type = ConnectorResponsePropertiesIndexConnectorResponseProperties + s.ConnectorResponsePropertiesIndex = v +} + +// GetConnectorResponsePropertiesIndex returns ConnectorResponsePropertiesIndex and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesIndex. +func (s ConnectorResponseProperties) GetConnectorResponsePropertiesIndex() (v ConnectorResponsePropertiesIndex, ok bool) { + if !s.IsConnectorResponsePropertiesIndex() { + return v, false + } + return s.ConnectorResponsePropertiesIndex, true +} + +// NewConnectorResponsePropertiesIndexConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesIndex. +func NewConnectorResponsePropertiesIndexConnectorResponseProperties(v ConnectorResponsePropertiesIndex) ConnectorResponseProperties { + var s ConnectorResponseProperties + s.SetConnectorResponsePropertiesIndex(v) + return s +} + +// SetConnectorResponsePropertiesJira sets ConnectorResponseProperties to ConnectorResponsePropertiesJira. +func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesJira(v ConnectorResponsePropertiesJira) { + s.Type = ConnectorResponsePropertiesJiraConnectorResponseProperties + s.ConnectorResponsePropertiesJira = v +} + +// GetConnectorResponsePropertiesJira returns ConnectorResponsePropertiesJira and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesJira. +func (s ConnectorResponseProperties) GetConnectorResponsePropertiesJira() (v ConnectorResponsePropertiesJira, ok bool) { + if !s.IsConnectorResponsePropertiesJira() { + return v, false + } + return s.ConnectorResponsePropertiesJira, true +} + +// NewConnectorResponsePropertiesJiraConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesJira. +func NewConnectorResponsePropertiesJiraConnectorResponseProperties(v ConnectorResponsePropertiesJira) ConnectorResponseProperties { + var s ConnectorResponseProperties + s.SetConnectorResponsePropertiesJira(v) + return s +} + +// SetConnectorResponsePropertiesOpsgenie sets ConnectorResponseProperties to ConnectorResponsePropertiesOpsgenie. +func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesOpsgenie(v ConnectorResponsePropertiesOpsgenie) { + s.Type = ConnectorResponsePropertiesOpsgenieConnectorResponseProperties + s.ConnectorResponsePropertiesOpsgenie = v +} + +// GetConnectorResponsePropertiesOpsgenie returns ConnectorResponsePropertiesOpsgenie and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesOpsgenie. +func (s ConnectorResponseProperties) GetConnectorResponsePropertiesOpsgenie() (v ConnectorResponsePropertiesOpsgenie, ok bool) { + if !s.IsConnectorResponsePropertiesOpsgenie() { + return v, false + } + return s.ConnectorResponsePropertiesOpsgenie, true +} + +// NewConnectorResponsePropertiesOpsgenieConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesOpsgenie. +func NewConnectorResponsePropertiesOpsgenieConnectorResponseProperties(v ConnectorResponsePropertiesOpsgenie) ConnectorResponseProperties { + var s ConnectorResponseProperties + s.SetConnectorResponsePropertiesOpsgenie(v) + return s +} + +// SetConnectorResponsePropertiesPagerduty sets ConnectorResponseProperties to ConnectorResponsePropertiesPagerduty. +func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesPagerduty(v ConnectorResponsePropertiesPagerduty) { + s.Type = ConnectorResponsePropertiesPagerdutyConnectorResponseProperties + s.ConnectorResponsePropertiesPagerduty = v +} + +// GetConnectorResponsePropertiesPagerduty returns ConnectorResponsePropertiesPagerduty and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesPagerduty. +func (s ConnectorResponseProperties) GetConnectorResponsePropertiesPagerduty() (v ConnectorResponsePropertiesPagerduty, ok bool) { + if !s.IsConnectorResponsePropertiesPagerduty() { + return v, false + } + return s.ConnectorResponsePropertiesPagerduty, true +} + +// NewConnectorResponsePropertiesPagerdutyConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesPagerduty. +func NewConnectorResponsePropertiesPagerdutyConnectorResponseProperties(v ConnectorResponsePropertiesPagerduty) ConnectorResponseProperties { + var s ConnectorResponseProperties + s.SetConnectorResponsePropertiesPagerduty(v) + return s +} + +// SetConnectorResponsePropertiesResilient sets ConnectorResponseProperties to ConnectorResponsePropertiesResilient. +func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesResilient(v ConnectorResponsePropertiesResilient) { + s.Type = ConnectorResponsePropertiesResilientConnectorResponseProperties + s.ConnectorResponsePropertiesResilient = v +} + +// GetConnectorResponsePropertiesResilient returns ConnectorResponsePropertiesResilient and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesResilient. +func (s ConnectorResponseProperties) GetConnectorResponsePropertiesResilient() (v ConnectorResponsePropertiesResilient, ok bool) { + if !s.IsConnectorResponsePropertiesResilient() { + return v, false + } + return s.ConnectorResponsePropertiesResilient, true +} + +// NewConnectorResponsePropertiesResilientConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesResilient. +func NewConnectorResponsePropertiesResilientConnectorResponseProperties(v ConnectorResponsePropertiesResilient) ConnectorResponseProperties { + var s ConnectorResponseProperties + s.SetConnectorResponsePropertiesResilient(v) + return s +} + +// SetConnectorResponsePropertiesServerlog sets ConnectorResponseProperties to ConnectorResponsePropertiesServerlog. +func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesServerlog(v ConnectorResponsePropertiesServerlog) { + s.Type = ConnectorResponsePropertiesServerlogConnectorResponseProperties + s.ConnectorResponsePropertiesServerlog = v +} + +// GetConnectorResponsePropertiesServerlog returns ConnectorResponsePropertiesServerlog and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesServerlog. +func (s ConnectorResponseProperties) GetConnectorResponsePropertiesServerlog() (v ConnectorResponsePropertiesServerlog, ok bool) { + if !s.IsConnectorResponsePropertiesServerlog() { + return v, false + } + return s.ConnectorResponsePropertiesServerlog, true +} + +// NewConnectorResponsePropertiesServerlogConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesServerlog. +func NewConnectorResponsePropertiesServerlogConnectorResponseProperties(v ConnectorResponsePropertiesServerlog) ConnectorResponseProperties { + var s ConnectorResponseProperties + s.SetConnectorResponsePropertiesServerlog(v) + return s +} + +// SetConnectorResponsePropertiesServicenow sets ConnectorResponseProperties to ConnectorResponsePropertiesServicenow. +func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesServicenow(v ConnectorResponsePropertiesServicenow) { + s.Type = ConnectorResponsePropertiesServicenowConnectorResponseProperties + s.ConnectorResponsePropertiesServicenow = v +} + +// GetConnectorResponsePropertiesServicenow returns ConnectorResponsePropertiesServicenow and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesServicenow. +func (s ConnectorResponseProperties) GetConnectorResponsePropertiesServicenow() (v ConnectorResponsePropertiesServicenow, ok bool) { + if !s.IsConnectorResponsePropertiesServicenow() { + return v, false + } + return s.ConnectorResponsePropertiesServicenow, true +} + +// NewConnectorResponsePropertiesServicenowConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesServicenow. +func NewConnectorResponsePropertiesServicenowConnectorResponseProperties(v ConnectorResponsePropertiesServicenow) ConnectorResponseProperties { + var s ConnectorResponseProperties + s.SetConnectorResponsePropertiesServicenow(v) + return s +} + +// SetConnectorResponsePropertiesServicenowItom sets ConnectorResponseProperties to ConnectorResponsePropertiesServicenowItom. +func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesServicenowItom(v ConnectorResponsePropertiesServicenowItom) { + s.Type = ConnectorResponsePropertiesServicenowItomConnectorResponseProperties + s.ConnectorResponsePropertiesServicenowItom = v +} + +// GetConnectorResponsePropertiesServicenowItom returns ConnectorResponsePropertiesServicenowItom and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesServicenowItom. +func (s ConnectorResponseProperties) GetConnectorResponsePropertiesServicenowItom() (v ConnectorResponsePropertiesServicenowItom, ok bool) { + if !s.IsConnectorResponsePropertiesServicenowItom() { + return v, false + } + return s.ConnectorResponsePropertiesServicenowItom, true +} + +// NewConnectorResponsePropertiesServicenowItomConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesServicenowItom. +func NewConnectorResponsePropertiesServicenowItomConnectorResponseProperties(v ConnectorResponsePropertiesServicenowItom) ConnectorResponseProperties { + var s ConnectorResponseProperties + s.SetConnectorResponsePropertiesServicenowItom(v) + return s +} + +// SetConnectorResponsePropertiesServicenowSir sets ConnectorResponseProperties to ConnectorResponsePropertiesServicenowSir. +func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesServicenowSir(v ConnectorResponsePropertiesServicenowSir) { + s.Type = ConnectorResponsePropertiesServicenowSirConnectorResponseProperties + s.ConnectorResponsePropertiesServicenowSir = v +} + +// GetConnectorResponsePropertiesServicenowSir returns ConnectorResponsePropertiesServicenowSir and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesServicenowSir. +func (s ConnectorResponseProperties) GetConnectorResponsePropertiesServicenowSir() (v ConnectorResponsePropertiesServicenowSir, ok bool) { + if !s.IsConnectorResponsePropertiesServicenowSir() { + return v, false + } + return s.ConnectorResponsePropertiesServicenowSir, true +} + +// NewConnectorResponsePropertiesServicenowSirConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesServicenowSir. +func NewConnectorResponsePropertiesServicenowSirConnectorResponseProperties(v ConnectorResponsePropertiesServicenowSir) ConnectorResponseProperties { + var s ConnectorResponseProperties + s.SetConnectorResponsePropertiesServicenowSir(v) + return s +} + +// SetConnectorResponsePropertiesSlack sets ConnectorResponseProperties to ConnectorResponsePropertiesSlack. +func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesSlack(v ConnectorResponsePropertiesSlack) { + s.Type = ConnectorResponsePropertiesSlackConnectorResponseProperties + s.ConnectorResponsePropertiesSlack = v +} + +// GetConnectorResponsePropertiesSlack returns ConnectorResponsePropertiesSlack and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesSlack. +func (s ConnectorResponseProperties) GetConnectorResponsePropertiesSlack() (v ConnectorResponsePropertiesSlack, ok bool) { + if !s.IsConnectorResponsePropertiesSlack() { + return v, false + } + return s.ConnectorResponsePropertiesSlack, true +} + +// NewConnectorResponsePropertiesSlackConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesSlack. +func NewConnectorResponsePropertiesSlackConnectorResponseProperties(v ConnectorResponsePropertiesSlack) ConnectorResponseProperties { + var s ConnectorResponseProperties + s.SetConnectorResponsePropertiesSlack(v) + return s +} + +// SetConnectorResponsePropertiesSwimlane sets ConnectorResponseProperties to ConnectorResponsePropertiesSwimlane. +func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesSwimlane(v ConnectorResponsePropertiesSwimlane) { + s.Type = ConnectorResponsePropertiesSwimlaneConnectorResponseProperties + s.ConnectorResponsePropertiesSwimlane = v +} + +// GetConnectorResponsePropertiesSwimlane returns ConnectorResponsePropertiesSwimlane and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesSwimlane. +func (s ConnectorResponseProperties) GetConnectorResponsePropertiesSwimlane() (v ConnectorResponsePropertiesSwimlane, ok bool) { + if !s.IsConnectorResponsePropertiesSwimlane() { + return v, false + } + return s.ConnectorResponsePropertiesSwimlane, true +} + +// NewConnectorResponsePropertiesSwimlaneConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesSwimlane. +func NewConnectorResponsePropertiesSwimlaneConnectorResponseProperties(v ConnectorResponsePropertiesSwimlane) ConnectorResponseProperties { + var s ConnectorResponseProperties + s.SetConnectorResponsePropertiesSwimlane(v) + return s +} + +// SetConnectorResponsePropertiesTeams sets ConnectorResponseProperties to ConnectorResponsePropertiesTeams. +func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesTeams(v ConnectorResponsePropertiesTeams) { + s.Type = ConnectorResponsePropertiesTeamsConnectorResponseProperties + s.ConnectorResponsePropertiesTeams = v +} + +// GetConnectorResponsePropertiesTeams returns ConnectorResponsePropertiesTeams and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesTeams. +func (s ConnectorResponseProperties) GetConnectorResponsePropertiesTeams() (v ConnectorResponsePropertiesTeams, ok bool) { + if !s.IsConnectorResponsePropertiesTeams() { + return v, false + } + return s.ConnectorResponsePropertiesTeams, true +} + +// NewConnectorResponsePropertiesTeamsConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesTeams. +func NewConnectorResponsePropertiesTeamsConnectorResponseProperties(v ConnectorResponsePropertiesTeams) ConnectorResponseProperties { + var s ConnectorResponseProperties + s.SetConnectorResponsePropertiesTeams(v) + return s +} + +// SetConnectorResponsePropertiesTines sets ConnectorResponseProperties to ConnectorResponsePropertiesTines. +func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesTines(v ConnectorResponsePropertiesTines) { + s.Type = ConnectorResponsePropertiesTinesConnectorResponseProperties + s.ConnectorResponsePropertiesTines = v +} + +// GetConnectorResponsePropertiesTines returns ConnectorResponsePropertiesTines and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesTines. +func (s ConnectorResponseProperties) GetConnectorResponsePropertiesTines() (v ConnectorResponsePropertiesTines, ok bool) { + if !s.IsConnectorResponsePropertiesTines() { + return v, false + } + return s.ConnectorResponsePropertiesTines, true +} + +// NewConnectorResponsePropertiesTinesConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesTines. +func NewConnectorResponsePropertiesTinesConnectorResponseProperties(v ConnectorResponsePropertiesTines) ConnectorResponseProperties { + var s ConnectorResponseProperties + s.SetConnectorResponsePropertiesTines(v) + return s +} + +// SetConnectorResponsePropertiesWebhook sets ConnectorResponseProperties to ConnectorResponsePropertiesWebhook. +func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesWebhook(v ConnectorResponsePropertiesWebhook) { + s.Type = ConnectorResponsePropertiesWebhookConnectorResponseProperties + s.ConnectorResponsePropertiesWebhook = v +} + +// GetConnectorResponsePropertiesWebhook returns ConnectorResponsePropertiesWebhook and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesWebhook. +func (s ConnectorResponseProperties) GetConnectorResponsePropertiesWebhook() (v ConnectorResponsePropertiesWebhook, ok bool) { + if !s.IsConnectorResponsePropertiesWebhook() { + return v, false + } + return s.ConnectorResponsePropertiesWebhook, true +} + +// NewConnectorResponsePropertiesWebhookConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesWebhook. +func NewConnectorResponsePropertiesWebhookConnectorResponseProperties(v ConnectorResponsePropertiesWebhook) ConnectorResponseProperties { + var s ConnectorResponseProperties + s.SetConnectorResponsePropertiesWebhook(v) + return s +} + +// SetConnectorResponsePropertiesXmatters sets ConnectorResponseProperties to ConnectorResponsePropertiesXmatters. +func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesXmatters(v ConnectorResponsePropertiesXmatters) { + s.Type = ConnectorResponsePropertiesXmattersConnectorResponseProperties + s.ConnectorResponsePropertiesXmatters = v +} + +// GetConnectorResponsePropertiesXmatters returns ConnectorResponsePropertiesXmatters and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesXmatters. +func (s ConnectorResponseProperties) GetConnectorResponsePropertiesXmatters() (v ConnectorResponsePropertiesXmatters, ok bool) { + if !s.IsConnectorResponsePropertiesXmatters() { + return v, false + } + return s.ConnectorResponsePropertiesXmatters, true +} + +// NewConnectorResponsePropertiesXmattersConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesXmatters. +func NewConnectorResponsePropertiesXmattersConnectorResponseProperties(v ConnectorResponsePropertiesXmatters) ConnectorResponseProperties { + var s ConnectorResponseProperties + s.SetConnectorResponsePropertiesXmatters(v) + return s +} + +func (*ConnectorResponseProperties) createConnectorRes() {} +func (*ConnectorResponseProperties) getConnectorRes() {} +func (*ConnectorResponseProperties) updateConnectorRes() {} + +// Ref: #/components/schemas/connector_response_properties_cases_webhook +type ConnectorResponsePropertiesCasesWebhook struct { + Config ConfigPropertiesCasesWebhook `json:"config"` + // The identifier for the connector. + ID string `json:"id"` + IsDeprecated OptIsDeprecated `json:"is_deprecated"` + IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetConfig returns the value of Config. +func (s *ConnectorResponsePropertiesCasesWebhook) GetConfig() ConfigPropertiesCasesWebhook { + return s.Config +} + +// GetID returns the value of ID. +func (s *ConnectorResponsePropertiesCasesWebhook) GetID() string { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *ConnectorResponsePropertiesCasesWebhook) GetIsDeprecated() OptIsDeprecated { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesCasesWebhook) GetIsMissingSecrets() OptIsMissingSecrets { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesCasesWebhook) GetIsPreconfigured() IsPreconfigured { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *ConnectorResponsePropertiesCasesWebhook) GetName() string { + return s.Name +} + +// SetConfig sets the value of Config. +func (s *ConnectorResponsePropertiesCasesWebhook) SetConfig(val ConfigPropertiesCasesWebhook) { + s.Config = val +} + +// SetID sets the value of ID. +func (s *ConnectorResponsePropertiesCasesWebhook) SetID(val string) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *ConnectorResponsePropertiesCasesWebhook) SetIsDeprecated(val OptIsDeprecated) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesCasesWebhook) SetIsMissingSecrets(val OptIsMissingSecrets) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesCasesWebhook) SetIsPreconfigured(val IsPreconfigured) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *ConnectorResponsePropertiesCasesWebhook) SetName(val string) { + s.Name = val +} + +// The type of connector. +type ConnectorResponsePropertiesCasesWebhookConnectorTypeID string + +const ( + ConnectorResponsePropertiesCasesWebhookConnectorTypeIDDotCasesMinusWebhook ConnectorResponsePropertiesCasesWebhookConnectorTypeID = ".cases-webhook" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConnectorResponsePropertiesCasesWebhookConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case ConnectorResponsePropertiesCasesWebhookConnectorTypeIDDotCasesMinusWebhook: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConnectorResponsePropertiesCasesWebhookConnectorTypeID) UnmarshalText(data []byte) error { + switch ConnectorResponsePropertiesCasesWebhookConnectorTypeID(data) { + case ConnectorResponsePropertiesCasesWebhookConnectorTypeIDDotCasesMinusWebhook: + *s = ConnectorResponsePropertiesCasesWebhookConnectorTypeIDDotCasesMinusWebhook + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// Ref: #/components/schemas/connector_response_properties_email +type ConnectorResponsePropertiesEmail struct { + Config ConfigPropertiesEmail `json:"config"` + // The identifier for the connector. + ID string `json:"id"` + IsDeprecated OptIsDeprecated `json:"is_deprecated"` + IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetConfig returns the value of Config. +func (s *ConnectorResponsePropertiesEmail) GetConfig() ConfigPropertiesEmail { + return s.Config +} + +// GetID returns the value of ID. +func (s *ConnectorResponsePropertiesEmail) GetID() string { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *ConnectorResponsePropertiesEmail) GetIsDeprecated() OptIsDeprecated { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesEmail) GetIsMissingSecrets() OptIsMissingSecrets { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesEmail) GetIsPreconfigured() IsPreconfigured { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *ConnectorResponsePropertiesEmail) GetName() string { + return s.Name +} + +// SetConfig sets the value of Config. +func (s *ConnectorResponsePropertiesEmail) SetConfig(val ConfigPropertiesEmail) { + s.Config = val +} + +// SetID sets the value of ID. +func (s *ConnectorResponsePropertiesEmail) SetID(val string) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *ConnectorResponsePropertiesEmail) SetIsDeprecated(val OptIsDeprecated) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesEmail) SetIsMissingSecrets(val OptIsMissingSecrets) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesEmail) SetIsPreconfigured(val IsPreconfigured) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *ConnectorResponsePropertiesEmail) SetName(val string) { + s.Name = val +} + +// The type of connector. +type ConnectorResponsePropertiesEmailConnectorTypeID string + +const ( + ConnectorResponsePropertiesEmailConnectorTypeIDDotEmail ConnectorResponsePropertiesEmailConnectorTypeID = ".email" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConnectorResponsePropertiesEmailConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case ConnectorResponsePropertiesEmailConnectorTypeIDDotEmail: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConnectorResponsePropertiesEmailConnectorTypeID) UnmarshalText(data []byte) error { + switch ConnectorResponsePropertiesEmailConnectorTypeID(data) { + case ConnectorResponsePropertiesEmailConnectorTypeIDDotEmail: + *s = ConnectorResponsePropertiesEmailConnectorTypeIDDotEmail + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// Ref: #/components/schemas/connector_response_properties_index +type ConnectorResponsePropertiesIndex struct { + Config ConfigPropertiesIndex `json:"config"` + // The identifier for the connector. + ID string `json:"id"` + IsDeprecated OptIsDeprecated `json:"is_deprecated"` + IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetConfig returns the value of Config. +func (s *ConnectorResponsePropertiesIndex) GetConfig() ConfigPropertiesIndex { + return s.Config +} + +// GetID returns the value of ID. +func (s *ConnectorResponsePropertiesIndex) GetID() string { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *ConnectorResponsePropertiesIndex) GetIsDeprecated() OptIsDeprecated { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesIndex) GetIsMissingSecrets() OptIsMissingSecrets { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesIndex) GetIsPreconfigured() IsPreconfigured { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *ConnectorResponsePropertiesIndex) GetName() string { + return s.Name +} + +// SetConfig sets the value of Config. +func (s *ConnectorResponsePropertiesIndex) SetConfig(val ConfigPropertiesIndex) { + s.Config = val +} + +// SetID sets the value of ID. +func (s *ConnectorResponsePropertiesIndex) SetID(val string) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *ConnectorResponsePropertiesIndex) SetIsDeprecated(val OptIsDeprecated) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesIndex) SetIsMissingSecrets(val OptIsMissingSecrets) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesIndex) SetIsPreconfigured(val IsPreconfigured) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *ConnectorResponsePropertiesIndex) SetName(val string) { + s.Name = val +} + +// The type of connector. +type ConnectorResponsePropertiesIndexConnectorTypeID string + +const ( + ConnectorResponsePropertiesIndexConnectorTypeIDDotIndex ConnectorResponsePropertiesIndexConnectorTypeID = ".index" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConnectorResponsePropertiesIndexConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case ConnectorResponsePropertiesIndexConnectorTypeIDDotIndex: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConnectorResponsePropertiesIndexConnectorTypeID) UnmarshalText(data []byte) error { + switch ConnectorResponsePropertiesIndexConnectorTypeID(data) { + case ConnectorResponsePropertiesIndexConnectorTypeIDDotIndex: + *s = ConnectorResponsePropertiesIndexConnectorTypeIDDotIndex + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// Ref: #/components/schemas/connector_response_properties_jira +type ConnectorResponsePropertiesJira struct { + Config ConfigPropertiesJira `json:"config"` + // The identifier for the connector. + ID string `json:"id"` + IsDeprecated OptIsDeprecated `json:"is_deprecated"` + IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetConfig returns the value of Config. +func (s *ConnectorResponsePropertiesJira) GetConfig() ConfigPropertiesJira { + return s.Config +} + +// GetID returns the value of ID. +func (s *ConnectorResponsePropertiesJira) GetID() string { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *ConnectorResponsePropertiesJira) GetIsDeprecated() OptIsDeprecated { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesJira) GetIsMissingSecrets() OptIsMissingSecrets { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesJira) GetIsPreconfigured() IsPreconfigured { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *ConnectorResponsePropertiesJira) GetName() string { + return s.Name +} + +// SetConfig sets the value of Config. +func (s *ConnectorResponsePropertiesJira) SetConfig(val ConfigPropertiesJira) { + s.Config = val +} + +// SetID sets the value of ID. +func (s *ConnectorResponsePropertiesJira) SetID(val string) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *ConnectorResponsePropertiesJira) SetIsDeprecated(val OptIsDeprecated) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesJira) SetIsMissingSecrets(val OptIsMissingSecrets) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesJira) SetIsPreconfigured(val IsPreconfigured) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *ConnectorResponsePropertiesJira) SetName(val string) { + s.Name = val +} + +// The type of connector. +type ConnectorResponsePropertiesJiraConnectorTypeID string + +const ( + ConnectorResponsePropertiesJiraConnectorTypeIDDotJira ConnectorResponsePropertiesJiraConnectorTypeID = ".jira" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConnectorResponsePropertiesJiraConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case ConnectorResponsePropertiesJiraConnectorTypeIDDotJira: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConnectorResponsePropertiesJiraConnectorTypeID) UnmarshalText(data []byte) error { + switch ConnectorResponsePropertiesJiraConnectorTypeID(data) { + case ConnectorResponsePropertiesJiraConnectorTypeIDDotJira: + *s = ConnectorResponsePropertiesJiraConnectorTypeIDDotJira + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// Ref: #/components/schemas/connector_response_properties_opsgenie +type ConnectorResponsePropertiesOpsgenie struct { + Config ConfigPropertiesOpsgenie `json:"config"` + // The identifier for the connector. + ID string `json:"id"` + IsDeprecated OptIsDeprecated `json:"is_deprecated"` + IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetConfig returns the value of Config. +func (s *ConnectorResponsePropertiesOpsgenie) GetConfig() ConfigPropertiesOpsgenie { + return s.Config +} + +// GetID returns the value of ID. +func (s *ConnectorResponsePropertiesOpsgenie) GetID() string { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *ConnectorResponsePropertiesOpsgenie) GetIsDeprecated() OptIsDeprecated { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesOpsgenie) GetIsMissingSecrets() OptIsMissingSecrets { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesOpsgenie) GetIsPreconfigured() IsPreconfigured { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *ConnectorResponsePropertiesOpsgenie) GetName() string { + return s.Name +} + +// SetConfig sets the value of Config. +func (s *ConnectorResponsePropertiesOpsgenie) SetConfig(val ConfigPropertiesOpsgenie) { + s.Config = val +} + +// SetID sets the value of ID. +func (s *ConnectorResponsePropertiesOpsgenie) SetID(val string) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *ConnectorResponsePropertiesOpsgenie) SetIsDeprecated(val OptIsDeprecated) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesOpsgenie) SetIsMissingSecrets(val OptIsMissingSecrets) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesOpsgenie) SetIsPreconfigured(val IsPreconfigured) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *ConnectorResponsePropertiesOpsgenie) SetName(val string) { + s.Name = val +} + +// The type of connector. +type ConnectorResponsePropertiesOpsgenieConnectorTypeID string + +const ( + ConnectorResponsePropertiesOpsgenieConnectorTypeIDDotOpsgenie ConnectorResponsePropertiesOpsgenieConnectorTypeID = ".opsgenie" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConnectorResponsePropertiesOpsgenieConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case ConnectorResponsePropertiesOpsgenieConnectorTypeIDDotOpsgenie: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConnectorResponsePropertiesOpsgenieConnectorTypeID) UnmarshalText(data []byte) error { + switch ConnectorResponsePropertiesOpsgenieConnectorTypeID(data) { + case ConnectorResponsePropertiesOpsgenieConnectorTypeIDDotOpsgenie: + *s = ConnectorResponsePropertiesOpsgenieConnectorTypeIDDotOpsgenie + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// Ref: #/components/schemas/connector_response_properties_pagerduty +type ConnectorResponsePropertiesPagerduty struct { + Config ConfigPropertiesPagerduty `json:"config"` + // The identifier for the connector. + ID string `json:"id"` + IsDeprecated OptIsDeprecated `json:"is_deprecated"` + IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetConfig returns the value of Config. +func (s *ConnectorResponsePropertiesPagerduty) GetConfig() ConfigPropertiesPagerduty { + return s.Config +} + +// GetID returns the value of ID. +func (s *ConnectorResponsePropertiesPagerduty) GetID() string { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *ConnectorResponsePropertiesPagerduty) GetIsDeprecated() OptIsDeprecated { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesPagerduty) GetIsMissingSecrets() OptIsMissingSecrets { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesPagerduty) GetIsPreconfigured() IsPreconfigured { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *ConnectorResponsePropertiesPagerduty) GetName() string { + return s.Name +} + +// SetConfig sets the value of Config. +func (s *ConnectorResponsePropertiesPagerduty) SetConfig(val ConfigPropertiesPagerduty) { + s.Config = val +} + +// SetID sets the value of ID. +func (s *ConnectorResponsePropertiesPagerduty) SetID(val string) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *ConnectorResponsePropertiesPagerduty) SetIsDeprecated(val OptIsDeprecated) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesPagerduty) SetIsMissingSecrets(val OptIsMissingSecrets) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesPagerduty) SetIsPreconfigured(val IsPreconfigured) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *ConnectorResponsePropertiesPagerduty) SetName(val string) { + s.Name = val +} + +// The type of connector. +type ConnectorResponsePropertiesPagerdutyConnectorTypeID string + +const ( + ConnectorResponsePropertiesPagerdutyConnectorTypeIDDotPagerduty ConnectorResponsePropertiesPagerdutyConnectorTypeID = ".pagerduty" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConnectorResponsePropertiesPagerdutyConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case ConnectorResponsePropertiesPagerdutyConnectorTypeIDDotPagerduty: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConnectorResponsePropertiesPagerdutyConnectorTypeID) UnmarshalText(data []byte) error { + switch ConnectorResponsePropertiesPagerdutyConnectorTypeID(data) { + case ConnectorResponsePropertiesPagerdutyConnectorTypeIDDotPagerduty: + *s = ConnectorResponsePropertiesPagerdutyConnectorTypeIDDotPagerduty + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// Ref: #/components/schemas/connector_response_properties_resilient +type ConnectorResponsePropertiesResilient struct { + Config ConfigPropertiesResilient `json:"config"` + // The identifier for the connector. + ID string `json:"id"` + IsDeprecated OptIsDeprecated `json:"is_deprecated"` + IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetConfig returns the value of Config. +func (s *ConnectorResponsePropertiesResilient) GetConfig() ConfigPropertiesResilient { + return s.Config +} + +// GetID returns the value of ID. +func (s *ConnectorResponsePropertiesResilient) GetID() string { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *ConnectorResponsePropertiesResilient) GetIsDeprecated() OptIsDeprecated { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesResilient) GetIsMissingSecrets() OptIsMissingSecrets { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesResilient) GetIsPreconfigured() IsPreconfigured { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *ConnectorResponsePropertiesResilient) GetName() string { + return s.Name +} + +// SetConfig sets the value of Config. +func (s *ConnectorResponsePropertiesResilient) SetConfig(val ConfigPropertiesResilient) { + s.Config = val +} + +// SetID sets the value of ID. +func (s *ConnectorResponsePropertiesResilient) SetID(val string) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *ConnectorResponsePropertiesResilient) SetIsDeprecated(val OptIsDeprecated) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesResilient) SetIsMissingSecrets(val OptIsMissingSecrets) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesResilient) SetIsPreconfigured(val IsPreconfigured) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *ConnectorResponsePropertiesResilient) SetName(val string) { + s.Name = val +} + +// The type of connector. +type ConnectorResponsePropertiesResilientConnectorTypeID string + +const ( + ConnectorResponsePropertiesResilientConnectorTypeIDDotResilient ConnectorResponsePropertiesResilientConnectorTypeID = ".resilient" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConnectorResponsePropertiesResilientConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case ConnectorResponsePropertiesResilientConnectorTypeIDDotResilient: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConnectorResponsePropertiesResilientConnectorTypeID) UnmarshalText(data []byte) error { + switch ConnectorResponsePropertiesResilientConnectorTypeID(data) { + case ConnectorResponsePropertiesResilientConnectorTypeIDDotResilient: + *s = ConnectorResponsePropertiesResilientConnectorTypeIDDotResilient + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// Ref: #/components/schemas/connector_response_properties_serverlog +type ConnectorResponsePropertiesServerlog struct { + Config *ConnectorResponsePropertiesServerlogConfig `json:"config"` + // The identifier for the connector. + ID string `json:"id"` + IsDeprecated OptIsDeprecated `json:"is_deprecated"` + IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetConfig returns the value of Config. +func (s *ConnectorResponsePropertiesServerlog) GetConfig() *ConnectorResponsePropertiesServerlogConfig { + return s.Config +} + +// GetID returns the value of ID. +func (s *ConnectorResponsePropertiesServerlog) GetID() string { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *ConnectorResponsePropertiesServerlog) GetIsDeprecated() OptIsDeprecated { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesServerlog) GetIsMissingSecrets() OptIsMissingSecrets { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesServerlog) GetIsPreconfigured() IsPreconfigured { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *ConnectorResponsePropertiesServerlog) GetName() string { + return s.Name +} + +// SetConfig sets the value of Config. +func (s *ConnectorResponsePropertiesServerlog) SetConfig(val *ConnectorResponsePropertiesServerlogConfig) { + s.Config = val +} + +// SetID sets the value of ID. +func (s *ConnectorResponsePropertiesServerlog) SetID(val string) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *ConnectorResponsePropertiesServerlog) SetIsDeprecated(val OptIsDeprecated) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesServerlog) SetIsMissingSecrets(val OptIsMissingSecrets) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesServerlog) SetIsPreconfigured(val IsPreconfigured) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *ConnectorResponsePropertiesServerlog) SetName(val string) { + s.Name = val +} + +type ConnectorResponsePropertiesServerlogConfig struct{} + +// The type of connector. +type ConnectorResponsePropertiesServerlogConnectorTypeID string + +const ( + ConnectorResponsePropertiesServerlogConnectorTypeIDDotServerMinusLog ConnectorResponsePropertiesServerlogConnectorTypeID = ".server-log" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConnectorResponsePropertiesServerlogConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case ConnectorResponsePropertiesServerlogConnectorTypeIDDotServerMinusLog: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConnectorResponsePropertiesServerlogConnectorTypeID) UnmarshalText(data []byte) error { + switch ConnectorResponsePropertiesServerlogConnectorTypeID(data) { + case ConnectorResponsePropertiesServerlogConnectorTypeIDDotServerMinusLog: + *s = ConnectorResponsePropertiesServerlogConnectorTypeIDDotServerMinusLog + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// Ref: #/components/schemas/connector_response_properties_servicenow +type ConnectorResponsePropertiesServicenow struct { + Config ConfigPropertiesServicenow `json:"config"` + // The identifier for the connector. + ID string `json:"id"` + IsDeprecated OptIsDeprecated `json:"is_deprecated"` + IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetConfig returns the value of Config. +func (s *ConnectorResponsePropertiesServicenow) GetConfig() ConfigPropertiesServicenow { + return s.Config +} + +// GetID returns the value of ID. +func (s *ConnectorResponsePropertiesServicenow) GetID() string { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *ConnectorResponsePropertiesServicenow) GetIsDeprecated() OptIsDeprecated { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesServicenow) GetIsMissingSecrets() OptIsMissingSecrets { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesServicenow) GetIsPreconfigured() IsPreconfigured { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *ConnectorResponsePropertiesServicenow) GetName() string { + return s.Name +} + +// SetConfig sets the value of Config. +func (s *ConnectorResponsePropertiesServicenow) SetConfig(val ConfigPropertiesServicenow) { + s.Config = val +} + +// SetID sets the value of ID. +func (s *ConnectorResponsePropertiesServicenow) SetID(val string) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *ConnectorResponsePropertiesServicenow) SetIsDeprecated(val OptIsDeprecated) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesServicenow) SetIsMissingSecrets(val OptIsMissingSecrets) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesServicenow) SetIsPreconfigured(val IsPreconfigured) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *ConnectorResponsePropertiesServicenow) SetName(val string) { + s.Name = val +} + +// The type of connector. +type ConnectorResponsePropertiesServicenowConnectorTypeID string + +const ( + ConnectorResponsePropertiesServicenowConnectorTypeIDDotServicenow ConnectorResponsePropertiesServicenowConnectorTypeID = ".servicenow" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConnectorResponsePropertiesServicenowConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case ConnectorResponsePropertiesServicenowConnectorTypeIDDotServicenow: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConnectorResponsePropertiesServicenowConnectorTypeID) UnmarshalText(data []byte) error { + switch ConnectorResponsePropertiesServicenowConnectorTypeID(data) { + case ConnectorResponsePropertiesServicenowConnectorTypeIDDotServicenow: + *s = ConnectorResponsePropertiesServicenowConnectorTypeIDDotServicenow + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// Ref: #/components/schemas/connector_response_properties_servicenow_itom +type ConnectorResponsePropertiesServicenowItom struct { + Config ConfigPropertiesServicenowItom `json:"config"` + // The identifier for the connector. + ID string `json:"id"` + IsDeprecated OptIsDeprecated `json:"is_deprecated"` + IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetConfig returns the value of Config. +func (s *ConnectorResponsePropertiesServicenowItom) GetConfig() ConfigPropertiesServicenowItom { + return s.Config +} + +// GetID returns the value of ID. +func (s *ConnectorResponsePropertiesServicenowItom) GetID() string { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *ConnectorResponsePropertiesServicenowItom) GetIsDeprecated() OptIsDeprecated { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesServicenowItom) GetIsMissingSecrets() OptIsMissingSecrets { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesServicenowItom) GetIsPreconfigured() IsPreconfigured { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *ConnectorResponsePropertiesServicenowItom) GetName() string { + return s.Name +} + +// SetConfig sets the value of Config. +func (s *ConnectorResponsePropertiesServicenowItom) SetConfig(val ConfigPropertiesServicenowItom) { + s.Config = val +} + +// SetID sets the value of ID. +func (s *ConnectorResponsePropertiesServicenowItom) SetID(val string) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *ConnectorResponsePropertiesServicenowItom) SetIsDeprecated(val OptIsDeprecated) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesServicenowItom) SetIsMissingSecrets(val OptIsMissingSecrets) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesServicenowItom) SetIsPreconfigured(val IsPreconfigured) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *ConnectorResponsePropertiesServicenowItom) SetName(val string) { + s.Name = val +} + +// The type of connector. +type ConnectorResponsePropertiesServicenowItomConnectorTypeID string + +const ( + ConnectorResponsePropertiesServicenowItomConnectorTypeIDDotServicenowMinusItom ConnectorResponsePropertiesServicenowItomConnectorTypeID = ".servicenow-itom" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConnectorResponsePropertiesServicenowItomConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case ConnectorResponsePropertiesServicenowItomConnectorTypeIDDotServicenowMinusItom: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConnectorResponsePropertiesServicenowItomConnectorTypeID) UnmarshalText(data []byte) error { + switch ConnectorResponsePropertiesServicenowItomConnectorTypeID(data) { + case ConnectorResponsePropertiesServicenowItomConnectorTypeIDDotServicenowMinusItom: + *s = ConnectorResponsePropertiesServicenowItomConnectorTypeIDDotServicenowMinusItom + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// Ref: #/components/schemas/connector_response_properties_servicenow_sir +type ConnectorResponsePropertiesServicenowSir struct { + Config ConfigPropertiesServicenow `json:"config"` + // The identifier for the connector. + ID string `json:"id"` + IsDeprecated OptIsDeprecated `json:"is_deprecated"` + IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetConfig returns the value of Config. +func (s *ConnectorResponsePropertiesServicenowSir) GetConfig() ConfigPropertiesServicenow { + return s.Config +} + +// GetID returns the value of ID. +func (s *ConnectorResponsePropertiesServicenowSir) GetID() string { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *ConnectorResponsePropertiesServicenowSir) GetIsDeprecated() OptIsDeprecated { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesServicenowSir) GetIsMissingSecrets() OptIsMissingSecrets { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesServicenowSir) GetIsPreconfigured() IsPreconfigured { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *ConnectorResponsePropertiesServicenowSir) GetName() string { + return s.Name +} + +// SetConfig sets the value of Config. +func (s *ConnectorResponsePropertiesServicenowSir) SetConfig(val ConfigPropertiesServicenow) { + s.Config = val +} + +// SetID sets the value of ID. +func (s *ConnectorResponsePropertiesServicenowSir) SetID(val string) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *ConnectorResponsePropertiesServicenowSir) SetIsDeprecated(val OptIsDeprecated) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesServicenowSir) SetIsMissingSecrets(val OptIsMissingSecrets) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesServicenowSir) SetIsPreconfigured(val IsPreconfigured) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *ConnectorResponsePropertiesServicenowSir) SetName(val string) { + s.Name = val +} + +// The type of connector. +type ConnectorResponsePropertiesServicenowSirConnectorTypeID string + +const ( + ConnectorResponsePropertiesServicenowSirConnectorTypeIDDotServicenowMinusSir ConnectorResponsePropertiesServicenowSirConnectorTypeID = ".servicenow-sir" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConnectorResponsePropertiesServicenowSirConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case ConnectorResponsePropertiesServicenowSirConnectorTypeIDDotServicenowMinusSir: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConnectorResponsePropertiesServicenowSirConnectorTypeID) UnmarshalText(data []byte) error { + switch ConnectorResponsePropertiesServicenowSirConnectorTypeID(data) { + case ConnectorResponsePropertiesServicenowSirConnectorTypeIDDotServicenowMinusSir: + *s = ConnectorResponsePropertiesServicenowSirConnectorTypeIDDotServicenowMinusSir + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// Ref: #/components/schemas/connector_response_properties_slack +type ConnectorResponsePropertiesSlack struct { + // The identifier for the connector. + ID string `json:"id"` + IsDeprecated OptIsDeprecated `json:"is_deprecated"` + IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetID returns the value of ID. +func (s *ConnectorResponsePropertiesSlack) GetID() string { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *ConnectorResponsePropertiesSlack) GetIsDeprecated() OptIsDeprecated { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesSlack) GetIsMissingSecrets() OptIsMissingSecrets { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesSlack) GetIsPreconfigured() IsPreconfigured { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *ConnectorResponsePropertiesSlack) GetName() string { + return s.Name +} + +// SetID sets the value of ID. +func (s *ConnectorResponsePropertiesSlack) SetID(val string) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *ConnectorResponsePropertiesSlack) SetIsDeprecated(val OptIsDeprecated) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesSlack) SetIsMissingSecrets(val OptIsMissingSecrets) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesSlack) SetIsPreconfigured(val IsPreconfigured) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *ConnectorResponsePropertiesSlack) SetName(val string) { + s.Name = val +} + +// The type of connector. +type ConnectorResponsePropertiesSlackConnectorTypeID string + +const ( + ConnectorResponsePropertiesSlackConnectorTypeIDDotSlack ConnectorResponsePropertiesSlackConnectorTypeID = ".slack" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConnectorResponsePropertiesSlackConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case ConnectorResponsePropertiesSlackConnectorTypeIDDotSlack: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConnectorResponsePropertiesSlackConnectorTypeID) UnmarshalText(data []byte) error { + switch ConnectorResponsePropertiesSlackConnectorTypeID(data) { + case ConnectorResponsePropertiesSlackConnectorTypeIDDotSlack: + *s = ConnectorResponsePropertiesSlackConnectorTypeIDDotSlack + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// Ref: #/components/schemas/connector_response_properties_swimlane +type ConnectorResponsePropertiesSwimlane struct { + Config ConfigPropertiesSwimlane `json:"config"` + // The identifier for the connector. + ID string `json:"id"` + IsDeprecated OptIsDeprecated `json:"is_deprecated"` + IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetConfig returns the value of Config. +func (s *ConnectorResponsePropertiesSwimlane) GetConfig() ConfigPropertiesSwimlane { + return s.Config +} + +// GetID returns the value of ID. +func (s *ConnectorResponsePropertiesSwimlane) GetID() string { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *ConnectorResponsePropertiesSwimlane) GetIsDeprecated() OptIsDeprecated { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesSwimlane) GetIsMissingSecrets() OptIsMissingSecrets { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesSwimlane) GetIsPreconfigured() IsPreconfigured { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *ConnectorResponsePropertiesSwimlane) GetName() string { + return s.Name +} + +// SetConfig sets the value of Config. +func (s *ConnectorResponsePropertiesSwimlane) SetConfig(val ConfigPropertiesSwimlane) { + s.Config = val +} + +// SetID sets the value of ID. +func (s *ConnectorResponsePropertiesSwimlane) SetID(val string) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *ConnectorResponsePropertiesSwimlane) SetIsDeprecated(val OptIsDeprecated) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesSwimlane) SetIsMissingSecrets(val OptIsMissingSecrets) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesSwimlane) SetIsPreconfigured(val IsPreconfigured) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *ConnectorResponsePropertiesSwimlane) SetName(val string) { + s.Name = val +} + +// The type of connector. +type ConnectorResponsePropertiesSwimlaneConnectorTypeID string + +const ( + ConnectorResponsePropertiesSwimlaneConnectorTypeIDDotSwimlane ConnectorResponsePropertiesSwimlaneConnectorTypeID = ".swimlane" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConnectorResponsePropertiesSwimlaneConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case ConnectorResponsePropertiesSwimlaneConnectorTypeIDDotSwimlane: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConnectorResponsePropertiesSwimlaneConnectorTypeID) UnmarshalText(data []byte) error { + switch ConnectorResponsePropertiesSwimlaneConnectorTypeID(data) { + case ConnectorResponsePropertiesSwimlaneConnectorTypeIDDotSwimlane: + *s = ConnectorResponsePropertiesSwimlaneConnectorTypeIDDotSwimlane + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// Ref: #/components/schemas/connector_response_properties_teams +type ConnectorResponsePropertiesTeams struct { + // The identifier for the connector. + ID string `json:"id"` + IsDeprecated OptIsDeprecated `json:"is_deprecated"` + IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetID returns the value of ID. +func (s *ConnectorResponsePropertiesTeams) GetID() string { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *ConnectorResponsePropertiesTeams) GetIsDeprecated() OptIsDeprecated { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesTeams) GetIsMissingSecrets() OptIsMissingSecrets { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesTeams) GetIsPreconfigured() IsPreconfigured { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *ConnectorResponsePropertiesTeams) GetName() string { + return s.Name +} + +// SetID sets the value of ID. +func (s *ConnectorResponsePropertiesTeams) SetID(val string) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *ConnectorResponsePropertiesTeams) SetIsDeprecated(val OptIsDeprecated) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesTeams) SetIsMissingSecrets(val OptIsMissingSecrets) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesTeams) SetIsPreconfigured(val IsPreconfigured) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *ConnectorResponsePropertiesTeams) SetName(val string) { + s.Name = val +} + +// The type of connector. +type ConnectorResponsePropertiesTeamsConnectorTypeID string + +const ( + ConnectorResponsePropertiesTeamsConnectorTypeIDDotTeams ConnectorResponsePropertiesTeamsConnectorTypeID = ".teams" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConnectorResponsePropertiesTeamsConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case ConnectorResponsePropertiesTeamsConnectorTypeIDDotTeams: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConnectorResponsePropertiesTeamsConnectorTypeID) UnmarshalText(data []byte) error { + switch ConnectorResponsePropertiesTeamsConnectorTypeID(data) { + case ConnectorResponsePropertiesTeamsConnectorTypeIDDotTeams: + *s = ConnectorResponsePropertiesTeamsConnectorTypeIDDotTeams + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// Ref: #/components/schemas/connector_response_properties_tines +type ConnectorResponsePropertiesTines struct { + Config ConfigPropertiesTines `json:"config"` + // The identifier for the connector. + ID string `json:"id"` + IsDeprecated OptIsDeprecated `json:"is_deprecated"` + IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetConfig returns the value of Config. +func (s *ConnectorResponsePropertiesTines) GetConfig() ConfigPropertiesTines { + return s.Config +} + +// GetID returns the value of ID. +func (s *ConnectorResponsePropertiesTines) GetID() string { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *ConnectorResponsePropertiesTines) GetIsDeprecated() OptIsDeprecated { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesTines) GetIsMissingSecrets() OptIsMissingSecrets { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesTines) GetIsPreconfigured() IsPreconfigured { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *ConnectorResponsePropertiesTines) GetName() string { + return s.Name +} + +// SetConfig sets the value of Config. +func (s *ConnectorResponsePropertiesTines) SetConfig(val ConfigPropertiesTines) { + s.Config = val +} + +// SetID sets the value of ID. +func (s *ConnectorResponsePropertiesTines) SetID(val string) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *ConnectorResponsePropertiesTines) SetIsDeprecated(val OptIsDeprecated) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesTines) SetIsMissingSecrets(val OptIsMissingSecrets) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesTines) SetIsPreconfigured(val IsPreconfigured) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *ConnectorResponsePropertiesTines) SetName(val string) { + s.Name = val +} + +// The type of connector. +type ConnectorResponsePropertiesTinesConnectorTypeID string + +const ( + ConnectorResponsePropertiesTinesConnectorTypeIDDotTines ConnectorResponsePropertiesTinesConnectorTypeID = ".tines" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConnectorResponsePropertiesTinesConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case ConnectorResponsePropertiesTinesConnectorTypeIDDotTines: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConnectorResponsePropertiesTinesConnectorTypeID) UnmarshalText(data []byte) error { + switch ConnectorResponsePropertiesTinesConnectorTypeID(data) { + case ConnectorResponsePropertiesTinesConnectorTypeIDDotTines: + *s = ConnectorResponsePropertiesTinesConnectorTypeIDDotTines + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// Ref: #/components/schemas/connector_response_properties_webhook +type ConnectorResponsePropertiesWebhook struct { + Config ConfigPropertiesWebhook `json:"config"` + // The identifier for the connector. + ID string `json:"id"` + IsDeprecated OptIsDeprecated `json:"is_deprecated"` + IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetConfig returns the value of Config. +func (s *ConnectorResponsePropertiesWebhook) GetConfig() ConfigPropertiesWebhook { + return s.Config +} + +// GetID returns the value of ID. +func (s *ConnectorResponsePropertiesWebhook) GetID() string { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *ConnectorResponsePropertiesWebhook) GetIsDeprecated() OptIsDeprecated { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesWebhook) GetIsMissingSecrets() OptIsMissingSecrets { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesWebhook) GetIsPreconfigured() IsPreconfigured { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *ConnectorResponsePropertiesWebhook) GetName() string { + return s.Name +} + +// SetConfig sets the value of Config. +func (s *ConnectorResponsePropertiesWebhook) SetConfig(val ConfigPropertiesWebhook) { + s.Config = val +} + +// SetID sets the value of ID. +func (s *ConnectorResponsePropertiesWebhook) SetID(val string) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *ConnectorResponsePropertiesWebhook) SetIsDeprecated(val OptIsDeprecated) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesWebhook) SetIsMissingSecrets(val OptIsMissingSecrets) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesWebhook) SetIsPreconfigured(val IsPreconfigured) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *ConnectorResponsePropertiesWebhook) SetName(val string) { + s.Name = val +} + +// The type of connector. +type ConnectorResponsePropertiesWebhookConnectorTypeID string + +const ( + ConnectorResponsePropertiesWebhookConnectorTypeIDDotWebhook ConnectorResponsePropertiesWebhookConnectorTypeID = ".webhook" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConnectorResponsePropertiesWebhookConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case ConnectorResponsePropertiesWebhookConnectorTypeIDDotWebhook: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConnectorResponsePropertiesWebhookConnectorTypeID) UnmarshalText(data []byte) error { + switch ConnectorResponsePropertiesWebhookConnectorTypeID(data) { + case ConnectorResponsePropertiesWebhookConnectorTypeIDDotWebhook: + *s = ConnectorResponsePropertiesWebhookConnectorTypeIDDotWebhook + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// Ref: #/components/schemas/connector_response_properties_xmatters +type ConnectorResponsePropertiesXmatters struct { + Config ConfigPropertiesXmatters `json:"config"` + // The identifier for the connector. + ID string `json:"id"` + IsDeprecated OptIsDeprecated `json:"is_deprecated"` + IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetConfig returns the value of Config. +func (s *ConnectorResponsePropertiesXmatters) GetConfig() ConfigPropertiesXmatters { + return s.Config +} + +// GetID returns the value of ID. +func (s *ConnectorResponsePropertiesXmatters) GetID() string { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *ConnectorResponsePropertiesXmatters) GetIsDeprecated() OptIsDeprecated { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesXmatters) GetIsMissingSecrets() OptIsMissingSecrets { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesXmatters) GetIsPreconfigured() IsPreconfigured { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *ConnectorResponsePropertiesXmatters) GetName() string { + return s.Name +} + +// SetConfig sets the value of Config. +func (s *ConnectorResponsePropertiesXmatters) SetConfig(val ConfigPropertiesXmatters) { + s.Config = val +} + +// SetID sets the value of ID. +func (s *ConnectorResponsePropertiesXmatters) SetID(val string) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *ConnectorResponsePropertiesXmatters) SetIsDeprecated(val OptIsDeprecated) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *ConnectorResponsePropertiesXmatters) SetIsMissingSecrets(val OptIsMissingSecrets) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *ConnectorResponsePropertiesXmatters) SetIsPreconfigured(val IsPreconfigured) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *ConnectorResponsePropertiesXmatters) SetName(val string) { + s.Name = val +} + +// The type of connector. +type ConnectorResponsePropertiesXmattersConnectorTypeID string + +const ( + ConnectorResponsePropertiesXmattersConnectorTypeIDDotXmatters ConnectorResponsePropertiesXmattersConnectorTypeID = ".xmatters" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConnectorResponsePropertiesXmattersConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case ConnectorResponsePropertiesXmattersConnectorTypeIDDotXmatters: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConnectorResponsePropertiesXmattersConnectorTypeID) UnmarshalText(data []byte) error { + switch ConnectorResponsePropertiesXmattersConnectorTypeID(data) { + case ConnectorResponsePropertiesXmattersConnectorTypeIDDotXmatters: + *s = ConnectorResponsePropertiesXmattersConnectorTypeIDDotXmatters + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`. +// Ref: #/components/schemas/connector_types +type ConnectorTypes string + +const ( + ConnectorTypesDotCasesMinusWebhook ConnectorTypes = ".cases-webhook" + ConnectorTypesDotEmail ConnectorTypes = ".email" + ConnectorTypesDotIndex ConnectorTypes = ".index" + ConnectorTypesDotJira ConnectorTypes = ".jira" + ConnectorTypesDotOpsgenie ConnectorTypes = ".opsgenie" + ConnectorTypesDotPagerduty ConnectorTypes = ".pagerduty" + ConnectorTypesDotResilient ConnectorTypes = ".resilient" + ConnectorTypesDotServicenow ConnectorTypes = ".servicenow" + ConnectorTypesDotServicenowMinusItom ConnectorTypes = ".servicenow-itom" + ConnectorTypesDotServicenowMinusSir ConnectorTypes = ".servicenow-sir" + ConnectorTypesDotServerMinusLog ConnectorTypes = ".server-log" + ConnectorTypesDotSlack ConnectorTypes = ".slack" + ConnectorTypesDotSwimlane ConnectorTypes = ".swimlane" + ConnectorTypesDotTeams ConnectorTypes = ".teams" + ConnectorTypesDotTines ConnectorTypes = ".tines" + ConnectorTypesDotWebhook ConnectorTypes = ".webhook" + ConnectorTypesDotXmatters ConnectorTypes = ".xmatters" +) + +// MarshalText implements encoding.TextMarshaler. +func (s ConnectorTypes) MarshalText() ([]byte, error) { + switch s { + case ConnectorTypesDotCasesMinusWebhook: + return []byte(s), nil + case ConnectorTypesDotEmail: + return []byte(s), nil + case ConnectorTypesDotIndex: + return []byte(s), nil + case ConnectorTypesDotJira: + return []byte(s), nil + case ConnectorTypesDotOpsgenie: + return []byte(s), nil + case ConnectorTypesDotPagerduty: + return []byte(s), nil + case ConnectorTypesDotResilient: + return []byte(s), nil + case ConnectorTypesDotServicenow: + return []byte(s), nil + case ConnectorTypesDotServicenowMinusItom: + return []byte(s), nil + case ConnectorTypesDotServicenowMinusSir: + return []byte(s), nil + case ConnectorTypesDotServerMinusLog: + return []byte(s), nil + case ConnectorTypesDotSlack: + return []byte(s), nil + case ConnectorTypesDotSwimlane: + return []byte(s), nil + case ConnectorTypesDotTeams: + return []byte(s), nil + case ConnectorTypesDotTines: + return []byte(s), nil + case ConnectorTypesDotWebhook: + return []byte(s), nil + case ConnectorTypesDotXmatters: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ConnectorTypes) UnmarshalText(data []byte) error { + switch ConnectorTypes(data) { + case ConnectorTypesDotCasesMinusWebhook: + *s = ConnectorTypesDotCasesMinusWebhook + return nil + case ConnectorTypesDotEmail: + *s = ConnectorTypesDotEmail + return nil + case ConnectorTypesDotIndex: + *s = ConnectorTypesDotIndex + return nil + case ConnectorTypesDotJira: + *s = ConnectorTypesDotJira + return nil + case ConnectorTypesDotOpsgenie: + *s = ConnectorTypesDotOpsgenie + return nil + case ConnectorTypesDotPagerduty: + *s = ConnectorTypesDotPagerduty + return nil + case ConnectorTypesDotResilient: + *s = ConnectorTypesDotResilient + return nil + case ConnectorTypesDotServicenow: + *s = ConnectorTypesDotServicenow + return nil + case ConnectorTypesDotServicenowMinusItom: + *s = ConnectorTypesDotServicenowMinusItom + return nil + case ConnectorTypesDotServicenowMinusSir: + *s = ConnectorTypesDotServicenowMinusSir + return nil + case ConnectorTypesDotServerMinusLog: + *s = ConnectorTypesDotServerMinusLog + return nil + case ConnectorTypesDotSlack: + *s = ConnectorTypesDotSlack + return nil + case ConnectorTypesDotSwimlane: + *s = ConnectorTypesDotSwimlane + return nil + case ConnectorTypesDotTeams: + *s = ConnectorTypesDotTeams + return nil + case ConnectorTypesDotTines: + *s = ConnectorTypesDotTines + return nil + case ConnectorTypesDotWebhook: + *s = ConnectorTypesDotWebhook + return nil + case ConnectorTypesDotXmatters: + *s = ConnectorTypesDotXmatters + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The properties vary depending on the connector type. +// CreateConnectorReq represents sum type. +type CreateConnectorReq struct { + Type CreateConnectorReqType // switch on this field + CreateConnectorRequestCasesWebhook CreateConnectorRequestCasesWebhook + CreateConnectorRequestEmail CreateConnectorRequestEmail + CreateConnectorRequestIndex CreateConnectorRequestIndex + CreateConnectorRequestJira CreateConnectorRequestJira + CreateConnectorRequestOpsgenie CreateConnectorRequestOpsgenie + CreateConnectorRequestPagerduty CreateConnectorRequestPagerduty + CreateConnectorRequestResilient CreateConnectorRequestResilient + CreateConnectorRequestServerlog CreateConnectorRequestServerlog + CreateConnectorRequestServicenow CreateConnectorRequestServicenow + CreateConnectorRequestServicenowItom CreateConnectorRequestServicenowItom + CreateConnectorRequestServicenowSir CreateConnectorRequestServicenowSir + CreateConnectorRequestSlack CreateConnectorRequestSlack + CreateConnectorRequestSwimlane CreateConnectorRequestSwimlane + CreateConnectorRequestTeams CreateConnectorRequestTeams + CreateConnectorRequestTines CreateConnectorRequestTines + CreateConnectorRequestWebhook CreateConnectorRequestWebhook + CreateConnectorRequestXmatters CreateConnectorRequestXmatters +} + +// CreateConnectorReqType is oneOf type of CreateConnectorReq. +type CreateConnectorReqType string + +// Possible values for CreateConnectorReqType. +const ( + CreateConnectorRequestCasesWebhookCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestCasesWebhook" + CreateConnectorRequestEmailCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestEmail" + CreateConnectorRequestIndexCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestIndex" + CreateConnectorRequestJiraCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestJira" + CreateConnectorRequestOpsgenieCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestOpsgenie" + CreateConnectorRequestPagerdutyCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestPagerduty" + CreateConnectorRequestResilientCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestResilient" + CreateConnectorRequestServerlogCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestServerlog" + CreateConnectorRequestServicenowCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestServicenow" + CreateConnectorRequestServicenowItomCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestServicenowItom" + CreateConnectorRequestServicenowSirCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestServicenowSir" + CreateConnectorRequestSlackCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestSlack" + CreateConnectorRequestSwimlaneCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestSwimlane" + CreateConnectorRequestTeamsCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestTeams" + CreateConnectorRequestTinesCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestTines" + CreateConnectorRequestWebhookCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestWebhook" + CreateConnectorRequestXmattersCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestXmatters" +) + +// IsCreateConnectorRequestCasesWebhook reports whether CreateConnectorReq is CreateConnectorRequestCasesWebhook. +func (s CreateConnectorReq) IsCreateConnectorRequestCasesWebhook() bool { + return s.Type == CreateConnectorRequestCasesWebhookCreateConnectorReq +} + +// IsCreateConnectorRequestEmail reports whether CreateConnectorReq is CreateConnectorRequestEmail. +func (s CreateConnectorReq) IsCreateConnectorRequestEmail() bool { + return s.Type == CreateConnectorRequestEmailCreateConnectorReq +} + +// IsCreateConnectorRequestIndex reports whether CreateConnectorReq is CreateConnectorRequestIndex. +func (s CreateConnectorReq) IsCreateConnectorRequestIndex() bool { + return s.Type == CreateConnectorRequestIndexCreateConnectorReq +} + +// IsCreateConnectorRequestJira reports whether CreateConnectorReq is CreateConnectorRequestJira. +func (s CreateConnectorReq) IsCreateConnectorRequestJira() bool { + return s.Type == CreateConnectorRequestJiraCreateConnectorReq +} + +// IsCreateConnectorRequestOpsgenie reports whether CreateConnectorReq is CreateConnectorRequestOpsgenie. +func (s CreateConnectorReq) IsCreateConnectorRequestOpsgenie() bool { + return s.Type == CreateConnectorRequestOpsgenieCreateConnectorReq +} + +// IsCreateConnectorRequestPagerduty reports whether CreateConnectorReq is CreateConnectorRequestPagerduty. +func (s CreateConnectorReq) IsCreateConnectorRequestPagerduty() bool { + return s.Type == CreateConnectorRequestPagerdutyCreateConnectorReq +} + +// IsCreateConnectorRequestResilient reports whether CreateConnectorReq is CreateConnectorRequestResilient. +func (s CreateConnectorReq) IsCreateConnectorRequestResilient() bool { + return s.Type == CreateConnectorRequestResilientCreateConnectorReq +} + +// IsCreateConnectorRequestServerlog reports whether CreateConnectorReq is CreateConnectorRequestServerlog. +func (s CreateConnectorReq) IsCreateConnectorRequestServerlog() bool { + return s.Type == CreateConnectorRequestServerlogCreateConnectorReq +} + +// IsCreateConnectorRequestServicenow reports whether CreateConnectorReq is CreateConnectorRequestServicenow. +func (s CreateConnectorReq) IsCreateConnectorRequestServicenow() bool { + return s.Type == CreateConnectorRequestServicenowCreateConnectorReq +} + +// IsCreateConnectorRequestServicenowItom reports whether CreateConnectorReq is CreateConnectorRequestServicenowItom. +func (s CreateConnectorReq) IsCreateConnectorRequestServicenowItom() bool { + return s.Type == CreateConnectorRequestServicenowItomCreateConnectorReq +} + +// IsCreateConnectorRequestServicenowSir reports whether CreateConnectorReq is CreateConnectorRequestServicenowSir. +func (s CreateConnectorReq) IsCreateConnectorRequestServicenowSir() bool { + return s.Type == CreateConnectorRequestServicenowSirCreateConnectorReq +} + +// IsCreateConnectorRequestSlack reports whether CreateConnectorReq is CreateConnectorRequestSlack. +func (s CreateConnectorReq) IsCreateConnectorRequestSlack() bool { + return s.Type == CreateConnectorRequestSlackCreateConnectorReq +} + +// IsCreateConnectorRequestSwimlane reports whether CreateConnectorReq is CreateConnectorRequestSwimlane. +func (s CreateConnectorReq) IsCreateConnectorRequestSwimlane() bool { + return s.Type == CreateConnectorRequestSwimlaneCreateConnectorReq +} + +// IsCreateConnectorRequestTeams reports whether CreateConnectorReq is CreateConnectorRequestTeams. +func (s CreateConnectorReq) IsCreateConnectorRequestTeams() bool { + return s.Type == CreateConnectorRequestTeamsCreateConnectorReq +} + +// IsCreateConnectorRequestTines reports whether CreateConnectorReq is CreateConnectorRequestTines. +func (s CreateConnectorReq) IsCreateConnectorRequestTines() bool { + return s.Type == CreateConnectorRequestTinesCreateConnectorReq +} + +// IsCreateConnectorRequestWebhook reports whether CreateConnectorReq is CreateConnectorRequestWebhook. +func (s CreateConnectorReq) IsCreateConnectorRequestWebhook() bool { + return s.Type == CreateConnectorRequestWebhookCreateConnectorReq +} + +// IsCreateConnectorRequestXmatters reports whether CreateConnectorReq is CreateConnectorRequestXmatters. +func (s CreateConnectorReq) IsCreateConnectorRequestXmatters() bool { + return s.Type == CreateConnectorRequestXmattersCreateConnectorReq +} + +// SetCreateConnectorRequestCasesWebhook sets CreateConnectorReq to CreateConnectorRequestCasesWebhook. +func (s *CreateConnectorReq) SetCreateConnectorRequestCasesWebhook(v CreateConnectorRequestCasesWebhook) { + s.Type = CreateConnectorRequestCasesWebhookCreateConnectorReq + s.CreateConnectorRequestCasesWebhook = v +} + +// GetCreateConnectorRequestCasesWebhook returns CreateConnectorRequestCasesWebhook and true boolean if CreateConnectorReq is CreateConnectorRequestCasesWebhook. +func (s CreateConnectorReq) GetCreateConnectorRequestCasesWebhook() (v CreateConnectorRequestCasesWebhook, ok bool) { + if !s.IsCreateConnectorRequestCasesWebhook() { + return v, false + } + return s.CreateConnectorRequestCasesWebhook, true +} + +// NewCreateConnectorRequestCasesWebhookCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestCasesWebhook. +func NewCreateConnectorRequestCasesWebhookCreateConnectorReq(v CreateConnectorRequestCasesWebhook) CreateConnectorReq { + var s CreateConnectorReq + s.SetCreateConnectorRequestCasesWebhook(v) + return s +} + +// SetCreateConnectorRequestEmail sets CreateConnectorReq to CreateConnectorRequestEmail. +func (s *CreateConnectorReq) SetCreateConnectorRequestEmail(v CreateConnectorRequestEmail) { + s.Type = CreateConnectorRequestEmailCreateConnectorReq + s.CreateConnectorRequestEmail = v +} + +// GetCreateConnectorRequestEmail returns CreateConnectorRequestEmail and true boolean if CreateConnectorReq is CreateConnectorRequestEmail. +func (s CreateConnectorReq) GetCreateConnectorRequestEmail() (v CreateConnectorRequestEmail, ok bool) { + if !s.IsCreateConnectorRequestEmail() { + return v, false + } + return s.CreateConnectorRequestEmail, true +} + +// NewCreateConnectorRequestEmailCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestEmail. +func NewCreateConnectorRequestEmailCreateConnectorReq(v CreateConnectorRequestEmail) CreateConnectorReq { + var s CreateConnectorReq + s.SetCreateConnectorRequestEmail(v) + return s +} + +// SetCreateConnectorRequestIndex sets CreateConnectorReq to CreateConnectorRequestIndex. +func (s *CreateConnectorReq) SetCreateConnectorRequestIndex(v CreateConnectorRequestIndex) { + s.Type = CreateConnectorRequestIndexCreateConnectorReq + s.CreateConnectorRequestIndex = v +} + +// GetCreateConnectorRequestIndex returns CreateConnectorRequestIndex and true boolean if CreateConnectorReq is CreateConnectorRequestIndex. +func (s CreateConnectorReq) GetCreateConnectorRequestIndex() (v CreateConnectorRequestIndex, ok bool) { + if !s.IsCreateConnectorRequestIndex() { + return v, false + } + return s.CreateConnectorRequestIndex, true +} + +// NewCreateConnectorRequestIndexCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestIndex. +func NewCreateConnectorRequestIndexCreateConnectorReq(v CreateConnectorRequestIndex) CreateConnectorReq { + var s CreateConnectorReq + s.SetCreateConnectorRequestIndex(v) + return s +} + +// SetCreateConnectorRequestJira sets CreateConnectorReq to CreateConnectorRequestJira. +func (s *CreateConnectorReq) SetCreateConnectorRequestJira(v CreateConnectorRequestJira) { + s.Type = CreateConnectorRequestJiraCreateConnectorReq + s.CreateConnectorRequestJira = v +} + +// GetCreateConnectorRequestJira returns CreateConnectorRequestJira and true boolean if CreateConnectorReq is CreateConnectorRequestJira. +func (s CreateConnectorReq) GetCreateConnectorRequestJira() (v CreateConnectorRequestJira, ok bool) { + if !s.IsCreateConnectorRequestJira() { + return v, false + } + return s.CreateConnectorRequestJira, true +} + +// NewCreateConnectorRequestJiraCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestJira. +func NewCreateConnectorRequestJiraCreateConnectorReq(v CreateConnectorRequestJira) CreateConnectorReq { + var s CreateConnectorReq + s.SetCreateConnectorRequestJira(v) + return s +} + +// SetCreateConnectorRequestOpsgenie sets CreateConnectorReq to CreateConnectorRequestOpsgenie. +func (s *CreateConnectorReq) SetCreateConnectorRequestOpsgenie(v CreateConnectorRequestOpsgenie) { + s.Type = CreateConnectorRequestOpsgenieCreateConnectorReq + s.CreateConnectorRequestOpsgenie = v +} + +// GetCreateConnectorRequestOpsgenie returns CreateConnectorRequestOpsgenie and true boolean if CreateConnectorReq is CreateConnectorRequestOpsgenie. +func (s CreateConnectorReq) GetCreateConnectorRequestOpsgenie() (v CreateConnectorRequestOpsgenie, ok bool) { + if !s.IsCreateConnectorRequestOpsgenie() { + return v, false + } + return s.CreateConnectorRequestOpsgenie, true +} + +// NewCreateConnectorRequestOpsgenieCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestOpsgenie. +func NewCreateConnectorRequestOpsgenieCreateConnectorReq(v CreateConnectorRequestOpsgenie) CreateConnectorReq { + var s CreateConnectorReq + s.SetCreateConnectorRequestOpsgenie(v) + return s +} + +// SetCreateConnectorRequestPagerduty sets CreateConnectorReq to CreateConnectorRequestPagerduty. +func (s *CreateConnectorReq) SetCreateConnectorRequestPagerduty(v CreateConnectorRequestPagerduty) { + s.Type = CreateConnectorRequestPagerdutyCreateConnectorReq + s.CreateConnectorRequestPagerduty = v +} + +// GetCreateConnectorRequestPagerduty returns CreateConnectorRequestPagerduty and true boolean if CreateConnectorReq is CreateConnectorRequestPagerduty. +func (s CreateConnectorReq) GetCreateConnectorRequestPagerduty() (v CreateConnectorRequestPagerduty, ok bool) { + if !s.IsCreateConnectorRequestPagerduty() { + return v, false + } + return s.CreateConnectorRequestPagerduty, true +} + +// NewCreateConnectorRequestPagerdutyCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestPagerduty. +func NewCreateConnectorRequestPagerdutyCreateConnectorReq(v CreateConnectorRequestPagerduty) CreateConnectorReq { + var s CreateConnectorReq + s.SetCreateConnectorRequestPagerduty(v) + return s +} + +// SetCreateConnectorRequestResilient sets CreateConnectorReq to CreateConnectorRequestResilient. +func (s *CreateConnectorReq) SetCreateConnectorRequestResilient(v CreateConnectorRequestResilient) { + s.Type = CreateConnectorRequestResilientCreateConnectorReq + s.CreateConnectorRequestResilient = v +} + +// GetCreateConnectorRequestResilient returns CreateConnectorRequestResilient and true boolean if CreateConnectorReq is CreateConnectorRequestResilient. +func (s CreateConnectorReq) GetCreateConnectorRequestResilient() (v CreateConnectorRequestResilient, ok bool) { + if !s.IsCreateConnectorRequestResilient() { + return v, false + } + return s.CreateConnectorRequestResilient, true +} + +// NewCreateConnectorRequestResilientCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestResilient. +func NewCreateConnectorRequestResilientCreateConnectorReq(v CreateConnectorRequestResilient) CreateConnectorReq { + var s CreateConnectorReq + s.SetCreateConnectorRequestResilient(v) + return s +} + +// SetCreateConnectorRequestServerlog sets CreateConnectorReq to CreateConnectorRequestServerlog. +func (s *CreateConnectorReq) SetCreateConnectorRequestServerlog(v CreateConnectorRequestServerlog) { + s.Type = CreateConnectorRequestServerlogCreateConnectorReq + s.CreateConnectorRequestServerlog = v +} + +// GetCreateConnectorRequestServerlog returns CreateConnectorRequestServerlog and true boolean if CreateConnectorReq is CreateConnectorRequestServerlog. +func (s CreateConnectorReq) GetCreateConnectorRequestServerlog() (v CreateConnectorRequestServerlog, ok bool) { + if !s.IsCreateConnectorRequestServerlog() { + return v, false + } + return s.CreateConnectorRequestServerlog, true +} + +// NewCreateConnectorRequestServerlogCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestServerlog. +func NewCreateConnectorRequestServerlogCreateConnectorReq(v CreateConnectorRequestServerlog) CreateConnectorReq { + var s CreateConnectorReq + s.SetCreateConnectorRequestServerlog(v) + return s +} + +// SetCreateConnectorRequestServicenow sets CreateConnectorReq to CreateConnectorRequestServicenow. +func (s *CreateConnectorReq) SetCreateConnectorRequestServicenow(v CreateConnectorRequestServicenow) { + s.Type = CreateConnectorRequestServicenowCreateConnectorReq + s.CreateConnectorRequestServicenow = v +} + +// GetCreateConnectorRequestServicenow returns CreateConnectorRequestServicenow and true boolean if CreateConnectorReq is CreateConnectorRequestServicenow. +func (s CreateConnectorReq) GetCreateConnectorRequestServicenow() (v CreateConnectorRequestServicenow, ok bool) { + if !s.IsCreateConnectorRequestServicenow() { + return v, false + } + return s.CreateConnectorRequestServicenow, true +} + +// NewCreateConnectorRequestServicenowCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestServicenow. +func NewCreateConnectorRequestServicenowCreateConnectorReq(v CreateConnectorRequestServicenow) CreateConnectorReq { + var s CreateConnectorReq + s.SetCreateConnectorRequestServicenow(v) + return s +} + +// SetCreateConnectorRequestServicenowItom sets CreateConnectorReq to CreateConnectorRequestServicenowItom. +func (s *CreateConnectorReq) SetCreateConnectorRequestServicenowItom(v CreateConnectorRequestServicenowItom) { + s.Type = CreateConnectorRequestServicenowItomCreateConnectorReq + s.CreateConnectorRequestServicenowItom = v +} + +// GetCreateConnectorRequestServicenowItom returns CreateConnectorRequestServicenowItom and true boolean if CreateConnectorReq is CreateConnectorRequestServicenowItom. +func (s CreateConnectorReq) GetCreateConnectorRequestServicenowItom() (v CreateConnectorRequestServicenowItom, ok bool) { + if !s.IsCreateConnectorRequestServicenowItom() { + return v, false + } + return s.CreateConnectorRequestServicenowItom, true +} + +// NewCreateConnectorRequestServicenowItomCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestServicenowItom. +func NewCreateConnectorRequestServicenowItomCreateConnectorReq(v CreateConnectorRequestServicenowItom) CreateConnectorReq { + var s CreateConnectorReq + s.SetCreateConnectorRequestServicenowItom(v) + return s +} + +// SetCreateConnectorRequestServicenowSir sets CreateConnectorReq to CreateConnectorRequestServicenowSir. +func (s *CreateConnectorReq) SetCreateConnectorRequestServicenowSir(v CreateConnectorRequestServicenowSir) { + s.Type = CreateConnectorRequestServicenowSirCreateConnectorReq + s.CreateConnectorRequestServicenowSir = v +} + +// GetCreateConnectorRequestServicenowSir returns CreateConnectorRequestServicenowSir and true boolean if CreateConnectorReq is CreateConnectorRequestServicenowSir. +func (s CreateConnectorReq) GetCreateConnectorRequestServicenowSir() (v CreateConnectorRequestServicenowSir, ok bool) { + if !s.IsCreateConnectorRequestServicenowSir() { + return v, false + } + return s.CreateConnectorRequestServicenowSir, true +} + +// NewCreateConnectorRequestServicenowSirCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestServicenowSir. +func NewCreateConnectorRequestServicenowSirCreateConnectorReq(v CreateConnectorRequestServicenowSir) CreateConnectorReq { + var s CreateConnectorReq + s.SetCreateConnectorRequestServicenowSir(v) + return s +} + +// SetCreateConnectorRequestSlack sets CreateConnectorReq to CreateConnectorRequestSlack. +func (s *CreateConnectorReq) SetCreateConnectorRequestSlack(v CreateConnectorRequestSlack) { + s.Type = CreateConnectorRequestSlackCreateConnectorReq + s.CreateConnectorRequestSlack = v +} + +// GetCreateConnectorRequestSlack returns CreateConnectorRequestSlack and true boolean if CreateConnectorReq is CreateConnectorRequestSlack. +func (s CreateConnectorReq) GetCreateConnectorRequestSlack() (v CreateConnectorRequestSlack, ok bool) { + if !s.IsCreateConnectorRequestSlack() { + return v, false + } + return s.CreateConnectorRequestSlack, true +} + +// NewCreateConnectorRequestSlackCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestSlack. +func NewCreateConnectorRequestSlackCreateConnectorReq(v CreateConnectorRequestSlack) CreateConnectorReq { + var s CreateConnectorReq + s.SetCreateConnectorRequestSlack(v) + return s +} + +// SetCreateConnectorRequestSwimlane sets CreateConnectorReq to CreateConnectorRequestSwimlane. +func (s *CreateConnectorReq) SetCreateConnectorRequestSwimlane(v CreateConnectorRequestSwimlane) { + s.Type = CreateConnectorRequestSwimlaneCreateConnectorReq + s.CreateConnectorRequestSwimlane = v +} + +// GetCreateConnectorRequestSwimlane returns CreateConnectorRequestSwimlane and true boolean if CreateConnectorReq is CreateConnectorRequestSwimlane. +func (s CreateConnectorReq) GetCreateConnectorRequestSwimlane() (v CreateConnectorRequestSwimlane, ok bool) { + if !s.IsCreateConnectorRequestSwimlane() { + return v, false + } + return s.CreateConnectorRequestSwimlane, true +} + +// NewCreateConnectorRequestSwimlaneCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestSwimlane. +func NewCreateConnectorRequestSwimlaneCreateConnectorReq(v CreateConnectorRequestSwimlane) CreateConnectorReq { + var s CreateConnectorReq + s.SetCreateConnectorRequestSwimlane(v) + return s +} + +// SetCreateConnectorRequestTeams sets CreateConnectorReq to CreateConnectorRequestTeams. +func (s *CreateConnectorReq) SetCreateConnectorRequestTeams(v CreateConnectorRequestTeams) { + s.Type = CreateConnectorRequestTeamsCreateConnectorReq + s.CreateConnectorRequestTeams = v +} + +// GetCreateConnectorRequestTeams returns CreateConnectorRequestTeams and true boolean if CreateConnectorReq is CreateConnectorRequestTeams. +func (s CreateConnectorReq) GetCreateConnectorRequestTeams() (v CreateConnectorRequestTeams, ok bool) { + if !s.IsCreateConnectorRequestTeams() { + return v, false + } + return s.CreateConnectorRequestTeams, true +} + +// NewCreateConnectorRequestTeamsCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestTeams. +func NewCreateConnectorRequestTeamsCreateConnectorReq(v CreateConnectorRequestTeams) CreateConnectorReq { + var s CreateConnectorReq + s.SetCreateConnectorRequestTeams(v) + return s +} + +// SetCreateConnectorRequestTines sets CreateConnectorReq to CreateConnectorRequestTines. +func (s *CreateConnectorReq) SetCreateConnectorRequestTines(v CreateConnectorRequestTines) { + s.Type = CreateConnectorRequestTinesCreateConnectorReq + s.CreateConnectorRequestTines = v +} + +// GetCreateConnectorRequestTines returns CreateConnectorRequestTines and true boolean if CreateConnectorReq is CreateConnectorRequestTines. +func (s CreateConnectorReq) GetCreateConnectorRequestTines() (v CreateConnectorRequestTines, ok bool) { + if !s.IsCreateConnectorRequestTines() { + return v, false + } + return s.CreateConnectorRequestTines, true +} + +// NewCreateConnectorRequestTinesCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestTines. +func NewCreateConnectorRequestTinesCreateConnectorReq(v CreateConnectorRequestTines) CreateConnectorReq { + var s CreateConnectorReq + s.SetCreateConnectorRequestTines(v) + return s +} + +// SetCreateConnectorRequestWebhook sets CreateConnectorReq to CreateConnectorRequestWebhook. +func (s *CreateConnectorReq) SetCreateConnectorRequestWebhook(v CreateConnectorRequestWebhook) { + s.Type = CreateConnectorRequestWebhookCreateConnectorReq + s.CreateConnectorRequestWebhook = v +} + +// GetCreateConnectorRequestWebhook returns CreateConnectorRequestWebhook and true boolean if CreateConnectorReq is CreateConnectorRequestWebhook. +func (s CreateConnectorReq) GetCreateConnectorRequestWebhook() (v CreateConnectorRequestWebhook, ok bool) { + if !s.IsCreateConnectorRequestWebhook() { + return v, false + } + return s.CreateConnectorRequestWebhook, true +} + +// NewCreateConnectorRequestWebhookCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestWebhook. +func NewCreateConnectorRequestWebhookCreateConnectorReq(v CreateConnectorRequestWebhook) CreateConnectorReq { + var s CreateConnectorReq + s.SetCreateConnectorRequestWebhook(v) + return s +} + +// SetCreateConnectorRequestXmatters sets CreateConnectorReq to CreateConnectorRequestXmatters. +func (s *CreateConnectorReq) SetCreateConnectorRequestXmatters(v CreateConnectorRequestXmatters) { + s.Type = CreateConnectorRequestXmattersCreateConnectorReq + s.CreateConnectorRequestXmatters = v +} + +// GetCreateConnectorRequestXmatters returns CreateConnectorRequestXmatters and true boolean if CreateConnectorReq is CreateConnectorRequestXmatters. +func (s CreateConnectorReq) GetCreateConnectorRequestXmatters() (v CreateConnectorRequestXmatters, ok bool) { + if !s.IsCreateConnectorRequestXmatters() { + return v, false + } + return s.CreateConnectorRequestXmatters, true +} + +// NewCreateConnectorRequestXmattersCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestXmatters. +func NewCreateConnectorRequestXmattersCreateConnectorReq(v CreateConnectorRequestXmatters) CreateConnectorReq { + var s CreateConnectorReq + s.SetCreateConnectorRequestXmatters(v) + return s +} + +// The Webhook - Case Management connector uses axios to send POST, PUT, and GET requests to a case +// management RESTful API web service. +// Ref: #/components/schemas/create_connector_request_cases_webhook +type CreateConnectorRequestCasesWebhook struct { + Config ConfigPropertiesCasesWebhook `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets OptSecretsPropertiesCasesWebhook `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *CreateConnectorRequestCasesWebhook) GetConfig() ConfigPropertiesCasesWebhook { + return s.Config +} + +// GetName returns the value of Name. +func (s *CreateConnectorRequestCasesWebhook) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *CreateConnectorRequestCasesWebhook) GetSecrets() OptSecretsPropertiesCasesWebhook { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *CreateConnectorRequestCasesWebhook) SetConfig(val ConfigPropertiesCasesWebhook) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *CreateConnectorRequestCasesWebhook) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *CreateConnectorRequestCasesWebhook) SetSecrets(val OptSecretsPropertiesCasesWebhook) { + s.Secrets = val +} + +// The type of connector. +type CreateConnectorRequestCasesWebhookConnectorTypeID string + +const ( + CreateConnectorRequestCasesWebhookConnectorTypeIDDotCasesMinusWebhook CreateConnectorRequestCasesWebhookConnectorTypeID = ".cases-webhook" +) + +// MarshalText implements encoding.TextMarshaler. +func (s CreateConnectorRequestCasesWebhookConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case CreateConnectorRequestCasesWebhookConnectorTypeIDDotCasesMinusWebhook: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *CreateConnectorRequestCasesWebhookConnectorTypeID) UnmarshalText(data []byte) error { + switch CreateConnectorRequestCasesWebhookConnectorTypeID(data) { + case CreateConnectorRequestCasesWebhookConnectorTypeIDDotCasesMinusWebhook: + *s = CreateConnectorRequestCasesWebhookConnectorTypeIDDotCasesMinusWebhook + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The email connector uses the SMTP protocol to send mail messages, using an integration of +// Nodemailer. An exception is Microsoft Exchange, which uses HTTP protocol for sending emails, Send +// mail. Email message text is sent as both plain text and html text. +// Ref: #/components/schemas/create_connector_request_email +type CreateConnectorRequestEmail struct { + Config ConfigPropertiesEmail `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesEmail `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *CreateConnectorRequestEmail) GetConfig() ConfigPropertiesEmail { + return s.Config +} + +// GetName returns the value of Name. +func (s *CreateConnectorRequestEmail) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *CreateConnectorRequestEmail) GetSecrets() SecretsPropertiesEmail { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *CreateConnectorRequestEmail) SetConfig(val ConfigPropertiesEmail) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *CreateConnectorRequestEmail) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *CreateConnectorRequestEmail) SetSecrets(val SecretsPropertiesEmail) { + s.Secrets = val +} + +// The type of connector. +type CreateConnectorRequestEmailConnectorTypeID string + +const ( + CreateConnectorRequestEmailConnectorTypeIDDotEmail CreateConnectorRequestEmailConnectorTypeID = ".email" +) + +// MarshalText implements encoding.TextMarshaler. +func (s CreateConnectorRequestEmailConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case CreateConnectorRequestEmailConnectorTypeIDDotEmail: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *CreateConnectorRequestEmailConnectorTypeID) UnmarshalText(data []byte) error { + switch CreateConnectorRequestEmailConnectorTypeID(data) { + case CreateConnectorRequestEmailConnectorTypeIDDotEmail: + *s = CreateConnectorRequestEmailConnectorTypeIDDotEmail + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The index connector indexes a document into Elasticsearch. +// Ref: #/components/schemas/create_connector_request_index +type CreateConnectorRequestIndex struct { + Config ConfigPropertiesIndex `json:"config"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetConfig returns the value of Config. +func (s *CreateConnectorRequestIndex) GetConfig() ConfigPropertiesIndex { + return s.Config +} + +// GetName returns the value of Name. +func (s *CreateConnectorRequestIndex) GetName() string { + return s.Name +} + +// SetConfig sets the value of Config. +func (s *CreateConnectorRequestIndex) SetConfig(val ConfigPropertiesIndex) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *CreateConnectorRequestIndex) SetName(val string) { + s.Name = val +} + +// The type of connector. +type CreateConnectorRequestIndexConnectorTypeID string + +const ( + CreateConnectorRequestIndexConnectorTypeIDDotIndex CreateConnectorRequestIndexConnectorTypeID = ".index" +) + +// MarshalText implements encoding.TextMarshaler. +func (s CreateConnectorRequestIndexConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case CreateConnectorRequestIndexConnectorTypeIDDotIndex: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *CreateConnectorRequestIndexConnectorTypeID) UnmarshalText(data []byte) error { + switch CreateConnectorRequestIndexConnectorTypeID(data) { + case CreateConnectorRequestIndexConnectorTypeIDDotIndex: + *s = CreateConnectorRequestIndexConnectorTypeIDDotIndex + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The Jira connector uses the REST API v2 to create Jira issues. +// Ref: #/components/schemas/create_connector_request_jira +type CreateConnectorRequestJira struct { + Config ConfigPropertiesJira `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesJira `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *CreateConnectorRequestJira) GetConfig() ConfigPropertiesJira { + return s.Config +} + +// GetName returns the value of Name. +func (s *CreateConnectorRequestJira) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *CreateConnectorRequestJira) GetSecrets() SecretsPropertiesJira { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *CreateConnectorRequestJira) SetConfig(val ConfigPropertiesJira) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *CreateConnectorRequestJira) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *CreateConnectorRequestJira) SetSecrets(val SecretsPropertiesJira) { + s.Secrets = val +} + +// The type of connector. +type CreateConnectorRequestJiraConnectorTypeID string + +const ( + CreateConnectorRequestJiraConnectorTypeIDDotJira CreateConnectorRequestJiraConnectorTypeID = ".jira" +) + +// MarshalText implements encoding.TextMarshaler. +func (s CreateConnectorRequestJiraConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case CreateConnectorRequestJiraConnectorTypeIDDotJira: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *CreateConnectorRequestJiraConnectorTypeID) UnmarshalText(data []byte) error { + switch CreateConnectorRequestJiraConnectorTypeID(data) { + case CreateConnectorRequestJiraConnectorTypeIDDotJira: + *s = CreateConnectorRequestJiraConnectorTypeIDDotJira + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The Opsgenie connector uses the Opsgenie alert API. +// Ref: #/components/schemas/create_connector_request_opsgenie +type CreateConnectorRequestOpsgenie struct { + Config ConfigPropertiesOpsgenie `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesOpsgenie `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *CreateConnectorRequestOpsgenie) GetConfig() ConfigPropertiesOpsgenie { + return s.Config +} + +// GetName returns the value of Name. +func (s *CreateConnectorRequestOpsgenie) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *CreateConnectorRequestOpsgenie) GetSecrets() SecretsPropertiesOpsgenie { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *CreateConnectorRequestOpsgenie) SetConfig(val ConfigPropertiesOpsgenie) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *CreateConnectorRequestOpsgenie) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *CreateConnectorRequestOpsgenie) SetSecrets(val SecretsPropertiesOpsgenie) { + s.Secrets = val +} + +// The type of connector. +type CreateConnectorRequestOpsgenieConnectorTypeID string + +const ( + CreateConnectorRequestOpsgenieConnectorTypeIDDotOpsgenie CreateConnectorRequestOpsgenieConnectorTypeID = ".opsgenie" +) + +// MarshalText implements encoding.TextMarshaler. +func (s CreateConnectorRequestOpsgenieConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case CreateConnectorRequestOpsgenieConnectorTypeIDDotOpsgenie: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *CreateConnectorRequestOpsgenieConnectorTypeID) UnmarshalText(data []byte) error { + switch CreateConnectorRequestOpsgenieConnectorTypeID(data) { + case CreateConnectorRequestOpsgenieConnectorTypeIDDotOpsgenie: + *s = CreateConnectorRequestOpsgenieConnectorTypeIDDotOpsgenie + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The PagerDuty connector uses the v2 Events API to trigger, acknowledge, and resolve PagerDuty +// alerts. +// Ref: #/components/schemas/create_connector_request_pagerduty +type CreateConnectorRequestPagerduty struct { + Config ConfigPropertiesPagerduty `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesPagerduty `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *CreateConnectorRequestPagerduty) GetConfig() ConfigPropertiesPagerduty { + return s.Config +} + +// GetName returns the value of Name. +func (s *CreateConnectorRequestPagerduty) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *CreateConnectorRequestPagerduty) GetSecrets() SecretsPropertiesPagerduty { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *CreateConnectorRequestPagerduty) SetConfig(val ConfigPropertiesPagerduty) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *CreateConnectorRequestPagerduty) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *CreateConnectorRequestPagerduty) SetSecrets(val SecretsPropertiesPagerduty) { + s.Secrets = val +} + +// The type of connector. +type CreateConnectorRequestPagerdutyConnectorTypeID string + +const ( + CreateConnectorRequestPagerdutyConnectorTypeIDDotPagerduty CreateConnectorRequestPagerdutyConnectorTypeID = ".pagerduty" +) + +// MarshalText implements encoding.TextMarshaler. +func (s CreateConnectorRequestPagerdutyConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case CreateConnectorRequestPagerdutyConnectorTypeIDDotPagerduty: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *CreateConnectorRequestPagerdutyConnectorTypeID) UnmarshalText(data []byte) error { + switch CreateConnectorRequestPagerdutyConnectorTypeID(data) { + case CreateConnectorRequestPagerdutyConnectorTypeIDDotPagerduty: + *s = CreateConnectorRequestPagerdutyConnectorTypeIDDotPagerduty + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The IBM Resilient connector uses the RESILIENT REST v2 to create IBM Resilient incidents. +// Ref: #/components/schemas/create_connector_request_resilient +type CreateConnectorRequestResilient struct { + Config ConfigPropertiesResilient `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesResilient `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *CreateConnectorRequestResilient) GetConfig() ConfigPropertiesResilient { + return s.Config +} + +// GetName returns the value of Name. +func (s *CreateConnectorRequestResilient) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *CreateConnectorRequestResilient) GetSecrets() SecretsPropertiesResilient { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *CreateConnectorRequestResilient) SetConfig(val ConfigPropertiesResilient) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *CreateConnectorRequestResilient) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *CreateConnectorRequestResilient) SetSecrets(val SecretsPropertiesResilient) { + s.Secrets = val +} + +// The type of connector. +type CreateConnectorRequestResilientConnectorTypeID string + +const ( + CreateConnectorRequestResilientConnectorTypeIDDotResilient CreateConnectorRequestResilientConnectorTypeID = ".resilient" +) + +// MarshalText implements encoding.TextMarshaler. +func (s CreateConnectorRequestResilientConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case CreateConnectorRequestResilientConnectorTypeIDDotResilient: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *CreateConnectorRequestResilientConnectorTypeID) UnmarshalText(data []byte) error { + switch CreateConnectorRequestResilientConnectorTypeID(data) { + case CreateConnectorRequestResilientConnectorTypeIDDotResilient: + *s = CreateConnectorRequestResilientConnectorTypeIDDotResilient + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// This connector writes an entry to the Kibana server log. +// Ref: #/components/schemas/create_connector_request_serverlog +type CreateConnectorRequestServerlog struct { + // The display name for the connector. + Name string `json:"name"` +} + +// GetName returns the value of Name. +func (s *CreateConnectorRequestServerlog) GetName() string { + return s.Name +} + +// SetName sets the value of Name. +func (s *CreateConnectorRequestServerlog) SetName(val string) { + s.Name = val +} + +// The type of connector. +type CreateConnectorRequestServerlogConnectorTypeID string + +const ( + CreateConnectorRequestServerlogConnectorTypeIDDotServerMinusLog CreateConnectorRequestServerlogConnectorTypeID = ".server-log" +) + +// MarshalText implements encoding.TextMarshaler. +func (s CreateConnectorRequestServerlogConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case CreateConnectorRequestServerlogConnectorTypeIDDotServerMinusLog: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *CreateConnectorRequestServerlogConnectorTypeID) UnmarshalText(data []byte) error { + switch CreateConnectorRequestServerlogConnectorTypeID(data) { + case CreateConnectorRequestServerlogConnectorTypeIDDotServerMinusLog: + *s = CreateConnectorRequestServerlogConnectorTypeIDDotServerMinusLog + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The ServiceNow ITSM connector uses the import set API to create ServiceNow incidents. You can use +// the connector for rule actions and cases. +// Ref: #/components/schemas/create_connector_request_servicenow +type CreateConnectorRequestServicenow struct { + Config ConfigPropertiesServicenow `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesServicenow `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *CreateConnectorRequestServicenow) GetConfig() ConfigPropertiesServicenow { + return s.Config +} + +// GetName returns the value of Name. +func (s *CreateConnectorRequestServicenow) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *CreateConnectorRequestServicenow) GetSecrets() SecretsPropertiesServicenow { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *CreateConnectorRequestServicenow) SetConfig(val ConfigPropertiesServicenow) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *CreateConnectorRequestServicenow) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *CreateConnectorRequestServicenow) SetSecrets(val SecretsPropertiesServicenow) { + s.Secrets = val +} + +// The type of connector. +type CreateConnectorRequestServicenowConnectorTypeID string + +const ( + CreateConnectorRequestServicenowConnectorTypeIDDotServicenow CreateConnectorRequestServicenowConnectorTypeID = ".servicenow" +) + +// MarshalText implements encoding.TextMarshaler. +func (s CreateConnectorRequestServicenowConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case CreateConnectorRequestServicenowConnectorTypeIDDotServicenow: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *CreateConnectorRequestServicenowConnectorTypeID) UnmarshalText(data []byte) error { + switch CreateConnectorRequestServicenowConnectorTypeID(data) { + case CreateConnectorRequestServicenowConnectorTypeIDDotServicenow: + *s = CreateConnectorRequestServicenowConnectorTypeIDDotServicenow + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The ServiceNow ITOM connector uses the event API to create ServiceNow events. You can use the +// connector for rule actions. +// Ref: #/components/schemas/create_connector_request_servicenow_itom +type CreateConnectorRequestServicenowItom struct { + Config ConfigPropertiesServicenowItom `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesServicenow `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *CreateConnectorRequestServicenowItom) GetConfig() ConfigPropertiesServicenowItom { + return s.Config +} + +// GetName returns the value of Name. +func (s *CreateConnectorRequestServicenowItom) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *CreateConnectorRequestServicenowItom) GetSecrets() SecretsPropertiesServicenow { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *CreateConnectorRequestServicenowItom) SetConfig(val ConfigPropertiesServicenowItom) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *CreateConnectorRequestServicenowItom) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *CreateConnectorRequestServicenowItom) SetSecrets(val SecretsPropertiesServicenow) { + s.Secrets = val +} + +// The type of connector. +type CreateConnectorRequestServicenowItomConnectorTypeID string + +const ( + CreateConnectorRequestServicenowItomConnectorTypeIDDotServicenowMinusItom CreateConnectorRequestServicenowItomConnectorTypeID = ".servicenow-itom" +) + +// MarshalText implements encoding.TextMarshaler. +func (s CreateConnectorRequestServicenowItomConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case CreateConnectorRequestServicenowItomConnectorTypeIDDotServicenowMinusItom: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *CreateConnectorRequestServicenowItomConnectorTypeID) UnmarshalText(data []byte) error { + switch CreateConnectorRequestServicenowItomConnectorTypeID(data) { + case CreateConnectorRequestServicenowItomConnectorTypeIDDotServicenowMinusItom: + *s = CreateConnectorRequestServicenowItomConnectorTypeIDDotServicenowMinusItom + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The ServiceNow SecOps connector uses the import set API to create ServiceNow security incidents. +// You can use the connector for rule actions and cases. +// Ref: #/components/schemas/create_connector_request_servicenow_sir +type CreateConnectorRequestServicenowSir struct { + Config ConfigPropertiesServicenow `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesServicenow `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *CreateConnectorRequestServicenowSir) GetConfig() ConfigPropertiesServicenow { + return s.Config +} + +// GetName returns the value of Name. +func (s *CreateConnectorRequestServicenowSir) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *CreateConnectorRequestServicenowSir) GetSecrets() SecretsPropertiesServicenow { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *CreateConnectorRequestServicenowSir) SetConfig(val ConfigPropertiesServicenow) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *CreateConnectorRequestServicenowSir) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *CreateConnectorRequestServicenowSir) SetSecrets(val SecretsPropertiesServicenow) { + s.Secrets = val +} + +// The type of connector. +type CreateConnectorRequestServicenowSirConnectorTypeID string + +const ( + CreateConnectorRequestServicenowSirConnectorTypeIDDotServicenowMinusSir CreateConnectorRequestServicenowSirConnectorTypeID = ".servicenow-sir" +) + +// MarshalText implements encoding.TextMarshaler. +func (s CreateConnectorRequestServicenowSirConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case CreateConnectorRequestServicenowSirConnectorTypeIDDotServicenowMinusSir: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *CreateConnectorRequestServicenowSirConnectorTypeID) UnmarshalText(data []byte) error { + switch CreateConnectorRequestServicenowSirConnectorTypeID(data) { + case CreateConnectorRequestServicenowSirConnectorTypeIDDotServicenowMinusSir: + *s = CreateConnectorRequestServicenowSirConnectorTypeIDDotServicenowMinusSir + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The Slack connector uses Slack Incoming Webhooks. +// Ref: #/components/schemas/create_connector_request_slack +type CreateConnectorRequestSlack struct { + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesSlack `json:"secrets"` +} + +// GetName returns the value of Name. +func (s *CreateConnectorRequestSlack) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *CreateConnectorRequestSlack) GetSecrets() SecretsPropertiesSlack { + return s.Secrets +} + +// SetName sets the value of Name. +func (s *CreateConnectorRequestSlack) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *CreateConnectorRequestSlack) SetSecrets(val SecretsPropertiesSlack) { + s.Secrets = val +} + +// The type of connector. +type CreateConnectorRequestSlackConnectorTypeID string + +const ( + CreateConnectorRequestSlackConnectorTypeIDDotSlack CreateConnectorRequestSlackConnectorTypeID = ".slack" +) + +// MarshalText implements encoding.TextMarshaler. +func (s CreateConnectorRequestSlackConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case CreateConnectorRequestSlackConnectorTypeIDDotSlack: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *CreateConnectorRequestSlackConnectorTypeID) UnmarshalText(data []byte) error { + switch CreateConnectorRequestSlackConnectorTypeID(data) { + case CreateConnectorRequestSlackConnectorTypeIDDotSlack: + *s = CreateConnectorRequestSlackConnectorTypeIDDotSlack + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The Swimlane connector uses the Swimlane REST API to create Swimlane records. +// Ref: #/components/schemas/create_connector_request_swimlane +type CreateConnectorRequestSwimlane struct { + Config ConfigPropertiesSwimlane `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesSwimlane `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *CreateConnectorRequestSwimlane) GetConfig() ConfigPropertiesSwimlane { + return s.Config +} + +// GetName returns the value of Name. +func (s *CreateConnectorRequestSwimlane) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *CreateConnectorRequestSwimlane) GetSecrets() SecretsPropertiesSwimlane { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *CreateConnectorRequestSwimlane) SetConfig(val ConfigPropertiesSwimlane) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *CreateConnectorRequestSwimlane) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *CreateConnectorRequestSwimlane) SetSecrets(val SecretsPropertiesSwimlane) { + s.Secrets = val +} + +// The type of connector. +type CreateConnectorRequestSwimlaneConnectorTypeID string + +const ( + CreateConnectorRequestSwimlaneConnectorTypeIDDotSwimlane CreateConnectorRequestSwimlaneConnectorTypeID = ".swimlane" +) + +// MarshalText implements encoding.TextMarshaler. +func (s CreateConnectorRequestSwimlaneConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case CreateConnectorRequestSwimlaneConnectorTypeIDDotSwimlane: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *CreateConnectorRequestSwimlaneConnectorTypeID) UnmarshalText(data []byte) error { + switch CreateConnectorRequestSwimlaneConnectorTypeID(data) { + case CreateConnectorRequestSwimlaneConnectorTypeIDDotSwimlane: + *s = CreateConnectorRequestSwimlaneConnectorTypeIDDotSwimlane + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The Microsoft Teams connector uses Incoming Webhooks. +// Ref: #/components/schemas/create_connector_request_teams +type CreateConnectorRequestTeams struct { + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesTeams `json:"secrets"` +} + +// GetName returns the value of Name. +func (s *CreateConnectorRequestTeams) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *CreateConnectorRequestTeams) GetSecrets() SecretsPropertiesTeams { + return s.Secrets +} + +// SetName sets the value of Name. +func (s *CreateConnectorRequestTeams) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *CreateConnectorRequestTeams) SetSecrets(val SecretsPropertiesTeams) { + s.Secrets = val +} + +// The type of connector. +type CreateConnectorRequestTeamsConnectorTypeID string + +const ( + CreateConnectorRequestTeamsConnectorTypeIDDotTeams CreateConnectorRequestTeamsConnectorTypeID = ".teams" +) + +// MarshalText implements encoding.TextMarshaler. +func (s CreateConnectorRequestTeamsConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case CreateConnectorRequestTeamsConnectorTypeIDDotTeams: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *CreateConnectorRequestTeamsConnectorTypeID) UnmarshalText(data []byte) error { + switch CreateConnectorRequestTeamsConnectorTypeID(data) { + case CreateConnectorRequestTeamsConnectorTypeIDDotTeams: + *s = CreateConnectorRequestTeamsConnectorTypeIDDotTeams + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The Tines connector uses Tines Webhook actions to send events via POST request. +// Ref: #/components/schemas/create_connector_request_tines +type CreateConnectorRequestTines struct { + Config ConfigPropertiesTines `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesTines `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *CreateConnectorRequestTines) GetConfig() ConfigPropertiesTines { + return s.Config +} + +// GetName returns the value of Name. +func (s *CreateConnectorRequestTines) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *CreateConnectorRequestTines) GetSecrets() SecretsPropertiesTines { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *CreateConnectorRequestTines) SetConfig(val ConfigPropertiesTines) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *CreateConnectorRequestTines) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *CreateConnectorRequestTines) SetSecrets(val SecretsPropertiesTines) { + s.Secrets = val +} + +// The type of connector. +type CreateConnectorRequestTinesConnectorTypeID string + +const ( + CreateConnectorRequestTinesConnectorTypeIDDotTines CreateConnectorRequestTinesConnectorTypeID = ".tines" +) + +// MarshalText implements encoding.TextMarshaler. +func (s CreateConnectorRequestTinesConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case CreateConnectorRequestTinesConnectorTypeIDDotTines: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *CreateConnectorRequestTinesConnectorTypeID) UnmarshalText(data []byte) error { + switch CreateConnectorRequestTinesConnectorTypeID(data) { + case CreateConnectorRequestTinesConnectorTypeIDDotTines: + *s = CreateConnectorRequestTinesConnectorTypeIDDotTines + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The Webhook connector uses axios to send a POST or PUT request to a web service. +// Ref: #/components/schemas/create_connector_request_webhook +type CreateConnectorRequestWebhook struct { + Config ConfigPropertiesWebhook `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesWebhook `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *CreateConnectorRequestWebhook) GetConfig() ConfigPropertiesWebhook { + return s.Config +} + +// GetName returns the value of Name. +func (s *CreateConnectorRequestWebhook) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *CreateConnectorRequestWebhook) GetSecrets() SecretsPropertiesWebhook { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *CreateConnectorRequestWebhook) SetConfig(val ConfigPropertiesWebhook) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *CreateConnectorRequestWebhook) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *CreateConnectorRequestWebhook) SetSecrets(val SecretsPropertiesWebhook) { + s.Secrets = val +} + +// The type of connector. +type CreateConnectorRequestWebhookConnectorTypeID string + +const ( + CreateConnectorRequestWebhookConnectorTypeIDDotWebhook CreateConnectorRequestWebhookConnectorTypeID = ".webhook" +) + +// MarshalText implements encoding.TextMarshaler. +func (s CreateConnectorRequestWebhookConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case CreateConnectorRequestWebhookConnectorTypeIDDotWebhook: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *CreateConnectorRequestWebhookConnectorTypeID) UnmarshalText(data []byte) error { + switch CreateConnectorRequestWebhookConnectorTypeID(data) { + case CreateConnectorRequestWebhookConnectorTypeIDDotWebhook: + *s = CreateConnectorRequestWebhookConnectorTypeIDDotWebhook + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// The xMatters connector uses the xMatters Workflow for Elastic to send actionable alerts to on-call +// xMatters resources. +// Ref: #/components/schemas/create_connector_request_xmatters +type CreateConnectorRequestXmatters struct { + Config ConfigPropertiesXmatters `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesXmatters `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *CreateConnectorRequestXmatters) GetConfig() ConfigPropertiesXmatters { + return s.Config +} + +// GetName returns the value of Name. +func (s *CreateConnectorRequestXmatters) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *CreateConnectorRequestXmatters) GetSecrets() SecretsPropertiesXmatters { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *CreateConnectorRequestXmatters) SetConfig(val ConfigPropertiesXmatters) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *CreateConnectorRequestXmatters) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *CreateConnectorRequestXmatters) SetSecrets(val SecretsPropertiesXmatters) { + s.Secrets = val +} + +// The type of connector. +type CreateConnectorRequestXmattersConnectorTypeID string + +const ( + CreateConnectorRequestXmattersConnectorTypeIDDotXmatters CreateConnectorRequestXmattersConnectorTypeID = ".xmatters" +) + +// MarshalText implements encoding.TextMarshaler. +func (s CreateConnectorRequestXmattersConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case CreateConnectorRequestXmattersConnectorTypeIDDotXmatters: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *CreateConnectorRequestXmattersConnectorTypeID) UnmarshalText(data []byte) error { + switch CreateConnectorRequestXmattersConnectorTypeID(data) { + case CreateConnectorRequestXmattersConnectorTypeIDDotXmatters: + *s = CreateConnectorRequestXmattersConnectorTypeIDDotXmatters + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// DeleteConnectorNoContent is response for DeleteConnector operation. +type DeleteConnectorNoContent struct{} + +func (*DeleteConnectorNoContent) deleteConnectorRes() {} + +type DeleteConnectorNotFound struct { + Error OptString `json:"error"` + Message OptString `json:"message"` + StatusCode OptInt `json:"statusCode"` +} + +// GetError returns the value of Error. +func (s *DeleteConnectorNotFound) GetError() OptString { + return s.Error +} + +// GetMessage returns the value of Message. +func (s *DeleteConnectorNotFound) GetMessage() OptString { + return s.Message +} + +// GetStatusCode returns the value of StatusCode. +func (s *DeleteConnectorNotFound) GetStatusCode() OptInt { + return s.StatusCode +} + +// SetError sets the value of Error. +func (s *DeleteConnectorNotFound) SetError(val OptString) { + s.Error = val +} + +// SetMessage sets the value of Message. +func (s *DeleteConnectorNotFound) SetMessage(val OptString) { + s.Message = val +} + +// SetStatusCode sets the value of StatusCode. +func (s *DeleteConnectorNotFound) SetStatusCode(val OptInt) { + s.StatusCode = val +} + +func (*DeleteConnectorNotFound) deleteConnectorRes() {} + +// The feature that uses the connector. Valid values are `alerting`, `cases`, `uptime`, and `siem`. +// Ref: #/components/schemas/features +type Features string + +const ( + FeaturesAlerting Features = "alerting" + FeaturesCases Features = "cases" + FeaturesUptime Features = "uptime" + FeaturesSiem Features = "siem" +) + +// MarshalText implements encoding.TextMarshaler. +func (s Features) MarshalText() ([]byte, error) { + switch s { + case FeaturesAlerting: + return []byte(s), nil + case FeaturesCases: + return []byte(s), nil + case FeaturesUptime: + return []byte(s), nil + case FeaturesSiem: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *Features) UnmarshalText(data []byte) error { + switch Features(data) { + case FeaturesAlerting: + *s = FeaturesAlerting + return nil + case FeaturesCases: + *s = FeaturesCases + return nil + case FeaturesUptime: + *s = FeaturesUptime + return nil + case FeaturesSiem: + *s = FeaturesSiem + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +type GetConnectorNotFound struct { + Error OptString `json:"error"` + Message OptString `json:"message"` + StatusCode OptInt `json:"statusCode"` +} + +// GetError returns the value of Error. +func (s *GetConnectorNotFound) GetError() OptString { + return s.Error +} + +// GetMessage returns the value of Message. +func (s *GetConnectorNotFound) GetMessage() OptString { + return s.Message +} + +// GetStatusCode returns the value of StatusCode. +func (s *GetConnectorNotFound) GetStatusCode() OptInt { + return s.StatusCode +} + +// SetError sets the value of Error. +func (s *GetConnectorNotFound) SetError(val OptString) { + s.Error = val +} + +// SetMessage sets the value of Message. +func (s *GetConnectorNotFound) SetMessage(val OptString) { + s.Message = val +} + +// SetStatusCode sets the value of StatusCode. +func (s *GetConnectorNotFound) SetStatusCode(val OptInt) { + s.StatusCode = val +} + +func (*GetConnectorNotFound) getConnectorRes() {} + +type GetConnectorTypesOKApplicationJSON []GetConnectorTypesOKItem + +func (*GetConnectorTypesOKApplicationJSON) getConnectorTypesRes() {} + +type GetConnectorTypesOKItem struct { + // Indicates whether the connector type is enabled in Kibana. + Enabled OptBool `json:"enabled"` + // Indicates whether the connector type is enabled in the Kibana `.yml` file. + EnabledInConfig OptBool `json:"enabled_in_config"` + // Indicates whether the connector is enabled in the license. + EnabledInLicense OptBool `json:"enabled_in_license"` + ID OptConnectorTypes `json:"id"` + // The license that is required to use the connector type. + MinimumLicenseRequired OptString `json:"minimum_license_required"` + // The name of the connector type. + Name OptString `json:"name"` + // The Kibana features that are supported by the connector type. + SupportedFeatureIds []Features `json:"supported_feature_ids"` +} + +// GetEnabled returns the value of Enabled. +func (s *GetConnectorTypesOKItem) GetEnabled() OptBool { + return s.Enabled +} + +// GetEnabledInConfig returns the value of EnabledInConfig. +func (s *GetConnectorTypesOKItem) GetEnabledInConfig() OptBool { + return s.EnabledInConfig +} + +// GetEnabledInLicense returns the value of EnabledInLicense. +func (s *GetConnectorTypesOKItem) GetEnabledInLicense() OptBool { + return s.EnabledInLicense +} + +// GetID returns the value of ID. +func (s *GetConnectorTypesOKItem) GetID() OptConnectorTypes { + return s.ID +} + +// GetMinimumLicenseRequired returns the value of MinimumLicenseRequired. +func (s *GetConnectorTypesOKItem) GetMinimumLicenseRequired() OptString { + return s.MinimumLicenseRequired +} + +// GetName returns the value of Name. +func (s *GetConnectorTypesOKItem) GetName() OptString { + return s.Name +} + +// GetSupportedFeatureIds returns the value of SupportedFeatureIds. +func (s *GetConnectorTypesOKItem) GetSupportedFeatureIds() []Features { + return s.SupportedFeatureIds +} + +// SetEnabled sets the value of Enabled. +func (s *GetConnectorTypesOKItem) SetEnabled(val OptBool) { + s.Enabled = val +} + +// SetEnabledInConfig sets the value of EnabledInConfig. +func (s *GetConnectorTypesOKItem) SetEnabledInConfig(val OptBool) { + s.EnabledInConfig = val +} + +// SetEnabledInLicense sets the value of EnabledInLicense. +func (s *GetConnectorTypesOKItem) SetEnabledInLicense(val OptBool) { + s.EnabledInLicense = val +} + +// SetID sets the value of ID. +func (s *GetConnectorTypesOKItem) SetID(val OptConnectorTypes) { + s.ID = val +} + +// SetMinimumLicenseRequired sets the value of MinimumLicenseRequired. +func (s *GetConnectorTypesOKItem) SetMinimumLicenseRequired(val OptString) { + s.MinimumLicenseRequired = val +} + +// SetName sets the value of Name. +func (s *GetConnectorTypesOKItem) SetName(val OptString) { + s.Name = val +} + +// SetSupportedFeatureIds sets the value of SupportedFeatureIds. +func (s *GetConnectorTypesOKItem) SetSupportedFeatureIds(val []Features) { + s.SupportedFeatureIds = val +} + +type GetConnectorsOKApplicationJSON []GetConnectorsOKItem + +func (*GetConnectorsOKApplicationJSON) getConnectorsRes() {} + +// The properties vary for each connector type. +type GetConnectorsOKItem struct { + ConnectorTypeID ConnectorTypes `json:"connector_type_id"` + // The configuration for the connector. Configuration properties vary depending on the connector type. + Config OptNilGetConnectorsOKItemConfig `json:"config"` + // The identifier for the connector. + ID string `json:"id"` + IsDeprecated OptIsDeprecated `json:"is_deprecated"` + IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + // The display name for the connector. + Name string `json:"name"` + // Indicates the number of saved objects that reference the connector. If `is_preconfigured` is true, + // this value is not calculated. + ReferencedByCount int `json:"referenced_by_count"` +} + +// GetConnectorTypeID returns the value of ConnectorTypeID. +func (s *GetConnectorsOKItem) GetConnectorTypeID() ConnectorTypes { + return s.ConnectorTypeID +} + +// GetConfig returns the value of Config. +func (s *GetConnectorsOKItem) GetConfig() OptNilGetConnectorsOKItemConfig { + return s.Config +} + +// GetID returns the value of ID. +func (s *GetConnectorsOKItem) GetID() string { + return s.ID +} + +// GetIsDeprecated returns the value of IsDeprecated. +func (s *GetConnectorsOKItem) GetIsDeprecated() OptIsDeprecated { + return s.IsDeprecated +} + +// GetIsMissingSecrets returns the value of IsMissingSecrets. +func (s *GetConnectorsOKItem) GetIsMissingSecrets() OptIsMissingSecrets { + return s.IsMissingSecrets +} + +// GetIsPreconfigured returns the value of IsPreconfigured. +func (s *GetConnectorsOKItem) GetIsPreconfigured() IsPreconfigured { + return s.IsPreconfigured +} + +// GetName returns the value of Name. +func (s *GetConnectorsOKItem) GetName() string { + return s.Name +} + +// GetReferencedByCount returns the value of ReferencedByCount. +func (s *GetConnectorsOKItem) GetReferencedByCount() int { + return s.ReferencedByCount +} + +// SetConnectorTypeID sets the value of ConnectorTypeID. +func (s *GetConnectorsOKItem) SetConnectorTypeID(val ConnectorTypes) { + s.ConnectorTypeID = val +} + +// SetConfig sets the value of Config. +func (s *GetConnectorsOKItem) SetConfig(val OptNilGetConnectorsOKItemConfig) { + s.Config = val +} + +// SetID sets the value of ID. +func (s *GetConnectorsOKItem) SetID(val string) { + s.ID = val +} + +// SetIsDeprecated sets the value of IsDeprecated. +func (s *GetConnectorsOKItem) SetIsDeprecated(val OptIsDeprecated) { + s.IsDeprecated = val +} + +// SetIsMissingSecrets sets the value of IsMissingSecrets. +func (s *GetConnectorsOKItem) SetIsMissingSecrets(val OptIsMissingSecrets) { + s.IsMissingSecrets = val +} + +// SetIsPreconfigured sets the value of IsPreconfigured. +func (s *GetConnectorsOKItem) SetIsPreconfigured(val IsPreconfigured) { + s.IsPreconfigured = val +} + +// SetName sets the value of Name. +func (s *GetConnectorsOKItem) SetName(val string) { + s.Name = val +} + +// SetReferencedByCount sets the value of ReferencedByCount. +func (s *GetConnectorsOKItem) SetReferencedByCount(val int) { + s.ReferencedByCount = val +} + +// The configuration for the connector. Configuration properties vary depending on the connector type. +type GetConnectorsOKItemConfig map[string]jx.Raw + +func (s *GetConnectorsOKItemConfig) init() GetConnectorsOKItemConfig { + m := *s + if m == nil { + m = map[string]jx.Raw{} + *s = m + } + return m +} + +type IsDeprecated bool + +type IsMissingSecrets bool + +type IsPreconfigured bool + +type LegacyCreateConnectorReq struct { + // The connector type identifier. + ActionTypeId OptString `json:"actionTypeId"` + // The configuration for the connector. Configuration properties vary depending on the connector type. + Config *LegacyCreateConnectorReqConfig `json:"config"` + // The display name for the connector. + Name OptString `json:"name"` + // The secrets configuration for the connector. Secrets configuration properties vary depending on + // the connector type. NOTE: Remember these values. You must provide them each time you update the + // connector. + Secrets *LegacyCreateConnectorReqSecrets `json:"secrets"` +} + +// GetActionTypeId returns the value of ActionTypeId. +func (s *LegacyCreateConnectorReq) GetActionTypeId() OptString { + return s.ActionTypeId +} + +// GetConfig returns the value of Config. +func (s *LegacyCreateConnectorReq) GetConfig() *LegacyCreateConnectorReqConfig { + return s.Config +} + +// GetName returns the value of Name. +func (s *LegacyCreateConnectorReq) GetName() OptString { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *LegacyCreateConnectorReq) GetSecrets() *LegacyCreateConnectorReqSecrets { + return s.Secrets +} + +// SetActionTypeId sets the value of ActionTypeId. +func (s *LegacyCreateConnectorReq) SetActionTypeId(val OptString) { + s.ActionTypeId = val +} + +// SetConfig sets the value of Config. +func (s *LegacyCreateConnectorReq) SetConfig(val *LegacyCreateConnectorReqConfig) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *LegacyCreateConnectorReq) SetName(val OptString) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *LegacyCreateConnectorReq) SetSecrets(val *LegacyCreateConnectorReqSecrets) { + s.Secrets = val +} + +// The configuration for the connector. Configuration properties vary depending on the connector type. +type LegacyCreateConnectorReqConfig struct{} + +// The secrets configuration for the connector. Secrets configuration properties vary depending on +// the connector type. NOTE: Remember these values. You must provide them each time you update the +// connector. +type LegacyCreateConnectorReqSecrets struct{} + +// LegacyDeleteConnectorNoContent is response for LegacyDeleteConnector operation. +type LegacyDeleteConnectorNoContent struct{} + +func (*LegacyDeleteConnectorNoContent) legacyDeleteConnectorRes() {} + +type LegacyGetConnectorTypesOKApplicationJSON []LegacyGetConnectorTypesOKItem + +func (*LegacyGetConnectorTypesOKApplicationJSON) legacyGetConnectorTypesRes() {} + +type LegacyGetConnectorTypesOKItem struct { + // Indicates whether the connector type is enabled in Kibana. + Enabled OptBool `json:"enabled"` + // Indicates whether the connector type is enabled in the Kibana `.yml` file. + EnabledInConfig OptBool `json:"enabledInConfig"` + // Indicates whether the connector is enabled in the license. + EnabledInLicense OptBool `json:"enabledInLicense"` + // The unique identifier for the connector type. + ID OptString `json:"id"` + // The license that is required to use the connector type. + MinimumLicenseRequired OptString `json:"minimumLicenseRequired"` + // The name of the connector type. + Name OptString `json:"name"` +} + +// GetEnabled returns the value of Enabled. +func (s *LegacyGetConnectorTypesOKItem) GetEnabled() OptBool { + return s.Enabled +} + +// GetEnabledInConfig returns the value of EnabledInConfig. +func (s *LegacyGetConnectorTypesOKItem) GetEnabledInConfig() OptBool { + return s.EnabledInConfig +} + +// GetEnabledInLicense returns the value of EnabledInLicense. +func (s *LegacyGetConnectorTypesOKItem) GetEnabledInLicense() OptBool { + return s.EnabledInLicense +} + +// GetID returns the value of ID. +func (s *LegacyGetConnectorTypesOKItem) GetID() OptString { + return s.ID +} + +// GetMinimumLicenseRequired returns the value of MinimumLicenseRequired. +func (s *LegacyGetConnectorTypesOKItem) GetMinimumLicenseRequired() OptString { + return s.MinimumLicenseRequired +} + +// GetName returns the value of Name. +func (s *LegacyGetConnectorTypesOKItem) GetName() OptString { + return s.Name +} + +// SetEnabled sets the value of Enabled. +func (s *LegacyGetConnectorTypesOKItem) SetEnabled(val OptBool) { + s.Enabled = val +} + +// SetEnabledInConfig sets the value of EnabledInConfig. +func (s *LegacyGetConnectorTypesOKItem) SetEnabledInConfig(val OptBool) { + s.EnabledInConfig = val +} + +// SetEnabledInLicense sets the value of EnabledInLicense. +func (s *LegacyGetConnectorTypesOKItem) SetEnabledInLicense(val OptBool) { + s.EnabledInLicense = val +} + +// SetID sets the value of ID. +func (s *LegacyGetConnectorTypesOKItem) SetID(val OptString) { + s.ID = val +} + +// SetMinimumLicenseRequired sets the value of MinimumLicenseRequired. +func (s *LegacyGetConnectorTypesOKItem) SetMinimumLicenseRequired(val OptString) { + s.MinimumLicenseRequired = val +} + +// SetName sets the value of Name. +func (s *LegacyGetConnectorTypesOKItem) SetName(val OptString) { + s.Name = val +} + +type LegacyGetConnectorsOKApplicationJSON []ActionResponseProperties + +func (*LegacyGetConnectorsOKApplicationJSON) legacyGetConnectorsRes() {} + +type LegacyRunConnectorOK struct { + ActionId OptString `json:"actionId"` + Data OptLegacyRunConnectorOKData `json:"data"` + // The status of the action. + Status OptString `json:"status"` +} + +// GetActionId returns the value of ActionId. +func (s *LegacyRunConnectorOK) GetActionId() OptString { + return s.ActionId +} + +// GetData returns the value of Data. +func (s *LegacyRunConnectorOK) GetData() OptLegacyRunConnectorOKData { + return s.Data +} + +// GetStatus returns the value of Status. +func (s *LegacyRunConnectorOK) GetStatus() OptString { + return s.Status +} + +// SetActionId sets the value of ActionId. +func (s *LegacyRunConnectorOK) SetActionId(val OptString) { + s.ActionId = val +} + +// SetData sets the value of Data. +func (s *LegacyRunConnectorOK) SetData(val OptLegacyRunConnectorOKData) { + s.Data = val +} + +// SetStatus sets the value of Status. +func (s *LegacyRunConnectorOK) SetStatus(val OptString) { + s.Status = val +} + +func (*LegacyRunConnectorOK) legacyRunConnectorRes() {} + +// LegacyRunConnectorOKData represents sum type. +type LegacyRunConnectorOKData struct { + Type LegacyRunConnectorOKDataType // switch on this field + LegacyRunConnectorOKData0 LegacyRunConnectorOKData0 + LegacyRunConnectorOKData1ItemArray []LegacyRunConnectorOKData1Item +} + +// LegacyRunConnectorOKDataType is oneOf type of LegacyRunConnectorOKData. +type LegacyRunConnectorOKDataType string + +// Possible values for LegacyRunConnectorOKDataType. +const ( + LegacyRunConnectorOKData0LegacyRunConnectorOKData LegacyRunConnectorOKDataType = "LegacyRunConnectorOKData0" + LegacyRunConnectorOKData1ItemArrayLegacyRunConnectorOKData LegacyRunConnectorOKDataType = "[]LegacyRunConnectorOKData1Item" +) + +// IsLegacyRunConnectorOKData0 reports whether LegacyRunConnectorOKData is LegacyRunConnectorOKData0. +func (s LegacyRunConnectorOKData) IsLegacyRunConnectorOKData0() bool { + return s.Type == LegacyRunConnectorOKData0LegacyRunConnectorOKData +} + +// IsLegacyRunConnectorOKData1ItemArray reports whether LegacyRunConnectorOKData is []LegacyRunConnectorOKData1Item. +func (s LegacyRunConnectorOKData) IsLegacyRunConnectorOKData1ItemArray() bool { + return s.Type == LegacyRunConnectorOKData1ItemArrayLegacyRunConnectorOKData +} + +// SetLegacyRunConnectorOKData0 sets LegacyRunConnectorOKData to LegacyRunConnectorOKData0. +func (s *LegacyRunConnectorOKData) SetLegacyRunConnectorOKData0(v LegacyRunConnectorOKData0) { + s.Type = LegacyRunConnectorOKData0LegacyRunConnectorOKData + s.LegacyRunConnectorOKData0 = v +} + +// GetLegacyRunConnectorOKData0 returns LegacyRunConnectorOKData0 and true boolean if LegacyRunConnectorOKData is LegacyRunConnectorOKData0. +func (s LegacyRunConnectorOKData) GetLegacyRunConnectorOKData0() (v LegacyRunConnectorOKData0, ok bool) { + if !s.IsLegacyRunConnectorOKData0() { + return v, false + } + return s.LegacyRunConnectorOKData0, true +} + +// NewLegacyRunConnectorOKData0LegacyRunConnectorOKData returns new LegacyRunConnectorOKData from LegacyRunConnectorOKData0. +func NewLegacyRunConnectorOKData0LegacyRunConnectorOKData(v LegacyRunConnectorOKData0) LegacyRunConnectorOKData { + var s LegacyRunConnectorOKData + s.SetLegacyRunConnectorOKData0(v) + return s +} + +// SetLegacyRunConnectorOKData1ItemArray sets LegacyRunConnectorOKData to []LegacyRunConnectorOKData1Item. +func (s *LegacyRunConnectorOKData) SetLegacyRunConnectorOKData1ItemArray(v []LegacyRunConnectorOKData1Item) { + s.Type = LegacyRunConnectorOKData1ItemArrayLegacyRunConnectorOKData + s.LegacyRunConnectorOKData1ItemArray = v +} + +// GetLegacyRunConnectorOKData1ItemArray returns []LegacyRunConnectorOKData1Item and true boolean if LegacyRunConnectorOKData is []LegacyRunConnectorOKData1Item. +func (s LegacyRunConnectorOKData) GetLegacyRunConnectorOKData1ItemArray() (v []LegacyRunConnectorOKData1Item, ok bool) { + if !s.IsLegacyRunConnectorOKData1ItemArray() { + return v, false + } + return s.LegacyRunConnectorOKData1ItemArray, true +} + +// NewLegacyRunConnectorOKData1ItemArrayLegacyRunConnectorOKData returns new LegacyRunConnectorOKData from []LegacyRunConnectorOKData1Item. +func NewLegacyRunConnectorOKData1ItemArrayLegacyRunConnectorOKData(v []LegacyRunConnectorOKData1Item) LegacyRunConnectorOKData { + var s LegacyRunConnectorOKData + s.SetLegacyRunConnectorOKData1ItemArray(v) + return s +} + +// Information returned from the action. +type LegacyRunConnectorOKData0 map[string]jx.Raw + +func (s *LegacyRunConnectorOKData0) init() LegacyRunConnectorOKData0 { + m := *s + if m == nil { + m = map[string]jx.Raw{} + *s = m + } + return m +} + +type LegacyRunConnectorOKData1Item struct{} + +// The properties vary depending on the connector type. +type LegacyRunConnectorReq struct { + // The parameters of the connector. Parameter properties vary depending on the connector type. + Params LegacyRunConnectorReqParams `json:"params"` +} + +// GetParams returns the value of Params. +func (s *LegacyRunConnectorReq) GetParams() LegacyRunConnectorReqParams { + return s.Params +} + +// SetParams sets the value of Params. +func (s *LegacyRunConnectorReq) SetParams(val LegacyRunConnectorReqParams) { + s.Params = val +} + +// The parameters of the connector. Parameter properties vary depending on the connector type. +type LegacyRunConnectorReqParams struct{} + +// The properties vary depending on the connector type. +type LegacyUpdateConnectorReq struct { + // The new connector configuration. Configuration properties vary depending on the connector type. + Config *LegacyUpdateConnectorReqConfig `json:"config"` + // The new name for the connector. + Name OptString `json:"name"` + // The updated secrets configuration for the connector. Secrets properties vary depending on the + // connector type. + Secrets *LegacyUpdateConnectorReqSecrets `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *LegacyUpdateConnectorReq) GetConfig() *LegacyUpdateConnectorReqConfig { + return s.Config +} + +// GetName returns the value of Name. +func (s *LegacyUpdateConnectorReq) GetName() OptString { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *LegacyUpdateConnectorReq) GetSecrets() *LegacyUpdateConnectorReqSecrets { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *LegacyUpdateConnectorReq) SetConfig(val *LegacyUpdateConnectorReqConfig) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *LegacyUpdateConnectorReq) SetName(val OptString) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *LegacyUpdateConnectorReq) SetSecrets(val *LegacyUpdateConnectorReqSecrets) { + s.Secrets = val +} + +// The new connector configuration. Configuration properties vary depending on the connector type. +type LegacyUpdateConnectorReqConfig struct{} + +// The updated secrets configuration for the connector. Secrets properties vary depending on the +// connector type. +type LegacyUpdateConnectorReqSecrets struct{} + +// NewOptBool returns new OptBool with value set to v. +func NewOptBool(v bool) OptBool { + return OptBool{ + Value: v, + Set: true, + } +} + +// OptBool is optional bool. +type OptBool struct { + Value bool + Set bool +} + +// IsSet returns true if OptBool was set. +func (o OptBool) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptBool) Reset() { + var v bool + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptBool) SetTo(v bool) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptBool) Get() (v bool, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptBool) Or(d bool) bool { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptConfigPropertiesCasesWebhookCreateCommentMethod returns new OptConfigPropertiesCasesWebhookCreateCommentMethod with value set to v. +func NewOptConfigPropertiesCasesWebhookCreateCommentMethod(v ConfigPropertiesCasesWebhookCreateCommentMethod) OptConfigPropertiesCasesWebhookCreateCommentMethod { + return OptConfigPropertiesCasesWebhookCreateCommentMethod{ + Value: v, + Set: true, + } +} + +// OptConfigPropertiesCasesWebhookCreateCommentMethod is optional ConfigPropertiesCasesWebhookCreateCommentMethod. +type OptConfigPropertiesCasesWebhookCreateCommentMethod struct { + Value ConfigPropertiesCasesWebhookCreateCommentMethod + Set bool +} + +// IsSet returns true if OptConfigPropertiesCasesWebhookCreateCommentMethod was set. +func (o OptConfigPropertiesCasesWebhookCreateCommentMethod) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptConfigPropertiesCasesWebhookCreateCommentMethod) Reset() { + var v ConfigPropertiesCasesWebhookCreateCommentMethod + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptConfigPropertiesCasesWebhookCreateCommentMethod) SetTo(v ConfigPropertiesCasesWebhookCreateCommentMethod) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptConfigPropertiesCasesWebhookCreateCommentMethod) Get() (v ConfigPropertiesCasesWebhookCreateCommentMethod, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptConfigPropertiesCasesWebhookCreateCommentMethod) Or(d ConfigPropertiesCasesWebhookCreateCommentMethod) ConfigPropertiesCasesWebhookCreateCommentMethod { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptConfigPropertiesCasesWebhookCreateIncidentMethod returns new OptConfigPropertiesCasesWebhookCreateIncidentMethod with value set to v. +func NewOptConfigPropertiesCasesWebhookCreateIncidentMethod(v ConfigPropertiesCasesWebhookCreateIncidentMethod) OptConfigPropertiesCasesWebhookCreateIncidentMethod { + return OptConfigPropertiesCasesWebhookCreateIncidentMethod{ + Value: v, + Set: true, + } +} + +// OptConfigPropertiesCasesWebhookCreateIncidentMethod is optional ConfigPropertiesCasesWebhookCreateIncidentMethod. +type OptConfigPropertiesCasesWebhookCreateIncidentMethod struct { + Value ConfigPropertiesCasesWebhookCreateIncidentMethod + Set bool +} + +// IsSet returns true if OptConfigPropertiesCasesWebhookCreateIncidentMethod was set. +func (o OptConfigPropertiesCasesWebhookCreateIncidentMethod) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptConfigPropertiesCasesWebhookCreateIncidentMethod) Reset() { + var v ConfigPropertiesCasesWebhookCreateIncidentMethod + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptConfigPropertiesCasesWebhookCreateIncidentMethod) SetTo(v ConfigPropertiesCasesWebhookCreateIncidentMethod) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptConfigPropertiesCasesWebhookCreateIncidentMethod) Get() (v ConfigPropertiesCasesWebhookCreateIncidentMethod, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptConfigPropertiesCasesWebhookCreateIncidentMethod) Or(d ConfigPropertiesCasesWebhookCreateIncidentMethod) ConfigPropertiesCasesWebhookCreateIncidentMethod { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptConfigPropertiesCasesWebhookUpdateIncidentMethod returns new OptConfigPropertiesCasesWebhookUpdateIncidentMethod with value set to v. +func NewOptConfigPropertiesCasesWebhookUpdateIncidentMethod(v ConfigPropertiesCasesWebhookUpdateIncidentMethod) OptConfigPropertiesCasesWebhookUpdateIncidentMethod { + return OptConfigPropertiesCasesWebhookUpdateIncidentMethod{ + Value: v, + Set: true, + } +} + +// OptConfigPropertiesCasesWebhookUpdateIncidentMethod is optional ConfigPropertiesCasesWebhookUpdateIncidentMethod. +type OptConfigPropertiesCasesWebhookUpdateIncidentMethod struct { + Value ConfigPropertiesCasesWebhookUpdateIncidentMethod + Set bool +} + +// IsSet returns true if OptConfigPropertiesCasesWebhookUpdateIncidentMethod was set. +func (o OptConfigPropertiesCasesWebhookUpdateIncidentMethod) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptConfigPropertiesCasesWebhookUpdateIncidentMethod) Reset() { + var v ConfigPropertiesCasesWebhookUpdateIncidentMethod + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptConfigPropertiesCasesWebhookUpdateIncidentMethod) SetTo(v ConfigPropertiesCasesWebhookUpdateIncidentMethod) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptConfigPropertiesCasesWebhookUpdateIncidentMethod) Get() (v ConfigPropertiesCasesWebhookUpdateIncidentMethod, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptConfigPropertiesCasesWebhookUpdateIncidentMethod) Or(d ConfigPropertiesCasesWebhookUpdateIncidentMethod) ConfigPropertiesCasesWebhookUpdateIncidentMethod { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptConfigPropertiesSwimlaneMappings returns new OptConfigPropertiesSwimlaneMappings with value set to v. +func NewOptConfigPropertiesSwimlaneMappings(v ConfigPropertiesSwimlaneMappings) OptConfigPropertiesSwimlaneMappings { + return OptConfigPropertiesSwimlaneMappings{ + Value: v, + Set: true, + } +} + +// OptConfigPropertiesSwimlaneMappings is optional ConfigPropertiesSwimlaneMappings. +type OptConfigPropertiesSwimlaneMappings struct { + Value ConfigPropertiesSwimlaneMappings + Set bool +} + +// IsSet returns true if OptConfigPropertiesSwimlaneMappings was set. +func (o OptConfigPropertiesSwimlaneMappings) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptConfigPropertiesSwimlaneMappings) Reset() { + var v ConfigPropertiesSwimlaneMappings + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptConfigPropertiesSwimlaneMappings) SetTo(v ConfigPropertiesSwimlaneMappings) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptConfigPropertiesSwimlaneMappings) Get() (v ConfigPropertiesSwimlaneMappings, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptConfigPropertiesSwimlaneMappings) Or(d ConfigPropertiesSwimlaneMappings) ConfigPropertiesSwimlaneMappings { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptConfigPropertiesSwimlaneMappingsAlertIdConfig returns new OptConfigPropertiesSwimlaneMappingsAlertIdConfig with value set to v. +func NewOptConfigPropertiesSwimlaneMappingsAlertIdConfig(v ConfigPropertiesSwimlaneMappingsAlertIdConfig) OptConfigPropertiesSwimlaneMappingsAlertIdConfig { + return OptConfigPropertiesSwimlaneMappingsAlertIdConfig{ + Value: v, + Set: true, + } +} + +// OptConfigPropertiesSwimlaneMappingsAlertIdConfig is optional ConfigPropertiesSwimlaneMappingsAlertIdConfig. +type OptConfigPropertiesSwimlaneMappingsAlertIdConfig struct { + Value ConfigPropertiesSwimlaneMappingsAlertIdConfig + Set bool +} + +// IsSet returns true if OptConfigPropertiesSwimlaneMappingsAlertIdConfig was set. +func (o OptConfigPropertiesSwimlaneMappingsAlertIdConfig) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptConfigPropertiesSwimlaneMappingsAlertIdConfig) Reset() { + var v ConfigPropertiesSwimlaneMappingsAlertIdConfig + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptConfigPropertiesSwimlaneMappingsAlertIdConfig) SetTo(v ConfigPropertiesSwimlaneMappingsAlertIdConfig) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptConfigPropertiesSwimlaneMappingsAlertIdConfig) Get() (v ConfigPropertiesSwimlaneMappingsAlertIdConfig, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptConfigPropertiesSwimlaneMappingsAlertIdConfig) Or(d ConfigPropertiesSwimlaneMappingsAlertIdConfig) ConfigPropertiesSwimlaneMappingsAlertIdConfig { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptConfigPropertiesSwimlaneMappingsCaseIdConfig returns new OptConfigPropertiesSwimlaneMappingsCaseIdConfig with value set to v. +func NewOptConfigPropertiesSwimlaneMappingsCaseIdConfig(v ConfigPropertiesSwimlaneMappingsCaseIdConfig) OptConfigPropertiesSwimlaneMappingsCaseIdConfig { + return OptConfigPropertiesSwimlaneMappingsCaseIdConfig{ + Value: v, + Set: true, + } +} + +// OptConfigPropertiesSwimlaneMappingsCaseIdConfig is optional ConfigPropertiesSwimlaneMappingsCaseIdConfig. +type OptConfigPropertiesSwimlaneMappingsCaseIdConfig struct { + Value ConfigPropertiesSwimlaneMappingsCaseIdConfig + Set bool +} + +// IsSet returns true if OptConfigPropertiesSwimlaneMappingsCaseIdConfig was set. +func (o OptConfigPropertiesSwimlaneMappingsCaseIdConfig) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptConfigPropertiesSwimlaneMappingsCaseIdConfig) Reset() { + var v ConfigPropertiesSwimlaneMappingsCaseIdConfig + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptConfigPropertiesSwimlaneMappingsCaseIdConfig) SetTo(v ConfigPropertiesSwimlaneMappingsCaseIdConfig) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptConfigPropertiesSwimlaneMappingsCaseIdConfig) Get() (v ConfigPropertiesSwimlaneMappingsCaseIdConfig, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptConfigPropertiesSwimlaneMappingsCaseIdConfig) Or(d ConfigPropertiesSwimlaneMappingsCaseIdConfig) ConfigPropertiesSwimlaneMappingsCaseIdConfig { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptConfigPropertiesSwimlaneMappingsCaseNameConfig returns new OptConfigPropertiesSwimlaneMappingsCaseNameConfig with value set to v. +func NewOptConfigPropertiesSwimlaneMappingsCaseNameConfig(v ConfigPropertiesSwimlaneMappingsCaseNameConfig) OptConfigPropertiesSwimlaneMappingsCaseNameConfig { + return OptConfigPropertiesSwimlaneMappingsCaseNameConfig{ + Value: v, + Set: true, + } +} + +// OptConfigPropertiesSwimlaneMappingsCaseNameConfig is optional ConfigPropertiesSwimlaneMappingsCaseNameConfig. +type OptConfigPropertiesSwimlaneMappingsCaseNameConfig struct { + Value ConfigPropertiesSwimlaneMappingsCaseNameConfig + Set bool +} + +// IsSet returns true if OptConfigPropertiesSwimlaneMappingsCaseNameConfig was set. +func (o OptConfigPropertiesSwimlaneMappingsCaseNameConfig) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptConfigPropertiesSwimlaneMappingsCaseNameConfig) Reset() { + var v ConfigPropertiesSwimlaneMappingsCaseNameConfig + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptConfigPropertiesSwimlaneMappingsCaseNameConfig) SetTo(v ConfigPropertiesSwimlaneMappingsCaseNameConfig) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptConfigPropertiesSwimlaneMappingsCaseNameConfig) Get() (v ConfigPropertiesSwimlaneMappingsCaseNameConfig, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptConfigPropertiesSwimlaneMappingsCaseNameConfig) Or(d ConfigPropertiesSwimlaneMappingsCaseNameConfig) ConfigPropertiesSwimlaneMappingsCaseNameConfig { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptConfigPropertiesSwimlaneMappingsCommentsConfig returns new OptConfigPropertiesSwimlaneMappingsCommentsConfig with value set to v. +func NewOptConfigPropertiesSwimlaneMappingsCommentsConfig(v ConfigPropertiesSwimlaneMappingsCommentsConfig) OptConfigPropertiesSwimlaneMappingsCommentsConfig { + return OptConfigPropertiesSwimlaneMappingsCommentsConfig{ + Value: v, + Set: true, + } +} + +// OptConfigPropertiesSwimlaneMappingsCommentsConfig is optional ConfigPropertiesSwimlaneMappingsCommentsConfig. +type OptConfigPropertiesSwimlaneMappingsCommentsConfig struct { + Value ConfigPropertiesSwimlaneMappingsCommentsConfig + Set bool +} + +// IsSet returns true if OptConfigPropertiesSwimlaneMappingsCommentsConfig was set. +func (o OptConfigPropertiesSwimlaneMappingsCommentsConfig) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptConfigPropertiesSwimlaneMappingsCommentsConfig) Reset() { + var v ConfigPropertiesSwimlaneMappingsCommentsConfig + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptConfigPropertiesSwimlaneMappingsCommentsConfig) SetTo(v ConfigPropertiesSwimlaneMappingsCommentsConfig) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptConfigPropertiesSwimlaneMappingsCommentsConfig) Get() (v ConfigPropertiesSwimlaneMappingsCommentsConfig, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptConfigPropertiesSwimlaneMappingsCommentsConfig) Or(d ConfigPropertiesSwimlaneMappingsCommentsConfig) ConfigPropertiesSwimlaneMappingsCommentsConfig { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptConfigPropertiesSwimlaneMappingsDescriptionConfig returns new OptConfigPropertiesSwimlaneMappingsDescriptionConfig with value set to v. +func NewOptConfigPropertiesSwimlaneMappingsDescriptionConfig(v ConfigPropertiesSwimlaneMappingsDescriptionConfig) OptConfigPropertiesSwimlaneMappingsDescriptionConfig { + return OptConfigPropertiesSwimlaneMappingsDescriptionConfig{ + Value: v, + Set: true, + } +} + +// OptConfigPropertiesSwimlaneMappingsDescriptionConfig is optional ConfigPropertiesSwimlaneMappingsDescriptionConfig. +type OptConfigPropertiesSwimlaneMappingsDescriptionConfig struct { + Value ConfigPropertiesSwimlaneMappingsDescriptionConfig + Set bool +} + +// IsSet returns true if OptConfigPropertiesSwimlaneMappingsDescriptionConfig was set. +func (o OptConfigPropertiesSwimlaneMappingsDescriptionConfig) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptConfigPropertiesSwimlaneMappingsDescriptionConfig) Reset() { + var v ConfigPropertiesSwimlaneMappingsDescriptionConfig + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptConfigPropertiesSwimlaneMappingsDescriptionConfig) SetTo(v ConfigPropertiesSwimlaneMappingsDescriptionConfig) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptConfigPropertiesSwimlaneMappingsDescriptionConfig) Get() (v ConfigPropertiesSwimlaneMappingsDescriptionConfig, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptConfigPropertiesSwimlaneMappingsDescriptionConfig) Or(d ConfigPropertiesSwimlaneMappingsDescriptionConfig) ConfigPropertiesSwimlaneMappingsDescriptionConfig { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptConfigPropertiesSwimlaneMappingsRuleNameConfig returns new OptConfigPropertiesSwimlaneMappingsRuleNameConfig with value set to v. +func NewOptConfigPropertiesSwimlaneMappingsRuleNameConfig(v ConfigPropertiesSwimlaneMappingsRuleNameConfig) OptConfigPropertiesSwimlaneMappingsRuleNameConfig { + return OptConfigPropertiesSwimlaneMappingsRuleNameConfig{ + Value: v, + Set: true, + } +} + +// OptConfigPropertiesSwimlaneMappingsRuleNameConfig is optional ConfigPropertiesSwimlaneMappingsRuleNameConfig. +type OptConfigPropertiesSwimlaneMappingsRuleNameConfig struct { + Value ConfigPropertiesSwimlaneMappingsRuleNameConfig + Set bool +} + +// IsSet returns true if OptConfigPropertiesSwimlaneMappingsRuleNameConfig was set. +func (o OptConfigPropertiesSwimlaneMappingsRuleNameConfig) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptConfigPropertiesSwimlaneMappingsRuleNameConfig) Reset() { + var v ConfigPropertiesSwimlaneMappingsRuleNameConfig + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptConfigPropertiesSwimlaneMappingsRuleNameConfig) SetTo(v ConfigPropertiesSwimlaneMappingsRuleNameConfig) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptConfigPropertiesSwimlaneMappingsRuleNameConfig) Get() (v ConfigPropertiesSwimlaneMappingsRuleNameConfig, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptConfigPropertiesSwimlaneMappingsRuleNameConfig) Or(d ConfigPropertiesSwimlaneMappingsRuleNameConfig) ConfigPropertiesSwimlaneMappingsRuleNameConfig { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptConfigPropertiesSwimlaneMappingsSeverityConfig returns new OptConfigPropertiesSwimlaneMappingsSeverityConfig with value set to v. +func NewOptConfigPropertiesSwimlaneMappingsSeverityConfig(v ConfigPropertiesSwimlaneMappingsSeverityConfig) OptConfigPropertiesSwimlaneMappingsSeverityConfig { + return OptConfigPropertiesSwimlaneMappingsSeverityConfig{ + Value: v, + Set: true, + } +} + +// OptConfigPropertiesSwimlaneMappingsSeverityConfig is optional ConfigPropertiesSwimlaneMappingsSeverityConfig. +type OptConfigPropertiesSwimlaneMappingsSeverityConfig struct { + Value ConfigPropertiesSwimlaneMappingsSeverityConfig + Set bool +} + +// IsSet returns true if OptConfigPropertiesSwimlaneMappingsSeverityConfig was set. +func (o OptConfigPropertiesSwimlaneMappingsSeverityConfig) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptConfigPropertiesSwimlaneMappingsSeverityConfig) Reset() { + var v ConfigPropertiesSwimlaneMappingsSeverityConfig + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptConfigPropertiesSwimlaneMappingsSeverityConfig) SetTo(v ConfigPropertiesSwimlaneMappingsSeverityConfig) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptConfigPropertiesSwimlaneMappingsSeverityConfig) Get() (v ConfigPropertiesSwimlaneMappingsSeverityConfig, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptConfigPropertiesSwimlaneMappingsSeverityConfig) Or(d ConfigPropertiesSwimlaneMappingsSeverityConfig) ConfigPropertiesSwimlaneMappingsSeverityConfig { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptConnectorTypes returns new OptConnectorTypes with value set to v. +func NewOptConnectorTypes(v ConnectorTypes) OptConnectorTypes { + return OptConnectorTypes{ + Value: v, + Set: true, + } +} + +// OptConnectorTypes is optional ConnectorTypes. +type OptConnectorTypes struct { + Value ConnectorTypes + Set bool +} + +// IsSet returns true if OptConnectorTypes was set. +func (o OptConnectorTypes) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptConnectorTypes) Reset() { + var v ConnectorTypes + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptConnectorTypes) SetTo(v ConnectorTypes) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptConnectorTypes) Get() (v ConnectorTypes, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptConnectorTypes) Or(d ConnectorTypes) ConnectorTypes { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptFeatures returns new OptFeatures with value set to v. +func NewOptFeatures(v Features) OptFeatures { + return OptFeatures{ + Value: v, + Set: true, + } +} + +// OptFeatures is optional Features. +type OptFeatures struct { + Value Features + Set bool +} + +// IsSet returns true if OptFeatures was set. +func (o OptFeatures) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptFeatures) Reset() { + var v Features + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptFeatures) SetTo(v Features) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptFeatures) Get() (v Features, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptFeatures) Or(d Features) Features { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptInt returns new OptInt with value set to v. +func NewOptInt(v int) OptInt { + return OptInt{ + Value: v, + Set: true, + } +} + +// OptInt is optional int. +type OptInt struct { + Value int + Set bool +} + +// IsSet returns true if OptInt was set. +func (o OptInt) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptInt) Reset() { + var v int + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptInt) SetTo(v int) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptInt) Get() (v int, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptInt) Or(d int) int { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptIsDeprecated returns new OptIsDeprecated with value set to v. +func NewOptIsDeprecated(v IsDeprecated) OptIsDeprecated { + return OptIsDeprecated{ + Value: v, + Set: true, + } +} + +// OptIsDeprecated is optional IsDeprecated. +type OptIsDeprecated struct { + Value IsDeprecated + Set bool +} + +// IsSet returns true if OptIsDeprecated was set. +func (o OptIsDeprecated) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptIsDeprecated) Reset() { + var v IsDeprecated + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptIsDeprecated) SetTo(v IsDeprecated) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptIsDeprecated) Get() (v IsDeprecated, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptIsDeprecated) Or(d IsDeprecated) IsDeprecated { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptIsMissingSecrets returns new OptIsMissingSecrets with value set to v. +func NewOptIsMissingSecrets(v IsMissingSecrets) OptIsMissingSecrets { + return OptIsMissingSecrets{ + Value: v, + Set: true, + } +} + +// OptIsMissingSecrets is optional IsMissingSecrets. +type OptIsMissingSecrets struct { + Value IsMissingSecrets + Set bool +} + +// IsSet returns true if OptIsMissingSecrets was set. +func (o OptIsMissingSecrets) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptIsMissingSecrets) Reset() { + var v IsMissingSecrets + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptIsMissingSecrets) SetTo(v IsMissingSecrets) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptIsMissingSecrets) Get() (v IsMissingSecrets, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptIsMissingSecrets) Or(d IsMissingSecrets) IsMissingSecrets { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptLegacyRunConnectorOKData returns new OptLegacyRunConnectorOKData with value set to v. +func NewOptLegacyRunConnectorOKData(v LegacyRunConnectorOKData) OptLegacyRunConnectorOKData { + return OptLegacyRunConnectorOKData{ + Value: v, + Set: true, + } +} + +// OptLegacyRunConnectorOKData is optional LegacyRunConnectorOKData. +type OptLegacyRunConnectorOKData struct { + Value LegacyRunConnectorOKData + Set bool +} + +// IsSet returns true if OptLegacyRunConnectorOKData was set. +func (o OptLegacyRunConnectorOKData) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptLegacyRunConnectorOKData) Reset() { + var v LegacyRunConnectorOKData + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptLegacyRunConnectorOKData) SetTo(v LegacyRunConnectorOKData) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptLegacyRunConnectorOKData) Get() (v LegacyRunConnectorOKData, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptLegacyRunConnectorOKData) Or(d LegacyRunConnectorOKData) LegacyRunConnectorOKData { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptNilGetConnectorsOKItemConfig returns new OptNilGetConnectorsOKItemConfig with value set to v. +func NewOptNilGetConnectorsOKItemConfig(v GetConnectorsOKItemConfig) OptNilGetConnectorsOKItemConfig { + return OptNilGetConnectorsOKItemConfig{ + Value: v, + Set: true, + } +} + +// OptNilGetConnectorsOKItemConfig is optional nullable GetConnectorsOKItemConfig. +type OptNilGetConnectorsOKItemConfig struct { + Value GetConnectorsOKItemConfig + Set bool + Null bool +} + +// IsSet returns true if OptNilGetConnectorsOKItemConfig was set. +func (o OptNilGetConnectorsOKItemConfig) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptNilGetConnectorsOKItemConfig) Reset() { + var v GetConnectorsOKItemConfig + o.Value = v + o.Set = false + o.Null = false +} + +// SetTo sets value to v. +func (o *OptNilGetConnectorsOKItemConfig) SetTo(v GetConnectorsOKItemConfig) { + o.Set = true + o.Null = false + o.Value = v +} + +// IsSet returns true if value is Null. +func (o OptNilGetConnectorsOKItemConfig) IsNull() bool { return o.Null } + +// SetNull sets value to null. +func (o *OptNilGetConnectorsOKItemConfig) SetToNull() { + o.Set = true + o.Null = true + var v GetConnectorsOKItemConfig + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptNilGetConnectorsOKItemConfig) Get() (v GetConnectorsOKItemConfig, ok bool) { + if o.Null { + return v, false + } + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptNilGetConnectorsOKItemConfig) Or(d GetConnectorsOKItemConfig) GetConnectorsOKItemConfig { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptNilString returns new OptNilString with value set to v. +func NewOptNilString(v string) OptNilString { + return OptNilString{ + Value: v, + Set: true, + } +} + +// OptNilString is optional nullable string. +type OptNilString struct { + Value string + Set bool + Null bool +} + +// IsSet returns true if OptNilString was set. +func (o OptNilString) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptNilString) Reset() { + var v string + o.Value = v + o.Set = false + o.Null = false +} + +// SetTo sets value to v. +func (o *OptNilString) SetTo(v string) { + o.Set = true + o.Null = false + o.Value = v +} + +// IsSet returns true if value is Null. +func (o OptNilString) IsNull() bool { return o.Null } + +// SetNull sets value to null. +func (o *OptNilString) SetToNull() { + o.Set = true + o.Null = true + var v string + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptNilString) Get() (v string, ok bool) { + if o.Null { + return v, false + } + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptNilString) Or(d string) string { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptR401Error returns new OptR401Error with value set to v. +func NewOptR401Error(v R401Error) OptR401Error { + return OptR401Error{ + Value: v, + Set: true, + } +} + +// OptR401Error is optional R401Error. +type OptR401Error struct { + Value R401Error + Set bool +} + +// IsSet returns true if OptR401Error was set. +func (o OptR401Error) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptR401Error) Reset() { + var v R401Error + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptR401Error) SetTo(v R401Error) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptR401Error) Get() (v R401Error, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptR401Error) Or(d R401Error) R401Error { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptR401StatusCode returns new OptR401StatusCode with value set to v. +func NewOptR401StatusCode(v R401StatusCode) OptR401StatusCode { + return OptR401StatusCode{ + Value: v, + Set: true, + } +} + +// OptR401StatusCode is optional R401StatusCode. +type OptR401StatusCode struct { + Value R401StatusCode + Set bool +} + +// IsSet returns true if OptR401StatusCode was set. +func (o OptR401StatusCode) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptR401StatusCode) Reset() { + var v R401StatusCode + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptR401StatusCode) SetTo(v R401StatusCode) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptR401StatusCode) Get() (v R401StatusCode, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptR401StatusCode) Or(d R401StatusCode) R401StatusCode { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptR404Error returns new OptR404Error with value set to v. +func NewOptR404Error(v R404Error) OptR404Error { + return OptR404Error{ + Value: v, + Set: true, + } +} + +// OptR404Error is optional R404Error. +type OptR404Error struct { + Value R404Error + Set bool +} + +// IsSet returns true if OptR404Error was set. +func (o OptR404Error) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptR404Error) Reset() { + var v R404Error + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptR404Error) SetTo(v R404Error) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptR404Error) Get() (v R404Error, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptR404Error) Or(d R404Error) R404Error { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptR404StatusCode returns new OptR404StatusCode with value set to v. +func NewOptR404StatusCode(v R404StatusCode) OptR404StatusCode { + return OptR404StatusCode{ + Value: v, + Set: true, + } +} + +// OptR404StatusCode is optional R404StatusCode. +type OptR404StatusCode struct { + Value R404StatusCode + Set bool +} + +// IsSet returns true if OptR404StatusCode was set. +func (o OptR404StatusCode) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptR404StatusCode) Reset() { + var v R404StatusCode + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptR404StatusCode) SetTo(v R404StatusCode) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptR404StatusCode) Get() (v R404StatusCode, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptR404StatusCode) Or(d R404StatusCode) R404StatusCode { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptSecretsPropertiesCasesWebhook returns new OptSecretsPropertiesCasesWebhook with value set to v. +func NewOptSecretsPropertiesCasesWebhook(v SecretsPropertiesCasesWebhook) OptSecretsPropertiesCasesWebhook { + return OptSecretsPropertiesCasesWebhook{ + Value: v, + Set: true, + } +} + +// OptSecretsPropertiesCasesWebhook is optional SecretsPropertiesCasesWebhook. +type OptSecretsPropertiesCasesWebhook struct { + Value SecretsPropertiesCasesWebhook + Set bool +} + +// IsSet returns true if OptSecretsPropertiesCasesWebhook was set. +func (o OptSecretsPropertiesCasesWebhook) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptSecretsPropertiesCasesWebhook) Reset() { + var v SecretsPropertiesCasesWebhook + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptSecretsPropertiesCasesWebhook) SetTo(v SecretsPropertiesCasesWebhook) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptSecretsPropertiesCasesWebhook) Get() (v SecretsPropertiesCasesWebhook, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptSecretsPropertiesCasesWebhook) Or(d SecretsPropertiesCasesWebhook) SecretsPropertiesCasesWebhook { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptString returns new OptString with value set to v. +func NewOptString(v string) OptString { + return OptString{ + Value: v, + Set: true, + } +} + +// OptString is optional string. +type OptString struct { + Value string + Set bool +} + +// IsSet returns true if OptString was set. +func (o OptString) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptString) Reset() { + var v string + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptString) SetTo(v string) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptString) Get() (v string, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptString) Or(d string) string { + if v, ok := o.Get(); ok { + return v + } + return d +} + +type R401 struct { + Error OptR401Error `json:"error"` + Message OptString `json:"message"` + StatusCode OptR401StatusCode `json:"statusCode"` +} + +// GetError returns the value of Error. +func (s *R401) GetError() OptR401Error { + return s.Error +} + +// GetMessage returns the value of Message. +func (s *R401) GetMessage() OptString { + return s.Message +} + +// GetStatusCode returns the value of StatusCode. +func (s *R401) GetStatusCode() OptR401StatusCode { + return s.StatusCode +} + +// SetError sets the value of Error. +func (s *R401) SetError(val OptR401Error) { + s.Error = val +} + +// SetMessage sets the value of Message. +func (s *R401) SetMessage(val OptString) { + s.Message = val +} + +// SetStatusCode sets the value of StatusCode. +func (s *R401) SetStatusCode(val OptR401StatusCode) { + s.StatusCode = val +} + +func (*R401) createConnectorRes() {} +func (*R401) deleteConnectorRes() {} +func (*R401) getConnectorRes() {} +func (*R401) getConnectorTypesRes() {} +func (*R401) getConnectorsRes() {} +func (*R401) legacyCreateConnectorRes() {} +func (*R401) legacyDeleteConnectorRes() {} +func (*R401) legacyGetConnectorRes() {} +func (*R401) legacyGetConnectorTypesRes() {} +func (*R401) legacyGetConnectorsRes() {} +func (*R401) legacyRunConnectorRes() {} +func (*R401) updateConnectorRes() {} + +type R401Error string + +const ( + R401ErrorUnauthorized R401Error = "Unauthorized" +) + +// MarshalText implements encoding.TextMarshaler. +func (s R401Error) MarshalText() ([]byte, error) { + switch s { + case R401ErrorUnauthorized: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *R401Error) UnmarshalText(data []byte) error { + switch R401Error(data) { + case R401ErrorUnauthorized: + *s = R401ErrorUnauthorized + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +type R401StatusCode int + +const ( + R401StatusCode401 R401StatusCode = 401 +) + +type R404 struct { + Error OptR404Error `json:"error"` + Message OptString `json:"message"` + StatusCode OptR404StatusCode `json:"statusCode"` +} + +// GetError returns the value of Error. +func (s *R404) GetError() OptR404Error { + return s.Error +} + +// GetMessage returns the value of Message. +func (s *R404) GetMessage() OptString { + return s.Message +} + +// GetStatusCode returns the value of StatusCode. +func (s *R404) GetStatusCode() OptR404StatusCode { + return s.StatusCode +} + +// SetError sets the value of Error. +func (s *R404) SetError(val OptR404Error) { + s.Error = val +} + +// SetMessage sets the value of Message. +func (s *R404) SetMessage(val OptString) { + s.Message = val +} + +// SetStatusCode sets the value of StatusCode. +func (s *R404) SetStatusCode(val OptR404StatusCode) { + s.StatusCode = val +} + +func (*R404) legacyUpdateConnectorRes() {} +func (*R404) updateConnectorRes() {} + +type R404Error string + +const ( + R404ErrorNotFound R404Error = "Not Found" +) + +// MarshalText implements encoding.TextMarshaler. +func (s R404Error) MarshalText() ([]byte, error) { + switch s { + case R404ErrorNotFound: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *R404Error) UnmarshalText(data []byte) error { + switch R404Error(data) { + case R404ErrorNotFound: + *s = R404ErrorNotFound + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +type R404StatusCode int + +const ( + R404StatusCode404 R404StatusCode = 404 +) + +// Ref: #/components/schemas/secrets_properties_cases_webhook +type SecretsPropertiesCasesWebhook struct { + // The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is + // required. + Password OptString `json:"password"` + // The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is + // required. + User OptString `json:"user"` +} + +// GetPassword returns the value of Password. +func (s *SecretsPropertiesCasesWebhook) GetPassword() OptString { + return s.Password +} + +// GetUser returns the value of User. +func (s *SecretsPropertiesCasesWebhook) GetUser() OptString { + return s.User +} + +// SetPassword sets the value of Password. +func (s *SecretsPropertiesCasesWebhook) SetPassword(val OptString) { + s.Password = val +} + +// SetUser sets the value of User. +func (s *SecretsPropertiesCasesWebhook) SetUser(val OptString) { + s.User = val +} + +// Defines secrets for connectors when type is `.email`. +// Ref: #/components/schemas/secrets_properties_email +type SecretsPropertiesEmail map[string]jx.Raw + +func (s *SecretsPropertiesEmail) init() SecretsPropertiesEmail { + m := *s + if m == nil { + m = map[string]jx.Raw{} + *s = m + } + return m +} + +// Defines secrets for connectors when type is `.jira`. +// Ref: #/components/schemas/secrets_properties_jira +type SecretsPropertiesJira struct { + // The Jira API authentication token for HTTP basic authentication. + ApiToken string `json:"apiToken"` + // The account email for HTTP Basic authentication. + Email string `json:"email"` +} + +// GetApiToken returns the value of ApiToken. +func (s *SecretsPropertiesJira) GetApiToken() string { + return s.ApiToken +} + +// GetEmail returns the value of Email. +func (s *SecretsPropertiesJira) GetEmail() string { + return s.Email +} + +// SetApiToken sets the value of ApiToken. +func (s *SecretsPropertiesJira) SetApiToken(val string) { + s.ApiToken = val +} + +// SetEmail sets the value of Email. +func (s *SecretsPropertiesJira) SetEmail(val string) { + s.Email = val +} + +// Defines secrets for connectors when type is `.opsgenie`. +// Ref: #/components/schemas/secrets_properties_opsgenie +type SecretsPropertiesOpsgenie struct { + // The Opsgenie API authentication key for HTTP Basic authentication. + ApiKey string `json:"apiKey"` +} + +// GetApiKey returns the value of ApiKey. +func (s *SecretsPropertiesOpsgenie) GetApiKey() string { + return s.ApiKey +} + +// SetApiKey sets the value of ApiKey. +func (s *SecretsPropertiesOpsgenie) SetApiKey(val string) { + s.ApiKey = val +} + +// Defines secrets for connectors when type is `.pagerduty`. +// Ref: #/components/schemas/secrets_properties_pagerduty +type SecretsPropertiesPagerduty map[string]jx.Raw + +func (s *SecretsPropertiesPagerduty) init() SecretsPropertiesPagerduty { + m := *s + if m == nil { + m = map[string]jx.Raw{} + *s = m + } + return m +} + +// Defines secrets for connectors when type is `.resilient`. +// Ref: #/components/schemas/secrets_properties_resilient +type SecretsPropertiesResilient struct { + // The authentication key ID for HTTP Basic authentication. + ApiKeyId string `json:"apiKeyId"` + // The authentication key secret for HTTP Basic authentication. + ApiKeySecret string `json:"apiKeySecret"` +} + +// GetApiKeyId returns the value of ApiKeyId. +func (s *SecretsPropertiesResilient) GetApiKeyId() string { + return s.ApiKeyId +} + +// GetApiKeySecret returns the value of ApiKeySecret. +func (s *SecretsPropertiesResilient) GetApiKeySecret() string { + return s.ApiKeySecret +} + +// SetApiKeyId sets the value of ApiKeyId. +func (s *SecretsPropertiesResilient) SetApiKeyId(val string) { + s.ApiKeyId = val +} + +// SetApiKeySecret sets the value of ApiKeySecret. +func (s *SecretsPropertiesResilient) SetApiKeySecret(val string) { + s.ApiKeySecret = val +} + +// Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `. +// servicenow-itom`. +// Ref: #/components/schemas/secrets_properties_servicenow +type SecretsPropertiesServicenow struct { + // The client secret assigned to your OAuth application. This property is required when `isOAuth` is + // `true`. + ClientSecret OptString `json:"clientSecret"` + // The password for HTTP basic authentication. This property is required when `isOAuth` is `false`. + Password OptString `json:"password"` + // The RSA private key that you created for use in ServiceNow. This property is required when + // `isOAuth` is `true`. + PrivateKey OptString `json:"privateKey"` + // The password for the RSA private key. This property is required when `isOAuth` is `true` and you + // set a password on your private key. + PrivateKeyPassword OptString `json:"privateKeyPassword"` + // The username for HTTP basic authentication. This property is required when `isOAuth` is `false`. + Username OptString `json:"username"` +} + +// GetClientSecret returns the value of ClientSecret. +func (s *SecretsPropertiesServicenow) GetClientSecret() OptString { + return s.ClientSecret +} + +// GetPassword returns the value of Password. +func (s *SecretsPropertiesServicenow) GetPassword() OptString { + return s.Password +} + +// GetPrivateKey returns the value of PrivateKey. +func (s *SecretsPropertiesServicenow) GetPrivateKey() OptString { + return s.PrivateKey +} + +// GetPrivateKeyPassword returns the value of PrivateKeyPassword. +func (s *SecretsPropertiesServicenow) GetPrivateKeyPassword() OptString { + return s.PrivateKeyPassword +} + +// GetUsername returns the value of Username. +func (s *SecretsPropertiesServicenow) GetUsername() OptString { + return s.Username +} + +// SetClientSecret sets the value of ClientSecret. +func (s *SecretsPropertiesServicenow) SetClientSecret(val OptString) { + s.ClientSecret = val +} + +// SetPassword sets the value of Password. +func (s *SecretsPropertiesServicenow) SetPassword(val OptString) { + s.Password = val +} + +// SetPrivateKey sets the value of PrivateKey. +func (s *SecretsPropertiesServicenow) SetPrivateKey(val OptString) { + s.PrivateKey = val +} + +// SetPrivateKeyPassword sets the value of PrivateKeyPassword. +func (s *SecretsPropertiesServicenow) SetPrivateKeyPassword(val OptString) { + s.PrivateKeyPassword = val +} + +// SetUsername sets the value of Username. +func (s *SecretsPropertiesServicenow) SetUsername(val OptString) { + s.Username = val +} + +// Defines secrets for connectors when type is `.slack`. +// Ref: #/components/schemas/secrets_properties_slack +type SecretsPropertiesSlack map[string]jx.Raw + +func (s *SecretsPropertiesSlack) init() SecretsPropertiesSlack { + m := *s + if m == nil { + m = map[string]jx.Raw{} + *s = m + } + return m +} + +// Defines secrets for connectors when type is `.swimlane`. +// Ref: #/components/schemas/secrets_properties_swimlane +type SecretsPropertiesSwimlane struct { + // Swimlane API authentication token. + ApiToken OptString `json:"apiToken"` +} + +// GetApiToken returns the value of ApiToken. +func (s *SecretsPropertiesSwimlane) GetApiToken() OptString { + return s.ApiToken +} + +// SetApiToken sets the value of ApiToken. +func (s *SecretsPropertiesSwimlane) SetApiToken(val OptString) { + s.ApiToken = val +} + +// Defines secrets for connectors when type is `.teams`. +// Ref: #/components/schemas/secrets_properties_teams +type SecretsPropertiesTeams map[string]jx.Raw + +func (s *SecretsPropertiesTeams) init() SecretsPropertiesTeams { + m := *s + if m == nil { + m = map[string]jx.Raw{} + *s = m + } + return m +} + +// Defines secrets for connectors when type is `.tines`. +// Ref: #/components/schemas/secrets_properties_tines +type SecretsPropertiesTines map[string]jx.Raw + +func (s *SecretsPropertiesTines) init() SecretsPropertiesTines { + m := *s + if m == nil { + m = map[string]jx.Raw{} + *s = m + } + return m +} + +// Defines secrets for connectors when type is `.webhook`. +// Ref: #/components/schemas/secrets_properties_webhook +type SecretsPropertiesWebhook map[string]jx.Raw + +func (s *SecretsPropertiesWebhook) init() SecretsPropertiesWebhook { + m := *s + if m == nil { + m = map[string]jx.Raw{} + *s = m + } + return m +} + +// Defines secrets for connectors when type is `.xmatters`. +// Ref: #/components/schemas/secrets_properties_xmatters +type SecretsPropertiesXmatters map[string]jx.Raw + +func (s *SecretsPropertiesXmatters) init() SecretsPropertiesXmatters { + m := *s + if m == nil { + m = map[string]jx.Raw{} + *s = m + } + return m +} + +type UpdateConnectorBadRequest struct { + Error OptString `json:"error"` + Message OptString `json:"message"` + StatusCode OptInt `json:"statusCode"` +} + +// GetError returns the value of Error. +func (s *UpdateConnectorBadRequest) GetError() OptString { + return s.Error +} + +// GetMessage returns the value of Message. +func (s *UpdateConnectorBadRequest) GetMessage() OptString { + return s.Message +} + +// GetStatusCode returns the value of StatusCode. +func (s *UpdateConnectorBadRequest) GetStatusCode() OptInt { + return s.StatusCode +} + +// SetError sets the value of Error. +func (s *UpdateConnectorBadRequest) SetError(val OptString) { + s.Error = val +} + +// SetMessage sets the value of Message. +func (s *UpdateConnectorBadRequest) SetMessage(val OptString) { + s.Message = val +} + +// SetStatusCode sets the value of StatusCode. +func (s *UpdateConnectorBadRequest) SetStatusCode(val OptInt) { + s.StatusCode = val +} + +func (*UpdateConnectorBadRequest) updateConnectorRes() {} + +// The properties vary depending on the connector type. +// UpdateConnectorReq represents sum type. +type UpdateConnectorReq struct { + Type UpdateConnectorReqType // switch on this field + UpdateConnectorRequestCasesWebhook UpdateConnectorRequestCasesWebhook + UpdateConnectorRequestIndex UpdateConnectorRequestIndex + UpdateConnectorRequestJira UpdateConnectorRequestJira + UpdateConnectorRequestOpsgenie UpdateConnectorRequestOpsgenie + UpdateConnectorRequestResilient UpdateConnectorRequestResilient + UpdateConnectorRequestServerlog UpdateConnectorRequestServerlog + UpdateConnectorRequestServicenow UpdateConnectorRequestServicenow + UpdateConnectorRequestServicenowItom UpdateConnectorRequestServicenowItom + UpdateConnectorRequestSwimlane UpdateConnectorRequestSwimlane +} + +// UpdateConnectorReqType is oneOf type of UpdateConnectorReq. +type UpdateConnectorReqType string + +// Possible values for UpdateConnectorReqType. +const ( + UpdateConnectorRequestCasesWebhookUpdateConnectorReq UpdateConnectorReqType = "UpdateConnectorRequestCasesWebhook" + UpdateConnectorRequestIndexUpdateConnectorReq UpdateConnectorReqType = "UpdateConnectorRequestIndex" + UpdateConnectorRequestJiraUpdateConnectorReq UpdateConnectorReqType = "UpdateConnectorRequestJira" + UpdateConnectorRequestOpsgenieUpdateConnectorReq UpdateConnectorReqType = "UpdateConnectorRequestOpsgenie" + UpdateConnectorRequestResilientUpdateConnectorReq UpdateConnectorReqType = "UpdateConnectorRequestResilient" + UpdateConnectorRequestServerlogUpdateConnectorReq UpdateConnectorReqType = "UpdateConnectorRequestServerlog" + UpdateConnectorRequestServicenowUpdateConnectorReq UpdateConnectorReqType = "UpdateConnectorRequestServicenow" + UpdateConnectorRequestServicenowItomUpdateConnectorReq UpdateConnectorReqType = "UpdateConnectorRequestServicenowItom" + UpdateConnectorRequestSwimlaneUpdateConnectorReq UpdateConnectorReqType = "UpdateConnectorRequestSwimlane" +) + +// IsUpdateConnectorRequestCasesWebhook reports whether UpdateConnectorReq is UpdateConnectorRequestCasesWebhook. +func (s UpdateConnectorReq) IsUpdateConnectorRequestCasesWebhook() bool { + return s.Type == UpdateConnectorRequestCasesWebhookUpdateConnectorReq +} + +// IsUpdateConnectorRequestIndex reports whether UpdateConnectorReq is UpdateConnectorRequestIndex. +func (s UpdateConnectorReq) IsUpdateConnectorRequestIndex() bool { + return s.Type == UpdateConnectorRequestIndexUpdateConnectorReq +} + +// IsUpdateConnectorRequestJira reports whether UpdateConnectorReq is UpdateConnectorRequestJira. +func (s UpdateConnectorReq) IsUpdateConnectorRequestJira() bool { + return s.Type == UpdateConnectorRequestJiraUpdateConnectorReq +} + +// IsUpdateConnectorRequestOpsgenie reports whether UpdateConnectorReq is UpdateConnectorRequestOpsgenie. +func (s UpdateConnectorReq) IsUpdateConnectorRequestOpsgenie() bool { + return s.Type == UpdateConnectorRequestOpsgenieUpdateConnectorReq +} + +// IsUpdateConnectorRequestResilient reports whether UpdateConnectorReq is UpdateConnectorRequestResilient. +func (s UpdateConnectorReq) IsUpdateConnectorRequestResilient() bool { + return s.Type == UpdateConnectorRequestResilientUpdateConnectorReq +} + +// IsUpdateConnectorRequestServerlog reports whether UpdateConnectorReq is UpdateConnectorRequestServerlog. +func (s UpdateConnectorReq) IsUpdateConnectorRequestServerlog() bool { + return s.Type == UpdateConnectorRequestServerlogUpdateConnectorReq +} + +// IsUpdateConnectorRequestServicenow reports whether UpdateConnectorReq is UpdateConnectorRequestServicenow. +func (s UpdateConnectorReq) IsUpdateConnectorRequestServicenow() bool { + return s.Type == UpdateConnectorRequestServicenowUpdateConnectorReq +} + +// IsUpdateConnectorRequestServicenowItom reports whether UpdateConnectorReq is UpdateConnectorRequestServicenowItom. +func (s UpdateConnectorReq) IsUpdateConnectorRequestServicenowItom() bool { + return s.Type == UpdateConnectorRequestServicenowItomUpdateConnectorReq +} + +// IsUpdateConnectorRequestSwimlane reports whether UpdateConnectorReq is UpdateConnectorRequestSwimlane. +func (s UpdateConnectorReq) IsUpdateConnectorRequestSwimlane() bool { + return s.Type == UpdateConnectorRequestSwimlaneUpdateConnectorReq +} + +// SetUpdateConnectorRequestCasesWebhook sets UpdateConnectorReq to UpdateConnectorRequestCasesWebhook. +func (s *UpdateConnectorReq) SetUpdateConnectorRequestCasesWebhook(v UpdateConnectorRequestCasesWebhook) { + s.Type = UpdateConnectorRequestCasesWebhookUpdateConnectorReq + s.UpdateConnectorRequestCasesWebhook = v +} + +// GetUpdateConnectorRequestCasesWebhook returns UpdateConnectorRequestCasesWebhook and true boolean if UpdateConnectorReq is UpdateConnectorRequestCasesWebhook. +func (s UpdateConnectorReq) GetUpdateConnectorRequestCasesWebhook() (v UpdateConnectorRequestCasesWebhook, ok bool) { + if !s.IsUpdateConnectorRequestCasesWebhook() { + return v, false + } + return s.UpdateConnectorRequestCasesWebhook, true +} + +// NewUpdateConnectorRequestCasesWebhookUpdateConnectorReq returns new UpdateConnectorReq from UpdateConnectorRequestCasesWebhook. +func NewUpdateConnectorRequestCasesWebhookUpdateConnectorReq(v UpdateConnectorRequestCasesWebhook) UpdateConnectorReq { + var s UpdateConnectorReq + s.SetUpdateConnectorRequestCasesWebhook(v) + return s +} + +// SetUpdateConnectorRequestIndex sets UpdateConnectorReq to UpdateConnectorRequestIndex. +func (s *UpdateConnectorReq) SetUpdateConnectorRequestIndex(v UpdateConnectorRequestIndex) { + s.Type = UpdateConnectorRequestIndexUpdateConnectorReq + s.UpdateConnectorRequestIndex = v +} + +// GetUpdateConnectorRequestIndex returns UpdateConnectorRequestIndex and true boolean if UpdateConnectorReq is UpdateConnectorRequestIndex. +func (s UpdateConnectorReq) GetUpdateConnectorRequestIndex() (v UpdateConnectorRequestIndex, ok bool) { + if !s.IsUpdateConnectorRequestIndex() { + return v, false + } + return s.UpdateConnectorRequestIndex, true +} + +// NewUpdateConnectorRequestIndexUpdateConnectorReq returns new UpdateConnectorReq from UpdateConnectorRequestIndex. +func NewUpdateConnectorRequestIndexUpdateConnectorReq(v UpdateConnectorRequestIndex) UpdateConnectorReq { + var s UpdateConnectorReq + s.SetUpdateConnectorRequestIndex(v) + return s +} + +// SetUpdateConnectorRequestJira sets UpdateConnectorReq to UpdateConnectorRequestJira. +func (s *UpdateConnectorReq) SetUpdateConnectorRequestJira(v UpdateConnectorRequestJira) { + s.Type = UpdateConnectorRequestJiraUpdateConnectorReq + s.UpdateConnectorRequestJira = v +} + +// GetUpdateConnectorRequestJira returns UpdateConnectorRequestJira and true boolean if UpdateConnectorReq is UpdateConnectorRequestJira. +func (s UpdateConnectorReq) GetUpdateConnectorRequestJira() (v UpdateConnectorRequestJira, ok bool) { + if !s.IsUpdateConnectorRequestJira() { + return v, false + } + return s.UpdateConnectorRequestJira, true +} + +// NewUpdateConnectorRequestJiraUpdateConnectorReq returns new UpdateConnectorReq from UpdateConnectorRequestJira. +func NewUpdateConnectorRequestJiraUpdateConnectorReq(v UpdateConnectorRequestJira) UpdateConnectorReq { + var s UpdateConnectorReq + s.SetUpdateConnectorRequestJira(v) + return s +} + +// SetUpdateConnectorRequestOpsgenie sets UpdateConnectorReq to UpdateConnectorRequestOpsgenie. +func (s *UpdateConnectorReq) SetUpdateConnectorRequestOpsgenie(v UpdateConnectorRequestOpsgenie) { + s.Type = UpdateConnectorRequestOpsgenieUpdateConnectorReq + s.UpdateConnectorRequestOpsgenie = v +} + +// GetUpdateConnectorRequestOpsgenie returns UpdateConnectorRequestOpsgenie and true boolean if UpdateConnectorReq is UpdateConnectorRequestOpsgenie. +func (s UpdateConnectorReq) GetUpdateConnectorRequestOpsgenie() (v UpdateConnectorRequestOpsgenie, ok bool) { + if !s.IsUpdateConnectorRequestOpsgenie() { + return v, false + } + return s.UpdateConnectorRequestOpsgenie, true +} + +// NewUpdateConnectorRequestOpsgenieUpdateConnectorReq returns new UpdateConnectorReq from UpdateConnectorRequestOpsgenie. +func NewUpdateConnectorRequestOpsgenieUpdateConnectorReq(v UpdateConnectorRequestOpsgenie) UpdateConnectorReq { + var s UpdateConnectorReq + s.SetUpdateConnectorRequestOpsgenie(v) + return s +} + +// SetUpdateConnectorRequestResilient sets UpdateConnectorReq to UpdateConnectorRequestResilient. +func (s *UpdateConnectorReq) SetUpdateConnectorRequestResilient(v UpdateConnectorRequestResilient) { + s.Type = UpdateConnectorRequestResilientUpdateConnectorReq + s.UpdateConnectorRequestResilient = v +} + +// GetUpdateConnectorRequestResilient returns UpdateConnectorRequestResilient and true boolean if UpdateConnectorReq is UpdateConnectorRequestResilient. +func (s UpdateConnectorReq) GetUpdateConnectorRequestResilient() (v UpdateConnectorRequestResilient, ok bool) { + if !s.IsUpdateConnectorRequestResilient() { + return v, false + } + return s.UpdateConnectorRequestResilient, true +} + +// NewUpdateConnectorRequestResilientUpdateConnectorReq returns new UpdateConnectorReq from UpdateConnectorRequestResilient. +func NewUpdateConnectorRequestResilientUpdateConnectorReq(v UpdateConnectorRequestResilient) UpdateConnectorReq { + var s UpdateConnectorReq + s.SetUpdateConnectorRequestResilient(v) + return s +} + +// SetUpdateConnectorRequestServerlog sets UpdateConnectorReq to UpdateConnectorRequestServerlog. +func (s *UpdateConnectorReq) SetUpdateConnectorRequestServerlog(v UpdateConnectorRequestServerlog) { + s.Type = UpdateConnectorRequestServerlogUpdateConnectorReq + s.UpdateConnectorRequestServerlog = v +} + +// GetUpdateConnectorRequestServerlog returns UpdateConnectorRequestServerlog and true boolean if UpdateConnectorReq is UpdateConnectorRequestServerlog. +func (s UpdateConnectorReq) GetUpdateConnectorRequestServerlog() (v UpdateConnectorRequestServerlog, ok bool) { + if !s.IsUpdateConnectorRequestServerlog() { + return v, false + } + return s.UpdateConnectorRequestServerlog, true +} + +// NewUpdateConnectorRequestServerlogUpdateConnectorReq returns new UpdateConnectorReq from UpdateConnectorRequestServerlog. +func NewUpdateConnectorRequestServerlogUpdateConnectorReq(v UpdateConnectorRequestServerlog) UpdateConnectorReq { + var s UpdateConnectorReq + s.SetUpdateConnectorRequestServerlog(v) + return s +} + +// SetUpdateConnectorRequestServicenow sets UpdateConnectorReq to UpdateConnectorRequestServicenow. +func (s *UpdateConnectorReq) SetUpdateConnectorRequestServicenow(v UpdateConnectorRequestServicenow) { + s.Type = UpdateConnectorRequestServicenowUpdateConnectorReq + s.UpdateConnectorRequestServicenow = v +} + +// GetUpdateConnectorRequestServicenow returns UpdateConnectorRequestServicenow and true boolean if UpdateConnectorReq is UpdateConnectorRequestServicenow. +func (s UpdateConnectorReq) GetUpdateConnectorRequestServicenow() (v UpdateConnectorRequestServicenow, ok bool) { + if !s.IsUpdateConnectorRequestServicenow() { + return v, false + } + return s.UpdateConnectorRequestServicenow, true +} + +// NewUpdateConnectorRequestServicenowUpdateConnectorReq returns new UpdateConnectorReq from UpdateConnectorRequestServicenow. +func NewUpdateConnectorRequestServicenowUpdateConnectorReq(v UpdateConnectorRequestServicenow) UpdateConnectorReq { + var s UpdateConnectorReq + s.SetUpdateConnectorRequestServicenow(v) + return s +} + +// SetUpdateConnectorRequestServicenowItom sets UpdateConnectorReq to UpdateConnectorRequestServicenowItom. +func (s *UpdateConnectorReq) SetUpdateConnectorRequestServicenowItom(v UpdateConnectorRequestServicenowItom) { + s.Type = UpdateConnectorRequestServicenowItomUpdateConnectorReq + s.UpdateConnectorRequestServicenowItom = v +} + +// GetUpdateConnectorRequestServicenowItom returns UpdateConnectorRequestServicenowItom and true boolean if UpdateConnectorReq is UpdateConnectorRequestServicenowItom. +func (s UpdateConnectorReq) GetUpdateConnectorRequestServicenowItom() (v UpdateConnectorRequestServicenowItom, ok bool) { + if !s.IsUpdateConnectorRequestServicenowItom() { + return v, false + } + return s.UpdateConnectorRequestServicenowItom, true +} + +// NewUpdateConnectorRequestServicenowItomUpdateConnectorReq returns new UpdateConnectorReq from UpdateConnectorRequestServicenowItom. +func NewUpdateConnectorRequestServicenowItomUpdateConnectorReq(v UpdateConnectorRequestServicenowItom) UpdateConnectorReq { + var s UpdateConnectorReq + s.SetUpdateConnectorRequestServicenowItom(v) + return s +} + +// SetUpdateConnectorRequestSwimlane sets UpdateConnectorReq to UpdateConnectorRequestSwimlane. +func (s *UpdateConnectorReq) SetUpdateConnectorRequestSwimlane(v UpdateConnectorRequestSwimlane) { + s.Type = UpdateConnectorRequestSwimlaneUpdateConnectorReq + s.UpdateConnectorRequestSwimlane = v +} + +// GetUpdateConnectorRequestSwimlane returns UpdateConnectorRequestSwimlane and true boolean if UpdateConnectorReq is UpdateConnectorRequestSwimlane. +func (s UpdateConnectorReq) GetUpdateConnectorRequestSwimlane() (v UpdateConnectorRequestSwimlane, ok bool) { + if !s.IsUpdateConnectorRequestSwimlane() { + return v, false + } + return s.UpdateConnectorRequestSwimlane, true +} + +// NewUpdateConnectorRequestSwimlaneUpdateConnectorReq returns new UpdateConnectorReq from UpdateConnectorRequestSwimlane. +func NewUpdateConnectorRequestSwimlaneUpdateConnectorReq(v UpdateConnectorRequestSwimlane) UpdateConnectorReq { + var s UpdateConnectorReq + s.SetUpdateConnectorRequestSwimlane(v) + return s +} + +// Ref: #/components/schemas/update_connector_request_cases_webhook +type UpdateConnectorRequestCasesWebhook struct { + Config ConfigPropertiesCasesWebhook `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets OptSecretsPropertiesCasesWebhook `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *UpdateConnectorRequestCasesWebhook) GetConfig() ConfigPropertiesCasesWebhook { + return s.Config +} + +// GetName returns the value of Name. +func (s *UpdateConnectorRequestCasesWebhook) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *UpdateConnectorRequestCasesWebhook) GetSecrets() OptSecretsPropertiesCasesWebhook { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *UpdateConnectorRequestCasesWebhook) SetConfig(val ConfigPropertiesCasesWebhook) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *UpdateConnectorRequestCasesWebhook) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *UpdateConnectorRequestCasesWebhook) SetSecrets(val OptSecretsPropertiesCasesWebhook) { + s.Secrets = val +} + +// Ref: #/components/schemas/update_connector_request_index +type UpdateConnectorRequestIndex struct { + Config ConfigPropertiesIndex `json:"config"` + // The display name for the connector. + Name string `json:"name"` +} + +// GetConfig returns the value of Config. +func (s *UpdateConnectorRequestIndex) GetConfig() ConfigPropertiesIndex { + return s.Config +} + +// GetName returns the value of Name. +func (s *UpdateConnectorRequestIndex) GetName() string { + return s.Name +} + +// SetConfig sets the value of Config. +func (s *UpdateConnectorRequestIndex) SetConfig(val ConfigPropertiesIndex) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *UpdateConnectorRequestIndex) SetName(val string) { + s.Name = val +} + +// Ref: #/components/schemas/update_connector_request_jira +type UpdateConnectorRequestJira struct { + Config ConfigPropertiesJira `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesJira `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *UpdateConnectorRequestJira) GetConfig() ConfigPropertiesJira { + return s.Config +} + +// GetName returns the value of Name. +func (s *UpdateConnectorRequestJira) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *UpdateConnectorRequestJira) GetSecrets() SecretsPropertiesJira { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *UpdateConnectorRequestJira) SetConfig(val ConfigPropertiesJira) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *UpdateConnectorRequestJira) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *UpdateConnectorRequestJira) SetSecrets(val SecretsPropertiesJira) { + s.Secrets = val +} + +// Ref: #/components/schemas/update_connector_request_opsgenie +type UpdateConnectorRequestOpsgenie struct { + Config ConfigPropertiesOpsgenie `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesOpsgenie `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *UpdateConnectorRequestOpsgenie) GetConfig() ConfigPropertiesOpsgenie { + return s.Config +} + +// GetName returns the value of Name. +func (s *UpdateConnectorRequestOpsgenie) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *UpdateConnectorRequestOpsgenie) GetSecrets() SecretsPropertiesOpsgenie { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *UpdateConnectorRequestOpsgenie) SetConfig(val ConfigPropertiesOpsgenie) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *UpdateConnectorRequestOpsgenie) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *UpdateConnectorRequestOpsgenie) SetSecrets(val SecretsPropertiesOpsgenie) { + s.Secrets = val +} + +// Ref: #/components/schemas/update_connector_request_resilient +type UpdateConnectorRequestResilient struct { + Config ConfigPropertiesResilient `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesResilient `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *UpdateConnectorRequestResilient) GetConfig() ConfigPropertiesResilient { + return s.Config +} + +// GetName returns the value of Name. +func (s *UpdateConnectorRequestResilient) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *UpdateConnectorRequestResilient) GetSecrets() SecretsPropertiesResilient { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *UpdateConnectorRequestResilient) SetConfig(val ConfigPropertiesResilient) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *UpdateConnectorRequestResilient) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *UpdateConnectorRequestResilient) SetSecrets(val SecretsPropertiesResilient) { + s.Secrets = val +} + +// Ref: #/components/schemas/update_connector_request_serverlog +type UpdateConnectorRequestServerlog struct { + // The display name for the connector. + Name string `json:"name"` +} + +// GetName returns the value of Name. +func (s *UpdateConnectorRequestServerlog) GetName() string { + return s.Name +} + +// SetName sets the value of Name. +func (s *UpdateConnectorRequestServerlog) SetName(val string) { + s.Name = val +} + +// Ref: #/components/schemas/update_connector_request_servicenow +type UpdateConnectorRequestServicenow struct { + Config ConfigPropertiesServicenow `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesServicenow `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *UpdateConnectorRequestServicenow) GetConfig() ConfigPropertiesServicenow { + return s.Config +} + +// GetName returns the value of Name. +func (s *UpdateConnectorRequestServicenow) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *UpdateConnectorRequestServicenow) GetSecrets() SecretsPropertiesServicenow { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *UpdateConnectorRequestServicenow) SetConfig(val ConfigPropertiesServicenow) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *UpdateConnectorRequestServicenow) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *UpdateConnectorRequestServicenow) SetSecrets(val SecretsPropertiesServicenow) { + s.Secrets = val +} + +// Ref: #/components/schemas/update_connector_request_servicenow_itom +type UpdateConnectorRequestServicenowItom struct { + Config ConfigPropertiesServicenowItom `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesServicenow `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *UpdateConnectorRequestServicenowItom) GetConfig() ConfigPropertiesServicenowItom { + return s.Config +} + +// GetName returns the value of Name. +func (s *UpdateConnectorRequestServicenowItom) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *UpdateConnectorRequestServicenowItom) GetSecrets() SecretsPropertiesServicenow { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *UpdateConnectorRequestServicenowItom) SetConfig(val ConfigPropertiesServicenowItom) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *UpdateConnectorRequestServicenowItom) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *UpdateConnectorRequestServicenowItom) SetSecrets(val SecretsPropertiesServicenow) { + s.Secrets = val +} + +// Ref: #/components/schemas/update_connector_request_swimlane +type UpdateConnectorRequestSwimlane struct { + Config ConfigPropertiesSwimlane `json:"config"` + // The display name for the connector. + Name string `json:"name"` + Secrets SecretsPropertiesSwimlane `json:"secrets"` +} + +// GetConfig returns the value of Config. +func (s *UpdateConnectorRequestSwimlane) GetConfig() ConfigPropertiesSwimlane { + return s.Config +} + +// GetName returns the value of Name. +func (s *UpdateConnectorRequestSwimlane) GetName() string { + return s.Name +} + +// GetSecrets returns the value of Secrets. +func (s *UpdateConnectorRequestSwimlane) GetSecrets() SecretsPropertiesSwimlane { + return s.Secrets +} + +// SetConfig sets the value of Config. +func (s *UpdateConnectorRequestSwimlane) SetConfig(val ConfigPropertiesSwimlane) { + s.Config = val +} + +// SetName sets the value of Name. +func (s *UpdateConnectorRequestSwimlane) SetName(val string) { + s.Name = val +} + +// SetSecrets sets the value of Secrets. +func (s *UpdateConnectorRequestSwimlane) SetSecrets(val SecretsPropertiesSwimlane) { + s.Secrets = val +} diff --git a/generated/connectors/oas_security_gen.go b/generated/connectors/oas_security_gen.go new file mode 100644 index 000000000..b2bb4406d --- /dev/null +++ b/generated/connectors/oas_security_gen.go @@ -0,0 +1,99 @@ +// Code generated by ogen, DO NOT EDIT. + +package connectors + +import ( + "context" + "net/http" + "strings" + + "github.com/go-faster/errors" + + "github.com/ogen-go/ogen/ogenerrors" +) + +// SecurityHandler is handler for security parameters. +type SecurityHandler interface { + // HandleApiKeyAuth handles apiKeyAuth security. + HandleApiKeyAuth(ctx context.Context, operationName string, t ApiKeyAuth) (context.Context, error) + // HandleBasicAuth handles basicAuth security. + HandleBasicAuth(ctx context.Context, operationName string, t BasicAuth) (context.Context, error) +} + +func findAuthorization(h http.Header, prefix string) (string, bool) { + v, ok := h["Authorization"] + if !ok { + return "", false + } + for _, vv := range v { + scheme, value, ok := strings.Cut(vv, " ") + if !ok || !strings.EqualFold(scheme, prefix) { + continue + } + return value, true + } + return "", false +} + +func (s *Server) securityApiKeyAuth(ctx context.Context, operationName string, req *http.Request) (context.Context, bool, error) { + var t ApiKeyAuth + const parameterName = "ApiKey" + value := req.Header.Get(parameterName) + if value == "" { + return ctx, false, nil + } + t.APIKey = value + rctx, err := s.sec.HandleApiKeyAuth(ctx, operationName, t) + if err != nil { + return nil, false, err + } + return rctx, true, err +} +func (s *Server) securityBasicAuth(ctx context.Context, operationName string, req *http.Request) (context.Context, bool, error) { + var t BasicAuth + if _, ok := findAuthorization(req.Header, "Basic"); !ok { + return ctx, false, nil + } + username, password, ok := req.BasicAuth() + if !ok { + return nil, false, errors.New("invalid basic auth") + } + t.Username = username + t.Password = password + rctx, err := s.sec.HandleBasicAuth(ctx, operationName, t) + if err != nil { + return nil, false, err + } + return rctx, true, err +} + +// SecuritySource is provider of security values (tokens, passwords, etc.). +type SecuritySource interface { + // ApiKeyAuth provides apiKeyAuth security value. + ApiKeyAuth(ctx context.Context, operationName string) (ApiKeyAuth, error) + // BasicAuth provides basicAuth security value. + BasicAuth(ctx context.Context, operationName string) (BasicAuth, error) +} + +func (s *Client) securityApiKeyAuth(ctx context.Context, operationName string, req *http.Request) error { + t, err := s.sec.ApiKeyAuth(ctx, operationName) + if err != nil { + if errors.Is(err, ogenerrors.ErrSkipClientSecurity) { + return ogenerrors.ErrSkipClientSecurity + } + return errors.Wrap(err, "security source \"ApiKeyAuth\"") + } + req.Header.Set("ApiKey", t.APIKey) + return nil +} +func (s *Client) securityBasicAuth(ctx context.Context, operationName string, req *http.Request) error { + t, err := s.sec.BasicAuth(ctx, operationName) + if err != nil { + if errors.Is(err, ogenerrors.ErrSkipClientSecurity) { + return ogenerrors.ErrSkipClientSecurity + } + return errors.Wrap(err, "security source \"BasicAuth\"") + } + req.SetBasicAuth(t.Username, t.Password) + return nil +} diff --git a/generated/connectors/oas_server_gen.go b/generated/connectors/oas_server_gen.go new file mode 100644 index 000000000..ecb87e410 --- /dev/null +++ b/generated/connectors/oas_server_gen.go @@ -0,0 +1,131 @@ +// Code generated by ogen, DO NOT EDIT. + +package connectors + +import ( + "context" +) + +// Handler handles operations described by OpenAPI v3 specification. +type Handler interface { + // CreateConnector implements createConnector operation. + // + // You must have `all` privileges for the **Actions and Connectors** feature in the **Management** + // section of the Kibana feature privileges. + // + // POST /s/{spaceId}/api/actions/connector + CreateConnector(ctx context.Context, req CreateConnectorReq, params CreateConnectorParams) (CreateConnectorRes, error) + // DeleteConnector implements deleteConnector operation. + // + // You must have `all` privileges for the **Actions and Connectors** feature in the **Management** + // section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be + // recovered. + // + // DELETE /s/{spaceId}/api/actions/connector/{connectorId} + DeleteConnector(ctx context.Context, params DeleteConnectorParams) (DeleteConnectorRes, error) + // GetConnector implements getConnector operation. + // + // You must have `read` privileges for the **Actions and Connectors** feature in the **Management** + // section of the Kibana feature privileges. + // + // GET /s/{spaceId}/api/actions/connector/{connectorId} + GetConnector(ctx context.Context, params GetConnectorParams) (GetConnectorRes, error) + // GetConnectorTypes implements getConnectorTypes operation. + // + // You do not need any Kibana feature privileges to run this API. + // + // GET /s/{spaceId}/api/actions/connector_types + GetConnectorTypes(ctx context.Context, params GetConnectorTypesParams) (GetConnectorTypesRes, error) + // GetConnectors implements getConnectors operation. + // + // You must have `read` privileges for the **Actions and Connectors** feature in the **Management** + // section of the Kibana feature privileges. + // + // GET /s/{spaceId}/api/actions/connectors + GetConnectors(ctx context.Context, params GetConnectorsParams) (GetConnectorsRes, error) + // LegacyCreateConnector implements legacyCreateConnector operation. + // + // Deprecated in 7.13.0. Use the create connector API instead. + // + // Deprecated: schema marks this operation as deprecated. + // + // POST /s/{spaceId}/api/actions + LegacyCreateConnector(ctx context.Context, req *LegacyCreateConnectorReq, params LegacyCreateConnectorParams) (LegacyCreateConnectorRes, error) + // LegacyDeleteConnector implements legacyDeleteConnector operation. + // + // Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, + // it cannot be recovered. + // + // Deprecated: schema marks this operation as deprecated. + // + // DELETE /s/{spaceId}/api/actions/action/{actionId} + LegacyDeleteConnector(ctx context.Context, params LegacyDeleteConnectorParams) (LegacyDeleteConnectorRes, error) + // LegacyGetConnector implements legacyGetConnector operation. + // + // Deprecated in 7.13.0. Use the get connector API instead. + // + // Deprecated: schema marks this operation as deprecated. + // + // GET /s/{spaceId}/api/actions/action/{actionId} + LegacyGetConnector(ctx context.Context, params LegacyGetConnectorParams) (LegacyGetConnectorRes, error) + // LegacyGetConnectorTypes implements legacyGetConnectorTypes operation. + // + // Deprecated in 7.13.0. Use the get all connector types API instead. + // + // Deprecated: schema marks this operation as deprecated. + // + // GET /s/{spaceId}/api/actions/list_action_types + LegacyGetConnectorTypes(ctx context.Context, params LegacyGetConnectorTypesParams) (LegacyGetConnectorTypesRes, error) + // LegacyGetConnectors implements legacyGetConnectors operation. + // + // Deprecated in 7.13.0. Use the get all connectors API instead. + // + // Deprecated: schema marks this operation as deprecated. + // + // GET /s/{spaceId}/api/actions + LegacyGetConnectors(ctx context.Context, params LegacyGetConnectorsParams) (LegacyGetConnectorsRes, error) + // LegacyRunConnector implements legacyRunConnector operation. + // + // Deprecated in 7.13.0. Use the run connector API instead. + // + // Deprecated: schema marks this operation as deprecated. + // + // POST /s/{spaceId}/api/actions/action/{actionId}/_execute + LegacyRunConnector(ctx context.Context, req *LegacyRunConnectorReq, params LegacyRunConnectorParams) (LegacyRunConnectorRes, error) + // LegacyUpdateConnector implements legacyUpdateConnector operation. + // + // Deprecated in 7.13.0. Use the update connector API instead. + // + // Deprecated: schema marks this operation as deprecated. + // + // PUT /s/{spaceId}/api/actions/action/{actionId} + LegacyUpdateConnector(ctx context.Context, req *LegacyUpdateConnectorReq, params LegacyUpdateConnectorParams) (LegacyUpdateConnectorRes, error) + // UpdateConnector implements updateConnector operation. + // + // You must have `all` privileges for the **Actions and Connectors** feature in the **Management** + // section of the Kibana feature privileges. + // + // PUT /s/{spaceId}/api/actions/connector/{connectorId} + UpdateConnector(ctx context.Context, req UpdateConnectorReq, params UpdateConnectorParams) (UpdateConnectorRes, error) +} + +// Server implements http server based on OpenAPI v3 specification and +// calls Handler to handle requests. +type Server struct { + h Handler + sec SecurityHandler + baseServer +} + +// NewServer creates new Server. +func NewServer(h Handler, sec SecurityHandler, opts ...ServerOption) (*Server, error) { + s, err := newServerConfig(opts...).baseServer() + if err != nil { + return nil, err + } + return &Server{ + h: h, + sec: sec, + baseServer: s, + }, nil +} diff --git a/generated/connectors/oas_unimplemented_gen.go b/generated/connectors/oas_unimplemented_gen.go new file mode 100644 index 000000000..03e90c68c --- /dev/null +++ b/generated/connectors/oas_unimplemented_gen.go @@ -0,0 +1,152 @@ +// Code generated by ogen, DO NOT EDIT. + +package connectors + +import ( + "context" + + ht "github.com/ogen-go/ogen/http" +) + +// UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented. +type UnimplementedHandler struct{} + +var _ Handler = UnimplementedHandler{} + +// CreateConnector implements createConnector operation. +// +// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** +// section of the Kibana feature privileges. +// +// POST /s/{spaceId}/api/actions/connector +func (UnimplementedHandler) CreateConnector(ctx context.Context, req CreateConnectorReq, params CreateConnectorParams) (r CreateConnectorRes, _ error) { + return r, ht.ErrNotImplemented +} + +// DeleteConnector implements deleteConnector operation. +// +// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** +// section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be +// recovered. +// +// DELETE /s/{spaceId}/api/actions/connector/{connectorId} +func (UnimplementedHandler) DeleteConnector(ctx context.Context, params DeleteConnectorParams) (r DeleteConnectorRes, _ error) { + return r, ht.ErrNotImplemented +} + +// GetConnector implements getConnector operation. +// +// You must have `read` privileges for the **Actions and Connectors** feature in the **Management** +// section of the Kibana feature privileges. +// +// GET /s/{spaceId}/api/actions/connector/{connectorId} +func (UnimplementedHandler) GetConnector(ctx context.Context, params GetConnectorParams) (r GetConnectorRes, _ error) { + return r, ht.ErrNotImplemented +} + +// GetConnectorTypes implements getConnectorTypes operation. +// +// You do not need any Kibana feature privileges to run this API. +// +// GET /s/{spaceId}/api/actions/connector_types +func (UnimplementedHandler) GetConnectorTypes(ctx context.Context, params GetConnectorTypesParams) (r GetConnectorTypesRes, _ error) { + return r, ht.ErrNotImplemented +} + +// GetConnectors implements getConnectors operation. +// +// You must have `read` privileges for the **Actions and Connectors** feature in the **Management** +// section of the Kibana feature privileges. +// +// GET /s/{spaceId}/api/actions/connectors +func (UnimplementedHandler) GetConnectors(ctx context.Context, params GetConnectorsParams) (r GetConnectorsRes, _ error) { + return r, ht.ErrNotImplemented +} + +// LegacyCreateConnector implements legacyCreateConnector operation. +// +// Deprecated in 7.13.0. Use the create connector API instead. +// +// Deprecated: schema marks this operation as deprecated. +// +// POST /s/{spaceId}/api/actions +func (UnimplementedHandler) LegacyCreateConnector(ctx context.Context, req *LegacyCreateConnectorReq, params LegacyCreateConnectorParams) (r LegacyCreateConnectorRes, _ error) { + return r, ht.ErrNotImplemented +} + +// LegacyDeleteConnector implements legacyDeleteConnector operation. +// +// Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, +// it cannot be recovered. +// +// Deprecated: schema marks this operation as deprecated. +// +// DELETE /s/{spaceId}/api/actions/action/{actionId} +func (UnimplementedHandler) LegacyDeleteConnector(ctx context.Context, params LegacyDeleteConnectorParams) (r LegacyDeleteConnectorRes, _ error) { + return r, ht.ErrNotImplemented +} + +// LegacyGetConnector implements legacyGetConnector operation. +// +// Deprecated in 7.13.0. Use the get connector API instead. +// +// Deprecated: schema marks this operation as deprecated. +// +// GET /s/{spaceId}/api/actions/action/{actionId} +func (UnimplementedHandler) LegacyGetConnector(ctx context.Context, params LegacyGetConnectorParams) (r LegacyGetConnectorRes, _ error) { + return r, ht.ErrNotImplemented +} + +// LegacyGetConnectorTypes implements legacyGetConnectorTypes operation. +// +// Deprecated in 7.13.0. Use the get all connector types API instead. +// +// Deprecated: schema marks this operation as deprecated. +// +// GET /s/{spaceId}/api/actions/list_action_types +func (UnimplementedHandler) LegacyGetConnectorTypes(ctx context.Context, params LegacyGetConnectorTypesParams) (r LegacyGetConnectorTypesRes, _ error) { + return r, ht.ErrNotImplemented +} + +// LegacyGetConnectors implements legacyGetConnectors operation. +// +// Deprecated in 7.13.0. Use the get all connectors API instead. +// +// Deprecated: schema marks this operation as deprecated. +// +// GET /s/{spaceId}/api/actions +func (UnimplementedHandler) LegacyGetConnectors(ctx context.Context, params LegacyGetConnectorsParams) (r LegacyGetConnectorsRes, _ error) { + return r, ht.ErrNotImplemented +} + +// LegacyRunConnector implements legacyRunConnector operation. +// +// Deprecated in 7.13.0. Use the run connector API instead. +// +// Deprecated: schema marks this operation as deprecated. +// +// POST /s/{spaceId}/api/actions/action/{actionId}/_execute +func (UnimplementedHandler) LegacyRunConnector(ctx context.Context, req *LegacyRunConnectorReq, params LegacyRunConnectorParams) (r LegacyRunConnectorRes, _ error) { + return r, ht.ErrNotImplemented +} + +// LegacyUpdateConnector implements legacyUpdateConnector operation. +// +// Deprecated in 7.13.0. Use the update connector API instead. +// +// Deprecated: schema marks this operation as deprecated. +// +// PUT /s/{spaceId}/api/actions/action/{actionId} +func (UnimplementedHandler) LegacyUpdateConnector(ctx context.Context, req *LegacyUpdateConnectorReq, params LegacyUpdateConnectorParams) (r LegacyUpdateConnectorRes, _ error) { + return r, ht.ErrNotImplemented +} + +// UpdateConnector implements updateConnector operation. +// +// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** +// section of the Kibana feature privileges. +// +// PUT /s/{spaceId}/api/actions/connector/{connectorId} +func (UnimplementedHandler) UpdateConnector(ctx context.Context, req UpdateConnectorReq, params UpdateConnectorParams) (r UpdateConnectorRes, _ error) { + return r, ht.ErrNotImplemented +} diff --git a/generated/connectors/oas_validators_gen.go b/generated/connectors/oas_validators_gen.go new file mode 100644 index 000000000..24cf7d342 --- /dev/null +++ b/generated/connectors/oas_validators_gen.go @@ -0,0 +1,981 @@ +// Code generated by ogen, DO NOT EDIT. + +package connectors + +import ( + "fmt" + + "github.com/go-faster/errors" + + "github.com/ogen-go/ogen/validate" +) + +func (s *ConfigPropertiesCasesWebhook) Validate() error { + var failures []validate.FieldError + if err := func() error { + if s.CreateCommentMethod.Set { + if err := func() error { + if err := s.CreateCommentMethod.Value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "createCommentMethod", + Error: err, + }) + } + if err := func() error { + if s.CreateIncidentMethod.Set { + if err := func() error { + if err := s.CreateIncidentMethod.Value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "createIncidentMethod", + Error: err, + }) + } + if err := func() error { + if s.UpdateIncidentMethod.Set { + if err := func() error { + if err := s.UpdateIncidentMethod.Value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "updateIncidentMethod", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} +func (s ConfigPropertiesCasesWebhookCreateCommentMethod) Validate() error { + switch s { + case "patch": + return nil + case "post": + return nil + case "put": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConfigPropertiesCasesWebhookCreateIncidentMethod) Validate() error { + switch s { + case "patch": + return nil + case "post": + return nil + case "put": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConfigPropertiesCasesWebhookUpdateIncidentMethod) Validate() error { + switch s { + case "patch": + return nil + case "post": + return nil + case "put": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s *ConfigPropertiesSwimlane) Validate() error { + var failures []validate.FieldError + if err := func() error { + if err := s.ConnectorType.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "connectorType", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} +func (s ConfigPropertiesSwimlaneConnectorType) Validate() error { + switch s { + case "all": + return nil + case "alerts": + return nil + case "cases": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConnectorResponseProperties) Validate() error { + switch s.Type { + case ConnectorResponsePropertiesCasesWebhookConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesCasesWebhook.Validate(); err != nil { + return err + } + return nil + case ConnectorResponsePropertiesEmailConnectorResponseProperties: + return nil // no validation needed + case ConnectorResponsePropertiesIndexConnectorResponseProperties: + return nil // no validation needed + case ConnectorResponsePropertiesJiraConnectorResponseProperties: + return nil // no validation needed + case ConnectorResponsePropertiesOpsgenieConnectorResponseProperties: + return nil // no validation needed + case ConnectorResponsePropertiesPagerdutyConnectorResponseProperties: + return nil // no validation needed + case ConnectorResponsePropertiesResilientConnectorResponseProperties: + return nil // no validation needed + case ConnectorResponsePropertiesServerlogConnectorResponseProperties: + return nil // no validation needed + case ConnectorResponsePropertiesServicenowConnectorResponseProperties: + return nil // no validation needed + case ConnectorResponsePropertiesServicenowItomConnectorResponseProperties: + return nil // no validation needed + case ConnectorResponsePropertiesServicenowSirConnectorResponseProperties: + return nil // no validation needed + case ConnectorResponsePropertiesSlackConnectorResponseProperties: + return nil // no validation needed + case ConnectorResponsePropertiesSwimlaneConnectorResponseProperties: + if err := s.ConnectorResponsePropertiesSwimlane.Validate(); err != nil { + return err + } + return nil + case ConnectorResponsePropertiesTeamsConnectorResponseProperties: + return nil // no validation needed + case ConnectorResponsePropertiesTinesConnectorResponseProperties: + return nil // no validation needed + case ConnectorResponsePropertiesWebhookConnectorResponseProperties: + return nil // no validation needed + case ConnectorResponsePropertiesXmattersConnectorResponseProperties: + return nil // no validation needed + default: + return errors.Errorf("invalid type %q", s.Type) + } +} + +func (s *ConnectorResponsePropertiesCasesWebhook) Validate() error { + var failures []validate.FieldError + if err := func() error { + if err := s.Config.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "config", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} +func (s ConnectorResponsePropertiesCasesWebhookConnectorTypeID) Validate() error { + switch s { + case ".cases-webhook": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConnectorResponsePropertiesEmailConnectorTypeID) Validate() error { + switch s { + case ".email": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConnectorResponsePropertiesIndexConnectorTypeID) Validate() error { + switch s { + case ".index": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConnectorResponsePropertiesJiraConnectorTypeID) Validate() error { + switch s { + case ".jira": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConnectorResponsePropertiesOpsgenieConnectorTypeID) Validate() error { + switch s { + case ".opsgenie": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConnectorResponsePropertiesPagerdutyConnectorTypeID) Validate() error { + switch s { + case ".pagerduty": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConnectorResponsePropertiesResilientConnectorTypeID) Validate() error { + switch s { + case ".resilient": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConnectorResponsePropertiesServerlogConnectorTypeID) Validate() error { + switch s { + case ".server-log": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConnectorResponsePropertiesServicenowConnectorTypeID) Validate() error { + switch s { + case ".servicenow": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConnectorResponsePropertiesServicenowItomConnectorTypeID) Validate() error { + switch s { + case ".servicenow-itom": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConnectorResponsePropertiesServicenowSirConnectorTypeID) Validate() error { + switch s { + case ".servicenow-sir": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConnectorResponsePropertiesSlackConnectorTypeID) Validate() error { + switch s { + case ".slack": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s *ConnectorResponsePropertiesSwimlane) Validate() error { + var failures []validate.FieldError + if err := func() error { + if err := s.Config.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "config", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} +func (s ConnectorResponsePropertiesSwimlaneConnectorTypeID) Validate() error { + switch s { + case ".swimlane": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConnectorResponsePropertiesTeamsConnectorTypeID) Validate() error { + switch s { + case ".teams": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConnectorResponsePropertiesTinesConnectorTypeID) Validate() error { + switch s { + case ".tines": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConnectorResponsePropertiesWebhookConnectorTypeID) Validate() error { + switch s { + case ".webhook": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConnectorResponsePropertiesXmattersConnectorTypeID) Validate() error { + switch s { + case ".xmatters": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s ConnectorTypes) Validate() error { + switch s { + case ".cases-webhook": + return nil + case ".email": + return nil + case ".index": + return nil + case ".jira": + return nil + case ".opsgenie": + return nil + case ".pagerduty": + return nil + case ".resilient": + return nil + case ".servicenow": + return nil + case ".servicenow-itom": + return nil + case ".servicenow-sir": + return nil + case ".server-log": + return nil + case ".slack": + return nil + case ".swimlane": + return nil + case ".teams": + return nil + case ".tines": + return nil + case ".webhook": + return nil + case ".xmatters": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s CreateConnectorReq) Validate() error { + switch s.Type { + case CreateConnectorRequestCasesWebhookCreateConnectorReq: + if err := s.CreateConnectorRequestCasesWebhook.Validate(); err != nil { + return err + } + return nil + case CreateConnectorRequestEmailCreateConnectorReq: + return nil // no validation needed + case CreateConnectorRequestIndexCreateConnectorReq: + return nil // no validation needed + case CreateConnectorRequestJiraCreateConnectorReq: + return nil // no validation needed + case CreateConnectorRequestOpsgenieCreateConnectorReq: + return nil // no validation needed + case CreateConnectorRequestPagerdutyCreateConnectorReq: + return nil // no validation needed + case CreateConnectorRequestResilientCreateConnectorReq: + return nil // no validation needed + case CreateConnectorRequestServerlogCreateConnectorReq: + return nil // no validation needed + case CreateConnectorRequestServicenowCreateConnectorReq: + return nil // no validation needed + case CreateConnectorRequestServicenowItomCreateConnectorReq: + return nil // no validation needed + case CreateConnectorRequestServicenowSirCreateConnectorReq: + return nil // no validation needed + case CreateConnectorRequestSlackCreateConnectorReq: + return nil // no validation needed + case CreateConnectorRequestSwimlaneCreateConnectorReq: + if err := s.CreateConnectorRequestSwimlane.Validate(); err != nil { + return err + } + return nil + case CreateConnectorRequestTeamsCreateConnectorReq: + return nil // no validation needed + case CreateConnectorRequestTinesCreateConnectorReq: + return nil // no validation needed + case CreateConnectorRequestWebhookCreateConnectorReq: + return nil // no validation needed + case CreateConnectorRequestXmattersCreateConnectorReq: + return nil // no validation needed + default: + return errors.Errorf("invalid type %q", s.Type) + } +} + +func (s *CreateConnectorRequestCasesWebhook) Validate() error { + var failures []validate.FieldError + if err := func() error { + if err := s.Config.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "config", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} +func (s CreateConnectorRequestCasesWebhookConnectorTypeID) Validate() error { + switch s { + case ".cases-webhook": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s CreateConnectorRequestEmailConnectorTypeID) Validate() error { + switch s { + case ".email": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s CreateConnectorRequestIndexConnectorTypeID) Validate() error { + switch s { + case ".index": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s CreateConnectorRequestJiraConnectorTypeID) Validate() error { + switch s { + case ".jira": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s CreateConnectorRequestOpsgenieConnectorTypeID) Validate() error { + switch s { + case ".opsgenie": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s CreateConnectorRequestPagerdutyConnectorTypeID) Validate() error { + switch s { + case ".pagerduty": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s CreateConnectorRequestResilientConnectorTypeID) Validate() error { + switch s { + case ".resilient": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s CreateConnectorRequestServerlogConnectorTypeID) Validate() error { + switch s { + case ".server-log": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s CreateConnectorRequestServicenowConnectorTypeID) Validate() error { + switch s { + case ".servicenow": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s CreateConnectorRequestServicenowItomConnectorTypeID) Validate() error { + switch s { + case ".servicenow-itom": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s CreateConnectorRequestServicenowSirConnectorTypeID) Validate() error { + switch s { + case ".servicenow-sir": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s CreateConnectorRequestSlackConnectorTypeID) Validate() error { + switch s { + case ".slack": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s *CreateConnectorRequestSwimlane) Validate() error { + var failures []validate.FieldError + if err := func() error { + if err := s.Config.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "config", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} +func (s CreateConnectorRequestSwimlaneConnectorTypeID) Validate() error { + switch s { + case ".swimlane": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s CreateConnectorRequestTeamsConnectorTypeID) Validate() error { + switch s { + case ".teams": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s CreateConnectorRequestTinesConnectorTypeID) Validate() error { + switch s { + case ".tines": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s CreateConnectorRequestWebhookConnectorTypeID) Validate() error { + switch s { + case ".webhook": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s CreateConnectorRequestXmattersConnectorTypeID) Validate() error { + switch s { + case ".xmatters": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s Features) Validate() error { + switch s { + case "alerting": + return nil + case "cases": + return nil + case "uptime": + return nil + case "siem": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s GetConnectorTypesOKApplicationJSON) Validate() error { + if s == nil { + return errors.New("nil is invalid value") + } + var failures []validate.FieldError + for i, elem := range s { + if err := func() error { + if err := elem.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} +func (s *GetConnectorTypesOKItem) Validate() error { + var failures []validate.FieldError + if err := func() error { + if s.ID.Set { + if err := func() error { + if err := s.ID.Value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "id", + Error: err, + }) + } + if err := func() error { + var failures []validate.FieldError + for i, elem := range s.SupportedFeatureIds { + if err := func() error { + if err := elem.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "supported_feature_ids", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} +func (s GetConnectorsOKApplicationJSON) Validate() error { + if s == nil { + return errors.New("nil is invalid value") + } + var failures []validate.FieldError + for i, elem := range s { + if err := func() error { + if err := elem.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} +func (s *GetConnectorsOKItem) Validate() error { + var failures []validate.FieldError + if err := func() error { + if err := s.ConnectorTypeID.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "connector_type_id", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} +func (s LegacyGetConnectorTypesOKApplicationJSON) Validate() error { + if s == nil { + return errors.New("nil is invalid value") + } + return nil +} +func (s LegacyGetConnectorsOKApplicationJSON) Validate() error { + if s == nil { + return errors.New("nil is invalid value") + } + return nil +} +func (s *LegacyRunConnectorOK) Validate() error { + var failures []validate.FieldError + if err := func() error { + if s.Data.Set { + if err := func() error { + if err := s.Data.Value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "data", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} +func (s LegacyRunConnectorOKData) Validate() error { + switch s.Type { + case LegacyRunConnectorOKData0LegacyRunConnectorOKData: + return nil // no validation needed + case LegacyRunConnectorOKData1ItemArrayLegacyRunConnectorOKData: + if s.LegacyRunConnectorOKData1ItemArray == nil { + return errors.New("nil is invalid value") + } + return nil + default: + return errors.Errorf("invalid type %q", s.Type) + } +} + +func (s *R401) Validate() error { + var failures []validate.FieldError + if err := func() error { + if s.Error.Set { + if err := func() error { + if err := s.Error.Value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "error", + Error: err, + }) + } + if err := func() error { + if s.StatusCode.Set { + if err := func() error { + if err := s.StatusCode.Value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "statusCode", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} +func (s R401Error) Validate() error { + switch s { + case "Unauthorized": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s R401StatusCode) Validate() error { + switch s { + case 401: + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s *R404) Validate() error { + var failures []validate.FieldError + if err := func() error { + if s.Error.Set { + if err := func() error { + if err := s.Error.Value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "error", + Error: err, + }) + } + if err := func() error { + if s.StatusCode.Set { + if err := func() error { + if err := s.StatusCode.Value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "statusCode", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} +func (s R404Error) Validate() error { + switch s { + case "Not Found": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s R404StatusCode) Validate() error { + switch s { + case 404: + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s UpdateConnectorReq) Validate() error { + switch s.Type { + case UpdateConnectorRequestCasesWebhookUpdateConnectorReq: + if err := s.UpdateConnectorRequestCasesWebhook.Validate(); err != nil { + return err + } + return nil + case UpdateConnectorRequestIndexUpdateConnectorReq: + return nil // no validation needed + case UpdateConnectorRequestJiraUpdateConnectorReq: + return nil // no validation needed + case UpdateConnectorRequestOpsgenieUpdateConnectorReq: + return nil // no validation needed + case UpdateConnectorRequestResilientUpdateConnectorReq: + return nil // no validation needed + case UpdateConnectorRequestServerlogUpdateConnectorReq: + return nil // no validation needed + case UpdateConnectorRequestServicenowUpdateConnectorReq: + return nil // no validation needed + case UpdateConnectorRequestServicenowItomUpdateConnectorReq: + return nil // no validation needed + case UpdateConnectorRequestSwimlaneUpdateConnectorReq: + if err := s.UpdateConnectorRequestSwimlane.Validate(); err != nil { + return err + } + return nil + default: + return errors.Errorf("invalid type %q", s.Type) + } +} + +func (s *UpdateConnectorRequestCasesWebhook) Validate() error { + var failures []validate.FieldError + if err := func() error { + if err := s.Config.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "config", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} +func (s *UpdateConnectorRequestSwimlane) Validate() error { + var failures []validate.FieldError + if err := func() error { + if err := s.Config.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "config", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} diff --git a/generated/kibanaactions/.gitignore b/generated/kibanaactions/.gitignore deleted file mode 100644 index daf913b1b..000000000 --- a/generated/kibanaactions/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof diff --git a/generated/kibanaactions/.swagger-codegen-ignore b/generated/kibanaactions/.swagger-codegen-ignore deleted file mode 100644 index c5fa491b4..000000000 --- a/generated/kibanaactions/.swagger-codegen-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/generated/kibanaactions/.swagger-codegen/VERSION b/generated/kibanaactions/.swagger-codegen/VERSION deleted file mode 100644 index 34ec317ad..000000000 --- a/generated/kibanaactions/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.0.42 \ No newline at end of file diff --git a/generated/kibanaactions/.travis.yml b/generated/kibanaactions/.travis.yml deleted file mode 100644 index f5cb2ce9a..000000000 --- a/generated/kibanaactions/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/generated/kibanaactions/README.md b/generated/kibanaactions/README.md deleted file mode 100644 index 167cbb353..000000000 --- a/generated/kibanaactions/README.md +++ /dev/null @@ -1,186 +0,0 @@ -# Go API client for kibanaactions - -OpenAPI schema for Connectors endpoints - -## Overview -This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. - -- API version: 0.1 -- Package version: 1.0.0 -- Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen - -## Installation -Put the package under your project folder and add the following in import: -```golang -import "./kibanaactions" -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost:5601* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ConnectorsApi* | [**CreateConnector**](docs/ConnectorsApi.md#createconnector) | **Post** /s/{spaceId}/api/actions/connector | Creates a connector. -*ConnectorsApi* | [**DeleteConnector**](docs/ConnectorsApi.md#deleteconnector) | **Delete** /s/{spaceId}/api/actions/connector/{connectorId} | Deletes a connector. -*ConnectorsApi* | [**GetConnector**](docs/ConnectorsApi.md#getconnector) | **Get** /s/{spaceId}/api/actions/connector/{connectorId} | Retrieves a connector by ID. -*ConnectorsApi* | [**GetConnectorTypes**](docs/ConnectorsApi.md#getconnectortypes) | **Get** /s/{spaceId}/api/actions/connector_types | Retrieves a list of all connector types. -*ConnectorsApi* | [**GetConnectors**](docs/ConnectorsApi.md#getconnectors) | **Get** /s/{spaceId}/api/actions/connectors | Retrieves all connectors. -*ConnectorsApi* | [**LegacyCreateConnector**](docs/ConnectorsApi.md#legacycreateconnector) | **Post** /s/{spaceId}/api/actions | Creates a connector. -*ConnectorsApi* | [**LegacyDeleteConnector**](docs/ConnectorsApi.md#legacydeleteconnector) | **Delete** /s/{spaceId}/api/actions/action/{actionId} | Deletes a connector. -*ConnectorsApi* | [**LegacyGetConnector**](docs/ConnectorsApi.md#legacygetconnector) | **Get** /s/{spaceId}/api/actions/action/{actionId} | Retrieves a connector by ID. -*ConnectorsApi* | [**LegacyGetConnectorTypes**](docs/ConnectorsApi.md#legacygetconnectortypes) | **Get** /s/{spaceId}/api/actions/list_action_types | Retrieves a list of all connector types. -*ConnectorsApi* | [**LegacyGetConnectors**](docs/ConnectorsApi.md#legacygetconnectors) | **Get** /s/{spaceId}/api/actions | Retrieves all connectors. -*ConnectorsApi* | [**LegacyRunConnector**](docs/ConnectorsApi.md#legacyrunconnector) | **Post** /s/{spaceId}/api/actions/action/{actionId}/_execute | Runs a connector. -*ConnectorsApi* | [**LegacyUpdateConnector**](docs/ConnectorsApi.md#legacyupdateconnector) | **Put** /s/{spaceId}/api/actions/action/{actionId} | Updates the attributes for a connector. -*ConnectorsApi* | [**RunConnector**](docs/ConnectorsApi.md#runconnector) | **Post** /s/{spaceId}/api/actions/connector/{connectorId}/_execute | Runs a connector. -*ConnectorsApi* | [**UpdateConnector**](docs/ConnectorsApi.md#updateconnector) | **Put** /s/{spaceId}/api/actions/connector/{connectorId} | Updates the attributes for a connector. - -## Documentation For Models - - - [ActionResponseProperties](docs/ActionResponseProperties.md) - - [AlertIdentifierMapping](docs/AlertIdentifierMapping.md) - - [CaseCommentMapping](docs/CaseCommentMapping.md) - - [CaseDescriptionMapping](docs/CaseDescriptionMapping.md) - - [CaseIdentifierMapping](docs/CaseIdentifierMapping.md) - - [CaseNameMapping](docs/CaseNameMapping.md) - - [ConfigPropertiesCasesWebhook](docs/ConfigPropertiesCasesWebhook.md) - - [ConfigPropertiesIndex](docs/ConfigPropertiesIndex.md) - - [ConfigPropertiesJira](docs/ConfigPropertiesJira.md) - - [ConfigPropertiesOpsgenie](docs/ConfigPropertiesOpsgenie.md) - - [ConfigPropertiesResilient](docs/ConfigPropertiesResilient.md) - - [ConfigPropertiesServicenow](docs/ConfigPropertiesServicenow.md) - - [ConfigPropertiesServicenowItom](docs/ConfigPropertiesServicenowItom.md) - - [ConfigPropertiesSwimlane](docs/ConfigPropertiesSwimlane.md) - - [ConnectorMappingsPropertiesForASwimlaneConnector](docs/ConnectorMappingsPropertiesForASwimlaneConnector.md) - - [ConnectorResponseProperties](docs/ConnectorResponseProperties.md) - - [ConnectorResponsePropertiesCasesWebhook](docs/ConnectorResponsePropertiesCasesWebhook.md) - - [ConnectorResponsePropertiesEmail](docs/ConnectorResponsePropertiesEmail.md) - - [ConnectorResponsePropertiesIndex](docs/ConnectorResponsePropertiesIndex.md) - - [ConnectorResponsePropertiesJira](docs/ConnectorResponsePropertiesJira.md) - - [ConnectorResponsePropertiesOpsgenie](docs/ConnectorResponsePropertiesOpsgenie.md) - - [ConnectorResponsePropertiesPagerduty](docs/ConnectorResponsePropertiesPagerduty.md) - - [ConnectorResponsePropertiesResilient](docs/ConnectorResponsePropertiesResilient.md) - - [ConnectorResponsePropertiesServerlog](docs/ConnectorResponsePropertiesServerlog.md) - - [ConnectorResponsePropertiesServicenow](docs/ConnectorResponsePropertiesServicenow.md) - - [ConnectorResponsePropertiesServicenowItom](docs/ConnectorResponsePropertiesServicenowItom.md) - - [ConnectorResponsePropertiesServicenowSir](docs/ConnectorResponsePropertiesServicenowSir.md) - - [ConnectorResponsePropertiesSlack](docs/ConnectorResponsePropertiesSlack.md) - - [ConnectorResponsePropertiesSwimlane](docs/ConnectorResponsePropertiesSwimlane.md) - - [ConnectorResponsePropertiesTeams](docs/ConnectorResponsePropertiesTeams.md) - - [ConnectorResponsePropertiesTines](docs/ConnectorResponsePropertiesTines.md) - - [ConnectorResponsePropertiesWebhook](docs/ConnectorResponsePropertiesWebhook.md) - - [ConnectorResponsePropertiesXmatters](docs/ConnectorResponsePropertiesXmatters.md) - - [ConnectorTypes](docs/ConnectorTypes.md) - - [CreateConnectorRequestBodyProperties](docs/CreateConnectorRequestBodyProperties.md) - - [CreateConnectorRequestCasesWebhook](docs/CreateConnectorRequestCasesWebhook.md) - - [CreateConnectorRequestEmail](docs/CreateConnectorRequestEmail.md) - - [CreateConnectorRequestIndex](docs/CreateConnectorRequestIndex.md) - - [CreateConnectorRequestJira](docs/CreateConnectorRequestJira.md) - - [CreateConnectorRequestOpsgenie](docs/CreateConnectorRequestOpsgenie.md) - - [CreateConnectorRequestPagerduty](docs/CreateConnectorRequestPagerduty.md) - - [CreateConnectorRequestResilient](docs/CreateConnectorRequestResilient.md) - - [CreateConnectorRequestServerlog](docs/CreateConnectorRequestServerlog.md) - - [CreateConnectorRequestServicenow](docs/CreateConnectorRequestServicenow.md) - - [CreateConnectorRequestServicenowItom](docs/CreateConnectorRequestServicenowItom.md) - - [CreateConnectorRequestServicenowSir](docs/CreateConnectorRequestServicenowSir.md) - - [CreateConnectorRequestSlack](docs/CreateConnectorRequestSlack.md) - - [CreateConnectorRequestSwimlane](docs/CreateConnectorRequestSwimlane.md) - - [CreateConnectorRequestTeams](docs/CreateConnectorRequestTeams.md) - - [CreateConnectorRequestTines](docs/CreateConnectorRequestTines.md) - - [CreateConnectorRequestWebhook](docs/CreateConnectorRequestWebhook.md) - - [CreateConnectorRequestXmatters](docs/CreateConnectorRequestXmatters.md) - - [Features](docs/Features.md) - - [GetConnectorsResponseBodyProperties](docs/GetConnectorsResponseBodyProperties.md) - - [InlineResponse200](docs/InlineResponse200.md) - - [InlineResponse2001](docs/InlineResponse2001.md) - - [InlineResponse2002](docs/InlineResponse2002.md) - - [InlineResponse2003](docs/InlineResponse2003.md) - - [InlineResponse400](docs/InlineResponse400.md) - - [InlineResponse404](docs/InlineResponse404.md) - - [LegacyCreateConnectorRequestProperties](docs/LegacyCreateConnectorRequestProperties.md) - - [LegacyRunConnectorRequestBodyProperties](docs/LegacyRunConnectorRequestBodyProperties.md) - - [LegacyUpdateConnectorRequestBodyProperties](docs/LegacyUpdateConnectorRequestBodyProperties.md) - - [NotFoundResponse](docs/NotFoundResponse.md) - - [OneOfRunConnectorRequestBodyPropertiesParams](docs/OneOfRunConnectorRequestBodyPropertiesParams.md) - - [OneOfinlineResponse2001Data](docs/OneOfinlineResponse2001Data.md) - - [OneOfinlineResponse2003Data](docs/OneOfinlineResponse2003Data.md) - - [OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp](docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md) - - [OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash](docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md) - - [OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl](docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md) - - [OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp](docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md) - - [RuleNameMapping](docs/RuleNameMapping.md) - - [RunConnectorParamsDocuments](docs/RunConnectorParamsDocuments.md) - - [RunConnectorParamsLevelMessage](docs/RunConnectorParamsLevelMessage.md) - - [RunConnectorRequestBodyProperties](docs/RunConnectorRequestBodyProperties.md) - - [RunConnectorSubactionAddevent](docs/RunConnectorSubactionAddevent.md) - - [RunConnectorSubactionAddeventSubActionParams](docs/RunConnectorSubactionAddeventSubActionParams.md) - - [RunConnectorSubactionClosealert](docs/RunConnectorSubactionClosealert.md) - - [RunConnectorSubactionClosealertSubActionParams](docs/RunConnectorSubactionClosealertSubActionParams.md) - - [RunConnectorSubactionCreatealert](docs/RunConnectorSubactionCreatealert.md) - - [RunConnectorSubactionCreatealertSubActionParams](docs/RunConnectorSubactionCreatealertSubActionParams.md) - - [RunConnectorSubactionCreatealertSubActionParamsResponders](docs/RunConnectorSubactionCreatealertSubActionParamsResponders.md) - - [RunConnectorSubactionCreatealertSubActionParamsVisibleTo](docs/RunConnectorSubactionCreatealertSubActionParamsVisibleTo.md) - - [RunConnectorSubactionFieldsbyissuetype](docs/RunConnectorSubactionFieldsbyissuetype.md) - - [RunConnectorSubactionFieldsbyissuetypeSubActionParams](docs/RunConnectorSubactionFieldsbyissuetypeSubActionParams.md) - - [RunConnectorSubactionGetchoices](docs/RunConnectorSubactionGetchoices.md) - - [RunConnectorSubactionGetchoicesSubActionParams](docs/RunConnectorSubactionGetchoicesSubActionParams.md) - - [RunConnectorSubactionGetfields](docs/RunConnectorSubactionGetfields.md) - - [RunConnectorSubactionGetincident](docs/RunConnectorSubactionGetincident.md) - - [RunConnectorSubactionGetincidentSubActionParams](docs/RunConnectorSubactionGetincidentSubActionParams.md) - - [RunConnectorSubactionIssue](docs/RunConnectorSubactionIssue.md) - - [RunConnectorSubactionIssueSubActionParams](docs/RunConnectorSubactionIssueSubActionParams.md) - - [RunConnectorSubactionIssues](docs/RunConnectorSubactionIssues.md) - - [RunConnectorSubactionIssuesSubActionParams](docs/RunConnectorSubactionIssuesSubActionParams.md) - - [RunConnectorSubactionIssuetypes](docs/RunConnectorSubactionIssuetypes.md) - - [RunConnectorSubactionPushtoservice](docs/RunConnectorSubactionPushtoservice.md) - - [RunConnectorSubactionPushtoserviceSubActionParams](docs/RunConnectorSubactionPushtoserviceSubActionParams.md) - - [RunConnectorSubactionPushtoserviceSubActionParamsComments](docs/RunConnectorSubactionPushtoserviceSubActionParamsComments.md) - - [RunConnectorSubactionPushtoserviceSubActionParamsIncident](docs/RunConnectorSubactionPushtoserviceSubActionParamsIncident.md) - - [SecretsPropertiesCasesWebhook](docs/SecretsPropertiesCasesWebhook.md) - - [SecretsPropertiesJira](docs/SecretsPropertiesJira.md) - - [SecretsPropertiesOpsgenie](docs/SecretsPropertiesOpsgenie.md) - - [SecretsPropertiesResilient](docs/SecretsPropertiesResilient.md) - - [SecretsPropertiesServicenow](docs/SecretsPropertiesServicenow.md) - - [SecretsPropertiesSwimlane](docs/SecretsPropertiesSwimlane.md) - - [SeverityMapping](docs/SeverityMapping.md) - - [UnauthorizedResponse](docs/UnauthorizedResponse.md) - - [UpdateConnectorRequestBodyProperties](docs/UpdateConnectorRequestBodyProperties.md) - - [UpdateConnectorRequestCasesWebhook](docs/UpdateConnectorRequestCasesWebhook.md) - - [UpdateConnectorRequestIndex](docs/UpdateConnectorRequestIndex.md) - - [UpdateConnectorRequestJira](docs/UpdateConnectorRequestJira.md) - - [UpdateConnectorRequestOpsgenie](docs/UpdateConnectorRequestOpsgenie.md) - - [UpdateConnectorRequestResilient](docs/UpdateConnectorRequestResilient.md) - - [UpdateConnectorRequestServerlog](docs/UpdateConnectorRequestServerlog.md) - - [UpdateConnectorRequestServicenow](docs/UpdateConnectorRequestServicenow.md) - - [UpdateConnectorRequestServicenowItom](docs/UpdateConnectorRequestServicenowItom.md) - - [UpdateConnectorRequestSwimlane](docs/UpdateConnectorRequestSwimlane.md) - -## Documentation For Authorization - -## apiKeyAuth -- **Type**: API key - -Example -```golang -auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{ - Key: "APIKEY", - Prefix: "Bearer", // Omit if not necessary. -}) -r, err := client.Service.Operation(auth, args) -``` -## basicAuth -- **Type**: HTTP basic authentication - -Example -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - -## Author - - diff --git a/generated/kibanaactions/api_connectors.go b/generated/kibanaactions/api_connectors.go deleted file mode 100644 index 91c9f9ba2..000000000 --- a/generated/kibanaactions/api_connectors.go +++ /dev/null @@ -1,1623 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -import ( - "context" - "fmt" - "github.com/antihax/optional" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - -// Linger please -var ( - _ context.Context -) - -type ConnectorsApiService service - -/* -ConnectorsApiService Creates a connector. -You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param body - - @param kbnXsrf Cross-site request forgery protection - - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - -@return ConnectorResponseProperties -*/ -func (a *ConnectorsApiService) CreateConnector(ctx context.Context, body CreateConnectorRequestBodyProperties, kbnXsrf string, spaceId string) (ConnectorResponseProperties, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue ConnectorResponseProperties - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/connector" - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - localVarHeaderParams["kbn-xsrf"] = parameterToString(kbnXsrf, "") - // body params - localVarPostBody = &body - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - localVarHeaderParams["ApiKey"] = key - - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v ConnectorResponseProperties - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} - -/* -ConnectorsApiService Deletes a connector. -You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be recovered. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param kbnXsrf Cross-site request forgery protection - - @param connectorId An identifier for the connector. - - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. -*/ -func (a *ConnectorsApiService) DeleteConnector(ctx context.Context, kbnXsrf string, connectorId string, spaceId string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Delete") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/connector/{connectorId}" - localVarPath = strings.Replace(localVarPath, "{"+"connectorId"+"}", fmt.Sprintf("%v", connectorId), -1) - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - localVarHeaderParams["kbn-xsrf"] = parameterToString(kbnXsrf, "") - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - localVarHeaderParams["ApiKey"] = key - - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 404 { - var v InlineResponse404 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} - -/* -ConnectorsApiService Retrieves a connector by ID. -You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param connectorId An identifier for the connector. - - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - -@return ConnectorResponseProperties -*/ -func (a *ConnectorsApiService) GetConnector(ctx context.Context, connectorId string, spaceId string) (ConnectorResponseProperties, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue ConnectorResponseProperties - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/connector/{connectorId}" - localVarPath = strings.Replace(localVarPath, "{"+"connectorId"+"}", fmt.Sprintf("%v", connectorId), -1) - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - localVarHeaderParams["ApiKey"] = key - - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v ConnectorResponseProperties - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 404 { - var v InlineResponse404 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} - -/* -ConnectorsApiService Retrieves a list of all connector types. -You do not need any Kibana feature privileges to run this API. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - * @param optional nil or *ConnectorsApiGetConnectorTypesOpts - Optional Parameters: - * @param "FeatureId" (optional.Interface of Features) - A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases). -@return []InlineResponse200 -*/ - -type ConnectorsApiGetConnectorTypesOpts struct { - FeatureId optional.Interface -} - -func (a *ConnectorsApiService) GetConnectorTypes(ctx context.Context, spaceId string, localVarOptionals *ConnectorsApiGetConnectorTypesOpts) ([]InlineResponse200, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []InlineResponse200 - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/connector_types" - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if localVarOptionals != nil && localVarOptionals.FeatureId.IsSet() { - localVarQueryParams.Add("feature_id", parameterToString(localVarOptionals.FeatureId.Value(), "")) - } - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - localVarHeaderParams["ApiKey"] = key - - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v []InlineResponse200 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} - -/* -ConnectorsApiService Retrieves all connectors. -You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - -@return []GetConnectorsResponseBodyProperties -*/ -func (a *ConnectorsApiService) GetConnectors(ctx context.Context, spaceId string) ([]GetConnectorsResponseBodyProperties, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []GetConnectorsResponseBodyProperties - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/connectors" - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - localVarHeaderParams["ApiKey"] = key - - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v []GetConnectorsResponseBodyProperties - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} - -/* -ConnectorsApiService Creates a connector. -Deprecated in 7.13.0. Use the create connector API instead. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param body - - @param kbnXsrf Cross-site request forgery protection - - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - -@return ActionResponseProperties -*/ -func (a *ConnectorsApiService) LegacyCreateConnector(ctx context.Context, body LegacyCreateConnectorRequestProperties, kbnXsrf string, spaceId string) (ActionResponseProperties, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue ActionResponseProperties - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions" - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - localVarHeaderParams["kbn-xsrf"] = parameterToString(kbnXsrf, "") - // body params - localVarPostBody = &body - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - localVarHeaderParams["ApiKey"] = key - - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v ActionResponseProperties - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} - -/* -ConnectorsApiService Deletes a connector. -Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, it cannot be recovered. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param kbnXsrf Cross-site request forgery protection - - @param actionId An identifier for the action. - - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. -*/ -func (a *ConnectorsApiService) LegacyDeleteConnector(ctx context.Context, kbnXsrf string, actionId string, spaceId string) (*http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Delete") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/action/{actionId}" - localVarPath = strings.Replace(localVarPath, "{"+"actionId"+"}", fmt.Sprintf("%v", actionId), -1) - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - localVarHeaderParams["kbn-xsrf"] = parameterToString(kbnXsrf, "") - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - localVarHeaderParams["ApiKey"] = key - - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v - return localVarHttpResponse, newErr - } - return localVarHttpResponse, newErr - } - - return localVarHttpResponse, nil -} - -/* -ConnectorsApiService Retrieves a connector by ID. -Deprecated in 7.13.0. Use the get connector API instead. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param actionId An identifier for the action. - - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - -@return ActionResponseProperties -*/ -func (a *ConnectorsApiService) LegacyGetConnector(ctx context.Context, actionId string, spaceId string) (ActionResponseProperties, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue ActionResponseProperties - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/action/{actionId}" - localVarPath = strings.Replace(localVarPath, "{"+"actionId"+"}", fmt.Sprintf("%v", actionId), -1) - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - localVarHeaderParams["ApiKey"] = key - - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v ActionResponseProperties - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} - -/* -ConnectorsApiService Retrieves a list of all connector types. -Deprecated in 7.13.0. Use the get all connector types API instead. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - -@return []InlineResponse2002 -*/ -func (a *ConnectorsApiService) LegacyGetConnectorTypes(ctx context.Context, spaceId string) ([]InlineResponse2002, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []InlineResponse2002 - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/list_action_types" - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - localVarHeaderParams["ApiKey"] = key - - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v []InlineResponse2002 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} - -/* -ConnectorsApiService Retrieves all connectors. -Deprecated in 7.13.0. Use the get all connectors API instead. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - -@return []ActionResponseProperties -*/ -func (a *ConnectorsApiService) LegacyGetConnectors(ctx context.Context, spaceId string) ([]ActionResponseProperties, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []ActionResponseProperties - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions" - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - localVarHeaderParams["ApiKey"] = key - - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v []ActionResponseProperties - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} - -/* -ConnectorsApiService Runs a connector. -Deprecated in 7.13.0. Use the run connector API instead. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param body - - @param kbnXsrf Cross-site request forgery protection - - @param actionId An identifier for the action. - - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - -@return InlineResponse2003 -*/ -func (a *ConnectorsApiService) LegacyRunConnector(ctx context.Context, body LegacyRunConnectorRequestBodyProperties, kbnXsrf string, actionId string, spaceId string) (InlineResponse2003, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse2003 - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/action/{actionId}/_execute" - localVarPath = strings.Replace(localVarPath, "{"+"actionId"+"}", fmt.Sprintf("%v", actionId), -1) - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - localVarHeaderParams["kbn-xsrf"] = parameterToString(kbnXsrf, "") - // body params - localVarPostBody = &body - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - localVarHeaderParams["ApiKey"] = key - - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v InlineResponse2003 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} - -/* -ConnectorsApiService Updates the attributes for a connector. -Deprecated in 7.13.0. Use the update connector API instead. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param body - - @param kbnXsrf Cross-site request forgery protection - - @param actionId An identifier for the action. - - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - -@return ActionResponseProperties -*/ -func (a *ConnectorsApiService) LegacyUpdateConnector(ctx context.Context, body LegacyUpdateConnectorRequestBodyProperties, kbnXsrf string, actionId string, spaceId string) (ActionResponseProperties, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Put") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue ActionResponseProperties - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/action/{actionId}" - localVarPath = strings.Replace(localVarPath, "{"+"actionId"+"}", fmt.Sprintf("%v", actionId), -1) - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - localVarHeaderParams["kbn-xsrf"] = parameterToString(kbnXsrf, "") - // body params - localVarPostBody = &body - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - localVarHeaderParams["ApiKey"] = key - - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v ActionResponseProperties - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 404 { - var v NotFoundResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} - -/* -ConnectorsApiService Runs a connector. -You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. If you use an index connector, you must also have `all`, `create`, `index`, or `write` indices privileges. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param body - - @param kbnXsrf Cross-site request forgery protection - - @param connectorId An identifier for the connector. - - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - -@return InlineResponse2001 -*/ -func (a *ConnectorsApiService) RunConnector(ctx context.Context, body RunConnectorRequestBodyProperties, kbnXsrf string, connectorId string, spaceId string) (InlineResponse2001, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse2001 - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/connector/{connectorId}/_execute" - localVarPath = strings.Replace(localVarPath, "{"+"connectorId"+"}", fmt.Sprintf("%v", connectorId), -1) - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - localVarHeaderParams["kbn-xsrf"] = parameterToString(kbnXsrf, "") - // body params - localVarPostBody = &body - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - localVarHeaderParams["ApiKey"] = key - - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v InlineResponse2001 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} - -/* -ConnectorsApiService Updates the attributes for a connector. -You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param body - - @param kbnXsrf Cross-site request forgery protection - - @param connectorId An identifier for the connector. - - @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - -@return ConnectorResponseProperties -*/ -func (a *ConnectorsApiService) UpdateConnector(ctx context.Context, body UpdateConnectorRequestBodyProperties, kbnXsrf string, connectorId string, spaceId string) (ConnectorResponseProperties, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Put") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue ConnectorResponseProperties - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/s/{spaceId}/api/actions/connector/{connectorId}" - localVarPath = strings.Replace(localVarPath, "{"+"connectorId"+"}", fmt.Sprintf("%v", connectorId), -1) - localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", fmt.Sprintf("%v", spaceId), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - localVarHeaderParams["kbn-xsrf"] = parameterToString(kbnXsrf, "") - // body params - localVarPostBody = &body - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - localVarHeaderParams["ApiKey"] = key - - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err == nil { - return localVarReturnValue, localVarHttpResponse, err - } - } - - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 200 { - var v ConnectorResponseProperties - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 400 { - var v InlineResponse400 - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 401 { - var v UnauthorizedResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 404 { - var v NotFoundResponse - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} diff --git a/generated/kibanaactions/client.go b/generated/kibanaactions/client.go deleted file mode 100644 index 89b6b4ada..000000000 --- a/generated/kibanaactions/client.go +++ /dev/null @@ -1,473 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "mime/multipart" - "net/http" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - - "golang.org/x/oauth2" -) - -var ( - jsonCheck = regexp.MustCompile("(?i:[application|text]/json)") - xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)") -) - -// APIClient manages communication with the Connectors API v0.1 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - ConnectorsApi *ConnectorsApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.ConnectorsApi = (*ConnectorsApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insenstive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.ToLower(a) == strings.ToLower(needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. -func parameterToString(obj interface{}, collectionFormat string) string { - var delimiter string - - switch collectionFormat { - case "pipes": - delimiter = "|" - case "ssv": - delimiter = " " - case "tsv": - delimiter = "\t" - case "csv": - delimiter = "," - } - - if reflect.TypeOf(obj).Kind() == reflect.Slice { - return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") - } - - return fmt.Sprintf("%v", obj) -} - -// callAPI do the request. -func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { - return c.cfg.HTTPClient.Do(request) -} - -// Change base path to allow switching to mocks -func (c *APIClient) ChangeBasePath(path string) { - c.cfg.BasePath = path -} - -// prepareRequest build the request -func (c *APIClient) prepareRequest( - ctx context.Context, - path string, method string, - postBody interface{}, - headerParams map[string]string, - queryParams url.Values, - formParams url.Values, - fileName string, - fileBytes []byte) (localVarRequest *http.Request, err error) { - - var body *bytes.Buffer - - // Detect postBody type and post. - if postBody != nil { - contentType := headerParams["Content-Type"] - if contentType == "" { - contentType = detectContentType(postBody) - headerParams["Content-Type"] = contentType - } - - body, err = setBody(postBody, contentType) - if err != nil { - return nil, err - } - } - - // add form parameters and file if available. - if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - if len(fileBytes) > 0 && fileName != "" { - w.Boundary() - //_, fileNm := filepath.Split(fileName) - part, err := w.CreateFormFile("file", filepath.Base(fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(fileBytes) - if err != nil { - return nil, err - } - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - } - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = query.Encode() - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers.Set(h, v) - } - localVarRequest.Header = headers - } - - // Override request host, if applicable - if c.cfg.Host != "" { - localVarRequest.Host = c.cfg.Host - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - // OAuth2 authentication - if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { - // We were able to grab an oauth2 token from the context - var latestToken *oauth2.Token - if latestToken, err = tok.Token(); err != nil { - return nil, err - } - - latestToken.SetAuthHeader(localVarRequest) - } - - // Basic HTTP Authentication - if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { - localVarRequest.SetBasicAuth(auth.UserName, auth.Password) - } - - // AccessToken Authentication - if auth, ok := ctx.Value(ContextAccessToken).(string); ok { - localVarRequest.Header.Add("Authorization", "Bearer "+auth) - } - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if strings.Contains(contentType, "application/xml") { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } else if strings.Contains(contentType, "application/json") { - if err = json.Unmarshal(b, v); err != nil { - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(path) - if err != nil { - return err - } - defer file.Close() - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("Invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } - expires = now.Add(lifetime) - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericSwaggerError Provides access to the body, error and model on returned errors. -type GenericSwaggerError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericSwaggerError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericSwaggerError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -func (e GenericSwaggerError) Model() interface{} { - return e.model -} diff --git a/generated/kibanaactions/configuration.go b/generated/kibanaactions/configuration.go deleted file mode 100644 index 7f604985d..000000000 --- a/generated/kibanaactions/configuration.go +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -import ( - "net/http" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -var ( - // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. - ContextOAuth2 = contextKey("token") - - // ContextBasicAuth takes BasicAuth as authentication for the request. - ContextBasicAuth = contextKey("basic") - - // ContextAccessToken takes a string oauth2 access token as authentication for the request. - ContextAccessToken = contextKey("accesstoken") - - // ContextAPIKey takes an APIKey as authentication for the request - ContextAPIKey = contextKey("apikey") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -type Configuration struct { - BasePath string `json:"basePath,omitempty"` - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - HTTPClient *http.Client -} - -func NewConfiguration() *Configuration { - cfg := &Configuration{ - BasePath: "http://localhost:5601", - DefaultHeader: make(map[string]string), - UserAgent: "Swagger-Codegen/1.0.0/go", - } - return cfg -} - -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} diff --git a/generated/kibanaactions/docs/ActionResponseProperties.md b/generated/kibanaactions/docs/ActionResponseProperties.md deleted file mode 100644 index 4959074c9..000000000 --- a/generated/kibanaactions/docs/ActionResponseProperties.md +++ /dev/null @@ -1,15 +0,0 @@ -# ActionResponseProperties - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ActionTypeId** | **string** | | [optional] [default to null] -**Config** | [***interface{}**](interface{}.md) | | [optional] [default to null] -**Id** | **string** | | [optional] [default to null] -**IsDeprecated** | **bool** | Indicates whether the action type is deprecated. | [optional] [default to null] -**IsMissingSecrets** | **bool** | Indicates whether secrets are missing for the action. | [optional] [default to null] -**IsPreconfigured** | **bool** | Indicates whether it is a preconfigured action. | [optional] [default to null] -**Name** | **string** | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/AlertIdentifierMapping.md b/generated/kibanaactions/docs/AlertIdentifierMapping.md deleted file mode 100644 index 3847fccfb..000000000 --- a/generated/kibanaactions/docs/AlertIdentifierMapping.md +++ /dev/null @@ -1,12 +0,0 @@ -# AlertIdentifierMapping - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FieldType** | **string** | The type of field in Swimlane. | [default to null] -**Id** | **string** | The identifier for the field in Swimlane. | [default to null] -**Key** | **string** | The key for the field in Swimlane. | [default to null] -**Name** | **string** | The name of the field in Swimlane. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CaseCommentMapping.md b/generated/kibanaactions/docs/CaseCommentMapping.md deleted file mode 100644 index 20e6aea5e..000000000 --- a/generated/kibanaactions/docs/CaseCommentMapping.md +++ /dev/null @@ -1,12 +0,0 @@ -# CaseCommentMapping - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FieldType** | **string** | The type of field in Swimlane. | [default to null] -**Id** | **string** | The identifier for the field in Swimlane. | [default to null] -**Key** | **string** | The key for the field in Swimlane. | [default to null] -**Name** | **string** | The name of the field in Swimlane. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CaseDescriptionMapping.md b/generated/kibanaactions/docs/CaseDescriptionMapping.md deleted file mode 100644 index 8cf63591b..000000000 --- a/generated/kibanaactions/docs/CaseDescriptionMapping.md +++ /dev/null @@ -1,12 +0,0 @@ -# CaseDescriptionMapping - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FieldType** | **string** | The type of field in Swimlane. | [default to null] -**Id** | **string** | The identifier for the field in Swimlane. | [default to null] -**Key** | **string** | The key for the field in Swimlane. | [default to null] -**Name** | **string** | The name of the field in Swimlane. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CaseIdentifierMapping.md b/generated/kibanaactions/docs/CaseIdentifierMapping.md deleted file mode 100644 index 1f0ec419d..000000000 --- a/generated/kibanaactions/docs/CaseIdentifierMapping.md +++ /dev/null @@ -1,12 +0,0 @@ -# CaseIdentifierMapping - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FieldType** | **string** | The type of field in Swimlane. | [default to null] -**Id** | **string** | The identifier for the field in Swimlane. | [default to null] -**Key** | **string** | The key for the field in Swimlane. | [default to null] -**Name** | **string** | The name of the field in Swimlane. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CaseNameMapping.md b/generated/kibanaactions/docs/CaseNameMapping.md deleted file mode 100644 index ff242d7c0..000000000 --- a/generated/kibanaactions/docs/CaseNameMapping.md +++ /dev/null @@ -1,12 +0,0 @@ -# CaseNameMapping - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FieldType** | **string** | The type of field in Swimlane. | [default to null] -**Id** | **string** | The identifier for the field in Swimlane. | [default to null] -**Key** | **string** | The key for the field in Swimlane. | [default to null] -**Name** | **string** | The name of the field in Swimlane. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConfigPropertiesCasesWebhook.md b/generated/kibanaactions/docs/ConfigPropertiesCasesWebhook.md deleted file mode 100644 index aa0fb51e8..000000000 --- a/generated/kibanaactions/docs/ConfigPropertiesCasesWebhook.md +++ /dev/null @@ -1,23 +0,0 @@ -# ConfigPropertiesCasesWebhook - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreateCommentJson** | **string** | A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. | [optional] [default to null] -**CreateCommentMethod** | **string** | The REST API HTTP request method to create a case comment in the third-party system. Valid values are `patch`, `post`, and `put`. | [optional] [default to CREATE_COMMENT_METHOD.PUT] -**CreateCommentUrl** | **string** | The REST API URL to create a case comment by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts setting`, add the hostname to the allowed hosts. | [optional] [default to null] -**CreateIncidentJson** | **string** | A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. | [default to null] -**CreateIncidentMethod** | **string** | The REST API HTTP request method to create a case in the third-party system. Valid values are `patch`, `post`, and `put`. | [optional] [default to CREATE_INCIDENT_METHOD.POST] -**CreateIncidentResponseKey** | **string** | The JSON key in the create case response that contains the external case ID. | [default to null] -**CreateIncidentUrl** | **string** | The REST API URL to create a case in the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. | [default to null] -**GetIncidentResponseExternalTitleKey** | **string** | The JSON key in get case response that contains the external case title. | [default to null] -**GetIncidentUrl** | **string** | The REST API URL to get the case by ID from the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. You can use a variable to add the external system ID to the URL. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. | [default to null] -**HasAuth** | **bool** | If true, a username and password for login type authentication must be provided. | [optional] [default to true] -**Headers** | **string** | A set of key-value pairs sent as headers with the request URLs for the create case, update case, get case, and create comment methods. | [optional] [default to null] -**UpdateIncidentJson** | **string** | The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. | [default to null] -**UpdateIncidentMethod** | **string** | The REST API HTTP request method to update the case in the third-party system. Valid values are `patch`, `post`, and `put`. | [optional] [default to UPDATE_INCIDENT_METHOD.PUT] -**UpdateIncidentUrl** | **string** | The REST API URL to update the case by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. | [default to null] -**ViewIncidentUrl** | **string** | The URL to view the case in the external system. You can use variables to add the external system ID or external system title to the URL. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConfigPropertiesIndex.md b/generated/kibanaactions/docs/ConfigPropertiesIndex.md deleted file mode 100644 index ee7cc02fa..000000000 --- a/generated/kibanaactions/docs/ConfigPropertiesIndex.md +++ /dev/null @@ -1,11 +0,0 @@ -# ConfigPropertiesIndex - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ExecutionTimeField** | **string** | Specifies a field that will contain the time the alert condition was detected. | [optional] [default to null] -**Index** | **string** | The Elasticsearch index to be written to. | [default to null] -**Refresh** | **bool** | The refresh policy for the write request, which affects when changes are made visible to search. Refer to the refresh setting for Elasticsearch document APIs. | [optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConfigPropertiesJira.md b/generated/kibanaactions/docs/ConfigPropertiesJira.md deleted file mode 100644 index 880ecdbb2..000000000 --- a/generated/kibanaactions/docs/ConfigPropertiesJira.md +++ /dev/null @@ -1,10 +0,0 @@ -# ConfigPropertiesJira - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ApiUrl** | **string** | The Jira instance URL. | [default to null] -**ProjectKey** | **string** | The Jira project key. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConfigPropertiesOpsgenie.md b/generated/kibanaactions/docs/ConfigPropertiesOpsgenie.md deleted file mode 100644 index 76cc5d84c..000000000 --- a/generated/kibanaactions/docs/ConfigPropertiesOpsgenie.md +++ /dev/null @@ -1,9 +0,0 @@ -# ConfigPropertiesOpsgenie - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ApiUrl** | **string** | The Opsgenie URL. For example, `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConfigPropertiesResilient.md b/generated/kibanaactions/docs/ConfigPropertiesResilient.md deleted file mode 100644 index fa4754739..000000000 --- a/generated/kibanaactions/docs/ConfigPropertiesResilient.md +++ /dev/null @@ -1,10 +0,0 @@ -# ConfigPropertiesResilient - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ApiUrl** | **string** | The IBM Resilient instance URL. | [default to null] -**OrgId** | **string** | The IBM Resilient organization ID. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConfigPropertiesServicenow.md b/generated/kibanaactions/docs/ConfigPropertiesServicenow.md deleted file mode 100644 index e9a414fd8..000000000 --- a/generated/kibanaactions/docs/ConfigPropertiesServicenow.md +++ /dev/null @@ -1,14 +0,0 @@ -# ConfigPropertiesServicenow - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ApiUrl** | **string** | The ServiceNow instance URL. | [default to null] -**ClientId** | **string** | The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. | [optional] [default to null] -**IsOAuth** | **bool** | The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). | [optional] [default to false] -**JwtKeyId** | **string** | The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. | [optional] [default to null] -**UserIdentifierValue** | **string** | The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. | [optional] [default to null] -**UsesTableApi** | **bool** | Determines whether the connector uses the Table API or the Import Set API. This property is supported only for ServiceNow ITSM and ServiceNow SecOps connectors. NOTE: If this property is set to `false`, the Elastic application should be installed in ServiceNow. | [optional] [default to true] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConfigPropertiesServicenowItom.md b/generated/kibanaactions/docs/ConfigPropertiesServicenowItom.md deleted file mode 100644 index bf41b2aca..000000000 --- a/generated/kibanaactions/docs/ConfigPropertiesServicenowItom.md +++ /dev/null @@ -1,13 +0,0 @@ -# ConfigPropertiesServicenowItom - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ApiUrl** | **string** | The ServiceNow instance URL. | [default to null] -**ClientId** | **string** | The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. | [optional] [default to null] -**IsOAuth** | **bool** | The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). | [optional] [default to false] -**JwtKeyId** | **string** | The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. | [optional] [default to null] -**UserIdentifierValue** | **string** | The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConfigPropertiesSwimlane.md b/generated/kibanaactions/docs/ConfigPropertiesSwimlane.md deleted file mode 100644 index b0d90054b..000000000 --- a/generated/kibanaactions/docs/ConfigPropertiesSwimlane.md +++ /dev/null @@ -1,12 +0,0 @@ -# ConfigPropertiesSwimlane - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ApiUrl** | **string** | The Swimlane instance URL. | [default to null] -**AppId** | **string** | The Swimlane application ID. | [default to null] -**ConnectorType** | **string** | The type of connector. Valid values are `all`, `alerts`, and `cases`. | [default to null] -**Mappings** | [***ConnectorMappingsPropertiesForASwimlaneConnector**](Connector mappings properties for a Swimlane connector.md) | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorMappingsPropertiesForASwimlaneConnector.md b/generated/kibanaactions/docs/ConnectorMappingsPropertiesForASwimlaneConnector.md deleted file mode 100644 index bcd3f3bcb..000000000 --- a/generated/kibanaactions/docs/ConnectorMappingsPropertiesForASwimlaneConnector.md +++ /dev/null @@ -1,15 +0,0 @@ -# ConnectorMappingsPropertiesForASwimlaneConnector - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AlertIdConfig** | [***AlertIdentifierMapping**](Alert identifier mapping.md) | | [optional] [default to null] -**CaseIdConfig** | [***CaseIdentifierMapping**](Case identifier mapping.md) | | [optional] [default to null] -**CaseNameConfig** | [***CaseNameMapping**](Case name mapping.md) | | [optional] [default to null] -**CommentsConfig** | [***CaseCommentMapping**](Case comment mapping.md) | | [optional] [default to null] -**DescriptionConfig** | [***CaseDescriptionMapping**](Case description mapping.md) | | [optional] [default to null] -**RuleNameConfig** | [***RuleNameMapping**](Rule name mapping.md) | | [optional] [default to null] -**SeverityConfig** | [***SeverityMapping**](Severity mapping.md) | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponseProperties.md b/generated/kibanaactions/docs/ConnectorResponseProperties.md deleted file mode 100644 index bb894194b..000000000 --- a/generated/kibanaactions/docs/ConnectorResponseProperties.md +++ /dev/null @@ -1,8 +0,0 @@ -# ConnectorResponseProperties - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesCasesWebhook.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesCasesWebhook.md deleted file mode 100644 index 3313c3ae8..000000000 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesCasesWebhook.md +++ /dev/null @@ -1,15 +0,0 @@ -# ConnectorResponsePropertiesCasesWebhook - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesCasesWebhook**](config_properties_cases_webhook.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Id** | **string** | The identifier for the connector. | [default to null] -**IsDeprecated** | **bool** | | [default to null] -**IsMissingSecrets** | **bool** | | [optional] [default to null] -**IsPreconfigured** | **bool** | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesEmail.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesEmail.md deleted file mode 100644 index 51b3754e1..000000000 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesEmail.md +++ /dev/null @@ -1,15 +0,0 @@ -# ConnectorResponsePropertiesEmail - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ModelMap**](map.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Id** | **string** | The identifier for the connector. | [default to null] -**IsDeprecated** | **bool** | | [default to null] -**IsMissingSecrets** | **bool** | | [optional] [default to null] -**IsPreconfigured** | **bool** | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesIndex.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesIndex.md deleted file mode 100644 index 68016edc8..000000000 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesIndex.md +++ /dev/null @@ -1,15 +0,0 @@ -# ConnectorResponsePropertiesIndex - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesIndex**](config_properties_index.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Id** | **string** | The identifier for the connector. | [default to null] -**IsDeprecated** | **bool** | | [default to null] -**IsMissingSecrets** | **bool** | | [optional] [default to null] -**IsPreconfigured** | **bool** | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesJira.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesJira.md deleted file mode 100644 index 42b303842..000000000 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesJira.md +++ /dev/null @@ -1,15 +0,0 @@ -# ConnectorResponsePropertiesJira - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesJira**](config_properties_jira.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Id** | **string** | The identifier for the connector. | [default to null] -**IsDeprecated** | **bool** | | [default to null] -**IsMissingSecrets** | **bool** | | [optional] [default to null] -**IsPreconfigured** | **bool** | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesOpsgenie.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesOpsgenie.md deleted file mode 100644 index 1592d0b71..000000000 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesOpsgenie.md +++ /dev/null @@ -1,15 +0,0 @@ -# ConnectorResponsePropertiesOpsgenie - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesOpsgenie**](config_properties_opsgenie.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Id** | **string** | The identifier for the connector. | [default to null] -**IsDeprecated** | **bool** | | [default to null] -**IsMissingSecrets** | **bool** | | [optional] [default to null] -**IsPreconfigured** | **bool** | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesPagerduty.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesPagerduty.md deleted file mode 100644 index cc0d5e93d..000000000 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesPagerduty.md +++ /dev/null @@ -1,15 +0,0 @@ -# ConnectorResponsePropertiesPagerduty - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ModelMap**](map.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Id** | **string** | The identifier for the connector. | [default to null] -**IsDeprecated** | **bool** | | [default to null] -**IsMissingSecrets** | **bool** | | [optional] [default to null] -**IsPreconfigured** | **bool** | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesResilient.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesResilient.md deleted file mode 100644 index 5143d760c..000000000 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesResilient.md +++ /dev/null @@ -1,15 +0,0 @@ -# ConnectorResponsePropertiesResilient - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesResilient**](config_properties_resilient.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Id** | **string** | The identifier for the connector. | [default to null] -**IsDeprecated** | **bool** | | [default to null] -**IsMissingSecrets** | **bool** | | [optional] [default to null] -**IsPreconfigured** | **bool** | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesServerlog.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesServerlog.md deleted file mode 100644 index 68741666d..000000000 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesServerlog.md +++ /dev/null @@ -1,15 +0,0 @@ -# ConnectorResponsePropertiesServerlog - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***interface{}**](interface{}.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Id** | **string** | The identifier for the connector. | [default to null] -**IsDeprecated** | **bool** | | [default to null] -**IsMissingSecrets** | **bool** | | [optional] [default to null] -**IsPreconfigured** | **bool** | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenow.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenow.md deleted file mode 100644 index ead93d977..000000000 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenow.md +++ /dev/null @@ -1,15 +0,0 @@ -# ConnectorResponsePropertiesServicenow - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesServicenow**](config_properties_servicenow.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Id** | **string** | The identifier for the connector. | [default to null] -**IsDeprecated** | **bool** | | [default to null] -**IsMissingSecrets** | **bool** | | [optional] [default to null] -**IsPreconfigured** | **bool** | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowItom.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowItom.md deleted file mode 100644 index 2a4d1d86a..000000000 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowItom.md +++ /dev/null @@ -1,15 +0,0 @@ -# ConnectorResponsePropertiesServicenowItom - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesServicenowItom**](config_properties_servicenow_itom.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Id** | **string** | The identifier for the connector. | [default to null] -**IsDeprecated** | **bool** | | [default to null] -**IsMissingSecrets** | **bool** | | [optional] [default to null] -**IsPreconfigured** | **bool** | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowSir.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowSir.md deleted file mode 100644 index a480bebbf..000000000 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesServicenowSir.md +++ /dev/null @@ -1,15 +0,0 @@ -# ConnectorResponsePropertiesServicenowSir - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesServicenow**](config_properties_servicenow.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Id** | **string** | The identifier for the connector. | [default to null] -**IsDeprecated** | **bool** | | [default to null] -**IsMissingSecrets** | **bool** | | [optional] [default to null] -**IsPreconfigured** | **bool** | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesSlack.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesSlack.md deleted file mode 100644 index 881318965..000000000 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesSlack.md +++ /dev/null @@ -1,14 +0,0 @@ -# ConnectorResponsePropertiesSlack - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Id** | **string** | The identifier for the connector. | [default to null] -**IsDeprecated** | **bool** | | [default to null] -**IsMissingSecrets** | **bool** | | [optional] [default to null] -**IsPreconfigured** | **bool** | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesSwimlane.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesSwimlane.md deleted file mode 100644 index 4b4a7da73..000000000 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesSwimlane.md +++ /dev/null @@ -1,15 +0,0 @@ -# ConnectorResponsePropertiesSwimlane - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesSwimlane**](config_properties_swimlane.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Id** | **string** | The identifier for the connector. | [default to null] -**IsDeprecated** | **bool** | | [default to null] -**IsMissingSecrets** | **bool** | | [optional] [default to null] -**IsPreconfigured** | **bool** | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesTeams.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesTeams.md deleted file mode 100644 index d1039e351..000000000 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesTeams.md +++ /dev/null @@ -1,14 +0,0 @@ -# ConnectorResponsePropertiesTeams - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Id** | **string** | The identifier for the connector. | [default to null] -**IsDeprecated** | **bool** | | [default to null] -**IsMissingSecrets** | **bool** | | [optional] [default to null] -**IsPreconfigured** | **bool** | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesTines.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesTines.md deleted file mode 100644 index 71fcfb659..000000000 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesTines.md +++ /dev/null @@ -1,15 +0,0 @@ -# ConnectorResponsePropertiesTines - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ModelMap**](map.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Id** | **string** | The identifier for the connector. | [default to null] -**IsDeprecated** | **bool** | | [default to null] -**IsMissingSecrets** | **bool** | | [optional] [default to null] -**IsPreconfigured** | **bool** | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesWebhook.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesWebhook.md deleted file mode 100644 index 505d53c62..000000000 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesWebhook.md +++ /dev/null @@ -1,15 +0,0 @@ -# ConnectorResponsePropertiesWebhook - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ModelMap**](map.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Id** | **string** | The identifier for the connector. | [default to null] -**IsDeprecated** | **bool** | | [default to null] -**IsMissingSecrets** | **bool** | | [optional] [default to null] -**IsPreconfigured** | **bool** | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorResponsePropertiesXmatters.md b/generated/kibanaactions/docs/ConnectorResponsePropertiesXmatters.md deleted file mode 100644 index c12547c31..000000000 --- a/generated/kibanaactions/docs/ConnectorResponsePropertiesXmatters.md +++ /dev/null @@ -1,15 +0,0 @@ -# ConnectorResponsePropertiesXmatters - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ModelMap**](map.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Id** | **string** | The identifier for the connector. | [default to null] -**IsDeprecated** | **bool** | | [default to null] -**IsMissingSecrets** | **bool** | | [optional] [default to null] -**IsPreconfigured** | **bool** | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorTypes.md b/generated/kibanaactions/docs/ConnectorTypes.md deleted file mode 100644 index abcf0a016..000000000 --- a/generated/kibanaactions/docs/ConnectorTypes.md +++ /dev/null @@ -1,8 +0,0 @@ -# ConnectorTypes - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/ConnectorsApi.md b/generated/kibanaactions/docs/ConnectorsApi.md deleted file mode 100644 index 847955ef5..000000000 --- a/generated/kibanaactions/docs/ConnectorsApi.md +++ /dev/null @@ -1,443 +0,0 @@ -# {{classname}} - -All URIs are relative to *http://localhost:5601* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateConnector**](ConnectorsApi.md#CreateConnector) | **Post** /s/{spaceId}/api/actions/connector | Creates a connector. -[**DeleteConnector**](ConnectorsApi.md#DeleteConnector) | **Delete** /s/{spaceId}/api/actions/connector/{connectorId} | Deletes a connector. -[**GetConnector**](ConnectorsApi.md#GetConnector) | **Get** /s/{spaceId}/api/actions/connector/{connectorId} | Retrieves a connector by ID. -[**GetConnectorTypes**](ConnectorsApi.md#GetConnectorTypes) | **Get** /s/{spaceId}/api/actions/connector_types | Retrieves a list of all connector types. -[**GetConnectors**](ConnectorsApi.md#GetConnectors) | **Get** /s/{spaceId}/api/actions/connectors | Retrieves all connectors. -[**LegacyCreateConnector**](ConnectorsApi.md#LegacyCreateConnector) | **Post** /s/{spaceId}/api/actions | Creates a connector. -[**LegacyDeleteConnector**](ConnectorsApi.md#LegacyDeleteConnector) | **Delete** /s/{spaceId}/api/actions/action/{actionId} | Deletes a connector. -[**LegacyGetConnector**](ConnectorsApi.md#LegacyGetConnector) | **Get** /s/{spaceId}/api/actions/action/{actionId} | Retrieves a connector by ID. -[**LegacyGetConnectorTypes**](ConnectorsApi.md#LegacyGetConnectorTypes) | **Get** /s/{spaceId}/api/actions/list_action_types | Retrieves a list of all connector types. -[**LegacyGetConnectors**](ConnectorsApi.md#LegacyGetConnectors) | **Get** /s/{spaceId}/api/actions | Retrieves all connectors. -[**LegacyRunConnector**](ConnectorsApi.md#LegacyRunConnector) | **Post** /s/{spaceId}/api/actions/action/{actionId}/_execute | Runs a connector. -[**LegacyUpdateConnector**](ConnectorsApi.md#LegacyUpdateConnector) | **Put** /s/{spaceId}/api/actions/action/{actionId} | Updates the attributes for a connector. -[**RunConnector**](ConnectorsApi.md#RunConnector) | **Post** /s/{spaceId}/api/actions/connector/{connectorId}/_execute | Runs a connector. -[**UpdateConnector**](ConnectorsApi.md#UpdateConnector) | **Put** /s/{spaceId}/api/actions/connector/{connectorId} | Updates the attributes for a connector. - -# **CreateConnector** -> ConnectorResponseProperties CreateConnector(ctx, body, kbnXsrf, spaceId) -Creates a connector. - -You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**CreateConnectorRequestBodyProperties**](CreateConnectorRequestBodyProperties.md)| | - **kbnXsrf** | **string**| Cross-site request forgery protection | - **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Return type - -[**ConnectorResponseProperties**](connector_response_properties.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **DeleteConnector** -> DeleteConnector(ctx, kbnXsrf, connectorId, spaceId) -Deletes a connector. - -You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be recovered. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **kbnXsrf** | **string**| Cross-site request forgery protection | - **connectorId** | **string**| An identifier for the connector. | - **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Return type - - (empty response body) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetConnector** -> ConnectorResponseProperties GetConnector(ctx, connectorId, spaceId) -Retrieves a connector by ID. - -You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **connectorId** | **string**| An identifier for the connector. | - **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Return type - -[**ConnectorResponseProperties**](connector_response_properties.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetConnectorTypes** -> []InlineResponse200 GetConnectorTypes(ctx, spaceId, optional) -Retrieves a list of all connector types. - -You do not need any Kibana feature privileges to run this API. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - **optional** | ***ConnectorsApiGetConnectorTypesOpts** | optional parameters | nil if no parameters - -### Optional Parameters -Optional parameters are passed through a pointer to a ConnectorsApiGetConnectorTypesOpts struct -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **featureId** | [**optional.Interface of Features**](.md)| A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases). | - -### Return type - -[**[]InlineResponse200**](inline_response_200.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetConnectors** -> []GetConnectorsResponseBodyProperties GetConnectors(ctx, spaceId) -Retrieves all connectors. - -You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Return type - -[**[]GetConnectorsResponseBodyProperties**](Get connectors response body properties.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **LegacyCreateConnector** -> ActionResponseProperties LegacyCreateConnector(ctx, body, kbnXsrf, spaceId) -Creates a connector. - -Deprecated in 7.13.0. Use the create connector API instead. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**LegacyCreateConnectorRequestProperties**](LegacyCreateConnectorRequestProperties.md)| | - **kbnXsrf** | **string**| Cross-site request forgery protection | - **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Return type - -[**ActionResponseProperties**](action_response_properties.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **LegacyDeleteConnector** -> LegacyDeleteConnector(ctx, kbnXsrf, actionId, spaceId) -Deletes a connector. - -Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, it cannot be recovered. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **kbnXsrf** | **string**| Cross-site request forgery protection | - **actionId** | **string**| An identifier for the action. | - **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Return type - - (empty response body) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **LegacyGetConnector** -> ActionResponseProperties LegacyGetConnector(ctx, actionId, spaceId) -Retrieves a connector by ID. - -Deprecated in 7.13.0. Use the get connector API instead. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **actionId** | **string**| An identifier for the action. | - **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Return type - -[**ActionResponseProperties**](action_response_properties.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **LegacyGetConnectorTypes** -> []InlineResponse2002 LegacyGetConnectorTypes(ctx, spaceId) -Retrieves a list of all connector types. - -Deprecated in 7.13.0. Use the get all connector types API instead. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Return type - -[**[]InlineResponse2002**](inline_response_200_2.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **LegacyGetConnectors** -> []ActionResponseProperties LegacyGetConnectors(ctx, spaceId) -Retrieves all connectors. - -Deprecated in 7.13.0. Use the get all connectors API instead. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Return type - -[**[]ActionResponseProperties**](action_response_properties.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **LegacyRunConnector** -> InlineResponse2003 LegacyRunConnector(ctx, body, kbnXsrf, actionId, spaceId) -Runs a connector. - -Deprecated in 7.13.0. Use the run connector API instead. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**LegacyRunConnectorRequestBodyProperties**](LegacyRunConnectorRequestBodyProperties.md)| | - **kbnXsrf** | **string**| Cross-site request forgery protection | - **actionId** | **string**| An identifier for the action. | - **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Return type - -[**InlineResponse2003**](inline_response_200_3.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **LegacyUpdateConnector** -> ActionResponseProperties LegacyUpdateConnector(ctx, body, kbnXsrf, actionId, spaceId) -Updates the attributes for a connector. - -Deprecated in 7.13.0. Use the update connector API instead. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**LegacyUpdateConnectorRequestBodyProperties**](LegacyUpdateConnectorRequestBodyProperties.md)| | - **kbnXsrf** | **string**| Cross-site request forgery protection | - **actionId** | **string**| An identifier for the action. | - **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Return type - -[**ActionResponseProperties**](action_response_properties.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **RunConnector** -> InlineResponse2001 RunConnector(ctx, body, kbnXsrf, connectorId, spaceId) -Runs a connector. - -You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. If you use an index connector, you must also have `all`, `create`, `index`, or `write` indices privileges. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**RunConnectorRequestBodyProperties**](RunConnectorRequestBodyProperties.md)| | - **kbnXsrf** | **string**| Cross-site request forgery protection | - **connectorId** | **string**| An identifier for the connector. | - **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Return type - -[**InlineResponse2001**](inline_response_200_1.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UpdateConnector** -> ConnectorResponseProperties UpdateConnector(ctx, body, kbnXsrf, connectorId, spaceId) -Updates the attributes for a connector. - -You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**UpdateConnectorRequestBodyProperties**](UpdateConnectorRequestBodyProperties.md)| | - **kbnXsrf** | **string**| Cross-site request forgery protection | - **connectorId** | **string**| An identifier for the connector. | - **spaceId** | **string**| An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | - -### Return type - -[**ConnectorResponseProperties**](connector_response_properties.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [basicAuth](../README.md#basicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestBodyProperties.md b/generated/kibanaactions/docs/CreateConnectorRequestBodyProperties.md deleted file mode 100644 index a1b3d1b4f..000000000 --- a/generated/kibanaactions/docs/CreateConnectorRequestBodyProperties.md +++ /dev/null @@ -1,8 +0,0 @@ -# CreateConnectorRequestBodyProperties - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestCasesWebhook.md b/generated/kibanaactions/docs/CreateConnectorRequestCasesWebhook.md deleted file mode 100644 index 06504fda2..000000000 --- a/generated/kibanaactions/docs/CreateConnectorRequestCasesWebhook.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateConnectorRequestCasesWebhook - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesCasesWebhook**](config_properties_cases_webhook.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***SecretsPropertiesCasesWebhook**](secrets_properties_cases_webhook.md) | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestEmail.md b/generated/kibanaactions/docs/CreateConnectorRequestEmail.md deleted file mode 100644 index c6fe8d266..000000000 --- a/generated/kibanaactions/docs/CreateConnectorRequestEmail.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateConnectorRequestEmail - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ModelMap**](map.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***ModelMap**](map.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestIndex.md b/generated/kibanaactions/docs/CreateConnectorRequestIndex.md deleted file mode 100644 index b8c81f0d2..000000000 --- a/generated/kibanaactions/docs/CreateConnectorRequestIndex.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateConnectorRequestIndex - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesIndex**](config_properties_index.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestJira.md b/generated/kibanaactions/docs/CreateConnectorRequestJira.md deleted file mode 100644 index 9327d7992..000000000 --- a/generated/kibanaactions/docs/CreateConnectorRequestJira.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateConnectorRequestJira - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesJira**](config_properties_jira.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***SecretsPropertiesJira**](secrets_properties_jira.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestOpsgenie.md b/generated/kibanaactions/docs/CreateConnectorRequestOpsgenie.md deleted file mode 100644 index 3ad2704ab..000000000 --- a/generated/kibanaactions/docs/CreateConnectorRequestOpsgenie.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateConnectorRequestOpsgenie - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesOpsgenie**](config_properties_opsgenie.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***SecretsPropertiesOpsgenie**](secrets_properties_opsgenie.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestPagerduty.md b/generated/kibanaactions/docs/CreateConnectorRequestPagerduty.md deleted file mode 100644 index 0ab08c0ae..000000000 --- a/generated/kibanaactions/docs/CreateConnectorRequestPagerduty.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateConnectorRequestPagerduty - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ModelMap**](map.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***ModelMap**](map.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestResilient.md b/generated/kibanaactions/docs/CreateConnectorRequestResilient.md deleted file mode 100644 index 464bb8abf..000000000 --- a/generated/kibanaactions/docs/CreateConnectorRequestResilient.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateConnectorRequestResilient - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesResilient**](config_properties_resilient.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***SecretsPropertiesResilient**](secrets_properties_resilient.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestServerlog.md b/generated/kibanaactions/docs/CreateConnectorRequestServerlog.md deleted file mode 100644 index f44c20be3..000000000 --- a/generated/kibanaactions/docs/CreateConnectorRequestServerlog.md +++ /dev/null @@ -1,10 +0,0 @@ -# CreateConnectorRequestServerlog - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestServicenow.md b/generated/kibanaactions/docs/CreateConnectorRequestServicenow.md deleted file mode 100644 index 993ef5d53..000000000 --- a/generated/kibanaactions/docs/CreateConnectorRequestServicenow.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateConnectorRequestServicenow - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesServicenow**](config_properties_servicenow.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***SecretsPropertiesServicenow**](secrets_properties_servicenow.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestServicenowItom.md b/generated/kibanaactions/docs/CreateConnectorRequestServicenowItom.md deleted file mode 100644 index 7584090ed..000000000 --- a/generated/kibanaactions/docs/CreateConnectorRequestServicenowItom.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateConnectorRequestServicenowItom - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesServicenowItom**](config_properties_servicenow_itom.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***SecretsPropertiesServicenow**](secrets_properties_servicenow.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestServicenowSir.md b/generated/kibanaactions/docs/CreateConnectorRequestServicenowSir.md deleted file mode 100644 index 6fdb79bcd..000000000 --- a/generated/kibanaactions/docs/CreateConnectorRequestServicenowSir.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateConnectorRequestServicenowSir - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesServicenow**](config_properties_servicenow.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***SecretsPropertiesServicenow**](secrets_properties_servicenow.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestSlack.md b/generated/kibanaactions/docs/CreateConnectorRequestSlack.md deleted file mode 100644 index 364fc22a1..000000000 --- a/generated/kibanaactions/docs/CreateConnectorRequestSlack.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateConnectorRequestSlack - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***ModelMap**](map.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestSwimlane.md b/generated/kibanaactions/docs/CreateConnectorRequestSwimlane.md deleted file mode 100644 index 1d41a2006..000000000 --- a/generated/kibanaactions/docs/CreateConnectorRequestSwimlane.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateConnectorRequestSwimlane - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesSwimlane**](config_properties_swimlane.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***SecretsPropertiesSwimlane**](secrets_properties_swimlane.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestTeams.md b/generated/kibanaactions/docs/CreateConnectorRequestTeams.md deleted file mode 100644 index 208df975a..000000000 --- a/generated/kibanaactions/docs/CreateConnectorRequestTeams.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateConnectorRequestTeams - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***ModelMap**](map.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestTines.md b/generated/kibanaactions/docs/CreateConnectorRequestTines.md deleted file mode 100644 index 49c66bb75..000000000 --- a/generated/kibanaactions/docs/CreateConnectorRequestTines.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateConnectorRequestTines - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ModelMap**](map.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***ModelMap**](map.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestWebhook.md b/generated/kibanaactions/docs/CreateConnectorRequestWebhook.md deleted file mode 100644 index 33f3a79cd..000000000 --- a/generated/kibanaactions/docs/CreateConnectorRequestWebhook.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateConnectorRequestWebhook - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ModelMap**](map.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***ModelMap**](map.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/CreateConnectorRequestXmatters.md b/generated/kibanaactions/docs/CreateConnectorRequestXmatters.md deleted file mode 100644 index c35871984..000000000 --- a/generated/kibanaactions/docs/CreateConnectorRequestXmatters.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateConnectorRequestXmatters - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ModelMap**](map.md) | | [default to null] -**ConnectorTypeId** | **string** | The type of connector. | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***ModelMap**](map.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/Features.md b/generated/kibanaactions/docs/Features.md deleted file mode 100644 index d21f461d4..000000000 --- a/generated/kibanaactions/docs/Features.md +++ /dev/null @@ -1,8 +0,0 @@ -# Features - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/GetConnectorsResponseBodyProperties.md b/generated/kibanaactions/docs/GetConnectorsResponseBodyProperties.md deleted file mode 100644 index e55d34b9b..000000000 --- a/generated/kibanaactions/docs/GetConnectorsResponseBodyProperties.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetConnectorsResponseBodyProperties - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ConnectorTypeId** | [***ConnectorTypes**](connector_types.md) | | [default to null] -**Config** | [**ModelMap**](interface{}.md) | The configuration for the connector. Configuration properties vary depending on the connector type. | [optional] [default to null] -**Id** | **string** | The identifier for the connector. | [default to null] -**IsDeprecated** | **bool** | | [default to null] -**IsMissingSecrets** | **bool** | | [optional] [default to null] -**IsPreconfigured** | **bool** | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**ReferencedByCount** | **int32** | Indicates the number of saved objects that reference the connector. If `is_preconfigured` is true, this value is not calculated. | [default to 0] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/InlineResponse200.md b/generated/kibanaactions/docs/InlineResponse200.md deleted file mode 100644 index f8a7ae353..000000000 --- a/generated/kibanaactions/docs/InlineResponse200.md +++ /dev/null @@ -1,15 +0,0 @@ -# InlineResponse200 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | Indicates whether the connector type is enabled in Kibana. | [optional] [default to null] -**EnabledInConfig** | **bool** | Indicates whether the connector type is enabled in the Kibana `.yml` file. | [optional] [default to null] -**EnabledInLicense** | **bool** | Indicates whether the connector is enabled in the license. | [optional] [default to null] -**Id** | [***ConnectorTypes**](connector_types.md) | | [optional] [default to null] -**MinimumLicenseRequired** | **string** | The license that is required to use the connector type. | [optional] [default to null] -**Name** | **string** | The name of the connector type. | [optional] [default to null] -**SupportedFeatureIds** | [**[]Features**](features.md) | The Kibana features that are supported by the connector type. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/InlineResponse2001.md b/generated/kibanaactions/docs/InlineResponse2001.md deleted file mode 100644 index 95aec6f75..000000000 --- a/generated/kibanaactions/docs/InlineResponse2001.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse2001 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ConnectorId** | **string** | The identifier for the connector. | [default to null] -**Data** | [***OneOfinlineResponse2001Data**](OneOfinlineResponse2001Data.md) | | [optional] [default to null] -**Status** | **string** | The status of the action. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/InlineResponse2002.md b/generated/kibanaactions/docs/InlineResponse2002.md deleted file mode 100644 index 1ef4a390b..000000000 --- a/generated/kibanaactions/docs/InlineResponse2002.md +++ /dev/null @@ -1,14 +0,0 @@ -# InlineResponse2002 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | Indicates whether the connector type is enabled in Kibana. | [optional] [default to null] -**EnabledInConfig** | **bool** | Indicates whether the connector type is enabled in the Kibana `.yml` file. | [optional] [default to null] -**EnabledInLicense** | **bool** | Indicates whether the connector is enabled in the license. | [optional] [default to null] -**Id** | **string** | The unique identifier for the connector type. | [optional] [default to null] -**MinimumLicenseRequired** | **string** | The license that is required to use the connector type. | [optional] [default to null] -**Name** | **string** | The name of the connector type. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/InlineResponse2003.md b/generated/kibanaactions/docs/InlineResponse2003.md deleted file mode 100644 index 37aa85249..000000000 --- a/generated/kibanaactions/docs/InlineResponse2003.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse2003 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ActionId** | **string** | | [optional] [default to null] -**Data** | [***OneOfinlineResponse2003Data**](OneOfinlineResponse2003Data.md) | | [optional] [default to null] -**Status** | **string** | The status of the action. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/InlineResponse400.md b/generated/kibanaactions/docs/InlineResponse400.md deleted file mode 100644 index f0a62c680..000000000 --- a/generated/kibanaactions/docs/InlineResponse400.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse400 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error_** | **string** | | [optional] [default to null] -**Message** | **string** | | [optional] [default to null] -**StatusCode** | **int32** | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/InlineResponse404.md b/generated/kibanaactions/docs/InlineResponse404.md deleted file mode 100644 index c664305af..000000000 --- a/generated/kibanaactions/docs/InlineResponse404.md +++ /dev/null @@ -1,11 +0,0 @@ -# InlineResponse404 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error_** | **string** | | [optional] [default to null] -**Message** | **string** | | [optional] [default to null] -**StatusCode** | **int32** | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/LegacyCreateConnectorRequestProperties.md b/generated/kibanaactions/docs/LegacyCreateConnectorRequestProperties.md deleted file mode 100644 index d7dc50410..000000000 --- a/generated/kibanaactions/docs/LegacyCreateConnectorRequestProperties.md +++ /dev/null @@ -1,12 +0,0 @@ -# LegacyCreateConnectorRequestProperties - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ActionTypeId** | **string** | The connector type identifier. | [optional] [default to null] -**Config** | [***interface{}**](interface{}.md) | The configuration for the connector. Configuration properties vary depending on the connector type. | [optional] [default to null] -**Name** | **string** | The display name for the connector. | [optional] [default to null] -**Secrets** | [***interface{}**](interface{}.md) | The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. NOTE: Remember these values. You must provide them each time you update the connector. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/LegacyRunConnectorRequestBodyProperties.md b/generated/kibanaactions/docs/LegacyRunConnectorRequestBodyProperties.md deleted file mode 100644 index 42d9e9d02..000000000 --- a/generated/kibanaactions/docs/LegacyRunConnectorRequestBodyProperties.md +++ /dev/null @@ -1,9 +0,0 @@ -# LegacyRunConnectorRequestBodyProperties - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Params** | [***interface{}**](interface{}.md) | The parameters of the connector. Parameter properties vary depending on the connector type. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/LegacyUpdateConnectorRequestBodyProperties.md b/generated/kibanaactions/docs/LegacyUpdateConnectorRequestBodyProperties.md deleted file mode 100644 index 66373d9f8..000000000 --- a/generated/kibanaactions/docs/LegacyUpdateConnectorRequestBodyProperties.md +++ /dev/null @@ -1,11 +0,0 @@ -# LegacyUpdateConnectorRequestBodyProperties - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***interface{}**](interface{}.md) | The new connector configuration. Configuration properties vary depending on the connector type. | [optional] [default to null] -**Name** | **string** | The new name for the connector. | [optional] [default to null] -**Secrets** | [***interface{}**](interface{}.md) | The updated secrets configuration for the connector. Secrets properties vary depending on the connector type. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/NotFoundResponse.md b/generated/kibanaactions/docs/NotFoundResponse.md deleted file mode 100644 index efef6cf08..000000000 --- a/generated/kibanaactions/docs/NotFoundResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# NotFoundResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error_** | **string** | | [optional] [default to null] -**Message** | **string** | | [optional] [default to null] -**StatusCode** | **int32** | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/OneOfRunConnectorRequestBodyPropertiesParams.md b/generated/kibanaactions/docs/OneOfRunConnectorRequestBodyPropertiesParams.md deleted file mode 100644 index f9ec8aed1..000000000 --- a/generated/kibanaactions/docs/OneOfRunConnectorRequestBodyPropertiesParams.md +++ /dev/null @@ -1,8 +0,0 @@ -# OneOfRunConnectorRequestBodyPropertiesParams - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/OneOfinlineResponse2001Data.md b/generated/kibanaactions/docs/OneOfinlineResponse2001Data.md deleted file mode 100644 index df4e57405..000000000 --- a/generated/kibanaactions/docs/OneOfinlineResponse2001Data.md +++ /dev/null @@ -1,8 +0,0 @@ -# OneOfinlineResponse2001Data - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/OneOfinlineResponse2003Data.md b/generated/kibanaactions/docs/OneOfinlineResponse2003Data.md deleted file mode 100644 index 8d059cc4e..000000000 --- a/generated/kibanaactions/docs/OneOfinlineResponse2003Data.md +++ /dev/null @@ -1,8 +0,0 @@ -# OneOfinlineResponse2003Data - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md b/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md deleted file mode 100644 index 06e110388..000000000 --- a/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md +++ /dev/null @@ -1,8 +0,0 @@ -# OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md b/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md deleted file mode 100644 index a176b0aac..000000000 --- a/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md +++ /dev/null @@ -1,8 +0,0 @@ -# OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md b/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md deleted file mode 100644 index eaa247f28..000000000 --- a/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl.md +++ /dev/null @@ -1,8 +0,0 @@ -# OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md b/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md deleted file mode 100644 index 497ce69b4..000000000 --- a/generated/kibanaactions/docs/OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md +++ /dev/null @@ -1,8 +0,0 @@ -# OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RuleNameMapping.md b/generated/kibanaactions/docs/RuleNameMapping.md deleted file mode 100644 index 93189f032..000000000 --- a/generated/kibanaactions/docs/RuleNameMapping.md +++ /dev/null @@ -1,12 +0,0 @@ -# RuleNameMapping - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FieldType** | **string** | The type of field in Swimlane. | [default to null] -**Id** | **string** | The identifier for the field in Swimlane. | [default to null] -**Key** | **string** | The key for the field in Swimlane. | [default to null] -**Name** | **string** | The name of the field in Swimlane. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorParamsDocuments.md b/generated/kibanaactions/docs/RunConnectorParamsDocuments.md deleted file mode 100644 index 2b410b4d1..000000000 --- a/generated/kibanaactions/docs/RunConnectorParamsDocuments.md +++ /dev/null @@ -1,9 +0,0 @@ -# RunConnectorParamsDocuments - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Documents** | [**[]ModelMap**](map.md) | The documents in JSON format for index connectors. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorParamsLevelMessage.md b/generated/kibanaactions/docs/RunConnectorParamsLevelMessage.md deleted file mode 100644 index b0567f86b..000000000 --- a/generated/kibanaactions/docs/RunConnectorParamsLevelMessage.md +++ /dev/null @@ -1,10 +0,0 @@ -# RunConnectorParamsLevelMessage - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Level** | **string** | The log level of the message for server log connectors. | [optional] [default to LEVEL.INFO] -**Message** | **string** | The message for server log connectors. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorRequestBodyProperties.md b/generated/kibanaactions/docs/RunConnectorRequestBodyProperties.md deleted file mode 100644 index ad6d5fc9f..000000000 --- a/generated/kibanaactions/docs/RunConnectorRequestBodyProperties.md +++ /dev/null @@ -1,9 +0,0 @@ -# RunConnectorRequestBodyProperties - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Params** | [***OneOfRunConnectorRequestBodyPropertiesParams**](OneOfRunConnectorRequestBodyPropertiesParams.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionAddevent.md b/generated/kibanaactions/docs/RunConnectorSubactionAddevent.md deleted file mode 100644 index d75e0b3f3..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionAddevent.md +++ /dev/null @@ -1,10 +0,0 @@ -# RunConnectorSubactionAddevent - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | [default to null] -**SubActionParams** | [***RunConnectorSubactionAddeventSubActionParams**](run_connector_subaction_addevent_subActionParams.md) | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionAddeventSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionAddeventSubActionParams.md deleted file mode 100644 index c14ff4900..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionAddeventSubActionParams.md +++ /dev/null @@ -1,19 +0,0 @@ -# RunConnectorSubactionAddeventSubActionParams - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AdditionalInfo** | **string** | Additional information about the event. | [optional] [default to null] -**Description** | **string** | The details about the event. | [optional] [default to null] -**EventClass** | **string** | A specific instance of the source. | [optional] [default to null] -**MessageKey** | **string** | All actions sharing this key are associated with the same ServiceNow alert. The default value is `<rule ID>:<alert instance ID>`. | [optional] [default to null] -**MetricName** | **string** | The name of the metric. | [optional] [default to null] -**Node** | **string** | The host that the event was triggered for. | [optional] [default to null] -**Resource** | **string** | The name of the resource. | [optional] [default to null] -**Severity** | **string** | The severity of the event. | [optional] [default to null] -**Source** | **string** | The name of the event source type. | [optional] [default to null] -**TimeOfEvent** | **string** | The time of the event. | [optional] [default to null] -**Type_** | **string** | The type of event. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionClosealert.md b/generated/kibanaactions/docs/RunConnectorSubactionClosealert.md deleted file mode 100644 index fd1fa2525..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionClosealert.md +++ /dev/null @@ -1,10 +0,0 @@ -# RunConnectorSubactionClosealert - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | [default to null] -**SubActionParams** | [***RunConnectorSubactionClosealertSubActionParams**](run_connector_subaction_closealert_subActionParams.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionClosealertSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionClosealertSubActionParams.md deleted file mode 100644 index 4c9d1aa06..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionClosealertSubActionParams.md +++ /dev/null @@ -1,12 +0,0 @@ -# RunConnectorSubactionClosealertSubActionParams - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Alias** | **string** | The unique identifier used for alert deduplication in Opsgenie. The alias must match the value used when creating the alert. | [default to null] -**Note** | **string** | Additional information for the alert. | [optional] [default to null] -**Source** | **string** | The display name for the source of the alert. | [optional] [default to null] -**User** | **string** | The display name for the owner. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionCreatealert.md b/generated/kibanaactions/docs/RunConnectorSubactionCreatealert.md deleted file mode 100644 index 87c466c1f..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionCreatealert.md +++ /dev/null @@ -1,10 +0,0 @@ -# RunConnectorSubactionCreatealert - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | [default to null] -**SubActionParams** | [***RunConnectorSubactionCreatealertSubActionParams**](run_connector_subaction_createalert_subActionParams.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParams.md deleted file mode 100644 index 9e26dd761..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParams.md +++ /dev/null @@ -1,21 +0,0 @@ -# RunConnectorSubactionCreatealertSubActionParams - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Actions** | **[]string** | The custom actions available to the alert. | [optional] [default to null] -**Alias** | **string** | The unique identifier used for alert deduplication in Opsgenie. | [optional] [default to null] -**Description** | **string** | A description that provides detailed information about the alert. | [optional] [default to null] -**Details** | [**ModelMap**](interface{}.md) | The custom properties of the alert. | [optional] [default to null] -**Entity** | **string** | The domain of the alert. For example, the application or server name. | [optional] [default to null] -**Message** | **string** | The alert message. | [default to null] -**Note** | **string** | Additional information for the alert. | [optional] [default to null] -**Priority** | **string** | The priority level for the alert. | [optional] [default to null] -**Responders** | [**[]RunConnectorSubactionCreatealertSubActionParamsResponders**](run_connector_subaction_createalert_subActionParams_responders.md) | The entities to receive notifications about the alert. If `type` is `user`, either `id` or `username` is required. If `type` is `team`, either `id` or `name` is required. | [optional] [default to null] -**Source** | **string** | The display name for the source of the alert. | [optional] [default to null] -**Tags** | **[]string** | The tags for the alert. | [optional] [default to null] -**User** | **string** | The display name for the owner. | [optional] [default to null] -**VisibleTo** | [**[]RunConnectorSubactionCreatealertSubActionParamsVisibleTo**](run_connector_subaction_createalert_subActionParams_visibleTo.md) | The teams and users that the alert will be visible to without sending a notification. Only one of `id`, `name`, or `username` is required. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsResponders.md b/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsResponders.md deleted file mode 100644 index 8dd3f379c..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsResponders.md +++ /dev/null @@ -1,12 +0,0 @@ -# RunConnectorSubactionCreatealertSubActionParamsResponders - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The identifier for the entity. | [optional] [default to null] -**Name** | **string** | The name of the entity. | [optional] [default to null] -**Type_** | **string** | The type of responders, in this case `escalation`. | [optional] [default to null] -**Username** | **string** | A valid email address for the user. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsVisibleTo.md b/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsVisibleTo.md deleted file mode 100644 index 53b52be2f..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionCreatealertSubActionParamsVisibleTo.md +++ /dev/null @@ -1,12 +0,0 @@ -# RunConnectorSubactionCreatealertSubActionParamsVisibleTo - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The identifier for the entity. | [optional] [default to null] -**Name** | **string** | The name of the entity. | [optional] [default to null] -**Type_** | **string** | Valid values are `team` and `user`. | [default to null] -**Username** | **string** | The user name. This property is required only when the `type` is `user`. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetype.md b/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetype.md deleted file mode 100644 index 1e4adf37f..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetype.md +++ /dev/null @@ -1,10 +0,0 @@ -# RunConnectorSubactionFieldsbyissuetype - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | [default to null] -**SubActionParams** | [***RunConnectorSubactionFieldsbyissuetypeSubActionParams**](run_connector_subaction_fieldsbyissuetype_subActionParams.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetypeSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetypeSubActionParams.md deleted file mode 100644 index a0e5f5290..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionFieldsbyissuetypeSubActionParams.md +++ /dev/null @@ -1,9 +0,0 @@ -# RunConnectorSubactionFieldsbyissuetypeSubActionParams - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The Jira issue type identifier. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionGetchoices.md b/generated/kibanaactions/docs/RunConnectorSubactionGetchoices.md deleted file mode 100644 index 7b3c46c8a..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionGetchoices.md +++ /dev/null @@ -1,10 +0,0 @@ -# RunConnectorSubactionGetchoices - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | [default to null] -**SubActionParams** | [***RunConnectorSubactionGetchoicesSubActionParams**](run_connector_subaction_getchoices_subActionParams.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionGetchoicesSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionGetchoicesSubActionParams.md deleted file mode 100644 index bd669e77b..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionGetchoicesSubActionParams.md +++ /dev/null @@ -1,9 +0,0 @@ -# RunConnectorSubactionGetchoicesSubActionParams - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Fields** | **[]string** | An array of fields. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionGetfields.md b/generated/kibanaactions/docs/RunConnectorSubactionGetfields.md deleted file mode 100644 index d15617682..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionGetfields.md +++ /dev/null @@ -1,9 +0,0 @@ -# RunConnectorSubactionGetfields - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionGetincident.md b/generated/kibanaactions/docs/RunConnectorSubactionGetincident.md deleted file mode 100644 index 452c79056..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionGetincident.md +++ /dev/null @@ -1,10 +0,0 @@ -# RunConnectorSubactionGetincident - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | [default to null] -**SubActionParams** | [***RunConnectorSubactionGetincidentSubActionParams**](run_connector_subaction_getincident_subActionParams.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionGetincidentSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionGetincidentSubActionParams.md deleted file mode 100644 index c518179a7..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionGetincidentSubActionParams.md +++ /dev/null @@ -1,9 +0,0 @@ -# RunConnectorSubactionGetincidentSubActionParams - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ExternalId** | **string** | The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionIssue.md b/generated/kibanaactions/docs/RunConnectorSubactionIssue.md deleted file mode 100644 index 88d26800c..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionIssue.md +++ /dev/null @@ -1,10 +0,0 @@ -# RunConnectorSubactionIssue - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | [default to null] -**SubActionParams** | [***RunConnectorSubactionIssueSubActionParams**](run_connector_subaction_issue_subActionParams.md) | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionIssueSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionIssueSubActionParams.md deleted file mode 100644 index 29f99a340..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionIssueSubActionParams.md +++ /dev/null @@ -1,9 +0,0 @@ -# RunConnectorSubactionIssueSubActionParams - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The Jira issue identifier. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionIssues.md b/generated/kibanaactions/docs/RunConnectorSubactionIssues.md deleted file mode 100644 index dd6b9cfcb..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionIssues.md +++ /dev/null @@ -1,10 +0,0 @@ -# RunConnectorSubactionIssues - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | [default to null] -**SubActionParams** | [***RunConnectorSubactionIssuesSubActionParams**](run_connector_subaction_issues_subActionParams.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionIssuesSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionIssuesSubActionParams.md deleted file mode 100644 index b844e8e85..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionIssuesSubActionParams.md +++ /dev/null @@ -1,9 +0,0 @@ -# RunConnectorSubactionIssuesSubActionParams - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Title** | **string** | The title of the Jira issue. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionIssuetypes.md b/generated/kibanaactions/docs/RunConnectorSubactionIssuetypes.md deleted file mode 100644 index e77cf6122..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionIssuetypes.md +++ /dev/null @@ -1,9 +0,0 @@ -# RunConnectorSubactionIssuetypes - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoservice.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoservice.md deleted file mode 100644 index ad2148491..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionPushtoservice.md +++ /dev/null @@ -1,10 +0,0 @@ -# RunConnectorSubactionPushtoservice - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SubAction** | **string** | The action to test. | [default to null] -**SubActionParams** | [***RunConnectorSubactionPushtoserviceSubActionParams**](run_connector_subaction_pushtoservice_subActionParams.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParams.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParams.md deleted file mode 100644 index f2480fdfd..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParams.md +++ /dev/null @@ -1,10 +0,0 @@ -# RunConnectorSubactionPushtoserviceSubActionParams - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Comments** | [**[]RunConnectorSubactionPushtoserviceSubActionParamsComments**](run_connector_subaction_pushtoservice_subActionParams_comments.md) | Additional information that is sent to Jira, ServiceNow ITSM, ServiceNow SecOps, or Swimlane. | [optional] [default to null] -**Incident** | [***RunConnectorSubactionPushtoserviceSubActionParamsIncident**](run_connector_subaction_pushtoservice_subActionParams_incident.md) | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsComments.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsComments.md deleted file mode 100644 index b6878267a..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsComments.md +++ /dev/null @@ -1,10 +0,0 @@ -# RunConnectorSubactionPushtoserviceSubActionParamsComments - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Comment** | **string** | A comment related to the incident. For example, describe how to troubleshoot the issue. | [optional] [default to null] -**CommentId** | **int32** | A unique identifier for the comment. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncident.md b/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncident.md deleted file mode 100644 index 358d2571f..000000000 --- a/generated/kibanaactions/docs/RunConnectorSubactionPushtoserviceSubActionParamsIncident.md +++ /dev/null @@ -1,32 +0,0 @@ -# RunConnectorSubactionPushtoserviceSubActionParamsIncident - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AlertId** | **string** | The alert identifier for Swimlane connectors. | [optional] [default to null] -**CaseId** | **string** | The case identifier for the incident for Swimlane connectors. | [optional] [default to null] -**CaseName** | **string** | The case name for the incident for Swimlane connectors. | [optional] [default to null] -**Category** | **string** | The category of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. | [optional] [default to null] -**CorrelationDisplay** | **string** | A descriptive label of the alert for correlation purposes for ServiceNow ITSM and ServiceNow SecOps connectors. | [optional] [default to null] -**CorrelationId** | **string** | The correlation identifier for the security incident for ServiceNow ITSM and ServiveNow SecOps connectors. Connectors using the same correlation ID are associated with the same ServiceNow incident. This value determines whether a new ServiceNow incident is created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the correlation ID value in ServiceNow. The maximum character length for this value is 100 characters. NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that ServiceNow creates a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, ServiceNow creates and continually updates a single incident record for the alert. | [optional] [default to null] -**Description** | **string** | The description of the incident for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors. | [optional] [default to null] -**DestIp** | [***OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp**](OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp.md) | A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. | [optional] [default to null] -**ExternalId** | **string** | The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. If present, the incident is updated. Otherwise, a new incident is created. | [optional] [default to null] -**Impact** | **string** | The impact of the incident for ServiceNow ITSM connectors. | [optional] [default to null] -**IssueType** | **int32** | The type of incident for Jira connectors. For example, 10006. To obtain the list of valid values, set `subAction` to `issueTypes`. | [optional] [default to null] -**Labels** | **[]string** | The labels for the incident for Jira connectors. NOTE: Labels cannot contain spaces. | [optional] [default to null] -**MalwareHash** | [***OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash**](OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash.md) | A list of malware hashes related to the security incident for ServiceNow SecOps connectors. The hashes are added as observables to the security incident. | [optional] [default to null] -**MalwareUrl** | **OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl** | A list of malware URLs related to the security incident for ServiceNow SecOps connectors. The URLs are added as observables to the security incident. | [optional] [default to null] -**Parent** | **string** | The ID or key of the parent issue for Jira connectors. Applies only to `Sub-task` types of issues. | [optional] [default to null] -**Priority** | **string** | The priority of the incident in Jira and ServiceNow SecOps connectors. | [optional] [default to null] -**RuleName** | **string** | The rule name for Swimlane connectors. | [optional] [default to null] -**Severity** | **string** | The severity of the incident for ServiceNow ITSM and Swimlane connectors. | [optional] [default to null] -**ShortDescription** | **string** | A short description of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. It is used for searching the contents of the knowledge base. | [optional] [default to null] -**SourceIp** | [***OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp**](OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp.md) | A list of source IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. | [optional] [default to null] -**Subcategory** | **string** | The subcategory of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. | [optional] [default to null] -**Summary** | **string** | A summary of the incident for Jira connectors. | [optional] [default to null] -**Title** | **string** | A title for the incident for Jira connectors. It is used for searching the contents of the knowledge base. | [optional] [default to null] -**Urgency** | **string** | The urgency of the incident for ServiceNow ITSM connectors. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/SecretsPropertiesCasesWebhook.md b/generated/kibanaactions/docs/SecretsPropertiesCasesWebhook.md deleted file mode 100644 index 959eac415..000000000 --- a/generated/kibanaactions/docs/SecretsPropertiesCasesWebhook.md +++ /dev/null @@ -1,10 +0,0 @@ -# SecretsPropertiesCasesWebhook - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Password** | **string** | The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. | [optional] [default to null] -**User** | **string** | The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/SecretsPropertiesJira.md b/generated/kibanaactions/docs/SecretsPropertiesJira.md deleted file mode 100644 index 8fba8bbd0..000000000 --- a/generated/kibanaactions/docs/SecretsPropertiesJira.md +++ /dev/null @@ -1,10 +0,0 @@ -# SecretsPropertiesJira - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ApiToken** | **string** | The Jira API authentication token for HTTP basic authentication. | [default to null] -**Email** | **string** | The account email for HTTP Basic authentication. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/SecretsPropertiesOpsgenie.md b/generated/kibanaactions/docs/SecretsPropertiesOpsgenie.md deleted file mode 100644 index f34e1c25e..000000000 --- a/generated/kibanaactions/docs/SecretsPropertiesOpsgenie.md +++ /dev/null @@ -1,9 +0,0 @@ -# SecretsPropertiesOpsgenie - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ApiKey** | **string** | The Opsgenie API authentication key for HTTP Basic authentication. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/SecretsPropertiesResilient.md b/generated/kibanaactions/docs/SecretsPropertiesResilient.md deleted file mode 100644 index c25f2420d..000000000 --- a/generated/kibanaactions/docs/SecretsPropertiesResilient.md +++ /dev/null @@ -1,10 +0,0 @@ -# SecretsPropertiesResilient - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ApiKeyId** | **string** | The authentication key ID for HTTP Basic authentication. | [default to null] -**ApiKeySecret** | **string** | The authentication key secret for HTTP Basic authentication. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/SecretsPropertiesServicenow.md b/generated/kibanaactions/docs/SecretsPropertiesServicenow.md deleted file mode 100644 index a5f269a91..000000000 --- a/generated/kibanaactions/docs/SecretsPropertiesServicenow.md +++ /dev/null @@ -1,13 +0,0 @@ -# SecretsPropertiesServicenow - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClientSecret** | **string** | The client secret assigned to your OAuth application. This property is required when `isOAuth` is `true`. | [optional] [default to null] -**Password** | **string** | The password for HTTP basic authentication. This property is required when `isOAuth` is `false`. | [optional] [default to null] -**PrivateKey** | **string** | The RSA private key that you created for use in ServiceNow. This property is required when `isOAuth` is `true`. | [optional] [default to null] -**PrivateKeyPassword** | **string** | The password for the RSA private key. This property is required when `isOAuth` is `true` and you set a password on your private key. | [optional] [default to null] -**Username** | **string** | The username for HTTP basic authentication. This property is required when `isOAuth` is `false`. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/SecretsPropertiesSwimlane.md b/generated/kibanaactions/docs/SecretsPropertiesSwimlane.md deleted file mode 100644 index e2a5a1fd1..000000000 --- a/generated/kibanaactions/docs/SecretsPropertiesSwimlane.md +++ /dev/null @@ -1,9 +0,0 @@ -# SecretsPropertiesSwimlane - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ApiToken** | **string** | Swimlane API authentication token. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/SeverityMapping.md b/generated/kibanaactions/docs/SeverityMapping.md deleted file mode 100644 index 76ff4b63e..000000000 --- a/generated/kibanaactions/docs/SeverityMapping.md +++ /dev/null @@ -1,12 +0,0 @@ -# SeverityMapping - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FieldType** | **string** | The type of field in Swimlane. | [default to null] -**Id** | **string** | The identifier for the field in Swimlane. | [default to null] -**Key** | **string** | The key for the field in Swimlane. | [default to null] -**Name** | **string** | The name of the field in Swimlane. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UnauthorizedResponse.md b/generated/kibanaactions/docs/UnauthorizedResponse.md deleted file mode 100644 index 28d90caff..000000000 --- a/generated/kibanaactions/docs/UnauthorizedResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# UnauthorizedResponse - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error_** | **string** | | [optional] [default to null] -**Message** | **string** | | [optional] [default to null] -**StatusCode** | **int32** | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestBodyProperties.md b/generated/kibanaactions/docs/UpdateConnectorRequestBodyProperties.md deleted file mode 100644 index cbcd15379..000000000 --- a/generated/kibanaactions/docs/UpdateConnectorRequestBodyProperties.md +++ /dev/null @@ -1,8 +0,0 @@ -# UpdateConnectorRequestBodyProperties - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestCasesWebhook.md b/generated/kibanaactions/docs/UpdateConnectorRequestCasesWebhook.md deleted file mode 100644 index f05f30b2a..000000000 --- a/generated/kibanaactions/docs/UpdateConnectorRequestCasesWebhook.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateConnectorRequestCasesWebhook - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesCasesWebhook**](config_properties_cases_webhook.md) | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***SecretsPropertiesCasesWebhook**](secrets_properties_cases_webhook.md) | | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestIndex.md b/generated/kibanaactions/docs/UpdateConnectorRequestIndex.md deleted file mode 100644 index 98442fc61..000000000 --- a/generated/kibanaactions/docs/UpdateConnectorRequestIndex.md +++ /dev/null @@ -1,10 +0,0 @@ -# UpdateConnectorRequestIndex - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesIndex**](config_properties_index.md) | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestJira.md b/generated/kibanaactions/docs/UpdateConnectorRequestJira.md deleted file mode 100644 index d85876156..000000000 --- a/generated/kibanaactions/docs/UpdateConnectorRequestJira.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateConnectorRequestJira - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesJira**](config_properties_jira.md) | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***SecretsPropertiesJira**](secrets_properties_jira.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestOpsgenie.md b/generated/kibanaactions/docs/UpdateConnectorRequestOpsgenie.md deleted file mode 100644 index 0c9fb4807..000000000 --- a/generated/kibanaactions/docs/UpdateConnectorRequestOpsgenie.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateConnectorRequestOpsgenie - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesOpsgenie**](config_properties_opsgenie.md) | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***SecretsPropertiesOpsgenie**](secrets_properties_opsgenie.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestResilient.md b/generated/kibanaactions/docs/UpdateConnectorRequestResilient.md deleted file mode 100644 index f8a870119..000000000 --- a/generated/kibanaactions/docs/UpdateConnectorRequestResilient.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateConnectorRequestResilient - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesResilient**](config_properties_resilient.md) | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***SecretsPropertiesResilient**](secrets_properties_resilient.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestServerlog.md b/generated/kibanaactions/docs/UpdateConnectorRequestServerlog.md deleted file mode 100644 index a44c133a5..000000000 --- a/generated/kibanaactions/docs/UpdateConnectorRequestServerlog.md +++ /dev/null @@ -1,9 +0,0 @@ -# UpdateConnectorRequestServerlog - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The display name for the connector. | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestServicenow.md b/generated/kibanaactions/docs/UpdateConnectorRequestServicenow.md deleted file mode 100644 index ad93d53b9..000000000 --- a/generated/kibanaactions/docs/UpdateConnectorRequestServicenow.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateConnectorRequestServicenow - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesServicenow**](config_properties_servicenow.md) | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***SecretsPropertiesServicenow**](secrets_properties_servicenow.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestServicenowItom.md b/generated/kibanaactions/docs/UpdateConnectorRequestServicenowItom.md deleted file mode 100644 index 73604632a..000000000 --- a/generated/kibanaactions/docs/UpdateConnectorRequestServicenowItom.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateConnectorRequestServicenowItom - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesServicenowItom**](config_properties_servicenow_itom.md) | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***SecretsPropertiesServicenow**](secrets_properties_servicenow.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/docs/UpdateConnectorRequestSwimlane.md b/generated/kibanaactions/docs/UpdateConnectorRequestSwimlane.md deleted file mode 100644 index 57bc2089d..000000000 --- a/generated/kibanaactions/docs/UpdateConnectorRequestSwimlane.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateConnectorRequestSwimlane - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Config** | [***ConfigPropertiesSwimlane**](config_properties_swimlane.md) | | [default to null] -**Name** | **string** | The display name for the connector. | [default to null] -**Secrets** | [***SecretsPropertiesSwimlane**](secrets_properties_swimlane.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/generated/kibanaactions/git_push.sh b/generated/kibanaactions/git_push.sh deleted file mode 100644 index ae01b182a..000000000 --- a/generated/kibanaactions/git_push.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/generated/kibanaactions/model_action_response_properties.go b/generated/kibanaactions/model_action_response_properties.go deleted file mode 100644 index 072e97706..000000000 --- a/generated/kibanaactions/model_action_response_properties.go +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The properties vary depending on the action type. -type ActionResponseProperties struct { - ActionTypeId string `json:"actionTypeId,omitempty"` - Config *interface{} `json:"config,omitempty"` - Id string `json:"id,omitempty"` - // Indicates whether the action type is deprecated. - IsDeprecated bool `json:"isDeprecated,omitempty"` - // Indicates whether secrets are missing for the action. - IsMissingSecrets bool `json:"isMissingSecrets,omitempty"` - // Indicates whether it is a preconfigured action. - IsPreconfigured bool `json:"isPreconfigured,omitempty"` - Name string `json:"name,omitempty"` -} diff --git a/generated/kibanaactions/model_alert_identifier_mapping.go b/generated/kibanaactions/model_alert_identifier_mapping.go deleted file mode 100644 index 5f2204e4e..000000000 --- a/generated/kibanaactions/model_alert_identifier_mapping.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Mapping for the alert ID. -type AlertIdentifierMapping struct { - // The type of field in Swimlane. - FieldType string `json:"fieldType"` - // The identifier for the field in Swimlane. - Id string `json:"id"` - // The key for the field in Swimlane. - Key string `json:"key"` - // The name of the field in Swimlane. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_case_comment_mapping.go b/generated/kibanaactions/model_case_comment_mapping.go deleted file mode 100644 index cfc12c7b3..000000000 --- a/generated/kibanaactions/model_case_comment_mapping.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Mapping for the case comments. -type CaseCommentMapping struct { - // The type of field in Swimlane. - FieldType string `json:"fieldType"` - // The identifier for the field in Swimlane. - Id string `json:"id"` - // The key for the field in Swimlane. - Key string `json:"key"` - // The name of the field in Swimlane. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_case_description_mapping.go b/generated/kibanaactions/model_case_description_mapping.go deleted file mode 100644 index 5df4986f1..000000000 --- a/generated/kibanaactions/model_case_description_mapping.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Mapping for the case description. -type CaseDescriptionMapping struct { - // The type of field in Swimlane. - FieldType string `json:"fieldType"` - // The identifier for the field in Swimlane. - Id string `json:"id"` - // The key for the field in Swimlane. - Key string `json:"key"` - // The name of the field in Swimlane. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_case_identifier_mapping.go b/generated/kibanaactions/model_case_identifier_mapping.go deleted file mode 100644 index f8f745351..000000000 --- a/generated/kibanaactions/model_case_identifier_mapping.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Mapping for the case ID. -type CaseIdentifierMapping struct { - // The type of field in Swimlane. - FieldType string `json:"fieldType"` - // The identifier for the field in Swimlane. - Id string `json:"id"` - // The key for the field in Swimlane. - Key string `json:"key"` - // The name of the field in Swimlane. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_case_name_mapping.go b/generated/kibanaactions/model_case_name_mapping.go deleted file mode 100644 index 23f3ed840..000000000 --- a/generated/kibanaactions/model_case_name_mapping.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Mapping for the case name. -type CaseNameMapping struct { - // The type of field in Swimlane. - FieldType string `json:"fieldType"` - // The identifier for the field in Swimlane. - Id string `json:"id"` - // The key for the field in Swimlane. - Key string `json:"key"` - // The name of the field in Swimlane. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_config_properties_cases_webhook.go b/generated/kibanaactions/model_config_properties_cases_webhook.go deleted file mode 100644 index 92c2b0e13..000000000 --- a/generated/kibanaactions/model_config_properties_cases_webhook.go +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Defines properties for connectors when type is `.cases-webhook`. -type ConfigPropertiesCasesWebhook struct { - // A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. - CreateCommentJson string `json:"createCommentJson,omitempty"` - // The REST API HTTP request method to create a case comment in the third-party system. Valid values are `patch`, `post`, and `put`. - CreateCommentMethod string `json:"createCommentMethod,omitempty"` - // The REST API URL to create a case comment by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts setting`, add the hostname to the allowed hosts. - CreateCommentUrl string `json:"createCommentUrl,omitempty"` - // A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. - CreateIncidentJson string `json:"createIncidentJson"` - // The REST API HTTP request method to create a case in the third-party system. Valid values are `patch`, `post`, and `put`. - CreateIncidentMethod string `json:"createIncidentMethod,omitempty"` - // The JSON key in the create case response that contains the external case ID. - CreateIncidentResponseKey string `json:"createIncidentResponseKey"` - // The REST API URL to create a case in the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. - CreateIncidentUrl string `json:"createIncidentUrl"` - // The JSON key in get case response that contains the external case title. - GetIncidentResponseExternalTitleKey string `json:"getIncidentResponseExternalTitleKey"` - // The REST API URL to get the case by ID from the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. You can use a variable to add the external system ID to the URL. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. - GetIncidentUrl string `json:"getIncidentUrl"` - // If true, a username and password for login type authentication must be provided. - HasAuth bool `json:"hasAuth,omitempty"` - // A set of key-value pairs sent as headers with the request URLs for the create case, update case, get case, and create comment methods. - Headers string `json:"headers,omitempty"` - // The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. - UpdateIncidentJson string `json:"updateIncidentJson"` - // The REST API HTTP request method to update the case in the third-party system. Valid values are `patch`, `post`, and `put`. - UpdateIncidentMethod string `json:"updateIncidentMethod,omitempty"` - // The REST API URL to update the case by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. - UpdateIncidentUrl string `json:"updateIncidentUrl"` - // The URL to view the case in the external system. You can use variables to add the external system ID or external system title to the URL. - ViewIncidentUrl string `json:"viewIncidentUrl"` -} diff --git a/generated/kibanaactions/model_config_properties_index.go b/generated/kibanaactions/model_config_properties_index.go deleted file mode 100644 index e7ccfffee..000000000 --- a/generated/kibanaactions/model_config_properties_index.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Defines properties for connectors when type is `.index`. -type ConfigPropertiesIndex struct { - // Specifies a field that will contain the time the alert condition was detected. - ExecutionTimeField string `json:"executionTimeField,omitempty"` - // The Elasticsearch index to be written to. - Index string `json:"index"` - // The refresh policy for the write request, which affects when changes are made visible to search. Refer to the refresh setting for Elasticsearch document APIs. - Refresh bool `json:"refresh,omitempty"` -} diff --git a/generated/kibanaactions/model_config_properties_jira.go b/generated/kibanaactions/model_config_properties_jira.go deleted file mode 100644 index 097a16ed8..000000000 --- a/generated/kibanaactions/model_config_properties_jira.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Defines properties for connectors when type is `.jira`. -type ConfigPropertiesJira struct { - // The Jira instance URL. - ApiUrl string `json:"apiUrl"` - // The Jira project key. - ProjectKey string `json:"projectKey"` -} diff --git a/generated/kibanaactions/model_config_properties_opsgenie.go b/generated/kibanaactions/model_config_properties_opsgenie.go deleted file mode 100644 index dce830650..000000000 --- a/generated/kibanaactions/model_config_properties_opsgenie.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Defines properties for connectors when type is `.opsgenie`. -type ConfigPropertiesOpsgenie struct { - // The Opsgenie URL. For example, `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. - ApiUrl string `json:"apiUrl"` -} diff --git a/generated/kibanaactions/model_config_properties_resilient.go b/generated/kibanaactions/model_config_properties_resilient.go deleted file mode 100644 index a71373a2d..000000000 --- a/generated/kibanaactions/model_config_properties_resilient.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Defines properties for connectors when type is `.resilient`. -type ConfigPropertiesResilient struct { - // The IBM Resilient instance URL. - ApiUrl string `json:"apiUrl"` - // The IBM Resilient organization ID. - OrgId string `json:"orgId"` -} diff --git a/generated/kibanaactions/model_config_properties_servicenow.go b/generated/kibanaactions/model_config_properties_servicenow.go deleted file mode 100644 index ca6224883..000000000 --- a/generated/kibanaactions/model_config_properties_servicenow.go +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Defines properties for connectors when type is `.servicenow`. -type ConfigPropertiesServicenow struct { - // The ServiceNow instance URL. - ApiUrl string `json:"apiUrl"` - // The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. - ClientId string `json:"clientId,omitempty"` - // The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). - IsOAuth bool `json:"isOAuth,omitempty"` - // The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. - JwtKeyId string `json:"jwtKeyId,omitempty"` - // The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. - UserIdentifierValue string `json:"userIdentifierValue,omitempty"` - // Determines whether the connector uses the Table API or the Import Set API. This property is supported only for ServiceNow ITSM and ServiceNow SecOps connectors. NOTE: If this property is set to `false`, the Elastic application should be installed in ServiceNow. - UsesTableApi bool `json:"usesTableApi,omitempty"` -} diff --git a/generated/kibanaactions/model_config_properties_servicenow_itom.go b/generated/kibanaactions/model_config_properties_servicenow_itom.go deleted file mode 100644 index d2539bf75..000000000 --- a/generated/kibanaactions/model_config_properties_servicenow_itom.go +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Defines properties for connectors when type is `.servicenow`. -type ConfigPropertiesServicenowItom struct { - // The ServiceNow instance URL. - ApiUrl string `json:"apiUrl"` - // The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. - ClientId string `json:"clientId,omitempty"` - // The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). - IsOAuth bool `json:"isOAuth,omitempty"` - // The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. - JwtKeyId string `json:"jwtKeyId,omitempty"` - // The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. - UserIdentifierValue string `json:"userIdentifierValue,omitempty"` -} diff --git a/generated/kibanaactions/model_config_properties_swimlane.go b/generated/kibanaactions/model_config_properties_swimlane.go deleted file mode 100644 index 930e787e5..000000000 --- a/generated/kibanaactions/model_config_properties_swimlane.go +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Defines properties for connectors when type is `.swimlane`. -type ConfigPropertiesSwimlane struct { - // The Swimlane instance URL. - ApiUrl string `json:"apiUrl"` - // The Swimlane application ID. - AppId string `json:"appId"` - // The type of connector. Valid values are `all`, `alerts`, and `cases`. - ConnectorType string `json:"connectorType"` - Mappings *ConnectorMappingsPropertiesForASwimlaneConnector `json:"mappings,omitempty"` -} diff --git a/generated/kibanaactions/model_connector_mappings_properties_for_a_swimlane_connector.go b/generated/kibanaactions/model_connector_mappings_properties_for_a_swimlane_connector.go deleted file mode 100644 index a9e67f650..000000000 --- a/generated/kibanaactions/model_connector_mappings_properties_for_a_swimlane_connector.go +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The field mapping. -type ConnectorMappingsPropertiesForASwimlaneConnector struct { - AlertIdConfig *AlertIdentifierMapping `json:"alertIdConfig,omitempty"` - CaseIdConfig *CaseIdentifierMapping `json:"caseIdConfig,omitempty"` - CaseNameConfig *CaseNameMapping `json:"caseNameConfig,omitempty"` - CommentsConfig *CaseCommentMapping `json:"commentsConfig,omitempty"` - DescriptionConfig *CaseDescriptionMapping `json:"descriptionConfig,omitempty"` - RuleNameConfig *RuleNameMapping `json:"ruleNameConfig,omitempty"` - SeverityConfig *SeverityMapping `json:"severityConfig,omitempty"` -} diff --git a/generated/kibanaactions/model_connector_response_properties.go b/generated/kibanaactions/model_connector_response_properties.go deleted file mode 100644 index e95207266..000000000 --- a/generated/kibanaactions/model_connector_response_properties.go +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The properties vary depending on the connector type. -type ConnectorResponseProperties struct { - ConnectorResponsePropertiesCasesWebhook - ConnectorResponsePropertiesEmail - ConnectorResponsePropertiesIndex - ConnectorResponsePropertiesJira - ConnectorResponsePropertiesOpsgenie - ConnectorResponsePropertiesPagerduty - ConnectorResponsePropertiesResilient - ConnectorResponsePropertiesServerlog - ConnectorResponsePropertiesServicenow - ConnectorResponsePropertiesServicenowItom - ConnectorResponsePropertiesServicenowSir - ConnectorResponsePropertiesSlack - ConnectorResponsePropertiesSwimlane - ConnectorResponsePropertiesTeams - ConnectorResponsePropertiesTines - ConnectorResponsePropertiesWebhook - ConnectorResponsePropertiesXmatters -} diff --git a/generated/kibanaactions/model_connector_response_properties_cases_webhook.go b/generated/kibanaactions/model_connector_response_properties_cases_webhook.go deleted file mode 100644 index 023c362b9..000000000 --- a/generated/kibanaactions/model_connector_response_properties_cases_webhook.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type ConnectorResponsePropertiesCasesWebhook struct { - Config *ConfigPropertiesCasesWebhook `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The identifier for the connector. - Id string `json:"id"` - IsDeprecated bool `json:"is_deprecated"` - IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` - IsPreconfigured bool `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_connector_response_properties_email.go b/generated/kibanaactions/model_connector_response_properties_email.go deleted file mode 100644 index df68b0e32..000000000 --- a/generated/kibanaactions/model_connector_response_properties_email.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type ConnectorResponsePropertiesEmail struct { - Config *ModelMap `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The identifier for the connector. - Id string `json:"id"` - IsDeprecated bool `json:"is_deprecated"` - IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` - IsPreconfigured bool `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_connector_response_properties_index.go b/generated/kibanaactions/model_connector_response_properties_index.go deleted file mode 100644 index 6c9f1a548..000000000 --- a/generated/kibanaactions/model_connector_response_properties_index.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type ConnectorResponsePropertiesIndex struct { - Config *ConfigPropertiesIndex `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The identifier for the connector. - Id string `json:"id"` - IsDeprecated bool `json:"is_deprecated"` - IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` - IsPreconfigured bool `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_connector_response_properties_jira.go b/generated/kibanaactions/model_connector_response_properties_jira.go deleted file mode 100644 index c0efcb5bf..000000000 --- a/generated/kibanaactions/model_connector_response_properties_jira.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type ConnectorResponsePropertiesJira struct { - Config *ConfigPropertiesJira `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The identifier for the connector. - Id string `json:"id"` - IsDeprecated bool `json:"is_deprecated"` - IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` - IsPreconfigured bool `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_connector_response_properties_opsgenie.go b/generated/kibanaactions/model_connector_response_properties_opsgenie.go deleted file mode 100644 index 7e4dc042a..000000000 --- a/generated/kibanaactions/model_connector_response_properties_opsgenie.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type ConnectorResponsePropertiesOpsgenie struct { - Config *ConfigPropertiesOpsgenie `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The identifier for the connector. - Id string `json:"id"` - IsDeprecated bool `json:"is_deprecated"` - IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` - IsPreconfigured bool `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_connector_response_properties_pagerduty.go b/generated/kibanaactions/model_connector_response_properties_pagerduty.go deleted file mode 100644 index a737f1256..000000000 --- a/generated/kibanaactions/model_connector_response_properties_pagerduty.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type ConnectorResponsePropertiesPagerduty struct { - Config *ModelMap `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The identifier for the connector. - Id string `json:"id"` - IsDeprecated bool `json:"is_deprecated"` - IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` - IsPreconfigured bool `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_connector_response_properties_resilient.go b/generated/kibanaactions/model_connector_response_properties_resilient.go deleted file mode 100644 index 7f158ad2f..000000000 --- a/generated/kibanaactions/model_connector_response_properties_resilient.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type ConnectorResponsePropertiesResilient struct { - Config *ConfigPropertiesResilient `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The identifier for the connector. - Id string `json:"id"` - IsDeprecated bool `json:"is_deprecated"` - IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` - IsPreconfigured bool `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_connector_response_properties_serverlog.go b/generated/kibanaactions/model_connector_response_properties_serverlog.go deleted file mode 100644 index 1a25b50a6..000000000 --- a/generated/kibanaactions/model_connector_response_properties_serverlog.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type ConnectorResponsePropertiesServerlog struct { - Config *interface{} `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The identifier for the connector. - Id string `json:"id"` - IsDeprecated bool `json:"is_deprecated"` - IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` - IsPreconfigured bool `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_connector_response_properties_servicenow.go b/generated/kibanaactions/model_connector_response_properties_servicenow.go deleted file mode 100644 index d6ac6d374..000000000 --- a/generated/kibanaactions/model_connector_response_properties_servicenow.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type ConnectorResponsePropertiesServicenow struct { - Config *ConfigPropertiesServicenow `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The identifier for the connector. - Id string `json:"id"` - IsDeprecated bool `json:"is_deprecated"` - IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` - IsPreconfigured bool `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_connector_response_properties_servicenow_itom.go b/generated/kibanaactions/model_connector_response_properties_servicenow_itom.go deleted file mode 100644 index 1b2187845..000000000 --- a/generated/kibanaactions/model_connector_response_properties_servicenow_itom.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type ConnectorResponsePropertiesServicenowItom struct { - Config *ConfigPropertiesServicenowItom `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The identifier for the connector. - Id string `json:"id"` - IsDeprecated bool `json:"is_deprecated"` - IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` - IsPreconfigured bool `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_connector_response_properties_servicenow_sir.go b/generated/kibanaactions/model_connector_response_properties_servicenow_sir.go deleted file mode 100644 index 3810c54ab..000000000 --- a/generated/kibanaactions/model_connector_response_properties_servicenow_sir.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type ConnectorResponsePropertiesServicenowSir struct { - Config *ConfigPropertiesServicenow `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The identifier for the connector. - Id string `json:"id"` - IsDeprecated bool `json:"is_deprecated"` - IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` - IsPreconfigured bool `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_connector_response_properties_slack.go b/generated/kibanaactions/model_connector_response_properties_slack.go deleted file mode 100644 index 431494588..000000000 --- a/generated/kibanaactions/model_connector_response_properties_slack.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type ConnectorResponsePropertiesSlack struct { - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The identifier for the connector. - Id string `json:"id"` - IsDeprecated bool `json:"is_deprecated"` - IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` - IsPreconfigured bool `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_connector_response_properties_swimlane.go b/generated/kibanaactions/model_connector_response_properties_swimlane.go deleted file mode 100644 index df523fb12..000000000 --- a/generated/kibanaactions/model_connector_response_properties_swimlane.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type ConnectorResponsePropertiesSwimlane struct { - Config *ConfigPropertiesSwimlane `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The identifier for the connector. - Id string `json:"id"` - IsDeprecated bool `json:"is_deprecated"` - IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` - IsPreconfigured bool `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_connector_response_properties_teams.go b/generated/kibanaactions/model_connector_response_properties_teams.go deleted file mode 100644 index 0f274a0e7..000000000 --- a/generated/kibanaactions/model_connector_response_properties_teams.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type ConnectorResponsePropertiesTeams struct { - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The identifier for the connector. - Id string `json:"id"` - IsDeprecated bool `json:"is_deprecated"` - IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` - IsPreconfigured bool `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_connector_response_properties_tines.go b/generated/kibanaactions/model_connector_response_properties_tines.go deleted file mode 100644 index c868bf4e1..000000000 --- a/generated/kibanaactions/model_connector_response_properties_tines.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type ConnectorResponsePropertiesTines struct { - Config *ModelMap `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The identifier for the connector. - Id string `json:"id"` - IsDeprecated bool `json:"is_deprecated"` - IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` - IsPreconfigured bool `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_connector_response_properties_webhook.go b/generated/kibanaactions/model_connector_response_properties_webhook.go deleted file mode 100644 index ad98587eb..000000000 --- a/generated/kibanaactions/model_connector_response_properties_webhook.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type ConnectorResponsePropertiesWebhook struct { - Config *ModelMap `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The identifier for the connector. - Id string `json:"id"` - IsDeprecated bool `json:"is_deprecated"` - IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` - IsPreconfigured bool `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_connector_response_properties_xmatters.go b/generated/kibanaactions/model_connector_response_properties_xmatters.go deleted file mode 100644 index 7b6db33c1..000000000 --- a/generated/kibanaactions/model_connector_response_properties_xmatters.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type ConnectorResponsePropertiesXmatters struct { - Config *ModelMap `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The identifier for the connector. - Id string `json:"id"` - IsDeprecated bool `json:"is_deprecated"` - IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` - IsPreconfigured bool `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_connector_types.go b/generated/kibanaactions/model_connector_types.go deleted file mode 100644 index 76f691249..000000000 --- a/generated/kibanaactions/model_connector_types.go +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// ConnectorTypes : The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`. -type ConnectorTypes string - -// List of connector_types -const ( - CASES_WEBHOOK_ConnectorTypes ConnectorTypes = ".cases-webhook" - EMAIL_ConnectorTypes ConnectorTypes = ".email" - INDEX_ConnectorTypes ConnectorTypes = ".index" - JIRA_ConnectorTypes ConnectorTypes = ".jira" - OPSGENIE_ConnectorTypes ConnectorTypes = ".opsgenie" - PAGERDUTY_ConnectorTypes ConnectorTypes = ".pagerduty" - RESILIENT_ConnectorTypes ConnectorTypes = ".resilient" - SERVICENOW_ConnectorTypes ConnectorTypes = ".servicenow" - SERVICENOW_ITOM_ConnectorTypes ConnectorTypes = ".servicenow-itom" - SERVICENOW_SIR_ConnectorTypes ConnectorTypes = ".servicenow-sir" - SERVER_LOG_ConnectorTypes ConnectorTypes = ".server-log" - SLACK_ConnectorTypes ConnectorTypes = ".slack" - SWIMLANE_ConnectorTypes ConnectorTypes = ".swimlane" - TEAMS_ConnectorTypes ConnectorTypes = ".teams" - TINES_ConnectorTypes ConnectorTypes = ".tines" - WEBHOOK_ConnectorTypes ConnectorTypes = ".webhook" - XMATTERS_ConnectorTypes ConnectorTypes = ".xmatters" -) diff --git a/generated/kibanaactions/model_create_connector_request_body_properties.go b/generated/kibanaactions/model_create_connector_request_body_properties.go deleted file mode 100644 index 5d8b9e302..000000000 --- a/generated/kibanaactions/model_create_connector_request_body_properties.go +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The properties vary depending on the connector type. -type CreateConnectorRequestBodyProperties struct { - CreateConnectorRequestCasesWebhook - CreateConnectorRequestEmail - CreateConnectorRequestIndex - CreateConnectorRequestJira - CreateConnectorRequestOpsgenie - CreateConnectorRequestPagerduty - CreateConnectorRequestResilient - CreateConnectorRequestServerlog - CreateConnectorRequestServicenow - CreateConnectorRequestServicenowItom - CreateConnectorRequestServicenowSir - CreateConnectorRequestSlack - CreateConnectorRequestSwimlane - CreateConnectorRequestTeams - CreateConnectorRequestTines - CreateConnectorRequestWebhook - CreateConnectorRequestXmatters -} diff --git a/generated/kibanaactions/model_create_connector_request_cases_webhook.go b/generated/kibanaactions/model_create_connector_request_cases_webhook.go deleted file mode 100644 index 334908cdc..000000000 --- a/generated/kibanaactions/model_create_connector_request_cases_webhook.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The Webhook - Case Management connector uses axios to send POST, PUT, and GET requests to a case management RESTful API web service. -type CreateConnectorRequestCasesWebhook struct { - Config *ConfigPropertiesCasesWebhook `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The display name for the connector. - Name string `json:"name"` - Secrets *SecretsPropertiesCasesWebhook `json:"secrets,omitempty"` -} diff --git a/generated/kibanaactions/model_create_connector_request_email.go b/generated/kibanaactions/model_create_connector_request_email.go deleted file mode 100644 index a1739d0ae..000000000 --- a/generated/kibanaactions/model_create_connector_request_email.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The email connector uses the SMTP protocol to send mail messages, using an integration of Nodemailer. An exception is Microsoft Exchange, which uses HTTP protocol for sending emails, Send mail. Email message text is sent as both plain text and html text. -type CreateConnectorRequestEmail struct { - Config *ModelMap `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The display name for the connector. - Name string `json:"name"` - Secrets *ModelMap `json:"secrets"` -} diff --git a/generated/kibanaactions/model_create_connector_request_index.go b/generated/kibanaactions/model_create_connector_request_index.go deleted file mode 100644 index 97225d8bb..000000000 --- a/generated/kibanaactions/model_create_connector_request_index.go +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The index connector indexes a document into Elasticsearch. -type CreateConnectorRequestIndex struct { - Config *ConfigPropertiesIndex `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_create_connector_request_jira.go b/generated/kibanaactions/model_create_connector_request_jira.go deleted file mode 100644 index 899b0cad8..000000000 --- a/generated/kibanaactions/model_create_connector_request_jira.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The Jira connector uses the REST API v2 to create Jira issues. -type CreateConnectorRequestJira struct { - Config *ConfigPropertiesJira `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The display name for the connector. - Name string `json:"name"` - Secrets *SecretsPropertiesJira `json:"secrets"` -} diff --git a/generated/kibanaactions/model_create_connector_request_opsgenie.go b/generated/kibanaactions/model_create_connector_request_opsgenie.go deleted file mode 100644 index d317c6120..000000000 --- a/generated/kibanaactions/model_create_connector_request_opsgenie.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The Opsgenie connector uses the Opsgenie alert API. -type CreateConnectorRequestOpsgenie struct { - Config *ConfigPropertiesOpsgenie `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The display name for the connector. - Name string `json:"name"` - Secrets *SecretsPropertiesOpsgenie `json:"secrets"` -} diff --git a/generated/kibanaactions/model_create_connector_request_pagerduty.go b/generated/kibanaactions/model_create_connector_request_pagerduty.go deleted file mode 100644 index d2873d7b8..000000000 --- a/generated/kibanaactions/model_create_connector_request_pagerduty.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The PagerDuty connector uses the v2 Events API to trigger, acknowledge, and resolve PagerDuty alerts. -type CreateConnectorRequestPagerduty struct { - Config *ModelMap `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The display name for the connector. - Name string `json:"name"` - Secrets *ModelMap `json:"secrets"` -} diff --git a/generated/kibanaactions/model_create_connector_request_resilient.go b/generated/kibanaactions/model_create_connector_request_resilient.go deleted file mode 100644 index becadeb95..000000000 --- a/generated/kibanaactions/model_create_connector_request_resilient.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The IBM Resilient connector uses the RESILIENT REST v2 to create IBM Resilient incidents. -type CreateConnectorRequestResilient struct { - Config *ConfigPropertiesResilient `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The display name for the connector. - Name string `json:"name"` - Secrets *SecretsPropertiesResilient `json:"secrets"` -} diff --git a/generated/kibanaactions/model_create_connector_request_serverlog.go b/generated/kibanaactions/model_create_connector_request_serverlog.go deleted file mode 100644 index 5b5cf1e2d..000000000 --- a/generated/kibanaactions/model_create_connector_request_serverlog.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// This connector writes an entry to the Kibana server log. -type CreateConnectorRequestServerlog struct { - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_create_connector_request_servicenow.go b/generated/kibanaactions/model_create_connector_request_servicenow.go deleted file mode 100644 index d49deef17..000000000 --- a/generated/kibanaactions/model_create_connector_request_servicenow.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The ServiceNow ITSM connector uses the import set API to create ServiceNow incidents. You can use the connector for rule actions and cases. -type CreateConnectorRequestServicenow struct { - Config *ConfigPropertiesServicenow `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The display name for the connector. - Name string `json:"name"` - Secrets *SecretsPropertiesServicenow `json:"secrets"` -} diff --git a/generated/kibanaactions/model_create_connector_request_servicenow_itom.go b/generated/kibanaactions/model_create_connector_request_servicenow_itom.go deleted file mode 100644 index 5b692b71b..000000000 --- a/generated/kibanaactions/model_create_connector_request_servicenow_itom.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The ServiceNow ITOM connector uses the event API to create ServiceNow events. You can use the connector for rule actions. -type CreateConnectorRequestServicenowItom struct { - Config *ConfigPropertiesServicenowItom `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The display name for the connector. - Name string `json:"name"` - Secrets *SecretsPropertiesServicenow `json:"secrets"` -} diff --git a/generated/kibanaactions/model_create_connector_request_servicenow_sir.go b/generated/kibanaactions/model_create_connector_request_servicenow_sir.go deleted file mode 100644 index 2e216c2be..000000000 --- a/generated/kibanaactions/model_create_connector_request_servicenow_sir.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The ServiceNow SecOps connector uses the import set API to create ServiceNow security incidents. You can use the connector for rule actions and cases. -type CreateConnectorRequestServicenowSir struct { - Config *ConfigPropertiesServicenow `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The display name for the connector. - Name string `json:"name"` - Secrets *SecretsPropertiesServicenow `json:"secrets"` -} diff --git a/generated/kibanaactions/model_create_connector_request_slack.go b/generated/kibanaactions/model_create_connector_request_slack.go deleted file mode 100644 index b5ab702c9..000000000 --- a/generated/kibanaactions/model_create_connector_request_slack.go +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The Slack connector uses Slack Incoming Webhooks. -type CreateConnectorRequestSlack struct { - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The display name for the connector. - Name string `json:"name"` - Secrets *ModelMap `json:"secrets"` -} diff --git a/generated/kibanaactions/model_create_connector_request_swimlane.go b/generated/kibanaactions/model_create_connector_request_swimlane.go deleted file mode 100644 index e6a3ecc9a..000000000 --- a/generated/kibanaactions/model_create_connector_request_swimlane.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The Swimlane connector uses the Swimlane REST API to create Swimlane records. -type CreateConnectorRequestSwimlane struct { - Config *ConfigPropertiesSwimlane `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The display name for the connector. - Name string `json:"name"` - Secrets *SecretsPropertiesSwimlane `json:"secrets"` -} diff --git a/generated/kibanaactions/model_create_connector_request_teams.go b/generated/kibanaactions/model_create_connector_request_teams.go deleted file mode 100644 index 4d50cad97..000000000 --- a/generated/kibanaactions/model_create_connector_request_teams.go +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The Microsoft Teams connector uses Incoming Webhooks. -type CreateConnectorRequestTeams struct { - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The display name for the connector. - Name string `json:"name"` - Secrets *ModelMap `json:"secrets"` -} diff --git a/generated/kibanaactions/model_create_connector_request_tines.go b/generated/kibanaactions/model_create_connector_request_tines.go deleted file mode 100644 index 5491919ce..000000000 --- a/generated/kibanaactions/model_create_connector_request_tines.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The Tines connector uses Tines Webhook actions to send events via POST request. -type CreateConnectorRequestTines struct { - Config *ModelMap `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The display name for the connector. - Name string `json:"name"` - Secrets *ModelMap `json:"secrets"` -} diff --git a/generated/kibanaactions/model_create_connector_request_webhook.go b/generated/kibanaactions/model_create_connector_request_webhook.go deleted file mode 100644 index f8619d2d4..000000000 --- a/generated/kibanaactions/model_create_connector_request_webhook.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The Webhook connector uses axios to send a POST or PUT request to a web service. -type CreateConnectorRequestWebhook struct { - Config *ModelMap `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The display name for the connector. - Name string `json:"name"` - Secrets *ModelMap `json:"secrets"` -} diff --git a/generated/kibanaactions/model_create_connector_request_xmatters.go b/generated/kibanaactions/model_create_connector_request_xmatters.go deleted file mode 100644 index 6092debdd..000000000 --- a/generated/kibanaactions/model_create_connector_request_xmatters.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The xMatters connector uses the xMatters Workflow for Elastic to send actionable alerts to on-call xMatters resources. -type CreateConnectorRequestXmatters struct { - Config *ModelMap `json:"config"` - // The type of connector. - ConnectorTypeId string `json:"connector_type_id"` - // The display name for the connector. - Name string `json:"name"` - Secrets *ModelMap `json:"secrets"` -} diff --git a/generated/kibanaactions/model_features.go b/generated/kibanaactions/model_features.go deleted file mode 100644 index 4cf75d996..000000000 --- a/generated/kibanaactions/model_features.go +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Features : The feature that uses the connector. Valid values are `alerting`, `cases`, `uptime`, and `siem`. -type Features string - -// List of features -const ( - ALERTING_Features Features = "alerting" - CASES_Features Features = "cases" - UPTIME_Features Features = "uptime" - SIEM_Features Features = "siem" -) diff --git a/generated/kibanaactions/model_get_connectors_response_body_properties.go b/generated/kibanaactions/model_get_connectors_response_body_properties.go deleted file mode 100644 index a0930ab67..000000000 --- a/generated/kibanaactions/model_get_connectors_response_body_properties.go +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The properties vary for each connector type. -type GetConnectorsResponseBodyProperties struct { - ConnectorTypeId *ConnectorTypes `json:"connector_type_id"` - // The configuration for the connector. Configuration properties vary depending on the connector type. - Config ModelMap `json:"config,omitempty"` - // The identifier for the connector. - Id string `json:"id"` - IsDeprecated bool `json:"is_deprecated"` - IsMissingSecrets bool `json:"is_missing_secrets,omitempty"` - IsPreconfigured bool `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` - // Indicates the number of saved objects that reference the connector. If `is_preconfigured` is true, this value is not calculated. - ReferencedByCount int32 `json:"referenced_by_count"` -} diff --git a/generated/kibanaactions/model_inline_response_200.go b/generated/kibanaactions/model_inline_response_200.go deleted file mode 100644 index d66bd4d8e..000000000 --- a/generated/kibanaactions/model_inline_response_200.go +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type InlineResponse200 struct { - // Indicates whether the connector type is enabled in Kibana. - Enabled bool `json:"enabled,omitempty"` - // Indicates whether the connector type is enabled in the Kibana `.yml` file. - EnabledInConfig bool `json:"enabled_in_config,omitempty"` - // Indicates whether the connector is enabled in the license. - EnabledInLicense bool `json:"enabled_in_license,omitempty"` - Id *ConnectorTypes `json:"id,omitempty"` - // The license that is required to use the connector type. - MinimumLicenseRequired string `json:"minimum_license_required,omitempty"` - // The name of the connector type. - Name string `json:"name,omitempty"` - // The Kibana features that are supported by the connector type. - SupportedFeatureIds []Features `json:"supported_feature_ids,omitempty"` -} diff --git a/generated/kibanaactions/model_inline_response_200_1.go b/generated/kibanaactions/model_inline_response_200_1.go deleted file mode 100644 index 3d3330c77..000000000 --- a/generated/kibanaactions/model_inline_response_200_1.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type InlineResponse2001 struct { - // The identifier for the connector. - ConnectorId string `json:"connector_id"` - Data *OneOfinlineResponse2001Data `json:"data,omitempty"` - // The status of the action. - Status string `json:"status"` -} diff --git a/generated/kibanaactions/model_inline_response_200_2.go b/generated/kibanaactions/model_inline_response_200_2.go deleted file mode 100644 index 2b19423ae..000000000 --- a/generated/kibanaactions/model_inline_response_200_2.go +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type InlineResponse2002 struct { - // Indicates whether the connector type is enabled in Kibana. - Enabled bool `json:"enabled,omitempty"` - // Indicates whether the connector type is enabled in the Kibana `.yml` file. - EnabledInConfig bool `json:"enabledInConfig,omitempty"` - // Indicates whether the connector is enabled in the license. - EnabledInLicense bool `json:"enabledInLicense,omitempty"` - // The unique identifier for the connector type. - Id string `json:"id,omitempty"` - // The license that is required to use the connector type. - MinimumLicenseRequired string `json:"minimumLicenseRequired,omitempty"` - // The name of the connector type. - Name string `json:"name,omitempty"` -} diff --git a/generated/kibanaactions/model_inline_response_200_3.go b/generated/kibanaactions/model_inline_response_200_3.go deleted file mode 100644 index 22db1fe23..000000000 --- a/generated/kibanaactions/model_inline_response_200_3.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type InlineResponse2003 struct { - ActionId string `json:"actionId,omitempty"` - Data *OneOfinlineResponse2003Data `json:"data,omitempty"` - // The status of the action. - Status string `json:"status,omitempty"` -} diff --git a/generated/kibanaactions/model_inline_response_400.go b/generated/kibanaactions/model_inline_response_400.go deleted file mode 100644 index dc1c189b7..000000000 --- a/generated/kibanaactions/model_inline_response_400.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type InlineResponse400 struct { - Error_ string `json:"error,omitempty"` - Message string `json:"message,omitempty"` - StatusCode int32 `json:"statusCode,omitempty"` -} diff --git a/generated/kibanaactions/model_inline_response_404.go b/generated/kibanaactions/model_inline_response_404.go deleted file mode 100644 index c51a9203b..000000000 --- a/generated/kibanaactions/model_inline_response_404.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type InlineResponse404 struct { - Error_ string `json:"error,omitempty"` - Message string `json:"message,omitempty"` - StatusCode int32 `json:"statusCode,omitempty"` -} diff --git a/generated/kibanaactions/model_legacy_create_connector_request_properties.go b/generated/kibanaactions/model_legacy_create_connector_request_properties.go deleted file mode 100644 index 7a2f04bc9..000000000 --- a/generated/kibanaactions/model_legacy_create_connector_request_properties.go +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type LegacyCreateConnectorRequestProperties struct { - // The connector type identifier. - ActionTypeId string `json:"actionTypeId,omitempty"` - // The configuration for the connector. Configuration properties vary depending on the connector type. - Config *interface{} `json:"config,omitempty"` - // The display name for the connector. - Name string `json:"name,omitempty"` - // The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. NOTE: Remember these values. You must provide them each time you update the connector. - Secrets *interface{} `json:"secrets,omitempty"` -} diff --git a/generated/kibanaactions/model_legacy_run_connector_request_body_properties.go b/generated/kibanaactions/model_legacy_run_connector_request_body_properties.go deleted file mode 100644 index 11a829a03..000000000 --- a/generated/kibanaactions/model_legacy_run_connector_request_body_properties.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The properties vary depending on the connector type. -type LegacyRunConnectorRequestBodyProperties struct { - // The parameters of the connector. Parameter properties vary depending on the connector type. - Params *interface{} `json:"params"` -} diff --git a/generated/kibanaactions/model_legacy_update_connector_request_body_properties.go b/generated/kibanaactions/model_legacy_update_connector_request_body_properties.go deleted file mode 100644 index 1e800506b..000000000 --- a/generated/kibanaactions/model_legacy_update_connector_request_body_properties.go +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The properties vary depending on the connector type. -type LegacyUpdateConnectorRequestBodyProperties struct { - // The new connector configuration. Configuration properties vary depending on the connector type. - Config *interface{} `json:"config,omitempty"` - // The new name for the connector. - Name string `json:"name,omitempty"` - // The updated secrets configuration for the connector. Secrets properties vary depending on the connector type. - Secrets *interface{} `json:"secrets,omitempty"` -} diff --git a/generated/kibanaactions/model_map.go b/generated/kibanaactions/model_map.go deleted file mode 100644 index 83cf4bd31..000000000 --- a/generated/kibanaactions/model_map.go +++ /dev/null @@ -1,3 +0,0 @@ -package kibanaactions - -type ModelMap map[string]interface{} diff --git a/generated/kibanaactions/model_not_found_response.go b/generated/kibanaactions/model_not_found_response.go deleted file mode 100644 index f9686e3e0..000000000 --- a/generated/kibanaactions/model_not_found_response.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type NotFoundResponse struct { - Error_ string `json:"error,omitempty"` - Message string `json:"message,omitempty"` - StatusCode int32 `json:"statusCode,omitempty"` -} diff --git a/generated/kibanaactions/model_one_of_run_connector_request_body_properties_params.go b/generated/kibanaactions/model_one_of_run_connector_request_body_properties_params.go deleted file mode 100644 index adfbd3126..000000000 --- a/generated/kibanaactions/model_one_of_run_connector_request_body_properties_params.go +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type OneOfRunConnectorRequestBodyPropertiesParams struct { - RunConnectorParamsDocuments - RunConnectorParamsLevelMessage -} diff --git a/generated/kibanaactions/model_one_ofinline_response_200_1_data.go b/generated/kibanaactions/model_one_ofinline_response_200_1_data.go deleted file mode 100644 index f0bd59c40..000000000 --- a/generated/kibanaactions/model_one_ofinline_response_200_1_data.go +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type OneOfinlineResponse2001Data struct { -} diff --git a/generated/kibanaactions/model_one_ofinline_response_200_3_data.go b/generated/kibanaactions/model_one_ofinline_response_200_3_data.go deleted file mode 100644 index 735082a66..000000000 --- a/generated/kibanaactions/model_one_ofinline_response_200_3_data.go +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type OneOfinlineResponse2003Data struct { -} diff --git a/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go b/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go deleted file mode 100644 index 42c1cae52..000000000 --- a/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_dest_ip.go +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp struct { -} diff --git a/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go b/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go deleted file mode 100644 index 68e09f305..000000000 --- a/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_malware_hash.go +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash struct { -} diff --git a/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go b/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go deleted file mode 100644 index 0107a161c..000000000 --- a/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_malware_url.go +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl struct { -} diff --git a/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go b/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go deleted file mode 100644 index 47e03b671..000000000 --- a/generated/kibanaactions/model_one_ofrun_connector_subaction_pushtoservice_sub_action_params_incident_source_ip.go +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp struct { -} diff --git a/generated/kibanaactions/model_rule_name_mapping.go b/generated/kibanaactions/model_rule_name_mapping.go deleted file mode 100644 index 48f03c2cc..000000000 --- a/generated/kibanaactions/model_rule_name_mapping.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Mapping for the name of the alert's rule. -type RuleNameMapping struct { - // The type of field in Swimlane. - FieldType string `json:"fieldType"` - // The identifier for the field in Swimlane. - Id string `json:"id"` - // The key for the field in Swimlane. - Key string `json:"key"` - // The name of the field in Swimlane. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_run_connector_params_documents.go b/generated/kibanaactions/model_run_connector_params_documents.go deleted file mode 100644 index 2cfa01f1f..000000000 --- a/generated/kibanaactions/model_run_connector_params_documents.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Test an action that indexes a document into Elasticsearch. -type RunConnectorParamsDocuments struct { - // The documents in JSON format for index connectors. - Documents []ModelMap `json:"documents"` -} diff --git a/generated/kibanaactions/model_run_connector_params_level_message.go b/generated/kibanaactions/model_run_connector_params_level_message.go deleted file mode 100644 index ce3b6840c..000000000 --- a/generated/kibanaactions/model_run_connector_params_level_message.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Test an action that writes an entry to the Kibana server log. -type RunConnectorParamsLevelMessage struct { - // The log level of the message for server log connectors. - Level string `json:"level,omitempty"` - // The message for server log connectors. - Message string `json:"message"` -} diff --git a/generated/kibanaactions/model_run_connector_request_body_properties.go b/generated/kibanaactions/model_run_connector_request_body_properties.go deleted file mode 100644 index 89d90f21f..000000000 --- a/generated/kibanaactions/model_run_connector_request_body_properties.go +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The properties vary depending on the connector type. -type RunConnectorRequestBodyProperties struct { - Params *OneOfRunConnectorRequestBodyPropertiesParams `json:"params"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_addevent.go b/generated/kibanaactions/model_run_connector_subaction_addevent.go deleted file mode 100644 index 63d16f0ce..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_addevent.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The `addEvent` subaction for ServiceNow ITOM connectors. -type RunConnectorSubactionAddevent struct { - // The action to test. - SubAction string `json:"subAction"` - SubActionParams *RunConnectorSubactionAddeventSubActionParams `json:"subActionParams,omitempty"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_addevent_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_addevent_sub_action_params.go deleted file mode 100644 index 73dc03f3f..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_addevent_sub_action_params.go +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The set of configuration properties for the action. -type RunConnectorSubactionAddeventSubActionParams struct { - // Additional information about the event. - AdditionalInfo string `json:"additional_info,omitempty"` - // The details about the event. - Description string `json:"description,omitempty"` - // A specific instance of the source. - EventClass string `json:"event_class,omitempty"` - // All actions sharing this key are associated with the same ServiceNow alert. The default value is `:`. - MessageKey string `json:"message_key,omitempty"` - // The name of the metric. - MetricName string `json:"metric_name,omitempty"` - // The host that the event was triggered for. - Node string `json:"node,omitempty"` - // The name of the resource. - Resource string `json:"resource,omitempty"` - // The severity of the event. - Severity string `json:"severity,omitempty"` - // The name of the event source type. - Source string `json:"source,omitempty"` - // The time of the event. - TimeOfEvent string `json:"time_of_event,omitempty"` - // The type of event. - Type_ string `json:"type,omitempty"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_closealert.go b/generated/kibanaactions/model_run_connector_subaction_closealert.go deleted file mode 100644 index 5c56f9b78..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_closealert.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The `closeAlert` subaction for Opsgenie connectors. -type RunConnectorSubactionClosealert struct { - // The action to test. - SubAction string `json:"subAction"` - SubActionParams *RunConnectorSubactionClosealertSubActionParams `json:"subActionParams"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_closealert_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_closealert_sub_action_params.go deleted file mode 100644 index eb5ccbe87..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_closealert_sub_action_params.go +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type RunConnectorSubactionClosealertSubActionParams struct { - // The unique identifier used for alert deduplication in Opsgenie. The alias must match the value used when creating the alert. - Alias string `json:"alias"` - // Additional information for the alert. - Note string `json:"note,omitempty"` - // The display name for the source of the alert. - Source string `json:"source,omitempty"` - // The display name for the owner. - User string `json:"user,omitempty"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_createalert.go b/generated/kibanaactions/model_run_connector_subaction_createalert.go deleted file mode 100644 index bc015b80e..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_createalert.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The `createAlert` subaction for Opsgenie connectors. -type RunConnectorSubactionCreatealert struct { - // The action to test. - SubAction string `json:"subAction"` - SubActionParams *RunConnectorSubactionCreatealertSubActionParams `json:"subActionParams"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params.go deleted file mode 100644 index eadb45b7a..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params.go +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type RunConnectorSubactionCreatealertSubActionParams struct { - // The custom actions available to the alert. - Actions []string `json:"actions,omitempty"` - // The unique identifier used for alert deduplication in Opsgenie. - Alias string `json:"alias,omitempty"` - // A description that provides detailed information about the alert. - Description string `json:"description,omitempty"` - // The custom properties of the alert. - Details ModelMap `json:"details,omitempty"` - // The domain of the alert. For example, the application or server name. - Entity string `json:"entity,omitempty"` - // The alert message. - Message string `json:"message"` - // Additional information for the alert. - Note string `json:"note,omitempty"` - // The priority level for the alert. - Priority string `json:"priority,omitempty"` - // The entities to receive notifications about the alert. If `type` is `user`, either `id` or `username` is required. If `type` is `team`, either `id` or `name` is required. - Responders []RunConnectorSubactionCreatealertSubActionParamsResponders `json:"responders,omitempty"` - // The display name for the source of the alert. - Source string `json:"source,omitempty"` - // The tags for the alert. - Tags []string `json:"tags,omitempty"` - // The display name for the owner. - User string `json:"user,omitempty"` - // The teams and users that the alert will be visible to without sending a notification. Only one of `id`, `name`, or `username` is required. - VisibleTo []RunConnectorSubactionCreatealertSubActionParamsVisibleTo `json:"visibleTo,omitempty"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_responders.go b/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_responders.go deleted file mode 100644 index 37793d081..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_responders.go +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type RunConnectorSubactionCreatealertSubActionParamsResponders struct { - // The identifier for the entity. - Id string `json:"id,omitempty"` - // The name of the entity. - Name string `json:"name,omitempty"` - // The type of responders, in this case `escalation`. - Type_ string `json:"type,omitempty"` - // A valid email address for the user. - Username string `json:"username,omitempty"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_visible_to.go b/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_visible_to.go deleted file mode 100644 index e8c6f2eb1..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_createalert_sub_action_params_visible_to.go +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type RunConnectorSubactionCreatealertSubActionParamsVisibleTo struct { - // The identifier for the entity. - Id string `json:"id,omitempty"` - // The name of the entity. - Name string `json:"name,omitempty"` - // Valid values are `team` and `user`. - Type_ string `json:"type"` - // The user name. This property is required only when the `type` is `user`. - Username string `json:"username,omitempty"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype.go b/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype.go deleted file mode 100644 index e58b6be54..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The `fieldsByIssueType` subaction for Jira connectors. -type RunConnectorSubactionFieldsbyissuetype struct { - // The action to test. - SubAction string `json:"subAction"` - SubActionParams *RunConnectorSubactionFieldsbyissuetypeSubActionParams `json:"subActionParams"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype_sub_action_params.go deleted file mode 100644 index ddd444e86..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_fieldsbyissuetype_sub_action_params.go +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type RunConnectorSubactionFieldsbyissuetypeSubActionParams struct { - // The Jira issue type identifier. - Id string `json:"id"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_getchoices.go b/generated/kibanaactions/model_run_connector_subaction_getchoices.go deleted file mode 100644 index c5aedeb92..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_getchoices.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The `getChoices` subaction for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors. -type RunConnectorSubactionGetchoices struct { - // The action to test. - SubAction string `json:"subAction"` - SubActionParams *RunConnectorSubactionGetchoicesSubActionParams `json:"subActionParams"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_getchoices_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_getchoices_sub_action_params.go deleted file mode 100644 index a5de3b171..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_getchoices_sub_action_params.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The set of configuration properties for the action. -type RunConnectorSubactionGetchoicesSubActionParams struct { - // An array of fields. - Fields []string `json:"fields"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_getfields.go b/generated/kibanaactions/model_run_connector_subaction_getfields.go deleted file mode 100644 index 4f059f850..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_getfields.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The `getFields` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors. -type RunConnectorSubactionGetfields struct { - // The action to test. - SubAction string `json:"subAction"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_getincident.go b/generated/kibanaactions/model_run_connector_subaction_getincident.go deleted file mode 100644 index b8bbbdb9b..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_getincident.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The `getIncident` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors. -type RunConnectorSubactionGetincident struct { - // The action to test. - SubAction string `json:"subAction"` - SubActionParams *RunConnectorSubactionGetincidentSubActionParams `json:"subActionParams"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_getincident_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_getincident_sub_action_params.go deleted file mode 100644 index a2fe77e47..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_getincident_sub_action_params.go +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type RunConnectorSubactionGetincidentSubActionParams struct { - // The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. - ExternalId string `json:"externalId"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_issue.go b/generated/kibanaactions/model_run_connector_subaction_issue.go deleted file mode 100644 index ed83f51fd..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_issue.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The `issue` subaction for Jira connectors. -type RunConnectorSubactionIssue struct { - // The action to test. - SubAction string `json:"subAction"` - SubActionParams *RunConnectorSubactionIssueSubActionParams `json:"subActionParams,omitempty"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_issue_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_issue_sub_action_params.go deleted file mode 100644 index 7b75a9ca5..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_issue_sub_action_params.go +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type RunConnectorSubactionIssueSubActionParams struct { - // The Jira issue identifier. - Id string `json:"id"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_issues.go b/generated/kibanaactions/model_run_connector_subaction_issues.go deleted file mode 100644 index c03adb62b..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_issues.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The `issues` subaction for Jira connectors. -type RunConnectorSubactionIssues struct { - // The action to test. - SubAction string `json:"subAction"` - SubActionParams *RunConnectorSubactionIssuesSubActionParams `json:"subActionParams"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_issues_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_issues_sub_action_params.go deleted file mode 100644 index 0e8f7c5e0..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_issues_sub_action_params.go +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type RunConnectorSubactionIssuesSubActionParams struct { - // The title of the Jira issue. - Title string `json:"title"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_issuetypes.go b/generated/kibanaactions/model_run_connector_subaction_issuetypes.go deleted file mode 100644 index 0ef586e4a..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_issuetypes.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The `issueTypes` subaction for Jira connectors. -type RunConnectorSubactionIssuetypes struct { - // The action to test. - SubAction string `json:"subAction"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice.go deleted file mode 100644 index 3e2a98f94..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_pushtoservice.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The `pushToService` subaction for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors. -type RunConnectorSubactionPushtoservice struct { - // The action to test. - SubAction string `json:"subAction"` - SubActionParams *RunConnectorSubactionPushtoserviceSubActionParams `json:"subActionParams"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params.go deleted file mode 100644 index 35276aaf8..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The set of configuration properties for the action. -type RunConnectorSubactionPushtoserviceSubActionParams struct { - // Additional information that is sent to Jira, ServiceNow ITSM, ServiceNow SecOps, or Swimlane. - Comments []RunConnectorSubactionPushtoserviceSubActionParamsComments `json:"comments,omitempty"` - Incident *RunConnectorSubactionPushtoserviceSubActionParamsIncident `json:"incident,omitempty"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_comments.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_comments.go deleted file mode 100644 index a03d18fbb..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_comments.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type RunConnectorSubactionPushtoserviceSubActionParamsComments struct { - // A comment related to the incident. For example, describe how to troubleshoot the issue. - Comment string `json:"comment,omitempty"` - // A unique identifier for the comment. - CommentId int32 `json:"commentId,omitempty"` -} diff --git a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident.go b/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident.go deleted file mode 100644 index 43e071bcd..000000000 --- a/generated/kibanaactions/model_run_connector_subaction_pushtoservice_sub_action_params_incident.go +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Information necessary to create or update a Jira, ServiceNow ITSM, ServiveNow SecOps, or Swimlane incident. -type RunConnectorSubactionPushtoserviceSubActionParamsIncident struct { - // The alert identifier for Swimlane connectors. - AlertId string `json:"alertId,omitempty"` - // The case identifier for the incident for Swimlane connectors. - CaseId string `json:"caseId,omitempty"` - // The case name for the incident for Swimlane connectors. - CaseName string `json:"caseName,omitempty"` - // The category of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. - Category string `json:"category,omitempty"` - // A descriptive label of the alert for correlation purposes for ServiceNow ITSM and ServiceNow SecOps connectors. - CorrelationDisplay string `json:"correlation_display,omitempty"` - // The correlation identifier for the security incident for ServiceNow ITSM and ServiveNow SecOps connectors. Connectors using the same correlation ID are associated with the same ServiceNow incident. This value determines whether a new ServiceNow incident is created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the correlation ID value in ServiceNow. The maximum character length for this value is 100 characters. NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that ServiceNow creates a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, ServiceNow creates and continually updates a single incident record for the alert. - CorrelationId string `json:"correlation_id,omitempty"` - // The description of the incident for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors. - Description string `json:"description,omitempty"` - // A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. - DestIp *OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp `json:"dest_ip,omitempty"` - // The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. If present, the incident is updated. Otherwise, a new incident is created. - ExternalId string `json:"externalId,omitempty"` - // The impact of the incident for ServiceNow ITSM connectors. - Impact string `json:"impact,omitempty"` - // The type of incident for Jira connectors. For example, 10006. To obtain the list of valid values, set `subAction` to `issueTypes`. - IssueType int32 `json:"issueType,omitempty"` - // The labels for the incident for Jira connectors. NOTE: Labels cannot contain spaces. - Labels []string `json:"labels,omitempty"` - // A list of malware hashes related to the security incident for ServiceNow SecOps connectors. The hashes are added as observables to the security incident. - MalwareHash *OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash `json:"malware_hash,omitempty"` - // A list of malware URLs related to the security incident for ServiceNow SecOps connectors. The URLs are added as observables to the security incident. - MalwareUrl OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareUrl `json:"malware_url,omitempty"` - // The ID or key of the parent issue for Jira connectors. Applies only to `Sub-task` types of issues. - Parent string `json:"parent,omitempty"` - // The priority of the incident in Jira and ServiceNow SecOps connectors. - Priority string `json:"priority,omitempty"` - // The rule name for Swimlane connectors. - RuleName string `json:"ruleName,omitempty"` - // The severity of the incident for ServiceNow ITSM and Swimlane connectors. - Severity string `json:"severity,omitempty"` - // A short description of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. It is used for searching the contents of the knowledge base. - ShortDescription string `json:"short_description,omitempty"` - // A list of source IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. - SourceIp *OneOfrunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp `json:"source_ip,omitempty"` - // The subcategory of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. - Subcategory string `json:"subcategory,omitempty"` - // A summary of the incident for Jira connectors. - Summary string `json:"summary,omitempty"` - // A title for the incident for Jira connectors. It is used for searching the contents of the knowledge base. - Title string `json:"title,omitempty"` - // The urgency of the incident for ServiceNow ITSM connectors. - Urgency string `json:"urgency,omitempty"` -} diff --git a/generated/kibanaactions/model_secrets_properties_cases_webhook.go b/generated/kibanaactions/model_secrets_properties_cases_webhook.go deleted file mode 100644 index f5515fd85..000000000 --- a/generated/kibanaactions/model_secrets_properties_cases_webhook.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type SecretsPropertiesCasesWebhook struct { - // The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. - Password string `json:"password,omitempty"` - // The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. - User string `json:"user,omitempty"` -} diff --git a/generated/kibanaactions/model_secrets_properties_jira.go b/generated/kibanaactions/model_secrets_properties_jira.go deleted file mode 100644 index ee6d51c11..000000000 --- a/generated/kibanaactions/model_secrets_properties_jira.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Defines secrets for connectors when type is `.jira`. -type SecretsPropertiesJira struct { - // The Jira API authentication token for HTTP basic authentication. - ApiToken string `json:"apiToken"` - // The account email for HTTP Basic authentication. - Email string `json:"email"` -} diff --git a/generated/kibanaactions/model_secrets_properties_opsgenie.go b/generated/kibanaactions/model_secrets_properties_opsgenie.go deleted file mode 100644 index e8d12120e..000000000 --- a/generated/kibanaactions/model_secrets_properties_opsgenie.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Defines secrets for connectors when type is `.opsgenie`. -type SecretsPropertiesOpsgenie struct { - // The Opsgenie API authentication key for HTTP Basic authentication. - ApiKey string `json:"apiKey"` -} diff --git a/generated/kibanaactions/model_secrets_properties_resilient.go b/generated/kibanaactions/model_secrets_properties_resilient.go deleted file mode 100644 index a193b6a33..000000000 --- a/generated/kibanaactions/model_secrets_properties_resilient.go +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Defines secrets for connectors when type is `.resilient`. -type SecretsPropertiesResilient struct { - // The authentication key ID for HTTP Basic authentication. - ApiKeyId string `json:"apiKeyId"` - // The authentication key secret for HTTP Basic authentication. - ApiKeySecret string `json:"apiKeySecret"` -} diff --git a/generated/kibanaactions/model_secrets_properties_servicenow.go b/generated/kibanaactions/model_secrets_properties_servicenow.go deleted file mode 100644 index 1cdfd0b39..000000000 --- a/generated/kibanaactions/model_secrets_properties_servicenow.go +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `.servicenow-itom`. -type SecretsPropertiesServicenow struct { - // The client secret assigned to your OAuth application. This property is required when `isOAuth` is `true`. - ClientSecret string `json:"clientSecret,omitempty"` - // The password for HTTP basic authentication. This property is required when `isOAuth` is `false`. - Password string `json:"password,omitempty"` - // The RSA private key that you created for use in ServiceNow. This property is required when `isOAuth` is `true`. - PrivateKey string `json:"privateKey,omitempty"` - // The password for the RSA private key. This property is required when `isOAuth` is `true` and you set a password on your private key. - PrivateKeyPassword string `json:"privateKeyPassword,omitempty"` - // The username for HTTP basic authentication. This property is required when `isOAuth` is `false`. - Username string `json:"username,omitempty"` -} diff --git a/generated/kibanaactions/model_secrets_properties_swimlane.go b/generated/kibanaactions/model_secrets_properties_swimlane.go deleted file mode 100644 index 5a55d951e..000000000 --- a/generated/kibanaactions/model_secrets_properties_swimlane.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Defines secrets for connectors when type is `.swimlane`. -type SecretsPropertiesSwimlane struct { - // Swimlane API authentication token. - ApiToken string `json:"apiToken,omitempty"` -} diff --git a/generated/kibanaactions/model_severity_mapping.go b/generated/kibanaactions/model_severity_mapping.go deleted file mode 100644 index c26bb5c6c..000000000 --- a/generated/kibanaactions/model_severity_mapping.go +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// Mapping for the severity. -type SeverityMapping struct { - // The type of field in Swimlane. - FieldType string `json:"fieldType"` - // The identifier for the field in Swimlane. - Id string `json:"id"` - // The key for the field in Swimlane. - Key string `json:"key"` - // The name of the field in Swimlane. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_unauthorized_response.go b/generated/kibanaactions/model_unauthorized_response.go deleted file mode 100644 index fe1e39e87..000000000 --- a/generated/kibanaactions/model_unauthorized_response.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type UnauthorizedResponse struct { - Error_ string `json:"error,omitempty"` - Message string `json:"message,omitempty"` - StatusCode int32 `json:"statusCode,omitempty"` -} diff --git a/generated/kibanaactions/model_update_connector_request_body_properties.go b/generated/kibanaactions/model_update_connector_request_body_properties.go deleted file mode 100644 index cbac94b27..000000000 --- a/generated/kibanaactions/model_update_connector_request_body_properties.go +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -// The properties vary depending on the connector type. -type UpdateConnectorRequestBodyProperties struct { - UpdateConnectorRequestCasesWebhook - UpdateConnectorRequestIndex - UpdateConnectorRequestJira - UpdateConnectorRequestOpsgenie - UpdateConnectorRequestResilient - UpdateConnectorRequestServerlog - UpdateConnectorRequestServicenow - UpdateConnectorRequestServicenowItom - UpdateConnectorRequestSwimlane -} diff --git a/generated/kibanaactions/model_update_connector_request_cases_webhook.go b/generated/kibanaactions/model_update_connector_request_cases_webhook.go deleted file mode 100644 index 3d47abbc4..000000000 --- a/generated/kibanaactions/model_update_connector_request_cases_webhook.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type UpdateConnectorRequestCasesWebhook struct { - Config *ConfigPropertiesCasesWebhook `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets *SecretsPropertiesCasesWebhook `json:"secrets,omitempty"` -} diff --git a/generated/kibanaactions/model_update_connector_request_index.go b/generated/kibanaactions/model_update_connector_request_index.go deleted file mode 100644 index 1e32405ec..000000000 --- a/generated/kibanaactions/model_update_connector_request_index.go +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type UpdateConnectorRequestIndex struct { - Config *ConfigPropertiesIndex `json:"config"` - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_update_connector_request_jira.go b/generated/kibanaactions/model_update_connector_request_jira.go deleted file mode 100644 index ef3051b37..000000000 --- a/generated/kibanaactions/model_update_connector_request_jira.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type UpdateConnectorRequestJira struct { - Config *ConfigPropertiesJira `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets *SecretsPropertiesJira `json:"secrets"` -} diff --git a/generated/kibanaactions/model_update_connector_request_opsgenie.go b/generated/kibanaactions/model_update_connector_request_opsgenie.go deleted file mode 100644 index 272435980..000000000 --- a/generated/kibanaactions/model_update_connector_request_opsgenie.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type UpdateConnectorRequestOpsgenie struct { - Config *ConfigPropertiesOpsgenie `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets *SecretsPropertiesOpsgenie `json:"secrets"` -} diff --git a/generated/kibanaactions/model_update_connector_request_resilient.go b/generated/kibanaactions/model_update_connector_request_resilient.go deleted file mode 100644 index bc0e3ffa2..000000000 --- a/generated/kibanaactions/model_update_connector_request_resilient.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type UpdateConnectorRequestResilient struct { - Config *ConfigPropertiesResilient `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets *SecretsPropertiesResilient `json:"secrets"` -} diff --git a/generated/kibanaactions/model_update_connector_request_serverlog.go b/generated/kibanaactions/model_update_connector_request_serverlog.go deleted file mode 100644 index 37851361b..000000000 --- a/generated/kibanaactions/model_update_connector_request_serverlog.go +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type UpdateConnectorRequestServerlog struct { - // The display name for the connector. - Name string `json:"name"` -} diff --git a/generated/kibanaactions/model_update_connector_request_servicenow.go b/generated/kibanaactions/model_update_connector_request_servicenow.go deleted file mode 100644 index de8e8210a..000000000 --- a/generated/kibanaactions/model_update_connector_request_servicenow.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type UpdateConnectorRequestServicenow struct { - Config *ConfigPropertiesServicenow `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets *SecretsPropertiesServicenow `json:"secrets"` -} diff --git a/generated/kibanaactions/model_update_connector_request_servicenow_itom.go b/generated/kibanaactions/model_update_connector_request_servicenow_itom.go deleted file mode 100644 index e583a6c27..000000000 --- a/generated/kibanaactions/model_update_connector_request_servicenow_itom.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type UpdateConnectorRequestServicenowItom struct { - Config *ConfigPropertiesServicenowItom `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets *SecretsPropertiesServicenow `json:"secrets"` -} diff --git a/generated/kibanaactions/model_update_connector_request_swimlane.go b/generated/kibanaactions/model_update_connector_request_swimlane.go deleted file mode 100644 index 95bf458da..000000000 --- a/generated/kibanaactions/model_update_connector_request_swimlane.go +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -type UpdateConnectorRequestSwimlane struct { - Config *ConfigPropertiesSwimlane `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets *SecretsPropertiesSwimlane `json:"secrets"` -} diff --git a/generated/kibanaactions/response.go b/generated/kibanaactions/response.go deleted file mode 100644 index 5b96d9e30..000000000 --- a/generated/kibanaactions/response.go +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Connectors - * - * OpenAPI schema for Connectors endpoints - * - * API version: 0.1 - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package kibanaactions - -import ( - "net/http" -) - -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the swagger operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/go.mod b/go.mod index 6a12a80aa..5a5ba7267 100644 --- a/go.mod +++ b/go.mod @@ -3,17 +3,22 @@ module github.com/elastic/terraform-provider-elasticstack go 1.19 require ( - github.com/antihax/optional v1.0.0 github.com/disaster37/go-kibana-rest/v8 v8.5.0 github.com/elastic/go-elasticsearch/v7 v7.17.7 + github.com/go-faster/errors v0.6.1 + github.com/go-faster/jx v1.0.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/terraform-plugin-go v0.15.0 github.com/hashicorp/terraform-plugin-log v0.8.0 github.com/hashicorp/terraform-plugin-mux v0.9.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 + github.com/ogen-go/ogen v0.63.0 github.com/stretchr/testify v1.8.2 - golang.org/x/oauth2 v0.4.0 + go.opentelemetry.io/otel v1.14.0 + go.opentelemetry.io/otel/metric v0.37.0 + go.opentelemetry.io/otel/trace v1.14.0 + go.uber.org/multierr v1.11.0 ) require ( @@ -23,9 +28,9 @@ require ( github.com/dlclark/regexp2 v1.9.0 // indirect github.com/fatih/color v1.15.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-faster/errors v0.6.1 // indirect - github.com/go-faster/jx v1.0.0 // indirect github.com/go-faster/yaml v0.4.5 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/go-cmp v0.5.9 // indirect @@ -52,7 +57,6 @@ require ( github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/ogen-go/ogen v0.63.0 // indirect github.com/oklog/run v1.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/segmentio/asm v1.2.0 // indirect @@ -62,14 +66,15 @@ require ( github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/zclconf/go-cty v1.13.1 // indirect go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/crypto v0.7.0 // indirect golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect golang.org/x/mod v0.10.0 // indirect golang.org/x/net v0.9.0 // indirect + golang.org/x/sync v0.1.0 // indirect golang.org/x/sys v0.7.0 // indirect golang.org/x/text v0.9.0 // indirect + golang.org/x/tools v0.8.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect google.golang.org/grpc v1.54.0 // indirect diff --git a/go.sum b/go.sum index ea512caec..41a087618 100644 --- a/go.sum +++ b/go.sum @@ -11,13 +11,12 @@ github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -32,7 +31,6 @@ github.com/elastic/go-elasticsearch/v7 v7.17.7/go.mod h1:OJ4wdbtDNk5g503kvlHLyEr github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= @@ -54,6 +52,11 @@ github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= @@ -146,7 +149,6 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= @@ -172,6 +174,7 @@ github.com/ogen-go/ogen v0.63.0/go.mod h1:8cZvkJSu85xWMKKgVACenk+bdItsiId46NgA/C github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -212,8 +215,15 @@ github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6e github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zclconf/go-cty v1.13.1 h1:0a6bRwuiSHtAmqCqNOE+c2oHgepv0ctoxU4FUe43kwc= github.com/zclconf/go-cty v1.13.1/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= +go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= +go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= +go.opentelemetry.io/otel/metric v0.37.0 h1:pHDQuLQOZwYD+Km0eb657A25NaRzy0a+eLyKfDXedEs= +go.opentelemetry.io/otel/metric v0.37.0/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s= +go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= +go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= @@ -232,8 +242,6 @@ golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAb golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -244,15 +252,13 @@ golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5o golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= -golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= -golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -275,14 +281,12 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -290,13 +294,13 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= +golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= diff --git a/internal/clients/api_client.go b/internal/clients/api_client.go index bebad7279..e80680e72 100644 --- a/internal/clients/api_client.go +++ b/internal/clients/api_client.go @@ -13,7 +13,7 @@ import ( "github.com/disaster37/go-kibana-rest/v8" "github.com/elastic/go-elasticsearch/v7" "github.com/elastic/terraform-provider-elasticstack/generated/alerting" - "github.com/elastic/terraform-provider-elasticstack/generated/kibanaactions" + "github.com/elastic/terraform-provider-elasticstack/generated/connectors" "github.com/elastic/terraform-provider-elasticstack/internal/models" "github.com/elastic/terraform-provider-elasticstack/internal/utils" "github.com/hashicorp/go-version" @@ -21,6 +21,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/ogen-go/ogen/ogenerrors" ) type CompositeId struct { @@ -63,7 +64,7 @@ type ApiClient struct { elasticsearchClusterInfo *models.ClusterInfo kibana *kibana.Client alerting alerting.AlertingApi - actionConnectors *kibanaactions.ConnectorsApiService + actionConnectors *connectors.Client kibanaConfig kibana.Config version string } @@ -122,7 +123,10 @@ func NewAcceptanceTestingClient() (*ApiClient, error) { return nil, err } - actionConnectors := buildActionConnectorClient(baseConfig, kibanaConfig) + actionConnectors, err := buildActionConnectorClient(baseConfig, kibanaConfig) + if err != nil { + return nil, fmt.Errorf("cannot create Kibana actions client: [%w]", err) + } return &ApiClient{ elasticsearch: es, @@ -194,16 +198,11 @@ func (a *ApiClient) GetAlertingClient() (alerting.AlertingApi, error) { return a.alerting, nil } -func (a *ApiClient) GetKibanaActionConnectorClient(ctx context.Context) (*kibanaactions.ConnectorsApiService, context.Context, error) { +func (a *ApiClient) GetKibanaActionConnectorClient(ctx context.Context) (*connectors.Client, context.Context, error) { if a.actionConnectors == nil { return nil, nil, errors.New("kibana action connector client not found") } - ctx = context.WithValue(ctx, kibanaactions.ContextBasicAuth, kibanaactions.BasicAuth{ - UserName: a.kibanaConfig.Username, - Password: a.kibanaConfig.Password, - }) - return a.actionConnectors, ctx, nil } @@ -521,12 +520,27 @@ func buildAlertingClient(baseConfig BaseConfig, config kibana.Config) *alerting. return alerting.NewAPIClient(&alertingConfig) } -func buildActionConnectorClient(baseConfig BaseConfig, config kibana.Config) *kibanaactions.ConnectorsApiService { - connectorsConfig := kibanaactions.Configuration{ - UserAgent: baseConfig.UserAgent, - BasePath: config.Address, - } - return kibanaactions.NewAPIClient(&connectorsConfig).ConnectorsApi +type SecuritySource struct { + username string + password string +} + +func (sec SecuritySource) ApiKeyAuth(ctx context.Context, operationName string) (connectors.ApiKeyAuth, error) { + return connectors.ApiKeyAuth{}, ogenerrors.ErrSkipClientSecurity +} + +func (sec SecuritySource) BasicAuth(ctx context.Context, operationName string) (connectors.BasicAuth, error) { + return connectors.BasicAuth{ + Username: sec.username, + Password: sec.password, + }, nil +} + +func buildActionConnectorClient(baseConfig BaseConfig, config kibana.Config) (*connectors.Client, error) { + return connectors.NewClient( + config.Address, + SecuritySource{username: config.Username, password: config.Password}, + ) } const esKey string = "elasticsearch" @@ -550,7 +564,10 @@ func newApiClient(d *schema.ResourceData, version string) (*ApiClient, diag.Diag alertingClient := buildAlertingClient(baseConfig, kibanaConfig) - actionConnectorClient := buildActionConnectorClient(baseConfig, kibanaConfig) + actionConnectorClient, err := buildActionConnectorClient(baseConfig, kibanaConfig) + if err != nil { + return nil, diag.FromErr(fmt.Errorf("cannot create Kibana actions client: [%w]", err)) + } return &ApiClient{ elasticsearch: esClient, diff --git a/internal/clients/kibana/action_connector_test.go b/internal/clients/kibana/action_connector_test.go new file mode 100644 index 000000000..a801ef002 --- /dev/null +++ b/internal/clients/kibana/action_connector_test.go @@ -0,0 +1,127 @@ +package kibana + +/* +import ( + "testing" + "time" + + "github.com/elastic/terraform-provider-elasticstack/generated/alerting" + "github.com/elastic/terraform-provider-elasticstack/generated/kibanaactions" + "github.com/elastic/terraform-provider-elasticstack/internal/models" + "github.com/stretchr/testify/require" +) + +func Test_actionConnectorToModel(t *testing.T) { + now := time.Now() + tests := []struct { + name string + spaceId string + connectorResponse *connectors.ConnectorResponseProperties + expectedModel *models.KibanaActionConnector + }{ + { + name: "nil response should return a nil model", + spaceId: "space-id", + connectorResponse: nil, + expectedModel: nil, + }, + { + name: "nil optional fields should not blow up the transform", + spaceId: "space-id", + connectorResponse: &connectors.ConnectorResponseProperties{ + Id: "id", + Name: "name", + Consumer: "consumer", + Params: map[string]interface{}{}, + RuleTypeId: "rule-type-id", + Enabled: true, + Tags: []string{"hello"}, + }, + expectedModel: &models.AlertingRule{ + ID: "id", + SpaceID: "space-id", + Name: "name", + Consumer: "consumer", + Params: map[string]interface{}{}, + RuleTypeID: "rule-type-id", + Enabled: makePtr(true), + Tags: []string{"hello"}, + Actions: []models.AlertingRuleAction{}, + }, + }, + { + name: "a full response should be successfully transformed", + spaceId: "space-id", + connectorResponse: &alerting.RuleResponseProperties{ + Id: "id", + Name: "name", + Consumer: "consumer", + Params: map[string]interface{}{}, + RuleTypeId: "rule-type-id", + Enabled: true, + Tags: []string{"hello"}, + NotifyWhen: makePtr(alerting.NotifyWhen("broken")), + Actions: []alerting.ActionsInner{ + { + Group: makePtr("group-1"), + Id: makePtr("id"), + Params: map[string]interface{}{}, + }, + { + Group: makePtr("group-2"), + Id: makePtr("id"), + Params: map[string]interface{}{}, + }, + }, + ExecutionStatus: alerting.RuleResponsePropertiesExecutionStatus{ + Status: makePtr("firing"), + LastExecutionDate: &now, + }, + ScheduledTaskId: makePtr("scheduled-task-id"), + Schedule: alerting.Schedule{ + Interval: makePtr("1m"), + }, + Throttle: *alerting.NewNullableString(makePtr("throttle")), + }, + expectedModel: &models.AlertingRule{ + ID: "id", + SpaceID: "space-id", + Name: "name", + Consumer: "consumer", + Params: map[string]interface{}{}, + RuleTypeID: "rule-type-id", + Enabled: makePtr(true), + Tags: []string{"hello"}, + NotifyWhen: "broken", + Schedule: models.AlertingRuleSchedule{Interval: "1m"}, + Throttle: makePtr("throttle"), + ScheduledTaskID: makePtr("scheduled-task-id"), + ExecutionStatus: models.AlertingRuleExecutionStatus{ + LastExecutionDate: &now, + Status: makePtr("firing"), + }, + Actions: []models.AlertingRuleAction{ + models.AlertingRuleAction{ + Group: "group-1", + ID: "id", + Params: map[string]interface{}{}, + }, + models.AlertingRuleAction{ + Group: "group-2", + ID: "id", + Params: map[string]interface{}{}, + }, + }, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + model := ruleResponseToModel(tt.spaceId, tt.connectorResponse) + + require.Equal(t, tt.expectedModel, model) + }) + } +} +*/ diff --git a/internal/clients/kibana/action_connector.go b/internal/clients/kibana/connector.go similarity index 59% rename from internal/clients/kibana/action_connector.go rename to internal/clients/kibana/connector.go index 61e1ba43a..6c82b59ae 100644 --- a/internal/clients/kibana/action_connector.go +++ b/internal/clients/kibana/connector.go @@ -2,15 +2,11 @@ package kibana import ( "context" - "encoding/json" - "errors" "fmt" - "net/http" - "github.com/elastic/terraform-provider-elasticstack/generated/kibanaactions" + "github.com/elastic/terraform-provider-elasticstack/generated/connectors" "github.com/elastic/terraform-provider-elasticstack/internal/clients" "github.com/elastic/terraform-provider-elasticstack/internal/models" - "github.com/elastic/terraform-provider-elasticstack/internal/utils" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" ) @@ -25,25 +21,17 @@ func CreateActionConnector(ctx context.Context, apiClient *clients.ApiClient, co return "", diag.FromErr(err) } - responseProperties, httpRes, err := client.CreateConnector(ctxWithAuth, createProperties, "true", connectorOld.SpaceID) + response, err := client.CreateConnector(ctxWithAuth, createProperties, connectors.CreateConnectorParams{KbnXSRF: "true", SpaceId: connectorOld.SpaceID}) if err != nil { - var swagErr kibanaactions.GenericSwaggerError - if errors.As(err, &swagErr) { - return "", diag.FromErr(fmt.Errorf("%s", string(swagErr.Body()))) - } - return "", diag.FromErr(err) + return "", diag.FromErr(fmt.Errorf("create connector failed: [%w]", err)) } - defer httpRes.Body.Close() - - // if diags := utils.CheckHttpError(httpRes, "Unabled to create action connector"); diags.HasError() { - // return "", diag.FromErr(err) - // } - // if err != nil { - // return "", diag.FromErr(err) - // } + properties, ok := response.(*connectors.ConnectorResponseProperties) + if !ok { + return "", diag.FromErr(fmt.Errorf("failed to parse create response [%+v]", response)) + } - connectorNew, err := actionConnectorToModel(connectorOld.SpaceID, responseProperties, connectorOld.ConnectorID) + connectorNew, err := actionConnectorToModel(connectorOld.SpaceID, *properties) if err != nil { return "", diag.FromErr(err) } @@ -62,17 +50,28 @@ func UpdateActionConnector(ctx context.Context, apiClient *clients.ApiClient, co return "", diag.FromErr(err) } - responseProperties, httpRes, err := client.UpdateConnector(ctxWithAuth, updateProperties, "true", connectorOld.ConnectorID, connectorOld.SpaceID) - if err != nil && httpRes == nil { + response, err := client.UpdateConnector( + ctxWithAuth, + updateProperties, + connectors.UpdateConnectorParams{ + KbnXSRF: "true", + ConnectorId: connectorOld.ConnectorID, + SpaceId: connectorOld.SpaceID, + }, + ) + + + + if err != nil { return "", diag.FromErr(err) } - defer httpRes.Body.Close() - if diags := utils.CheckHttpError(httpRes, "Unabled to update action connector"); diags.HasError() { - return "", diags + properties, ok := response.(*connectors.ConnectorResponseProperties) + if !ok { + return "", diag.FromErr(fmt.Errorf("failed to parse update response [%+v]", response)) } - connectorNew, err := actionConnectorToModel(connectorOld.SpaceID, responseProperties, connectorOld.ConnectorTypeID) + connectorNew, err := actionConnectorToModel(connectorOld.SpaceID, *properties) if err != nil { return "", diag.FromErr(err) } @@ -86,21 +85,18 @@ func GetActionConnector(ctx context.Context, apiClient *clients.ApiClient, conne return nil, diag.FromErr(err) } - properties, res, err := client.GetConnector(ctxWithAuth, connectorID, spaceID) - if err != nil && res == nil { - return nil, diag.FromErr(err) - } - defer res.Body.Close() + response, err := client.GetConnector(ctxWithAuth, connectors.GetConnectorParams{ConnectorId: connectorID, SpaceId: spaceID}) - if res.StatusCode == http.StatusNotFound { - return nil, nil + if err != nil { + return nil, diag.FromErr(err) } - if diags := utils.CheckHttpError(res, "Unabled to get action connector"); diags.HasError() { - return nil, diags + properties, ok := response.(*connectors.ConnectorResponseProperties) + if !ok { + return nil, diag.FromErr(fmt.Errorf("failed to parse get response [%+v]", response)) } - connector, err := actionConnectorToModel(spaceID, properties, connectorTypeID) + connector, err := actionConnectorToModel(spaceID, *properties) if err != nil { return nil, diag.FromErr(err) } @@ -114,640 +110,648 @@ func DeleteActionConnector(ctx context.Context, apiClient *clients.ApiClient, co return diag.FromErr(err) } - res, err := client.DeleteConnector(ctxWithAuth, "true", connectorID, spaceID) - if err != nil && res == nil { + _, err = client.DeleteConnector(ctxWithAuth, connectors.DeleteConnectorParams{KbnXSRF: "true", ConnectorId: connectorID, SpaceId: spaceID}) + + if err != nil { return diag.FromErr(err) } - defer res.Body.Close() - return utils.CheckHttpError(res, "Unabled to delete action connector") + return nil } -func createConnectorRequestBodyProperties(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { - switch kibanaactions.ConnectorTypes(connector.ConnectorTypeID) { - // case kibanaactions.CASES_WEBHOOK_ConnectorTypes: +func createConnectorRequestBodyProperties(connector models.KibanaActionConnector) (connectors.CreateConnectorReq, error) { + switch connectors.ConnectorTypes(connector.ConnectorTypeID) { + // case connectors.CASES_WEBHOOK_ConnectorTypes: // return createConnectorRequestCasesWebhook(connector) - // case kibanaactions.EMAIL_ConnectorTypes: + // case connectors.EMAIL_ConnectorTypes: // return createConnectorRequestEmail(connector) - case kibanaactions.INDEX_ConnectorTypes: + case connectors.ConnectorTypesDotIndex: return createConnectorRequestIndex(connector) - // case kibanaactions.JIRA_ConnectorTypes: + // case connectors.JIRA_ConnectorTypes: // return createConnectorRequestJira(connector) - // case kibanaactions.OPSGENIE_ConnectorTypes: + // case connectors.OPSGENIE_ConnectorTypes: // return createConnectorRequestOpsgenie(connector) - // case kibanaactions.PAGERDUTY: + // case connectors.PAGERDUTY: // return createConnectorRequestPagerduty(connector) - // case kibanaactions.RESILIENT_ConnectorTypes: + // case connectors.RESILIENT_ConnectorTypes: // return createConnectorRequestResilient(connector) - // case kibanaactions.SERVICENOW_ConnectorTypes: + // case connectors.SERVICENOW_ConnectorTypes: // return createConnectorRequestServicenow(connector) - // case kibanaactions.SERVICENOW_ITOM_ConnectorTypes: + // case connectors.SERVICENOW_ITOM_ConnectorTypes: // return createConnectorRequestServicenowItom(connector) - // case kibanaactions.SERVICENOW_SIR: + // case connectors.SERVICENOW_SIR: // return createConnectorRequestServicenowSir(connector) - // case kibanaactions.SERVER_LOG_ConnectorTypes: + // case connectors.SERVER_LOG_ConnectorTypes: // return createConnectorRequestServerLog(connector) - // case kibanaactions.SLACK: + // case connectors.SLACK: // return createConnectorRequestSlack(connector) - // case kibanaactions.SWIMLANE_ConnectorTypes: + // case connectors.SWIMLANE_ConnectorTypes: // return createConnectorRequestSwimlane(connector) - // case kibanaactions.TEAMS: + // case connectors.TEAMS: // return createConnectorRequestTeams(connector) - // case kibanaactions.TINES: + // case connectors.TINES: // return createConnectorRequestTines(connector) - // case kibanaactions.WEBHOOK: + // case connectors.WEBHOOK: // return createConnectorRequestWebhook(connector) - // case kibanaactions.XMATTERS: + // case connectors.XMATTERS: // return createConnectorRequestXmatters(connector) } - return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("unknown connector type [%s]", connector.ConnectorTypeID) + return connectors.CreateConnectorReq{}, fmt.Errorf("unknown connector type [%s]", connector.ConnectorTypeID) } -func updateConnectorRequestBodyProperties(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { - switch kibanaactions.ConnectorTypes(connector.ConnectorTypeID) { - // case kibanaactions.CASES_WEBHOOK: +func updateConnectorRequestBodyProperties(connector models.KibanaActionConnector) (connectors.UpdateConnectorReq, error) { + switch connectors.ConnectorTypes(connector.ConnectorTypeID) { + // case connectors.CASES_WEBHOOK: // return updateConnectorRequestCasesWebhook(connector) - // case kibanaactions.EMAIL: + // case connectors.EMAIL: // return updateConnectorRequestEmail(connector) - case kibanaactions.INDEX_ConnectorTypes: + case connectors.ConnectorTypesDotIndex: return updateConnectorRequestIndex(connector) - // case kibanaactions.JIRA: + // case connectors.JIRA: // return updateConnectorRequestJira(connector) - // case kibanaactions.OPSGENIE: + // case connectors.OPSGENIE: // return updateConnectorRequestOpsgenie(connector) - // case kibanaactions.PAGERDUTY: + // case connectors.PAGERDUTY: // return updateConnectorRequestPagerduty(connector) - // case kibanaactions.RESILIENT: + // case connectors.RESILIENT: // return updateConnectorRequestResilient(connector) - // case kibanaactions.SERVICENOW: + // case connectors.SERVICENOW: // return updateConnectorRequestServicenow(connector) - // case kibanaactions.SERVICENOW_ITOM: + // case connectors.SERVICENOW_ITOM: // return updateConnectorRequestServicenowItom(connector) - // case kibanaactions.SERVICENOW_SIR: + // case connectors.SERVICENOW_SIR: // return updateConnectorRequestServicenowSir(connector) - // case kibanaactions.SERVER_LOG: + // case connectors.SERVER_LOG: // return updateConnectorRequestServerLog(connector) - // case kibanaactions.SLACK: + // case connectors.SLACK: // return updateConnectorRequestSlack(connector) - // case kibanaactions.SWIMLANE: + // case connectors.SWIMLANE: // return updateConnectorRequestSwimlane(connector) - // case kibanaactions.TEAMS: + // case connectors.TEAMS: // return updateConnectorRequestTeams(connector) - // case kibanaactions.TINES: + // case connectors.TINES: // return updateConnectorRequestTines(connector) - // case kibanaactions.WEBHOOK: + // case connectors.WEBHOOK: // return updateConnectorRequestWebhook(connector) - // case kibanaactions.XMATTERS: + // case connectors.XMATTERS: // return updateConnectorRequestXmatters(connector) } - return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("unknown connector type [%s]", connector.ConnectorTypeID) + return connectors.UpdateConnectorReq{}, fmt.Errorf("unknown connector type [%s]", connector.ConnectorTypeID) } -// func createConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// func createConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for CasesWebhook" -// config := kibanaactions.NullableConfigPropertiesCasesWebhook{} +// config := connectors.NullableConfigPropertiesCasesWebhook{} // if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } -// secrets := kibanaactions.NullableSecretsPropertiesCasesWebhook{} +// secrets := connectors.NullableSecretsPropertiesCasesWebhook{} // if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.CreateConnectorRequestCasesWebhook{ +// c := connectors.CreateConnectorRequestCasesWebhook{ // ConnectorTypeId: connector.ConnectorTypeID, // Name: connector.Name, // Config: *config.Get(), // Secrets: secrets.Get(), // } -// return kibanaactions.CreateConnectorRequestCasesWebhookAsCreateConnectorRequestBodyProperties(&c), nil +// return connectors.CreateConnectorRequestCasesWebhookAsCreateConnectorRequestBodyProperties(&c), nil // } -// func createConnectorRequestEmail(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// func createConnectorRequestEmail(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for Email" // var config map[string]interface{} // if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } // var secrets map[string]interface{} // if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.CreateConnectorRequestEmail{ +// c := connectors.CreateConnectorRequestEmail{ // ConnectorTypeId: connector.ConnectorTypeID, // Name: connector.Name, // Config: config, // Secrets: secrets, // } -// return kibanaactions.CreateConnectorRequestEmailAsCreateConnectorRequestBodyProperties(&c), nil +// return connectors.CreateConnectorRequestEmailAsCreateConnectorRequestBodyProperties(&c), nil // } -func createConnectorRequestIndex(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +func createConnectorRequestIndex(connector models.KibanaActionConnector) (connectors.CreateConnectorReq, error) { prefixError := "failed to compose create connector request for Index" - var config kibanaactions.ConfigPropertiesIndex + config := &connectors.ConfigPropertiesIndex{} - if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { - return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) + if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + return connectors.CreateConnectorReq{}, fmt.Errorf("%s: failed to unmarshal [config]: %w", prefixError, err) } - return kibanaactions.CreateConnectorRequestBodyProperties{ - CreateConnectorRequestIndex: kibanaactions.CreateConnectorRequestIndex{ - ConnectorTypeId: connector.ConnectorTypeID, - Name: connector.Name, - Config: &config, + res := connectors.CreateConnectorReq{} + + res.SetCreateConnectorRequestIndex( + connectors.CreateConnectorRequestIndex{ + Name: connector.Name, + Config: *config, }, - }, nil + ) + + return res, nil } -// func createConnectorRequestJira(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// func createConnectorRequestJira(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for Jira" -// config := kibanaactions.NullableConfigPropertiesJira{} +// config := connectors.NullableConfigPropertiesJira{} // if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } -// secrets := kibanaactions.NullableSecretsPropertiesJira{} +// secrets := connectors.NullableSecretsPropertiesJira{} // if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.CreateConnectorRequestJira{ +// c := connectors.CreateConnectorRequestJira{ // ConnectorTypeId: connector.ConnectorTypeID, // Name: connector.Name, // Config: *config.Get(), // Secrets: *secrets.Get(), // } -// return kibanaactions.CreateConnectorRequestJiraAsCreateConnectorRequestBodyProperties(&c), nil +// return connectors.CreateConnectorRequestJiraAsCreateConnectorRequestBodyProperties(&c), nil // } -// func createConnectorRequestOpsgenie(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// func createConnectorRequestOpsgenie(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for Opsgenie" -// config := kibanaactions.NullableConfigPropertiesOpsgenie{} +// config := connectors.NullableConfigPropertiesOpsgenie{} // if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } -// secrets := kibanaactions.NullableSecretsPropertiesOpsgenie{} +// secrets := connectors.NullableSecretsPropertiesOpsgenie{} // if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.CreateConnectorRequestOpsgenie{ +// c := connectors.CreateConnectorRequestOpsgenie{ // ConnectorTypeId: connector.ConnectorTypeID, // Name: connector.Name, // Config: *config.Get(), // Secrets: *secrets.Get(), // } -// return kibanaactions.CreateConnectorRequestOpsgenieAsCreateConnectorRequestBodyProperties(&c), nil +// return connectors.CreateConnectorRequestOpsgenieAsCreateConnectorRequestBodyProperties(&c), nil // } -// func createConnectorRequestPagerduty(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// func createConnectorRequestPagerduty(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for PagerDuty" // var config map[string]interface{} // if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } // var secrets map[string]interface{} // if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.CreateConnectorRequestPagerduty{ +// c := connectors.CreateConnectorRequestPagerduty{ // ConnectorTypeId: connector.ConnectorTypeID, // Name: connector.Name, // Config: config, // Secrets: secrets, // } -// return kibanaactions.CreateConnectorRequestPagerdutyAsCreateConnectorRequestBodyProperties(&c), nil +// return connectors.CreateConnectorRequestPagerdutyAsCreateConnectorRequestBodyProperties(&c), nil // } -// func createConnectorRequestResilient(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// func createConnectorRequestResilient(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for Resilient" -// config := kibanaactions.NullableConfigPropertiesResilient{} +// config := connectors.NullableConfigPropertiesResilient{} // if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } -// secrets := kibanaactions.NullableSecretsPropertiesResilient{} +// secrets := connectors.NullableSecretsPropertiesResilient{} // if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.CreateConnectorRequestResilient{ +// c := connectors.CreateConnectorRequestResilient{ // ConnectorTypeId: connector.ConnectorTypeID, // Name: connector.Name, // Config: *config.Get(), // Secrets: *secrets.Get(), // } -// return kibanaactions.CreateConnectorRequestResilientAsCreateConnectorRequestBodyProperties(&c), nil +// return connectors.CreateConnectorRequestResilientAsCreateConnectorRequestBodyProperties(&c), nil // } -// func createConnectorRequestServicenow(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// func createConnectorRequestServicenow(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for Servicenow" -// config := kibanaactions.NullableConfigPropertiesServicenow{} +// config := connectors.NullableConfigPropertiesServicenow{} // if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } -// secrets := kibanaactions.NullableSecretsPropertiesServicenow{} +// secrets := connectors.NullableSecretsPropertiesServicenow{} // if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.CreateConnectorRequestServicenow{ +// c := connectors.CreateConnectorRequestServicenow{ // ConnectorTypeId: connector.ConnectorTypeID, // Name: connector.Name, // Config: *config.Get(), // Secrets: *secrets.Get(), // } -// return kibanaactions.CreateConnectorRequestServicenowAsCreateConnectorRequestBodyProperties(&c), nil +// return connectors.CreateConnectorRequestServicenowAsCreateConnectorRequestBodyProperties(&c), nil // } -// func createConnectorRequestServicenowItom(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// func createConnectorRequestServicenowItom(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for ServicenowItom" -// config := kibanaactions.NullableConfigPropertiesServicenowItom{} +// config := connectors.NullableConfigPropertiesServicenowItom{} // if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } -// secrets := kibanaactions.NullableSecretsPropertiesServicenow{} +// secrets := connectors.NullableSecretsPropertiesServicenow{} // if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.CreateConnectorRequestServicenowItom{ +// c := connectors.CreateConnectorRequestServicenowItom{ // ConnectorTypeId: connector.ConnectorTypeID, // Name: connector.Name, // Config: *config.Get(), // Secrets: *secrets.Get(), // } -// return kibanaactions.CreateConnectorRequestServicenowItomAsCreateConnectorRequestBodyProperties(&c), nil +// return connectors.CreateConnectorRequestServicenowItomAsCreateConnectorRequestBodyProperties(&c), nil // } -// func createConnectorRequestServicenowSir(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// func createConnectorRequestServicenowSir(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for ServicenowSir" -// config := kibanaactions.NullableConfigPropertiesServicenow{} +// config := connectors.NullableConfigPropertiesServicenow{} // if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } -// secrets := kibanaactions.NullableSecretsPropertiesServicenow{} +// secrets := connectors.NullableSecretsPropertiesServicenow{} // if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.CreateConnectorRequestServicenowSir{ +// c := connectors.CreateConnectorRequestServicenowSir{ // ConnectorTypeId: connector.ConnectorTypeID, // Name: connector.Name, // Config: *config.Get(), // Secrets: *secrets.Get(), // } -// return kibanaactions.CreateConnectorRequestServicenowSirAsCreateConnectorRequestBodyProperties(&c), nil +// return connectors.CreateConnectorRequestServicenowSirAsCreateConnectorRequestBodyProperties(&c), nil // } -// func createConnectorRequestServerLog(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { -// c := kibanaactions.CreateConnectorRequestServerlog{ +// func createConnectorRequestServerLog(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { +// c := connectors.CreateConnectorRequestServerlog{ // ConnectorTypeId: connector.ConnectorTypeID, // Name: connector.Name, // } -// return kibanaactions.CreateConnectorRequestServerlogAsCreateConnectorRequestBodyProperties(&c), nil +// return connectors.CreateConnectorRequestServerlogAsCreateConnectorRequestBodyProperties(&c), nil // } -// func createConnectorRequestSlack(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// func createConnectorRequestSlack(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for Slack" // var secrets map[string]interface{} // if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.CreateConnectorRequestSlack{ +// c := connectors.CreateConnectorRequestSlack{ // ConnectorTypeId: connector.ConnectorTypeID, // Name: connector.Name, // Secrets: secrets, // } -// return kibanaactions.CreateConnectorRequestSlackAsCreateConnectorRequestBodyProperties(&c), nil +// return connectors.CreateConnectorRequestSlackAsCreateConnectorRequestBodyProperties(&c), nil // } -// func createConnectorRequestSwimlane(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// func createConnectorRequestSwimlane(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for Swimlane" -// config := kibanaactions.NullableConfigPropertiesSwimlane{} +// config := connectors.NullableConfigPropertiesSwimlane{} // if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } -// secrets := kibanaactions.NullableSecretsPropertiesSwimlane{} +// secrets := connectors.NullableSecretsPropertiesSwimlane{} // if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.CreateConnectorRequestSwimlane{ +// c := connectors.CreateConnectorRequestSwimlane{ // ConnectorTypeId: connector.ConnectorTypeID, // Name: connector.Name, // Config: *config.Get(), // Secrets: *secrets.Get(), // } -// return kibanaactions.CreateConnectorRequestSwimlaneAsCreateConnectorRequestBodyProperties(&c), nil +// return connectors.CreateConnectorRequestSwimlaneAsCreateConnectorRequestBodyProperties(&c), nil // } -// func createConnectorRequestTeams(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// func createConnectorRequestTeams(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for Teams" // var secrets map[string]interface{} // if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.CreateConnectorRequestTeams{ +// c := connectors.CreateConnectorRequestTeams{ // ConnectorTypeId: connector.ConnectorTypeID, // Name: connector.Name, // Secrets: secrets, // } -// return kibanaactions.CreateConnectorRequestTeamsAsCreateConnectorRequestBodyProperties(&c), nil +// return connectors.CreateConnectorRequestTeamsAsCreateConnectorRequestBodyProperties(&c), nil // } -// func createConnectorRequestTines(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// func createConnectorRequestTines(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for Tines" // var config map[string]interface{} // if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } // var secrets map[string]interface{} // if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.CreateConnectorRequestTines{ +// c := connectors.CreateConnectorRequestTines{ // ConnectorTypeId: connector.ConnectorTypeID, // Name: connector.Name, // Config: config, // Secrets: secrets, // } -// return kibanaactions.CreateConnectorRequestTinesAsCreateConnectorRequestBodyProperties(&c), nil +// return connectors.CreateConnectorRequestTinesAsCreateConnectorRequestBodyProperties(&c), nil // } -// func createConnectorRequestWebhook(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// func createConnectorRequestWebhook(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for Webhook" // var config map[string]interface{} // if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } // var secrets map[string]interface{} // if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.CreateConnectorRequestWebhook{ +// c := connectors.CreateConnectorRequestWebhook{ // ConnectorTypeId: connector.ConnectorTypeID, // Name: connector.Name, // Config: config, // Secrets: secrets, // } -// return kibanaactions.CreateConnectorRequestWebhookAsCreateConnectorRequestBodyProperties(&c), nil +// return connectors.CreateConnectorRequestWebhookAsCreateConnectorRequestBodyProperties(&c), nil // } -// func createConnectorRequestXmatters(connector models.KibanaActionConnector) (kibanaactions.CreateConnectorRequestBodyProperties, error) { +// func createConnectorRequestXmatters(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose create connector request for Xmatters" // var config map[string]interface{} // if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } // var secrets map[string]interface{} // if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { -// return kibanaactions.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.CreateConnectorRequestXmatters{ +// c := connectors.CreateConnectorRequestXmatters{ // ConnectorTypeId: connector.ConnectorTypeID, // Name: connector.Name, // Config: config, // Secrets: secrets, // } -// return kibanaactions.CreateConnectorRequestXmattersAsCreateConnectorRequestBodyProperties(&c), nil +// return connectors.CreateConnectorRequestXmattersAsCreateConnectorRequestBodyProperties(&c), nil // } -// func updateConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { +// func updateConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (connectors.UpdateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose update connector request for CasesWebhook" -// nullableConfig := kibanaactions.NullableConfigPropertiesCasesWebhook{} +// nullableConfig := connectors.NullableConfigPropertiesCasesWebhook{} // if err := nullableConfig.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } -// nullableSecrets := kibanaactions.NullableSecretsPropertiesCasesWebhook{} +// nullableSecrets := connectors.NullableSecretsPropertiesCasesWebhook{} // if err := nullableSecrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// return kibanaactions.UpdateConnectorRequestBodyProperties { -// kibanaactions.UpdateConnectorRequestCasesWebhook{ +// return connectors.UpdateConnectorRequestBodyProperties { +// connectors.UpdateConnectorRequestCasesWebhook{ // Name: connector.Name, // Config: *nullableConfig.Get(), // Secrets: nullableSecrets.Get(), // } -// return kibanaactions.UpdateConnectorRequestCasesWebhookAsUpdateConnectorRequestBodyProperties(&c), nil +// return connectors.UpdateConnectorRequestCasesWebhookAsUpdateConnectorRequestBodyProperties(&c), nil // } -func updateConnectorRequestIndex(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { +func updateConnectorRequestIndex(connector models.KibanaActionConnector) (connectors.UpdateConnectorReq, error) { prefixError := "failed to compose update connector request for Index" - var config kibanaactions.ConfigPropertiesIndex - if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { - return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) + config := &connectors.ConfigPropertiesIndex{} + + if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { + return connectors.UpdateConnectorReq{}, fmt.Errorf("%s: failed to unmarshal [config]: %w", prefixError, err) } - return kibanaactions.UpdateConnectorRequestBodyProperties{ - UpdateConnectorRequestIndex: kibanaactions.UpdateConnectorRequestIndex{ + res := connectors.UpdateConnectorReq{} + + res.SetUpdateConnectorRequestIndex( + connectors.UpdateConnectorRequestIndex{ Name: connector.Name, - Config: &config, + Config: *config, }, - }, nil + ) + + return res, nil } -// func updateConnectorRequestJira(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { +// func updateConnectorRequestJira(connector models.KibanaActionConnector) (connectors.UpdateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose update connector request for Jira" -// config := kibanaactions.NullableConfigPropertiesJira{} +// config := connectors.NullableConfigPropertiesJira{} // if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } -// secrets := kibanaactions.NullableSecretsPropertiesJira{} +// secrets := connectors.NullableSecretsPropertiesJira{} // if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.UpdateConnectorRequestJira{ +// c := connectors.UpdateConnectorRequestJira{ // Name: connector.Name, // Config: *config.Get(), // Secrets: *secrets.Get(), // } -// return kibanaactions.UpdateConnectorRequestJiraAsUpdateConnectorRequestBodyProperties(&c), nil +// return connectors.UpdateConnectorRequestJiraAsUpdateConnectorRequestBodyProperties(&c), nil // } -// func updateConnectorRequestOpsgenie(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { +// func updateConnectorRequestOpsgenie(connector models.KibanaActionConnector) (connectors.UpdateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose update connector request for Opsgenie" -// config := kibanaactions.NullableConfigPropertiesOpsgenie{} +// config := connectors.NullableConfigPropertiesOpsgenie{} // if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } -// secrets := kibanaactions.NullableSecretsPropertiesOpsgenie{} +// secrets := connectors.NullableSecretsPropertiesOpsgenie{} // if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.UpdateConnectorRequestOpsgenie{ +// c := connectors.UpdateConnectorRequestOpsgenie{ // Name: connector.Name, // Config: *config.Get(), // Secrets: *secrets.Get(), // } -// return kibanaactions.UpdateConnectorRequestOpsgenieAsUpdateConnectorRequestBodyProperties(&c), nil +// return connectors.UpdateConnectorRequestOpsgenieAsUpdateConnectorRequestBodyProperties(&c), nil // } -// func updateConnectorRequestResilient(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { +// func updateConnectorRequestResilient(connector models.KibanaActionConnector) (connectors.UpdateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose update connector request for Resilient" -// config := kibanaactions.NullableConfigPropertiesResilient{} +// config := connectors.NullableConfigPropertiesResilient{} // if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } -// secrets := kibanaactions.NullableSecretsPropertiesResilient{} +// secrets := connectors.NullableSecretsPropertiesResilient{} // if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.UpdateConnectorRequestResilient{ +// c := connectors.UpdateConnectorRequestResilient{ // Name: connector.Name, // Config: *config.Get(), // Secrets: *secrets.Get(), // } -// return kibanaactions.UpdateConnectorRequestResilientAsUpdateConnectorRequestBodyProperties(&c), nil +// return connectors.UpdateConnectorRequestResilientAsUpdateConnectorRequestBodyProperties(&c), nil // } -// func updateConnectorRequestServicenow(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { +// func updateConnectorRequestServicenow(connector models.KibanaActionConnector) (connectors.UpdateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose update connector request for Servicenow" -// config := kibanaactions.NullableConfigPropertiesServicenow{} +// config := connectors.NullableConfigPropertiesServicenow{} // if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } -// secrets := kibanaactions.NullableSecretsPropertiesServicenow{} +// secrets := connectors.NullableSecretsPropertiesServicenow{} // if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.UpdateConnectorRequestServicenow{ +// c := connectors.UpdateConnectorRequestServicenow{ // Name: connector.Name, // Config: *config.Get(), // Secrets: *secrets.Get(), // } -// return kibanaactions.UpdateConnectorRequestServicenowAsUpdateConnectorRequestBodyProperties(&c), nil +// return connectors.UpdateConnectorRequestServicenowAsUpdateConnectorRequestBodyProperties(&c), nil // } -// func updateConnectorRequestServicenowItom(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { +// func updateConnectorRequestServicenowItom(connector models.KibanaActionConnector) (connectors.UpdateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose update connector request for ServicenowItom" -// config := kibanaactions.NullableConfigPropertiesServicenowItom{} +// config := connectors.NullableConfigPropertiesServicenowItom{} // if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } -// secrets := kibanaactions.NullableSecretsPropertiesServicenow{} +// secrets := connectors.NullableSecretsPropertiesServicenow{} // if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.UpdateConnectorRequestServicenowItom{ +// c := connectors.UpdateConnectorRequestServicenowItom{ // Name: connector.Name, // Config: *config.Get(), // Secrets: *secrets.Get(), // } -// return kibanaactions.UpdateConnectorRequestServicenowItomAsUpdateConnectorRequestBodyProperties(&c), nil +// return connectors.UpdateConnectorRequestServicenowItomAsUpdateConnectorRequestBodyProperties(&c), nil // } -// func updateConnectorRequestServerLog(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { -// c := kibanaactions.UpdateConnectorRequestServerlog{ +// func updateConnectorRequestServerLog(connector models.KibanaActionConnector) (connectors.UpdateConnectorRequestBodyProperties, error) { +// c := connectors.UpdateConnectorRequestServerlog{ // Name: connector.Name, // } -// return kibanaactions.UpdateConnectorRequestServerlogAsUpdateConnectorRequestBodyProperties(&c), nil +// return connectors.UpdateConnectorRequestServerlogAsUpdateConnectorRequestBodyProperties(&c), nil // } -// func updateConnectorRequestSwimlane(connector models.KibanaActionConnector) (kibanaactions.UpdateConnectorRequestBodyProperties, error) { +// func updateConnectorRequestSwimlane(connector models.KibanaActionConnector) (connectors.UpdateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose update connector request for Swimlane" -// config := kibanaactions.NullableConfigPropertiesSwimlane{} +// config := connectors.NullableConfigPropertiesSwimlane{} // if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) +// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) // } -// secrets := kibanaactions.NullableSecretsPropertiesSwimlane{} +// secrets := connectors.NullableSecretsPropertiesSwimlane{} // if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return kibanaactions.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) +// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) // } -// c := kibanaactions.UpdateConnectorRequestSwimlane{ +// c := connectors.UpdateConnectorRequestSwimlane{ // Name: connector.Name, // Config: *config.Get(), // Secrets: *secrets.Get(), // } -// return kibanaactions.UpdateConnectorRequestSwimlaneAsUpdateConnectorRequestBodyProperties(&c), nil +// return connectors.UpdateConnectorRequestSwimlaneAsUpdateConnectorRequestBodyProperties(&c), nil // } -func actionConnectorToModel(spaceID string, properties kibanaactions.ConnectorResponseProperties, connectorTypeID string) (*models.KibanaActionConnector, error) { - switch kibanaactions.ConnectorTypes(connectorTypeID) { +func actionConnectorToModel(spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + switch properties.Type { - // case kibanaactions.CASES_WEBHOOK_ConnectorTypes: + // case connectors.CASES_WEBHOOK_ConnectorTypes: // config, err := response.GetConfig().MarshalJSON() // if err != nil { // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) @@ -766,7 +770,7 @@ func actionConnectorToModel(spaceID string, properties kibanaactions.ConnectorRe // } // return &connector, nil - // case *kibanaactions.ConnectorResponsePropertiesEmail: + // case *connectors.ConnectorResponsePropertiesEmail: // config, err := json.Marshal(response.GetConfig()) // if err != nil { // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesEmail - [%w]", err) @@ -784,24 +788,27 @@ func actionConnectorToModel(spaceID string, properties kibanaactions.ConnectorRe // } // return &connector, nil - case kibanaactions.INDEX_ConnectorTypes: - config, err := json.Marshal(properties.ConnectorResponsePropertiesIndex.Config) + case connectors.ConnectorResponsePropertiesIndexConnectorResponseProperties: + resp, _ := properties.GetConnectorResponsePropertiesIndex() + + config, err := resp.Config.MarshalJSON() if err != nil { return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) } + connector := models.KibanaActionConnector{ - ConnectorID: properties.ConnectorResponsePropertiesIndex.Id, + ConnectorID: resp.ID, SpaceID: spaceID, - Name: properties.ConnectorResponsePropertiesIndex.Name, - ConnectorTypeID: connectorTypeID, - IsDeprecated: properties.ConnectorResponsePropertiesIndex.IsDeprecated, - IsMissingSecrets: properties.ConnectorResponsePropertiesIndex.IsMissingSecrets, - IsPreconfigured: properties.ConnectorResponsePropertiesIndex.IsPreconfigured, + Name: resp.Name, + ConnectorTypeID: string(connectors.ConnectorTypesDotIndex), + IsDeprecated: bool(resp.IsDeprecated.Or(connectors.IsDeprecated(false))), + IsMissingSecrets: bool(resp.IsMissingSecrets.Or(connectors.IsMissingSecrets(false))), + IsPreconfigured: bool(resp.IsPreconfigured), ConfigJSON: string(config), } return &connector, nil - // case *kibanaactions.ConnectorResponsePropertiesJira: + // case *connectors.ConnectorResponsePropertiesJira: // config, err := response.GetConfig().MarshalJSON() // if err != nil { // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) @@ -819,7 +826,7 @@ func actionConnectorToModel(spaceID string, properties kibanaactions.ConnectorRe // } // return &connector, nil - // case *kibanaactions.ConnectorResponsePropertiesOpsgenie: + // case *connectors.ConnectorResponsePropertiesOpsgenie: // config, err := response.GetConfig().MarshalJSON() // if err != nil { // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) @@ -837,7 +844,7 @@ func actionConnectorToModel(spaceID string, properties kibanaactions.ConnectorRe // } // return &connector, nil - // case *kibanaactions.ConnectorResponsePropertiesPagerduty: + // case *connectors.ConnectorResponsePropertiesPagerduty: // config, err := json.Marshal(response.GetConfig()) // if err != nil { // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) @@ -855,7 +862,7 @@ func actionConnectorToModel(spaceID string, properties kibanaactions.ConnectorRe // } // return &connector, nil - // case *kibanaactions.ConnectorResponsePropertiesResilient: + // case *connectors.ConnectorResponsePropertiesResilient: // config, err := response.GetConfig().MarshalJSON() // if err != nil { // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) @@ -873,7 +880,7 @@ func actionConnectorToModel(spaceID string, properties kibanaactions.ConnectorRe // } // return &connector, nil - // case *kibanaactions.ConnectorResponsePropertiesServerlog: + // case *connectors.ConnectorResponsePropertiesServerlog: // config, err := json.Marshal(response.GetConfig()) // if err != nil { // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) @@ -891,7 +898,7 @@ func actionConnectorToModel(spaceID string, properties kibanaactions.ConnectorRe // } // return &connector, nil - // case *kibanaactions.ConnectorResponsePropertiesServicenow: + // case *connectors.ConnectorResponsePropertiesServicenow: // config, err := response.GetConfig().MarshalJSON() // if err != nil { // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) @@ -909,7 +916,7 @@ func actionConnectorToModel(spaceID string, properties kibanaactions.ConnectorRe // } // return &connector, nil - // case *kibanaactions.ConnectorResponsePropertiesServicenowItom: + // case *connectors.ConnectorResponsePropertiesServicenowItom: // config, err := response.GetConfig().MarshalJSON() // if err != nil { // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) @@ -927,7 +934,7 @@ func actionConnectorToModel(spaceID string, properties kibanaactions.ConnectorRe // } // return &connector, nil - // case *kibanaactions.ConnectorResponsePropertiesServicenowSir: + // case *connectors.ConnectorResponsePropertiesServicenowSir: // config, err := response.GetConfig().MarshalJSON() // if err != nil { // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) @@ -945,7 +952,7 @@ func actionConnectorToModel(spaceID string, properties kibanaactions.ConnectorRe // } // return &connector, nil - // case *kibanaactions.ConnectorResponsePropertiesSlack: + // case *connectors.ConnectorResponsePropertiesSlack: // // return responseToConnector(response, config, spaceID), nil // connector := models.KibanaActionConnector{ // ConnectorID: response.GetId(), @@ -958,7 +965,7 @@ func actionConnectorToModel(spaceID string, properties kibanaactions.ConnectorRe // } // return &connector, nil - // case *kibanaactions.ConnectorResponsePropertiesSwimlane: + // case *connectors.ConnectorResponsePropertiesSwimlane: // config, err := response.GetConfig().MarshalJSON() // if err != nil { // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) @@ -976,7 +983,7 @@ func actionConnectorToModel(spaceID string, properties kibanaactions.ConnectorRe // } // return &connector, nil - // case *kibanaactions.ConnectorResponsePropertiesTeams: + // case *connectors.ConnectorResponsePropertiesTeams: // // return responseToConnector(response, config, spaceID), nil // connector := models.KibanaActionConnector{ // ConnectorID: response.GetId(), @@ -989,7 +996,7 @@ func actionConnectorToModel(spaceID string, properties kibanaactions.ConnectorRe // } // return &connector, nil - // case *kibanaactions.ConnectorResponsePropertiesTines: + // case *connectors.ConnectorResponsePropertiesTines: // config, err := json.Marshal(response.GetConfig()) // if err != nil { // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) @@ -1007,7 +1014,7 @@ func actionConnectorToModel(spaceID string, properties kibanaactions.ConnectorRe // } // return &connector, nil - // case *kibanaactions.ConnectorResponsePropertiesWebhook: + // case *connectors.ConnectorResponsePropertiesWebhook: // config, err := json.Marshal(response.GetConfig()) // if err != nil { // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) @@ -1025,7 +1032,7 @@ func actionConnectorToModel(spaceID string, properties kibanaactions.ConnectorRe // } // return &connector, nil - // case *kibanaactions.ConnectorResponsePropertiesXmatters: + // case *connectors.ConnectorResponsePropertiesXmatters: // config, err := json.Marshal(response.GetConfig()) // if err != nil { // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) @@ -1061,8 +1068,8 @@ func actionConnectorToModel(spaceID string, properties kibanaactions.ConnectorRe // } // type responseType interface { -// *kibanaactions.ConnectorResponsePropertiesCasesWebhook | *kibanaactions.ConnectorResponsePropertiesEmail | -// *kibanaactions.ConnectorResponsePropertiesIndex +// *connectors.ConnectorResponsePropertiesCasesWebhook | *connectors.ConnectorResponsePropertiesEmail | +// *connectors.ConnectorResponsePropertiesIndex // GetId() string // GetName() string // GetConnectorTypeId() string diff --git a/internal/kibana/action_connector.go b/internal/kibana/connector.go similarity index 100% rename from internal/kibana/action_connector.go rename to internal/kibana/connector.go diff --git a/internal/kibana/action_connector_test.go b/internal/kibana/connector_test.go similarity index 100% rename from internal/kibana/action_connector_test.go rename to internal/kibana/connector_test.go From 5a55d4e60a048426afe910d4d513d3edec28eda5 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 20 Apr 2023 14:50:46 +0200 Subject: [PATCH 08/59] add 400 http error to specs --- generated/connectors/bundled.yaml | 39 ++- generated/connectors/oas_json_gen.go | 330 +++++++++++++----- .../connectors/oas_response_decoders_gen.go | 37 +- .../connectors/oas_response_encoders_gen.go | 14 +- generated/connectors/oas_schemas_gen.go | 202 +++++++++-- generated/connectors/oas_validators_gen.go | 59 ++++ internal/clients/kibana/connector.go | 2 +- 7 files changed, 530 insertions(+), 153 deletions(-) diff --git a/generated/connectors/bundled.yaml b/generated/connectors/bundled.yaml index 56bef67ed..51f5e0d75 100644 --- a/generated/connectors/bundled.yaml +++ b/generated/connectors/bundled.yaml @@ -84,6 +84,8 @@ paths: examples: createIndexConnectorResponse: $ref: '#/components/examples/create_index_connector_response' + '400': + $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' servers: @@ -224,21 +226,7 @@ paths: schema: $ref: '#/components/schemas/connector_response_properties' '400': - description: Indicates a bad request. - content: - application/json: - schema: - type: object - properties: - error: - type: string - example: Bad Request - message: - type: string - example: 'error validating action type config: [index]: expected value of type [string] but got [undefined]' - statusCode: - type: integer - example: 400 + $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '404': @@ -3164,6 +3152,27 @@ components: pushedDate: '2022-09-08T16:52:27.865Z' status: ok responses: + '400': + description: Indicates a bad request. + content: + application/json: + schema: + type: object + title: Bad request + properties: + error: + type: string + example: Bad Request + enum: + - Bad Request + message: + type: string + example: 'error validating action type config: [index]: expected value of type [string] but got [undefined]' + statusCode: + type: integer + example: 400 + enum: + - 400 '401': description: Authorization information is missing or invalid. content: diff --git a/generated/connectors/oas_json_gen.go b/generated/connectors/oas_json_gen.go index 5049d04a0..107358d7f 100644 --- a/generated/connectors/oas_json_gen.go +++ b/generated/connectors/oas_json_gen.go @@ -11507,6 +11507,72 @@ func (s *OptNilString) UnmarshalJSON(data []byte) error { return s.Decode(d) } +// Encode encodes R400Error as json. +func (o OptR400Error) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Str(string(o.Value)) +} + +// Decode decodes R400Error from json. +func (o *OptR400Error) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptR400Error to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptR400Error) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptR400Error) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes R400StatusCode as json. +func (o OptR400StatusCode) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Int(int(o.Value)) +} + +// Decode decodes R400StatusCode from json. +func (o *OptR400StatusCode) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptR400StatusCode to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptR400StatusCode) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptR400StatusCode) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode encodes R401Error as json. func (o OptR401Error) Encode(e *jx.Encoder) { if !o.Set { @@ -11707,6 +11773,173 @@ func (s *OptString) UnmarshalJSON(data []byte) error { return s.Decode(d) } +// Encode implements json.Marshaler. +func (s *R400) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *R400) encodeFields(e *jx.Encoder) { + { + if s.Error.Set { + e.FieldStart("error") + s.Error.Encode(e) + } + } + { + if s.Message.Set { + e.FieldStart("message") + s.Message.Encode(e) + } + } + { + if s.StatusCode.Set { + e.FieldStart("statusCode") + s.StatusCode.Encode(e) + } + } +} + +var jsonFieldsNameOfR400 = [3]string{ + 0: "error", + 1: "message", + 2: "statusCode", +} + +// Decode decodes R400 from json. +func (s *R400) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode R400 to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "error": + if err := func() error { + s.Error.Reset() + if err := s.Error.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"error\"") + } + case "message": + if err := func() error { + s.Message.Reset() + if err := s.Message.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"message\"") + } + case "statusCode": + if err := func() error { + s.StatusCode.Reset() + if err := s.StatusCode.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"statusCode\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode R400") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *R400) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *R400) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes R400Error as json. +func (s R400Error) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes R400Error from json. +func (s *R400Error) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode R400Error to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch R400Error(v) { + case R400ErrorBadRequest: + *s = R400ErrorBadRequest + default: + *s = R400Error(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s R400Error) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *R400Error) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes R400StatusCode as json. +func (s R400StatusCode) Encode(e *jx.Encoder) { + e.Int(int(s)) +} + +// Decode decodes R400StatusCode from json. +func (s *R400StatusCode) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode R400StatusCode to nil") + } + v, err := d.Int() + if err != nil { + return err + } + *s = R400StatusCode(v) + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s R400StatusCode) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *R400StatusCode) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode implements json.Marshaler. func (s *R401) Encode(e *jx.Encoder) { e.ObjStart() @@ -13043,103 +13276,6 @@ func (s *SecretsPropertiesXmatters) UnmarshalJSON(data []byte) error { return s.Decode(d) } -// Encode implements json.Marshaler. -func (s *UpdateConnectorBadRequest) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *UpdateConnectorBadRequest) encodeFields(e *jx.Encoder) { - { - if s.Error.Set { - e.FieldStart("error") - s.Error.Encode(e) - } - } - { - if s.Message.Set { - e.FieldStart("message") - s.Message.Encode(e) - } - } - { - if s.StatusCode.Set { - e.FieldStart("statusCode") - s.StatusCode.Encode(e) - } - } -} - -var jsonFieldsNameOfUpdateConnectorBadRequest = [3]string{ - 0: "error", - 1: "message", - 2: "statusCode", -} - -// Decode decodes UpdateConnectorBadRequest from json. -func (s *UpdateConnectorBadRequest) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode UpdateConnectorBadRequest to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "error": - if err := func() error { - s.Error.Reset() - if err := s.Error.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"error\"") - } - case "message": - if err := func() error { - s.Message.Reset() - if err := s.Message.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"message\"") - } - case "statusCode": - if err := func() error { - s.StatusCode.Reset() - if err := s.StatusCode.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"statusCode\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode UpdateConnectorBadRequest") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *UpdateConnectorBadRequest) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *UpdateConnectorBadRequest) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - // Encode encodes UpdateConnectorReq as json. func (s UpdateConnectorReq) Encode(e *jx.Encoder) { switch s.Type { diff --git a/generated/connectors/oas_response_decoders_gen.go b/generated/connectors/oas_response_decoders_gen.go index 862a21260..13cf06891 100644 --- a/generated/connectors/oas_response_decoders_gen.go +++ b/generated/connectors/oas_response_decoders_gen.go @@ -51,6 +51,41 @@ func decodeCreateConnectorResponse(resp *http.Response) (res CreateConnectorRes, default: return res, validate.InvalidContentType(ct) } + case 400: + // Code 400. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response R400 + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } case 401: // Code 401. ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) @@ -983,7 +1018,7 @@ func decodeUpdateConnectorResponse(resp *http.Response) (res UpdateConnectorRes, } d := jx.DecodeBytes(buf) - var response UpdateConnectorBadRequest + var response R400 if err := func() error { if err := response.Decode(d); err != nil { return err diff --git a/generated/connectors/oas_response_encoders_gen.go b/generated/connectors/oas_response_encoders_gen.go index 38785c381..283223fbf 100644 --- a/generated/connectors/oas_response_encoders_gen.go +++ b/generated/connectors/oas_response_encoders_gen.go @@ -25,6 +25,18 @@ func encodeCreateConnectorResponse(response CreateConnectorRes, w http.ResponseW } return nil + case *R400: + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + span.SetStatus(codes.Error, http.StatusText(400)) + + e := jx.GetEncoder() + response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + return nil + case *R401: w.Header().Set("Content-Type", "application/json") w.WriteHeader(401) @@ -409,7 +421,7 @@ func encodeUpdateConnectorResponse(response UpdateConnectorRes, w http.ResponseW } return nil - case *UpdateConnectorBadRequest: + case *R400: w.Header().Set("Content-Type", "application/json") w.WriteHeader(400) span.SetStatus(codes.Error, http.StatusText(400)) diff --git a/generated/connectors/oas_schemas_gen.go b/generated/connectors/oas_schemas_gen.go index c6e4a1054..e6d9b57fe 100644 --- a/generated/connectors/oas_schemas_gen.go +++ b/generated/connectors/oas_schemas_gen.go @@ -6868,6 +6868,98 @@ func (o OptNilString) Or(d string) string { return d } +// NewOptR400Error returns new OptR400Error with value set to v. +func NewOptR400Error(v R400Error) OptR400Error { + return OptR400Error{ + Value: v, + Set: true, + } +} + +// OptR400Error is optional R400Error. +type OptR400Error struct { + Value R400Error + Set bool +} + +// IsSet returns true if OptR400Error was set. +func (o OptR400Error) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptR400Error) Reset() { + var v R400Error + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptR400Error) SetTo(v R400Error) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptR400Error) Get() (v R400Error, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptR400Error) Or(d R400Error) R400Error { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptR400StatusCode returns new OptR400StatusCode with value set to v. +func NewOptR400StatusCode(v R400StatusCode) OptR400StatusCode { + return OptR400StatusCode{ + Value: v, + Set: true, + } +} + +// OptR400StatusCode is optional R400StatusCode. +type OptR400StatusCode struct { + Value R400StatusCode + Set bool +} + +// IsSet returns true if OptR400StatusCode was set. +func (o OptR400StatusCode) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptR400StatusCode) Reset() { + var v R400StatusCode + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptR400StatusCode) SetTo(v R400StatusCode) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptR400StatusCode) Get() (v R400StatusCode, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptR400StatusCode) Or(d R400StatusCode) R400StatusCode { + if v, ok := o.Get(); ok { + return v + } + return d +} + // NewOptR401Error returns new OptR401Error with value set to v. func NewOptR401Error(v R401Error) OptR401Error { return OptR401Error{ @@ -7144,6 +7236,78 @@ func (o OptString) Or(d string) string { return d } +type R400 struct { + Error OptR400Error `json:"error"` + Message OptString `json:"message"` + StatusCode OptR400StatusCode `json:"statusCode"` +} + +// GetError returns the value of Error. +func (s *R400) GetError() OptR400Error { + return s.Error +} + +// GetMessage returns the value of Message. +func (s *R400) GetMessage() OptString { + return s.Message +} + +// GetStatusCode returns the value of StatusCode. +func (s *R400) GetStatusCode() OptR400StatusCode { + return s.StatusCode +} + +// SetError sets the value of Error. +func (s *R400) SetError(val OptR400Error) { + s.Error = val +} + +// SetMessage sets the value of Message. +func (s *R400) SetMessage(val OptString) { + s.Message = val +} + +// SetStatusCode sets the value of StatusCode. +func (s *R400) SetStatusCode(val OptR400StatusCode) { + s.StatusCode = val +} + +func (*R400) createConnectorRes() {} +func (*R400) updateConnectorRes() {} + +type R400Error string + +const ( + R400ErrorBadRequest R400Error = "Bad Request" +) + +// MarshalText implements encoding.TextMarshaler. +func (s R400Error) MarshalText() ([]byte, error) { + switch s { + case R400ErrorBadRequest: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *R400Error) UnmarshalText(data []byte) error { + switch R400Error(data) { + case R400ErrorBadRequest: + *s = R400ErrorBadRequest + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +type R400StatusCode int + +const ( + R400StatusCode400 R400StatusCode = 400 +) + type R401 struct { Error OptR401Error `json:"error"` Message OptString `json:"message"` @@ -7580,44 +7744,6 @@ func (s *SecretsPropertiesXmatters) init() SecretsPropertiesXmatters { return m } -type UpdateConnectorBadRequest struct { - Error OptString `json:"error"` - Message OptString `json:"message"` - StatusCode OptInt `json:"statusCode"` -} - -// GetError returns the value of Error. -func (s *UpdateConnectorBadRequest) GetError() OptString { - return s.Error -} - -// GetMessage returns the value of Message. -func (s *UpdateConnectorBadRequest) GetMessage() OptString { - return s.Message -} - -// GetStatusCode returns the value of StatusCode. -func (s *UpdateConnectorBadRequest) GetStatusCode() OptInt { - return s.StatusCode -} - -// SetError sets the value of Error. -func (s *UpdateConnectorBadRequest) SetError(val OptString) { - s.Error = val -} - -// SetMessage sets the value of Message. -func (s *UpdateConnectorBadRequest) SetMessage(val OptString) { - s.Message = val -} - -// SetStatusCode sets the value of StatusCode. -func (s *UpdateConnectorBadRequest) SetStatusCode(val OptInt) { - s.StatusCode = val -} - -func (*UpdateConnectorBadRequest) updateConnectorRes() {} - // The properties vary depending on the connector type. // UpdateConnectorReq represents sum type. type UpdateConnectorReq struct { diff --git a/generated/connectors/oas_validators_gen.go b/generated/connectors/oas_validators_gen.go index 24cf7d342..434ae1e5a 100644 --- a/generated/connectors/oas_validators_gen.go +++ b/generated/connectors/oas_validators_gen.go @@ -794,6 +794,65 @@ func (s LegacyRunConnectorOKData) Validate() error { } } +func (s *R400) Validate() error { + var failures []validate.FieldError + if err := func() error { + if s.Error.Set { + if err := func() error { + if err := s.Error.Value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "error", + Error: err, + }) + } + if err := func() error { + if s.StatusCode.Set { + if err := func() error { + if err := s.StatusCode.Value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "statusCode", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} +func (s R400Error) Validate() error { + switch s { + case "Bad Request": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s R400StatusCode) Validate() error { + switch s { + case 400: + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} func (s *R401) Validate() error { var failures []validate.FieldError if err := func() error { diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index 6c82b59ae..ed17184c7 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -60,7 +60,7 @@ func UpdateActionConnector(ctx context.Context, apiClient *clients.ApiClient, co }, ) - + if response.(*connectors.Upda) if err != nil { return "", diag.FromErr(err) From 5a74dfb47175636f3529fbd07435a5b966a4152b Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 20 Apr 2023 18:41:01 +0200 Subject: [PATCH 09/59] Fixes for connectors specs --- generated/connectors/bundled.yaml | 64 +++++- generated/connectors/oas_schemas_gen.go | 252 +++++++++++++++++++++ generated/connectors/oas_validators_gen.go | 72 ++++++ internal/clients/kibana/connector.go | 18 +- 4 files changed, 400 insertions(+), 6 deletions(-) diff --git a/generated/connectors/bundled.yaml b/generated/connectors/bundled.yaml index 51f5e0d75..03a09b195 100644 --- a/generated/connectors/bundled.yaml +++ b/generated/connectors/bundled.yaml @@ -2257,6 +2257,7 @@ components: required: - config - name + - connector_type_id properties: config: $ref: '#/components/schemas/config_properties_cases_webhook' @@ -2264,6 +2265,12 @@ components: type: string description: The display name for the connector. example: my-connector + connector_type_id: + type: string + description: The type of connector. + enum: + - .cases-webhook + example: .cases-webhook secrets: $ref: '#/components/schemas/secrets_properties_cases_webhook' update_connector_request_index: @@ -2271,20 +2278,27 @@ components: type: object required: - config -# - connector_type_id - name + - connector_type_id properties: config: $ref: '#/components/schemas/config_properties_index' name: type: string description: The display name for the connector. + connector_type_id: + type: string + description: The type of connector. + enum: + - .index + example: .index update_connector_request_jira: title: Update Jira connector request type: object required: - config - name + - connector_type_id - secrets properties: config: @@ -2292,6 +2306,12 @@ components: name: type: string description: The display name for the connector. + connector_type_id: + type: string + description: The type of connector. + enum: + - .jira + example: .jira secrets: $ref: '#/components/schemas/secrets_properties_jira' update_connector_request_opsgenie: @@ -2300,6 +2320,7 @@ components: required: - config - name + - connector_type_id - secrets properties: config: @@ -2307,6 +2328,12 @@ components: name: type: string description: The display name for the connector. + connector_type_id: + type: string + description: The type of connector. + enum: + - .opsgenie + example: .opsgenie secrets: $ref: '#/components/schemas/secrets_properties_opsgenie' update_connector_request_resilient: @@ -2315,6 +2342,7 @@ components: required: - config - name + - connector_type_id - secrets properties: config: @@ -2322,6 +2350,12 @@ components: name: type: string description: The display name for the connector. + connector_type_id: + type: string + description: The type of connector. + enum: + - .resilient + example: .resilient secrets: $ref: '#/components/schemas/secrets_properties_resilient' update_connector_request_serverlog: @@ -2329,16 +2363,24 @@ components: type: object required: - name + - connector_type_id properties: name: type: string description: The display name for the connector. + connector_type_id: + type: string + description: The type of connector. + enum: + - .server-log + example: .server-log update_connector_request_servicenow: title: Update ServiceNow ITSM connector or ServiceNow SecOps request type: object required: - config - name + - connector_type_id - secrets properties: config: @@ -2348,12 +2390,19 @@ components: description: The display name for the connector. secrets: $ref: '#/components/schemas/secrets_properties_servicenow' + connector_type_id: + type: string + description: The type of connector. + enum: + - .servicenow + example: .servicenow update_connector_request_servicenow_itom: title: Create ServiceNow ITOM connector request type: object required: - config - name + - connector_type_id - secrets properties: config: @@ -2361,6 +2410,12 @@ components: name: type: string description: The display name for the connector. + connector_type_id: + type: string + description: The type of connector. + enum: + - .servicenow-itom + example: .servicenow-itom secrets: $ref: '#/components/schemas/secrets_properties_servicenow' update_connector_request_swimlane: @@ -2369,6 +2424,7 @@ components: required: - config - name + - connector_type_id - secrets properties: config: @@ -2377,6 +2433,12 @@ components: type: string description: The display name for the connector. example: my-connector + connector_type_id: + type: string + description: The type of connector. + enum: + - .swimlane + example: .swimlane secrets: $ref: '#/components/schemas/secrets_properties_swimlane' connector_types: diff --git a/generated/connectors/oas_schemas_gen.go b/generated/connectors/oas_schemas_gen.go index e6d9b57fe..00a595b20 100644 --- a/generated/connectors/oas_schemas_gen.go +++ b/generated/connectors/oas_schemas_gen.go @@ -8047,6 +8047,34 @@ func (s *UpdateConnectorRequestCasesWebhook) SetSecrets(val OptSecretsProperties s.Secrets = val } +// The type of connector. +type UpdateConnectorRequestCasesWebhookConnectorTypeID string + +const ( + UpdateConnectorRequestCasesWebhookConnectorTypeIDDotCasesMinusWebhook UpdateConnectorRequestCasesWebhookConnectorTypeID = ".cases-webhook" +) + +// MarshalText implements encoding.TextMarshaler. +func (s UpdateConnectorRequestCasesWebhookConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case UpdateConnectorRequestCasesWebhookConnectorTypeIDDotCasesMinusWebhook: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *UpdateConnectorRequestCasesWebhookConnectorTypeID) UnmarshalText(data []byte) error { + switch UpdateConnectorRequestCasesWebhookConnectorTypeID(data) { + case UpdateConnectorRequestCasesWebhookConnectorTypeIDDotCasesMinusWebhook: + *s = UpdateConnectorRequestCasesWebhookConnectorTypeIDDotCasesMinusWebhook + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + // Ref: #/components/schemas/update_connector_request_index type UpdateConnectorRequestIndex struct { Config ConfigPropertiesIndex `json:"config"` @@ -8074,6 +8102,34 @@ func (s *UpdateConnectorRequestIndex) SetName(val string) { s.Name = val } +// The type of connector. +type UpdateConnectorRequestIndexConnectorTypeID string + +const ( + UpdateConnectorRequestIndexConnectorTypeIDDotIndex UpdateConnectorRequestIndexConnectorTypeID = ".index" +) + +// MarshalText implements encoding.TextMarshaler. +func (s UpdateConnectorRequestIndexConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case UpdateConnectorRequestIndexConnectorTypeIDDotIndex: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *UpdateConnectorRequestIndexConnectorTypeID) UnmarshalText(data []byte) error { + switch UpdateConnectorRequestIndexConnectorTypeID(data) { + case UpdateConnectorRequestIndexConnectorTypeIDDotIndex: + *s = UpdateConnectorRequestIndexConnectorTypeIDDotIndex + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + // Ref: #/components/schemas/update_connector_request_jira type UpdateConnectorRequestJira struct { Config ConfigPropertiesJira `json:"config"` @@ -8112,6 +8168,34 @@ func (s *UpdateConnectorRequestJira) SetSecrets(val SecretsPropertiesJira) { s.Secrets = val } +// The type of connector. +type UpdateConnectorRequestJiraConnectorTypeID string + +const ( + UpdateConnectorRequestJiraConnectorTypeIDDotJira UpdateConnectorRequestJiraConnectorTypeID = ".jira" +) + +// MarshalText implements encoding.TextMarshaler. +func (s UpdateConnectorRequestJiraConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case UpdateConnectorRequestJiraConnectorTypeIDDotJira: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *UpdateConnectorRequestJiraConnectorTypeID) UnmarshalText(data []byte) error { + switch UpdateConnectorRequestJiraConnectorTypeID(data) { + case UpdateConnectorRequestJiraConnectorTypeIDDotJira: + *s = UpdateConnectorRequestJiraConnectorTypeIDDotJira + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + // Ref: #/components/schemas/update_connector_request_opsgenie type UpdateConnectorRequestOpsgenie struct { Config ConfigPropertiesOpsgenie `json:"config"` @@ -8150,6 +8234,34 @@ func (s *UpdateConnectorRequestOpsgenie) SetSecrets(val SecretsPropertiesOpsgeni s.Secrets = val } +// The type of connector. +type UpdateConnectorRequestOpsgenieConnectorTypeID string + +const ( + UpdateConnectorRequestOpsgenieConnectorTypeIDDotOpsgenie UpdateConnectorRequestOpsgenieConnectorTypeID = ".opsgenie" +) + +// MarshalText implements encoding.TextMarshaler. +func (s UpdateConnectorRequestOpsgenieConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case UpdateConnectorRequestOpsgenieConnectorTypeIDDotOpsgenie: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *UpdateConnectorRequestOpsgenieConnectorTypeID) UnmarshalText(data []byte) error { + switch UpdateConnectorRequestOpsgenieConnectorTypeID(data) { + case UpdateConnectorRequestOpsgenieConnectorTypeIDDotOpsgenie: + *s = UpdateConnectorRequestOpsgenieConnectorTypeIDDotOpsgenie + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + // Ref: #/components/schemas/update_connector_request_resilient type UpdateConnectorRequestResilient struct { Config ConfigPropertiesResilient `json:"config"` @@ -8188,6 +8300,34 @@ func (s *UpdateConnectorRequestResilient) SetSecrets(val SecretsPropertiesResili s.Secrets = val } +// The type of connector. +type UpdateConnectorRequestResilientConnectorTypeID string + +const ( + UpdateConnectorRequestResilientConnectorTypeIDDotResilient UpdateConnectorRequestResilientConnectorTypeID = ".resilient" +) + +// MarshalText implements encoding.TextMarshaler. +func (s UpdateConnectorRequestResilientConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case UpdateConnectorRequestResilientConnectorTypeIDDotResilient: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *UpdateConnectorRequestResilientConnectorTypeID) UnmarshalText(data []byte) error { + switch UpdateConnectorRequestResilientConnectorTypeID(data) { + case UpdateConnectorRequestResilientConnectorTypeIDDotResilient: + *s = UpdateConnectorRequestResilientConnectorTypeIDDotResilient + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + // Ref: #/components/schemas/update_connector_request_serverlog type UpdateConnectorRequestServerlog struct { // The display name for the connector. @@ -8204,6 +8344,34 @@ func (s *UpdateConnectorRequestServerlog) SetName(val string) { s.Name = val } +// The type of connector. +type UpdateConnectorRequestServerlogConnectorTypeID string + +const ( + UpdateConnectorRequestServerlogConnectorTypeIDDotServerMinusLog UpdateConnectorRequestServerlogConnectorTypeID = ".server-log" +) + +// MarshalText implements encoding.TextMarshaler. +func (s UpdateConnectorRequestServerlogConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case UpdateConnectorRequestServerlogConnectorTypeIDDotServerMinusLog: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *UpdateConnectorRequestServerlogConnectorTypeID) UnmarshalText(data []byte) error { + switch UpdateConnectorRequestServerlogConnectorTypeID(data) { + case UpdateConnectorRequestServerlogConnectorTypeIDDotServerMinusLog: + *s = UpdateConnectorRequestServerlogConnectorTypeIDDotServerMinusLog + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + // Ref: #/components/schemas/update_connector_request_servicenow type UpdateConnectorRequestServicenow struct { Config ConfigPropertiesServicenow `json:"config"` @@ -8242,6 +8410,34 @@ func (s *UpdateConnectorRequestServicenow) SetSecrets(val SecretsPropertiesServi s.Secrets = val } +// The type of connector. +type UpdateConnectorRequestServicenowConnectorTypeID string + +const ( + UpdateConnectorRequestServicenowConnectorTypeIDDotServicenow UpdateConnectorRequestServicenowConnectorTypeID = ".servicenow" +) + +// MarshalText implements encoding.TextMarshaler. +func (s UpdateConnectorRequestServicenowConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case UpdateConnectorRequestServicenowConnectorTypeIDDotServicenow: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *UpdateConnectorRequestServicenowConnectorTypeID) UnmarshalText(data []byte) error { + switch UpdateConnectorRequestServicenowConnectorTypeID(data) { + case UpdateConnectorRequestServicenowConnectorTypeIDDotServicenow: + *s = UpdateConnectorRequestServicenowConnectorTypeIDDotServicenow + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + // Ref: #/components/schemas/update_connector_request_servicenow_itom type UpdateConnectorRequestServicenowItom struct { Config ConfigPropertiesServicenowItom `json:"config"` @@ -8280,6 +8476,34 @@ func (s *UpdateConnectorRequestServicenowItom) SetSecrets(val SecretsPropertiesS s.Secrets = val } +// The type of connector. +type UpdateConnectorRequestServicenowItomConnectorTypeID string + +const ( + UpdateConnectorRequestServicenowItomConnectorTypeIDDotServicenowMinusItom UpdateConnectorRequestServicenowItomConnectorTypeID = ".servicenow-itom" +) + +// MarshalText implements encoding.TextMarshaler. +func (s UpdateConnectorRequestServicenowItomConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case UpdateConnectorRequestServicenowItomConnectorTypeIDDotServicenowMinusItom: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *UpdateConnectorRequestServicenowItomConnectorTypeID) UnmarshalText(data []byte) error { + switch UpdateConnectorRequestServicenowItomConnectorTypeID(data) { + case UpdateConnectorRequestServicenowItomConnectorTypeIDDotServicenowMinusItom: + *s = UpdateConnectorRequestServicenowItomConnectorTypeIDDotServicenowMinusItom + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + // Ref: #/components/schemas/update_connector_request_swimlane type UpdateConnectorRequestSwimlane struct { Config ConfigPropertiesSwimlane `json:"config"` @@ -8317,3 +8541,31 @@ func (s *UpdateConnectorRequestSwimlane) SetName(val string) { func (s *UpdateConnectorRequestSwimlane) SetSecrets(val SecretsPropertiesSwimlane) { s.Secrets = val } + +// The type of connector. +type UpdateConnectorRequestSwimlaneConnectorTypeID string + +const ( + UpdateConnectorRequestSwimlaneConnectorTypeIDDotSwimlane UpdateConnectorRequestSwimlaneConnectorTypeID = ".swimlane" +) + +// MarshalText implements encoding.TextMarshaler. +func (s UpdateConnectorRequestSwimlaneConnectorTypeID) MarshalText() ([]byte, error) { + switch s { + case UpdateConnectorRequestSwimlaneConnectorTypeIDDotSwimlane: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *UpdateConnectorRequestSwimlaneConnectorTypeID) UnmarshalText(data []byte) error { + switch UpdateConnectorRequestSwimlaneConnectorTypeID(data) { + case UpdateConnectorRequestSwimlaneConnectorTypeIDDotSwimlane: + *s = UpdateConnectorRequestSwimlaneConnectorTypeIDDotSwimlane + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} diff --git a/generated/connectors/oas_validators_gen.go b/generated/connectors/oas_validators_gen.go index 434ae1e5a..f4fff0dbb 100644 --- a/generated/connectors/oas_validators_gen.go +++ b/generated/connectors/oas_validators_gen.go @@ -1020,6 +1020,70 @@ func (s *UpdateConnectorRequestCasesWebhook) Validate() error { } return nil } +func (s UpdateConnectorRequestCasesWebhookConnectorTypeID) Validate() error { + switch s { + case ".cases-webhook": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s UpdateConnectorRequestIndexConnectorTypeID) Validate() error { + switch s { + case ".index": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s UpdateConnectorRequestJiraConnectorTypeID) Validate() error { + switch s { + case ".jira": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s UpdateConnectorRequestOpsgenieConnectorTypeID) Validate() error { + switch s { + case ".opsgenie": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s UpdateConnectorRequestResilientConnectorTypeID) Validate() error { + switch s { + case ".resilient": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s UpdateConnectorRequestServerlogConnectorTypeID) Validate() error { + switch s { + case ".server-log": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s UpdateConnectorRequestServicenowConnectorTypeID) Validate() error { + switch s { + case ".servicenow": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s UpdateConnectorRequestServicenowItomConnectorTypeID) Validate() error { + switch s { + case ".servicenow-itom": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} func (s *UpdateConnectorRequestSwimlane) Validate() error { var failures []validate.FieldError if err := func() error { @@ -1038,3 +1102,11 @@ func (s *UpdateConnectorRequestSwimlane) Validate() error { } return nil } +func (s UpdateConnectorRequestSwimlaneConnectorTypeID) Validate() error { + switch s { + case ".swimlane": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index ed17184c7..6e48bc4cf 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -60,15 +60,23 @@ func UpdateActionConnector(ctx context.Context, apiClient *clients.ApiClient, co }, ) - if response.(*connectors.Upda) - if err != nil { return "", diag.FromErr(err) } - properties, ok := response.(*connectors.ConnectorResponseProperties) - if !ok { - return "", diag.FromErr(fmt.Errorf("failed to parse update response [%+v]", response)) + var properties *connectors.ConnectorResponseProperties + + switch resp := response.(type) { + case *connectors.ConnectorResponseProperties: + properties, _ = response.(*connectors.ConnectorResponseProperties) + case *connectors.R400: + return "", diag.Errorf("update failed with error [%s]: %s", resp.GetError().Value, resp.GetMessage().Value) + case *connectors.R401: + return "", diag.Errorf("update failed with error [%s]: %s", resp.GetError().Value, resp.GetMessage().Value) + case *connectors.R404: + return "", diag.Errorf("update failed with error [%s]: %s", resp.GetError().Value, resp.GetMessage().Value) + default: + return "", diag.Errorf("failed to parse update response %+v", response) } connectorNew, err := actionConnectorToModel(connectorOld.SpaceID, *properties) From 59fbfa111abc5610a296b31da577baaa6f1d70ce Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Mon, 1 May 2023 14:40:58 +0200 Subject: [PATCH 10/59] fixes --- generated/connectors/bundled.yaml | 63 ----- generated/connectors/oas_schemas_gen.go | 252 ------------------ generated/connectors/oas_validators_gen.go | 72 ----- internal/clients/api_client.go | 26 +- ...on_connector_test.go => connector_test.go} | 0 5 files changed, 13 insertions(+), 400 deletions(-) rename internal/clients/kibana/{action_connector_test.go => connector_test.go} (100%) diff --git a/generated/connectors/bundled.yaml b/generated/connectors/bundled.yaml index 03a09b195..7f77c8fc1 100644 --- a/generated/connectors/bundled.yaml +++ b/generated/connectors/bundled.yaml @@ -2257,7 +2257,6 @@ components: required: - config - name - - connector_type_id properties: config: $ref: '#/components/schemas/config_properties_cases_webhook' @@ -2265,12 +2264,6 @@ components: type: string description: The display name for the connector. example: my-connector - connector_type_id: - type: string - description: The type of connector. - enum: - - .cases-webhook - example: .cases-webhook secrets: $ref: '#/components/schemas/secrets_properties_cases_webhook' update_connector_request_index: @@ -2279,26 +2272,18 @@ components: required: - config - name - - connector_type_id properties: config: $ref: '#/components/schemas/config_properties_index' name: type: string description: The display name for the connector. - connector_type_id: - type: string - description: The type of connector. - enum: - - .index - example: .index update_connector_request_jira: title: Update Jira connector request type: object required: - config - name - - connector_type_id - secrets properties: config: @@ -2306,12 +2291,6 @@ components: name: type: string description: The display name for the connector. - connector_type_id: - type: string - description: The type of connector. - enum: - - .jira - example: .jira secrets: $ref: '#/components/schemas/secrets_properties_jira' update_connector_request_opsgenie: @@ -2320,7 +2299,6 @@ components: required: - config - name - - connector_type_id - secrets properties: config: @@ -2328,12 +2306,6 @@ components: name: type: string description: The display name for the connector. - connector_type_id: - type: string - description: The type of connector. - enum: - - .opsgenie - example: .opsgenie secrets: $ref: '#/components/schemas/secrets_properties_opsgenie' update_connector_request_resilient: @@ -2342,7 +2314,6 @@ components: required: - config - name - - connector_type_id - secrets properties: config: @@ -2350,12 +2321,6 @@ components: name: type: string description: The display name for the connector. - connector_type_id: - type: string - description: The type of connector. - enum: - - .resilient - example: .resilient secrets: $ref: '#/components/schemas/secrets_properties_resilient' update_connector_request_serverlog: @@ -2363,24 +2328,16 @@ components: type: object required: - name - - connector_type_id properties: name: type: string description: The display name for the connector. - connector_type_id: - type: string - description: The type of connector. - enum: - - .server-log - example: .server-log update_connector_request_servicenow: title: Update ServiceNow ITSM connector or ServiceNow SecOps request type: object required: - config - name - - connector_type_id - secrets properties: config: @@ -2390,19 +2347,12 @@ components: description: The display name for the connector. secrets: $ref: '#/components/schemas/secrets_properties_servicenow' - connector_type_id: - type: string - description: The type of connector. - enum: - - .servicenow - example: .servicenow update_connector_request_servicenow_itom: title: Create ServiceNow ITOM connector request type: object required: - config - name - - connector_type_id - secrets properties: config: @@ -2410,12 +2360,6 @@ components: name: type: string description: The display name for the connector. - connector_type_id: - type: string - description: The type of connector. - enum: - - .servicenow-itom - example: .servicenow-itom secrets: $ref: '#/components/schemas/secrets_properties_servicenow' update_connector_request_swimlane: @@ -2424,7 +2368,6 @@ components: required: - config - name - - connector_type_id - secrets properties: config: @@ -2433,12 +2376,6 @@ components: type: string description: The display name for the connector. example: my-connector - connector_type_id: - type: string - description: The type of connector. - enum: - - .swimlane - example: .swimlane secrets: $ref: '#/components/schemas/secrets_properties_swimlane' connector_types: diff --git a/generated/connectors/oas_schemas_gen.go b/generated/connectors/oas_schemas_gen.go index 00a595b20..e6d9b57fe 100644 --- a/generated/connectors/oas_schemas_gen.go +++ b/generated/connectors/oas_schemas_gen.go @@ -8047,34 +8047,6 @@ func (s *UpdateConnectorRequestCasesWebhook) SetSecrets(val OptSecretsProperties s.Secrets = val } -// The type of connector. -type UpdateConnectorRequestCasesWebhookConnectorTypeID string - -const ( - UpdateConnectorRequestCasesWebhookConnectorTypeIDDotCasesMinusWebhook UpdateConnectorRequestCasesWebhookConnectorTypeID = ".cases-webhook" -) - -// MarshalText implements encoding.TextMarshaler. -func (s UpdateConnectorRequestCasesWebhookConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case UpdateConnectorRequestCasesWebhookConnectorTypeIDDotCasesMinusWebhook: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *UpdateConnectorRequestCasesWebhookConnectorTypeID) UnmarshalText(data []byte) error { - switch UpdateConnectorRequestCasesWebhookConnectorTypeID(data) { - case UpdateConnectorRequestCasesWebhookConnectorTypeIDDotCasesMinusWebhook: - *s = UpdateConnectorRequestCasesWebhookConnectorTypeIDDotCasesMinusWebhook - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - // Ref: #/components/schemas/update_connector_request_index type UpdateConnectorRequestIndex struct { Config ConfigPropertiesIndex `json:"config"` @@ -8102,34 +8074,6 @@ func (s *UpdateConnectorRequestIndex) SetName(val string) { s.Name = val } -// The type of connector. -type UpdateConnectorRequestIndexConnectorTypeID string - -const ( - UpdateConnectorRequestIndexConnectorTypeIDDotIndex UpdateConnectorRequestIndexConnectorTypeID = ".index" -) - -// MarshalText implements encoding.TextMarshaler. -func (s UpdateConnectorRequestIndexConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case UpdateConnectorRequestIndexConnectorTypeIDDotIndex: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *UpdateConnectorRequestIndexConnectorTypeID) UnmarshalText(data []byte) error { - switch UpdateConnectorRequestIndexConnectorTypeID(data) { - case UpdateConnectorRequestIndexConnectorTypeIDDotIndex: - *s = UpdateConnectorRequestIndexConnectorTypeIDDotIndex - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - // Ref: #/components/schemas/update_connector_request_jira type UpdateConnectorRequestJira struct { Config ConfigPropertiesJira `json:"config"` @@ -8168,34 +8112,6 @@ func (s *UpdateConnectorRequestJira) SetSecrets(val SecretsPropertiesJira) { s.Secrets = val } -// The type of connector. -type UpdateConnectorRequestJiraConnectorTypeID string - -const ( - UpdateConnectorRequestJiraConnectorTypeIDDotJira UpdateConnectorRequestJiraConnectorTypeID = ".jira" -) - -// MarshalText implements encoding.TextMarshaler. -func (s UpdateConnectorRequestJiraConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case UpdateConnectorRequestJiraConnectorTypeIDDotJira: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *UpdateConnectorRequestJiraConnectorTypeID) UnmarshalText(data []byte) error { - switch UpdateConnectorRequestJiraConnectorTypeID(data) { - case UpdateConnectorRequestJiraConnectorTypeIDDotJira: - *s = UpdateConnectorRequestJiraConnectorTypeIDDotJira - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - // Ref: #/components/schemas/update_connector_request_opsgenie type UpdateConnectorRequestOpsgenie struct { Config ConfigPropertiesOpsgenie `json:"config"` @@ -8234,34 +8150,6 @@ func (s *UpdateConnectorRequestOpsgenie) SetSecrets(val SecretsPropertiesOpsgeni s.Secrets = val } -// The type of connector. -type UpdateConnectorRequestOpsgenieConnectorTypeID string - -const ( - UpdateConnectorRequestOpsgenieConnectorTypeIDDotOpsgenie UpdateConnectorRequestOpsgenieConnectorTypeID = ".opsgenie" -) - -// MarshalText implements encoding.TextMarshaler. -func (s UpdateConnectorRequestOpsgenieConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case UpdateConnectorRequestOpsgenieConnectorTypeIDDotOpsgenie: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *UpdateConnectorRequestOpsgenieConnectorTypeID) UnmarshalText(data []byte) error { - switch UpdateConnectorRequestOpsgenieConnectorTypeID(data) { - case UpdateConnectorRequestOpsgenieConnectorTypeIDDotOpsgenie: - *s = UpdateConnectorRequestOpsgenieConnectorTypeIDDotOpsgenie - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - // Ref: #/components/schemas/update_connector_request_resilient type UpdateConnectorRequestResilient struct { Config ConfigPropertiesResilient `json:"config"` @@ -8300,34 +8188,6 @@ func (s *UpdateConnectorRequestResilient) SetSecrets(val SecretsPropertiesResili s.Secrets = val } -// The type of connector. -type UpdateConnectorRequestResilientConnectorTypeID string - -const ( - UpdateConnectorRequestResilientConnectorTypeIDDotResilient UpdateConnectorRequestResilientConnectorTypeID = ".resilient" -) - -// MarshalText implements encoding.TextMarshaler. -func (s UpdateConnectorRequestResilientConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case UpdateConnectorRequestResilientConnectorTypeIDDotResilient: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *UpdateConnectorRequestResilientConnectorTypeID) UnmarshalText(data []byte) error { - switch UpdateConnectorRequestResilientConnectorTypeID(data) { - case UpdateConnectorRequestResilientConnectorTypeIDDotResilient: - *s = UpdateConnectorRequestResilientConnectorTypeIDDotResilient - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - // Ref: #/components/schemas/update_connector_request_serverlog type UpdateConnectorRequestServerlog struct { // The display name for the connector. @@ -8344,34 +8204,6 @@ func (s *UpdateConnectorRequestServerlog) SetName(val string) { s.Name = val } -// The type of connector. -type UpdateConnectorRequestServerlogConnectorTypeID string - -const ( - UpdateConnectorRequestServerlogConnectorTypeIDDotServerMinusLog UpdateConnectorRequestServerlogConnectorTypeID = ".server-log" -) - -// MarshalText implements encoding.TextMarshaler. -func (s UpdateConnectorRequestServerlogConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case UpdateConnectorRequestServerlogConnectorTypeIDDotServerMinusLog: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *UpdateConnectorRequestServerlogConnectorTypeID) UnmarshalText(data []byte) error { - switch UpdateConnectorRequestServerlogConnectorTypeID(data) { - case UpdateConnectorRequestServerlogConnectorTypeIDDotServerMinusLog: - *s = UpdateConnectorRequestServerlogConnectorTypeIDDotServerMinusLog - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - // Ref: #/components/schemas/update_connector_request_servicenow type UpdateConnectorRequestServicenow struct { Config ConfigPropertiesServicenow `json:"config"` @@ -8410,34 +8242,6 @@ func (s *UpdateConnectorRequestServicenow) SetSecrets(val SecretsPropertiesServi s.Secrets = val } -// The type of connector. -type UpdateConnectorRequestServicenowConnectorTypeID string - -const ( - UpdateConnectorRequestServicenowConnectorTypeIDDotServicenow UpdateConnectorRequestServicenowConnectorTypeID = ".servicenow" -) - -// MarshalText implements encoding.TextMarshaler. -func (s UpdateConnectorRequestServicenowConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case UpdateConnectorRequestServicenowConnectorTypeIDDotServicenow: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *UpdateConnectorRequestServicenowConnectorTypeID) UnmarshalText(data []byte) error { - switch UpdateConnectorRequestServicenowConnectorTypeID(data) { - case UpdateConnectorRequestServicenowConnectorTypeIDDotServicenow: - *s = UpdateConnectorRequestServicenowConnectorTypeIDDotServicenow - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - // Ref: #/components/schemas/update_connector_request_servicenow_itom type UpdateConnectorRequestServicenowItom struct { Config ConfigPropertiesServicenowItom `json:"config"` @@ -8476,34 +8280,6 @@ func (s *UpdateConnectorRequestServicenowItom) SetSecrets(val SecretsPropertiesS s.Secrets = val } -// The type of connector. -type UpdateConnectorRequestServicenowItomConnectorTypeID string - -const ( - UpdateConnectorRequestServicenowItomConnectorTypeIDDotServicenowMinusItom UpdateConnectorRequestServicenowItomConnectorTypeID = ".servicenow-itom" -) - -// MarshalText implements encoding.TextMarshaler. -func (s UpdateConnectorRequestServicenowItomConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case UpdateConnectorRequestServicenowItomConnectorTypeIDDotServicenowMinusItom: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *UpdateConnectorRequestServicenowItomConnectorTypeID) UnmarshalText(data []byte) error { - switch UpdateConnectorRequestServicenowItomConnectorTypeID(data) { - case UpdateConnectorRequestServicenowItomConnectorTypeIDDotServicenowMinusItom: - *s = UpdateConnectorRequestServicenowItomConnectorTypeIDDotServicenowMinusItom - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - // Ref: #/components/schemas/update_connector_request_swimlane type UpdateConnectorRequestSwimlane struct { Config ConfigPropertiesSwimlane `json:"config"` @@ -8541,31 +8317,3 @@ func (s *UpdateConnectorRequestSwimlane) SetName(val string) { func (s *UpdateConnectorRequestSwimlane) SetSecrets(val SecretsPropertiesSwimlane) { s.Secrets = val } - -// The type of connector. -type UpdateConnectorRequestSwimlaneConnectorTypeID string - -const ( - UpdateConnectorRequestSwimlaneConnectorTypeIDDotSwimlane UpdateConnectorRequestSwimlaneConnectorTypeID = ".swimlane" -) - -// MarshalText implements encoding.TextMarshaler. -func (s UpdateConnectorRequestSwimlaneConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case UpdateConnectorRequestSwimlaneConnectorTypeIDDotSwimlane: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *UpdateConnectorRequestSwimlaneConnectorTypeID) UnmarshalText(data []byte) error { - switch UpdateConnectorRequestSwimlaneConnectorTypeID(data) { - case UpdateConnectorRequestSwimlaneConnectorTypeIDDotSwimlane: - *s = UpdateConnectorRequestSwimlaneConnectorTypeIDDotSwimlane - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} diff --git a/generated/connectors/oas_validators_gen.go b/generated/connectors/oas_validators_gen.go index f4fff0dbb..434ae1e5a 100644 --- a/generated/connectors/oas_validators_gen.go +++ b/generated/connectors/oas_validators_gen.go @@ -1020,70 +1020,6 @@ func (s *UpdateConnectorRequestCasesWebhook) Validate() error { } return nil } -func (s UpdateConnectorRequestCasesWebhookConnectorTypeID) Validate() error { - switch s { - case ".cases-webhook": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s UpdateConnectorRequestIndexConnectorTypeID) Validate() error { - switch s { - case ".index": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s UpdateConnectorRequestJiraConnectorTypeID) Validate() error { - switch s { - case ".jira": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s UpdateConnectorRequestOpsgenieConnectorTypeID) Validate() error { - switch s { - case ".opsgenie": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s UpdateConnectorRequestResilientConnectorTypeID) Validate() error { - switch s { - case ".resilient": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s UpdateConnectorRequestServerlogConnectorTypeID) Validate() error { - switch s { - case ".server-log": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s UpdateConnectorRequestServicenowConnectorTypeID) Validate() error { - switch s { - case ".servicenow": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s UpdateConnectorRequestServicenowItomConnectorTypeID) Validate() error { - switch s { - case ".servicenow-itom": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} func (s *UpdateConnectorRequestSwimlane) Validate() error { var failures []validate.FieldError if err := func() error { @@ -1102,11 +1038,3 @@ func (s *UpdateConnectorRequestSwimlane) Validate() error { } return nil } -func (s UpdateConnectorRequestSwimlaneConnectorTypeID) Validate() error { - switch s { - case ".swimlane": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} diff --git a/internal/clients/api_client.go b/internal/clients/api_client.go index e80680e72..e06c6f44a 100644 --- a/internal/clients/api_client.go +++ b/internal/clients/api_client.go @@ -64,7 +64,7 @@ type ApiClient struct { elasticsearchClusterInfo *models.ClusterInfo kibana *kibana.Client alerting alerting.AlertingApi - actionConnectors *connectors.Client + connectors *connectors.Client kibanaConfig kibana.Config version string } @@ -123,18 +123,18 @@ func NewAcceptanceTestingClient() (*ApiClient, error) { return nil, err } - actionConnectors, err := buildActionConnectorClient(baseConfig, kibanaConfig) + actionConnectors, err := buildConnectorsClient(baseConfig, kibanaConfig) if err != nil { return nil, fmt.Errorf("cannot create Kibana actions client: [%w]", err) } return &ApiClient{ - elasticsearch: es, - kibana: kib, - alerting: buildAlertingClient(baseConfig, kibanaConfig).AlertingApi, - actionConnectors: actionConnectors, - kibanaConfig: kibanaConfig, - version: "acceptance-testing", + elasticsearch: es, + kibana: kib, + alerting: buildAlertingClient(baseConfig, kibanaConfig).AlertingApi, + connectors: actionConnectors, + kibanaConfig: kibanaConfig, + version: "acceptance-testing", }, nil } @@ -199,11 +199,11 @@ func (a *ApiClient) GetAlertingClient() (alerting.AlertingApi, error) { } func (a *ApiClient) GetKibanaActionConnectorClient(ctx context.Context) (*connectors.Client, context.Context, error) { - if a.actionConnectors == nil { + if a.connectors == nil { return nil, nil, errors.New("kibana action connector client not found") } - return a.actionConnectors, ctx, nil + return a.connectors, ctx, nil } func (a *ApiClient) SetAlertingAuthContext(ctx context.Context) context.Context { @@ -536,7 +536,7 @@ func (sec SecuritySource) BasicAuth(ctx context.Context, operationName string) ( }, nil } -func buildActionConnectorClient(baseConfig BaseConfig, config kibana.Config) (*connectors.Client, error) { +func buildConnectorsClient(baseConfig BaseConfig, config kibana.Config) (*connectors.Client, error) { return connectors.NewClient( config.Address, SecuritySource{username: config.Username, password: config.Password}, @@ -564,7 +564,7 @@ func newApiClient(d *schema.ResourceData, version string) (*ApiClient, diag.Diag alertingClient := buildAlertingClient(baseConfig, kibanaConfig) - actionConnectorClient, err := buildActionConnectorClient(baseConfig, kibanaConfig) + connectorsClient, err := buildConnectorsClient(baseConfig, kibanaConfig) if err != nil { return nil, diag.FromErr(fmt.Errorf("cannot create Kibana actions client: [%w]", err)) } @@ -575,7 +575,7 @@ func newApiClient(d *schema.ResourceData, version string) (*ApiClient, diag.Diag kibana: kibanaClient, kibanaConfig: kibanaConfig, alerting: alertingClient.AlertingApi, - actionConnectors: actionConnectorClient, + connectors: connectorsClient, version: version, }, nil } diff --git a/internal/clients/kibana/action_connector_test.go b/internal/clients/kibana/connector_test.go similarity index 100% rename from internal/clients/kibana/action_connector_test.go rename to internal/clients/kibana/connector_test.go From 8202acd335ac21f29b22b2932912a78c2475eb72 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Mon, 1 May 2023 18:36:57 +0200 Subject: [PATCH 11/59] Code generation based on ogen and modified bundled.yaml Ogen cannot generate code for `oneOf` without discriminator or unique fields. This is the problem for Update where payload doesn't and should not have `connector_type_id` field that is the only candidate for discriminator. --- connectors_gen.go | 4 +- generated/connectors/oas_cfg_gen.go | 141 - generated/connectors/oas_client_gen.go | 4 - generated/connectors/oas_handlers_gen.go | 2306 ----------------- generated/connectors/oas_middleware_gen.go | 10 - generated/connectors/oas_parameters_gen.go | 1517 ----------- .../connectors/oas_request_decoders_gen.go | 347 --- .../connectors/oas_response_encoders_gen.go | 463 ---- generated/connectors/oas_router_gen.go | 611 ----- generated/connectors/oas_security_gen.go | 56 - generated/connectors/oas_server_gen.go | 131 - generated/connectors/oas_unimplemented_gen.go | 152 -- internal/clients/kibana/connector.go | 8 +- internal/kibana/connector.go | 8 +- internal/kibana/connector_test.go | 2 +- 15 files changed, 12 insertions(+), 5748 deletions(-) delete mode 100644 generated/connectors/oas_handlers_gen.go delete mode 100644 generated/connectors/oas_middleware_gen.go delete mode 100644 generated/connectors/oas_request_decoders_gen.go delete mode 100644 generated/connectors/oas_response_encoders_gen.go delete mode 100644 generated/connectors/oas_router_gen.go delete mode 100644 generated/connectors/oas_server_gen.go delete mode 100644 generated/connectors/oas_unimplemented_gen.go diff --git a/connectors_gen.go b/connectors_gen.go index e09652256..5ef7046c8 100644 --- a/connectors_gen.go +++ b/connectors_gen.go @@ -1,3 +1,5 @@ -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --target generated/connectors -package connectors --clean --debug.ignoreNotImplemented "discriminator inference" ./generated/connectors/bundled.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --infer-types --no-server --target generated/connectors -package connectors --clean --debug.ignoreNotImplemented "discriminator inference" ./generated/connectors/bundled.yaml + +// go:generate go run github.com/ogen-go/ogen/cmd/ogen --help package main diff --git a/generated/connectors/oas_cfg_gen.go b/generated/connectors/oas_cfg_gen.go index 3d39a4e9d..66e05cfbe 100644 --- a/generated/connectors/oas_cfg_gen.go +++ b/generated/connectors/oas_cfg_gen.go @@ -11,16 +11,12 @@ import ( "go.opentelemetry.io/otel/trace" ht "github.com/ogen-go/ogen/http" - "github.com/ogen-go/ogen/middleware" - "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/otelogen" ) var ( // Allocate option closure once. clientSpanKind = trace.WithSpanKind(trace.SpanKindClient) - // Allocate option closure once. - serverSpanKind = trace.WithSpanKind(trace.SpanKindServer) ) type ( @@ -48,84 +44,6 @@ func (cfg *otelConfig) initOTEL() { cfg.Meter = cfg.MeterProvider.Meter(otelogen.Name) } -// ErrorHandler is error handler. -type ErrorHandler = ogenerrors.ErrorHandler - -type serverConfig struct { - otelConfig - NotFound http.HandlerFunc - MethodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string) - ErrorHandler ErrorHandler - Prefix string - Middleware Middleware - MaxMultipartMemory int64 -} - -// ServerOption is server config option. -type ServerOption interface { - applyServer(*serverConfig) -} - -var _ = []ServerOption{ - (optionFunc[serverConfig])(nil), - (otelOptionFunc)(nil), -} - -func (o optionFunc[C]) applyServer(c *C) { - o(c) -} - -func (o otelOptionFunc) applyServer(c *serverConfig) { - o(&c.otelConfig) -} - -func newServerConfig(opts ...ServerOption) serverConfig { - cfg := serverConfig{ - NotFound: http.NotFound, - MethodNotAllowed: func(w http.ResponseWriter, r *http.Request, allowed string) { - w.Header().Set("Allow", allowed) - w.WriteHeader(http.StatusMethodNotAllowed) - }, - ErrorHandler: ogenerrors.DefaultErrorHandler, - Middleware: nil, - MaxMultipartMemory: 32 << 20, // 32 MB - } - for _, opt := range opts { - opt.applyServer(&cfg) - } - cfg.initOTEL() - return cfg -} - -type baseServer struct { - cfg serverConfig - requests instrument.Int64Counter - errors instrument.Int64Counter - duration instrument.Int64Histogram -} - -func (s baseServer) notFound(w http.ResponseWriter, r *http.Request) { - s.cfg.NotFound(w, r) -} - -func (s baseServer) notAllowed(w http.ResponseWriter, r *http.Request, allowed string) { - s.cfg.MethodNotAllowed(w, r, allowed) -} - -func (cfg serverConfig) baseServer() (s baseServer, err error) { - s = baseServer{cfg: cfg} - if s.requests, err = s.cfg.Meter.Int64Counter(otelogen.ServerRequestCount); err != nil { - return s, err - } - if s.errors, err = s.cfg.Meter.Int64Counter(otelogen.ServerErrorsCount); err != nil { - return s, err - } - if s.duration, err = s.cfg.Meter.Int64Histogram(otelogen.ServerDuration); err != nil { - return s, err - } - return s, nil -} - type clientConfig struct { otelConfig Client ht.Client @@ -183,7 +101,6 @@ func (cfg clientConfig) baseClient() (c baseClient, err error) { // Option is config option. type Option interface { - ServerOption ClientOption } @@ -217,61 +134,3 @@ func WithClient(client ht.Client) ClientOption { } }) } - -// WithNotFound specifies Not Found handler to use. -func WithNotFound(notFound http.HandlerFunc) ServerOption { - return optionFunc[serverConfig](func(cfg *serverConfig) { - if notFound != nil { - cfg.NotFound = notFound - } - }) -} - -// WithMethodNotAllowed specifies Method Not Allowed handler to use. -func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption { - return optionFunc[serverConfig](func(cfg *serverConfig) { - if methodNotAllowed != nil { - cfg.MethodNotAllowed = methodNotAllowed - } - }) -} - -// WithErrorHandler specifies error handler to use. -func WithErrorHandler(h ErrorHandler) ServerOption { - return optionFunc[serverConfig](func(cfg *serverConfig) { - if h != nil { - cfg.ErrorHandler = h - } - }) -} - -// WithPathPrefix specifies server path prefix. -func WithPathPrefix(prefix string) ServerOption { - return optionFunc[serverConfig](func(cfg *serverConfig) { - cfg.Prefix = prefix - }) -} - -// WithMiddleware specifies middlewares to use. -func WithMiddleware(m ...Middleware) ServerOption { - return optionFunc[serverConfig](func(cfg *serverConfig) { - switch len(m) { - case 0: - cfg.Middleware = nil - case 1: - cfg.Middleware = m[0] - default: - cfg.Middleware = middleware.ChainMiddlewares(m...) - } - }) -} - -// WithMaxMultipartMemory specifies limit of memory for storing file parts. -// File parts which can't be stored in memory will be stored on disk in temporary files. -func WithMaxMultipartMemory(max int64) ServerOption { - return optionFunc[serverConfig](func(cfg *serverConfig) { - if max > 0 { - cfg.MaxMultipartMemory = max - } - }) -} diff --git a/generated/connectors/oas_client_gen.go b/generated/connectors/oas_client_gen.go index 0d3cc6db2..d648a7e3e 100644 --- a/generated/connectors/oas_client_gen.go +++ b/generated/connectors/oas_client_gen.go @@ -27,10 +27,6 @@ type Client struct { baseClient } -var _ Handler = struct { - *Client -}{} - func trimTrailingSlashes(u *url.URL) { u.Path = strings.TrimRight(u.Path, "/") u.RawPath = strings.TrimRight(u.RawPath, "/") diff --git a/generated/connectors/oas_handlers_gen.go b/generated/connectors/oas_handlers_gen.go deleted file mode 100644 index 6a509e88e..000000000 --- a/generated/connectors/oas_handlers_gen.go +++ /dev/null @@ -1,2306 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package connectors - -import ( - "context" - "net/http" - "time" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" - "go.opentelemetry.io/otel/trace" - - "github.com/ogen-go/ogen/middleware" - "github.com/ogen-go/ogen/ogenerrors" - "github.com/ogen-go/ogen/otelogen" -) - -// handleCreateConnectorRequest handles createConnector operation. -// -// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** -// section of the Kibana feature privileges. -// -// POST /s/{spaceId}/api/actions/connector -func (s *Server) handleCreateConnectorRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("createConnector"), - semconv.HTTPMethodKey.String("POST"), - semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/connector"), - } - - // Start a span for this request. - ctx, span := s.cfg.Tracer.Start(r.Context(), "CreateConnector", - trace.WithAttributes(otelAttrs...), - serverSpanKind, - ) - defer span.End() - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - s.requests.Add(ctx, 1, otelAttrs...) - - var ( - recordError = func(stage string, err error) { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - s.errors.Add(ctx, 1, otelAttrs...) - } - err error - opErrContext = ogenerrors.OperationContext{ - Name: "CreateConnector", - ID: "createConnector", - } - ) - { - type bitset = [1]uint8 - var satisfied bitset - { - sctx, ok, err := s.securityBasicAuth(ctx, "CreateConnector", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "BasicAuth", - Err: err, - } - recordError("Security:BasicAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 0 - ctx = sctx - } - } - { - sctx, ok, err := s.securityApiKeyAuth(ctx, "CreateConnector", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "ApiKeyAuth", - Err: err, - } - recordError("Security:ApiKeyAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 1 - ctx = sctx - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, - } - recordError("Security", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - } - params, err := decodeCreateConnectorParams(args, argsEscaped, r) - if err != nil { - err = &ogenerrors.DecodeParamsError{ - OperationContext: opErrContext, - Err: err, - } - recordError("DecodeParams", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - request, close, err := s.decodeCreateConnectorRequest(r) - if err != nil { - err = &ogenerrors.DecodeRequestError{ - OperationContext: opErrContext, - Err: err, - } - recordError("DecodeRequest", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - defer func() { - if err := close(); err != nil { - recordError("CloseRequest", err) - } - }() - - var response CreateConnectorRes - if m := s.cfg.Middleware; m != nil { - mreq := middleware.Request{ - Context: ctx, - OperationName: "CreateConnector", - OperationID: "createConnector", - Body: request, - Params: middleware.Parameters{ - { - Name: "kbn-xsrf", - In: "header", - }: params.KbnXSRF, - { - Name: "spaceId", - In: "path", - }: params.SpaceId, - }, - Raw: r, - } - - type ( - Request = CreateConnectorReq - Params = CreateConnectorParams - Response = CreateConnectorRes - ) - response, err = middleware.HookMiddleware[ - Request, - Params, - Response, - ]( - m, - mreq, - unpackCreateConnectorParams, - func(ctx context.Context, request Request, params Params) (response Response, err error) { - response, err = s.h.CreateConnector(ctx, request, params) - return response, err - }, - ) - } else { - response, err = s.h.CreateConnector(ctx, request, params) - } - if err != nil { - recordError("Internal", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - if err := encodeCreateConnectorResponse(response, w, span); err != nil { - recordError("EncodeResponse", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } -} - -// handleDeleteConnectorRequest handles deleteConnector operation. -// -// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** -// section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be -// recovered. -// -// DELETE /s/{spaceId}/api/actions/connector/{connectorId} -func (s *Server) handleDeleteConnectorRequest(args [2]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("deleteConnector"), - semconv.HTTPMethodKey.String("DELETE"), - semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/connector/{connectorId}"), - } - - // Start a span for this request. - ctx, span := s.cfg.Tracer.Start(r.Context(), "DeleteConnector", - trace.WithAttributes(otelAttrs...), - serverSpanKind, - ) - defer span.End() - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - s.requests.Add(ctx, 1, otelAttrs...) - - var ( - recordError = func(stage string, err error) { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - s.errors.Add(ctx, 1, otelAttrs...) - } - err error - opErrContext = ogenerrors.OperationContext{ - Name: "DeleteConnector", - ID: "deleteConnector", - } - ) - { - type bitset = [1]uint8 - var satisfied bitset - { - sctx, ok, err := s.securityBasicAuth(ctx, "DeleteConnector", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "BasicAuth", - Err: err, - } - recordError("Security:BasicAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 0 - ctx = sctx - } - } - { - sctx, ok, err := s.securityApiKeyAuth(ctx, "DeleteConnector", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "ApiKeyAuth", - Err: err, - } - recordError("Security:ApiKeyAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 1 - ctx = sctx - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, - } - recordError("Security", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - } - params, err := decodeDeleteConnectorParams(args, argsEscaped, r) - if err != nil { - err = &ogenerrors.DecodeParamsError{ - OperationContext: opErrContext, - Err: err, - } - recordError("DecodeParams", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - var response DeleteConnectorRes - if m := s.cfg.Middleware; m != nil { - mreq := middleware.Request{ - Context: ctx, - OperationName: "DeleteConnector", - OperationID: "deleteConnector", - Body: nil, - Params: middleware.Parameters{ - { - Name: "kbn-xsrf", - In: "header", - }: params.KbnXSRF, - { - Name: "connectorId", - In: "path", - }: params.ConnectorId, - { - Name: "spaceId", - In: "path", - }: params.SpaceId, - }, - Raw: r, - } - - type ( - Request = struct{} - Params = DeleteConnectorParams - Response = DeleteConnectorRes - ) - response, err = middleware.HookMiddleware[ - Request, - Params, - Response, - ]( - m, - mreq, - unpackDeleteConnectorParams, - func(ctx context.Context, request Request, params Params) (response Response, err error) { - response, err = s.h.DeleteConnector(ctx, params) - return response, err - }, - ) - } else { - response, err = s.h.DeleteConnector(ctx, params) - } - if err != nil { - recordError("Internal", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - if err := encodeDeleteConnectorResponse(response, w, span); err != nil { - recordError("EncodeResponse", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } -} - -// handleGetConnectorRequest handles getConnector operation. -// -// You must have `read` privileges for the **Actions and Connectors** feature in the **Management** -// section of the Kibana feature privileges. -// -// GET /s/{spaceId}/api/actions/connector/{connectorId} -func (s *Server) handleGetConnectorRequest(args [2]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("getConnector"), - semconv.HTTPMethodKey.String("GET"), - semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/connector/{connectorId}"), - } - - // Start a span for this request. - ctx, span := s.cfg.Tracer.Start(r.Context(), "GetConnector", - trace.WithAttributes(otelAttrs...), - serverSpanKind, - ) - defer span.End() - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - s.requests.Add(ctx, 1, otelAttrs...) - - var ( - recordError = func(stage string, err error) { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - s.errors.Add(ctx, 1, otelAttrs...) - } - err error - opErrContext = ogenerrors.OperationContext{ - Name: "GetConnector", - ID: "getConnector", - } - ) - { - type bitset = [1]uint8 - var satisfied bitset - { - sctx, ok, err := s.securityBasicAuth(ctx, "GetConnector", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "BasicAuth", - Err: err, - } - recordError("Security:BasicAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 0 - ctx = sctx - } - } - { - sctx, ok, err := s.securityApiKeyAuth(ctx, "GetConnector", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "ApiKeyAuth", - Err: err, - } - recordError("Security:ApiKeyAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 1 - ctx = sctx - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, - } - recordError("Security", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - } - params, err := decodeGetConnectorParams(args, argsEscaped, r) - if err != nil { - err = &ogenerrors.DecodeParamsError{ - OperationContext: opErrContext, - Err: err, - } - recordError("DecodeParams", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - var response GetConnectorRes - if m := s.cfg.Middleware; m != nil { - mreq := middleware.Request{ - Context: ctx, - OperationName: "GetConnector", - OperationID: "getConnector", - Body: nil, - Params: middleware.Parameters{ - { - Name: "connectorId", - In: "path", - }: params.ConnectorId, - { - Name: "spaceId", - In: "path", - }: params.SpaceId, - }, - Raw: r, - } - - type ( - Request = struct{} - Params = GetConnectorParams - Response = GetConnectorRes - ) - response, err = middleware.HookMiddleware[ - Request, - Params, - Response, - ]( - m, - mreq, - unpackGetConnectorParams, - func(ctx context.Context, request Request, params Params) (response Response, err error) { - response, err = s.h.GetConnector(ctx, params) - return response, err - }, - ) - } else { - response, err = s.h.GetConnector(ctx, params) - } - if err != nil { - recordError("Internal", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - if err := encodeGetConnectorResponse(response, w, span); err != nil { - recordError("EncodeResponse", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } -} - -// handleGetConnectorTypesRequest handles getConnectorTypes operation. -// -// You do not need any Kibana feature privileges to run this API. -// -// GET /s/{spaceId}/api/actions/connector_types -func (s *Server) handleGetConnectorTypesRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("getConnectorTypes"), - semconv.HTTPMethodKey.String("GET"), - semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/connector_types"), - } - - // Start a span for this request. - ctx, span := s.cfg.Tracer.Start(r.Context(), "GetConnectorTypes", - trace.WithAttributes(otelAttrs...), - serverSpanKind, - ) - defer span.End() - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - s.requests.Add(ctx, 1, otelAttrs...) - - var ( - recordError = func(stage string, err error) { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - s.errors.Add(ctx, 1, otelAttrs...) - } - err error - opErrContext = ogenerrors.OperationContext{ - Name: "GetConnectorTypes", - ID: "getConnectorTypes", - } - ) - { - type bitset = [1]uint8 - var satisfied bitset - { - sctx, ok, err := s.securityBasicAuth(ctx, "GetConnectorTypes", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "BasicAuth", - Err: err, - } - recordError("Security:BasicAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 0 - ctx = sctx - } - } - { - sctx, ok, err := s.securityApiKeyAuth(ctx, "GetConnectorTypes", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "ApiKeyAuth", - Err: err, - } - recordError("Security:ApiKeyAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 1 - ctx = sctx - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, - } - recordError("Security", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - } - params, err := decodeGetConnectorTypesParams(args, argsEscaped, r) - if err != nil { - err = &ogenerrors.DecodeParamsError{ - OperationContext: opErrContext, - Err: err, - } - recordError("DecodeParams", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - var response GetConnectorTypesRes - if m := s.cfg.Middleware; m != nil { - mreq := middleware.Request{ - Context: ctx, - OperationName: "GetConnectorTypes", - OperationID: "getConnectorTypes", - Body: nil, - Params: middleware.Parameters{ - { - Name: "spaceId", - In: "path", - }: params.SpaceId, - { - Name: "feature_id", - In: "query", - }: params.FeatureID, - }, - Raw: r, - } - - type ( - Request = struct{} - Params = GetConnectorTypesParams - Response = GetConnectorTypesRes - ) - response, err = middleware.HookMiddleware[ - Request, - Params, - Response, - ]( - m, - mreq, - unpackGetConnectorTypesParams, - func(ctx context.Context, request Request, params Params) (response Response, err error) { - response, err = s.h.GetConnectorTypes(ctx, params) - return response, err - }, - ) - } else { - response, err = s.h.GetConnectorTypes(ctx, params) - } - if err != nil { - recordError("Internal", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - if err := encodeGetConnectorTypesResponse(response, w, span); err != nil { - recordError("EncodeResponse", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } -} - -// handleGetConnectorsRequest handles getConnectors operation. -// -// You must have `read` privileges for the **Actions and Connectors** feature in the **Management** -// section of the Kibana feature privileges. -// -// GET /s/{spaceId}/api/actions/connectors -func (s *Server) handleGetConnectorsRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("getConnectors"), - semconv.HTTPMethodKey.String("GET"), - semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/connectors"), - } - - // Start a span for this request. - ctx, span := s.cfg.Tracer.Start(r.Context(), "GetConnectors", - trace.WithAttributes(otelAttrs...), - serverSpanKind, - ) - defer span.End() - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - s.requests.Add(ctx, 1, otelAttrs...) - - var ( - recordError = func(stage string, err error) { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - s.errors.Add(ctx, 1, otelAttrs...) - } - err error - opErrContext = ogenerrors.OperationContext{ - Name: "GetConnectors", - ID: "getConnectors", - } - ) - { - type bitset = [1]uint8 - var satisfied bitset - { - sctx, ok, err := s.securityBasicAuth(ctx, "GetConnectors", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "BasicAuth", - Err: err, - } - recordError("Security:BasicAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 0 - ctx = sctx - } - } - { - sctx, ok, err := s.securityApiKeyAuth(ctx, "GetConnectors", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "ApiKeyAuth", - Err: err, - } - recordError("Security:ApiKeyAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 1 - ctx = sctx - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, - } - recordError("Security", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - } - params, err := decodeGetConnectorsParams(args, argsEscaped, r) - if err != nil { - err = &ogenerrors.DecodeParamsError{ - OperationContext: opErrContext, - Err: err, - } - recordError("DecodeParams", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - var response GetConnectorsRes - if m := s.cfg.Middleware; m != nil { - mreq := middleware.Request{ - Context: ctx, - OperationName: "GetConnectors", - OperationID: "getConnectors", - Body: nil, - Params: middleware.Parameters{ - { - Name: "spaceId", - In: "path", - }: params.SpaceId, - }, - Raw: r, - } - - type ( - Request = struct{} - Params = GetConnectorsParams - Response = GetConnectorsRes - ) - response, err = middleware.HookMiddleware[ - Request, - Params, - Response, - ]( - m, - mreq, - unpackGetConnectorsParams, - func(ctx context.Context, request Request, params Params) (response Response, err error) { - response, err = s.h.GetConnectors(ctx, params) - return response, err - }, - ) - } else { - response, err = s.h.GetConnectors(ctx, params) - } - if err != nil { - recordError("Internal", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - if err := encodeGetConnectorsResponse(response, w, span); err != nil { - recordError("EncodeResponse", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } -} - -// handleLegacyCreateConnectorRequest handles legacyCreateConnector operation. -// -// Deprecated in 7.13.0. Use the create connector API instead. -// -// Deprecated: schema marks this operation as deprecated. -// -// POST /s/{spaceId}/api/actions -func (s *Server) handleLegacyCreateConnectorRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("legacyCreateConnector"), - semconv.HTTPMethodKey.String("POST"), - semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions"), - } - - // Start a span for this request. - ctx, span := s.cfg.Tracer.Start(r.Context(), "LegacyCreateConnector", - trace.WithAttributes(otelAttrs...), - serverSpanKind, - ) - defer span.End() - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - s.requests.Add(ctx, 1, otelAttrs...) - - var ( - recordError = func(stage string, err error) { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - s.errors.Add(ctx, 1, otelAttrs...) - } - err error - opErrContext = ogenerrors.OperationContext{ - Name: "LegacyCreateConnector", - ID: "legacyCreateConnector", - } - ) - { - type bitset = [1]uint8 - var satisfied bitset - { - sctx, ok, err := s.securityBasicAuth(ctx, "LegacyCreateConnector", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "BasicAuth", - Err: err, - } - recordError("Security:BasicAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 0 - ctx = sctx - } - } - { - sctx, ok, err := s.securityApiKeyAuth(ctx, "LegacyCreateConnector", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "ApiKeyAuth", - Err: err, - } - recordError("Security:ApiKeyAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 1 - ctx = sctx - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, - } - recordError("Security", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - } - params, err := decodeLegacyCreateConnectorParams(args, argsEscaped, r) - if err != nil { - err = &ogenerrors.DecodeParamsError{ - OperationContext: opErrContext, - Err: err, - } - recordError("DecodeParams", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - request, close, err := s.decodeLegacyCreateConnectorRequest(r) - if err != nil { - err = &ogenerrors.DecodeRequestError{ - OperationContext: opErrContext, - Err: err, - } - recordError("DecodeRequest", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - defer func() { - if err := close(); err != nil { - recordError("CloseRequest", err) - } - }() - - var response LegacyCreateConnectorRes - if m := s.cfg.Middleware; m != nil { - mreq := middleware.Request{ - Context: ctx, - OperationName: "LegacyCreateConnector", - OperationID: "legacyCreateConnector", - Body: request, - Params: middleware.Parameters{ - { - Name: "kbn-xsrf", - In: "header", - }: params.KbnXSRF, - { - Name: "spaceId", - In: "path", - }: params.SpaceId, - }, - Raw: r, - } - - type ( - Request = *LegacyCreateConnectorReq - Params = LegacyCreateConnectorParams - Response = LegacyCreateConnectorRes - ) - response, err = middleware.HookMiddleware[ - Request, - Params, - Response, - ]( - m, - mreq, - unpackLegacyCreateConnectorParams, - func(ctx context.Context, request Request, params Params) (response Response, err error) { - response, err = s.h.LegacyCreateConnector(ctx, request, params) - return response, err - }, - ) - } else { - response, err = s.h.LegacyCreateConnector(ctx, request, params) - } - if err != nil { - recordError("Internal", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - if err := encodeLegacyCreateConnectorResponse(response, w, span); err != nil { - recordError("EncodeResponse", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } -} - -// handleLegacyDeleteConnectorRequest handles legacyDeleteConnector operation. -// -// Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, -// it cannot be recovered. -// -// Deprecated: schema marks this operation as deprecated. -// -// DELETE /s/{spaceId}/api/actions/action/{actionId} -func (s *Server) handleLegacyDeleteConnectorRequest(args [2]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("legacyDeleteConnector"), - semconv.HTTPMethodKey.String("DELETE"), - semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/action/{actionId}"), - } - - // Start a span for this request. - ctx, span := s.cfg.Tracer.Start(r.Context(), "LegacyDeleteConnector", - trace.WithAttributes(otelAttrs...), - serverSpanKind, - ) - defer span.End() - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - s.requests.Add(ctx, 1, otelAttrs...) - - var ( - recordError = func(stage string, err error) { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - s.errors.Add(ctx, 1, otelAttrs...) - } - err error - opErrContext = ogenerrors.OperationContext{ - Name: "LegacyDeleteConnector", - ID: "legacyDeleteConnector", - } - ) - { - type bitset = [1]uint8 - var satisfied bitset - { - sctx, ok, err := s.securityBasicAuth(ctx, "LegacyDeleteConnector", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "BasicAuth", - Err: err, - } - recordError("Security:BasicAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 0 - ctx = sctx - } - } - { - sctx, ok, err := s.securityApiKeyAuth(ctx, "LegacyDeleteConnector", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "ApiKeyAuth", - Err: err, - } - recordError("Security:ApiKeyAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 1 - ctx = sctx - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, - } - recordError("Security", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - } - params, err := decodeLegacyDeleteConnectorParams(args, argsEscaped, r) - if err != nil { - err = &ogenerrors.DecodeParamsError{ - OperationContext: opErrContext, - Err: err, - } - recordError("DecodeParams", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - var response LegacyDeleteConnectorRes - if m := s.cfg.Middleware; m != nil { - mreq := middleware.Request{ - Context: ctx, - OperationName: "LegacyDeleteConnector", - OperationID: "legacyDeleteConnector", - Body: nil, - Params: middleware.Parameters{ - { - Name: "kbn-xsrf", - In: "header", - }: params.KbnXSRF, - { - Name: "actionId", - In: "path", - }: params.ActionId, - { - Name: "spaceId", - In: "path", - }: params.SpaceId, - }, - Raw: r, - } - - type ( - Request = struct{} - Params = LegacyDeleteConnectorParams - Response = LegacyDeleteConnectorRes - ) - response, err = middleware.HookMiddleware[ - Request, - Params, - Response, - ]( - m, - mreq, - unpackLegacyDeleteConnectorParams, - func(ctx context.Context, request Request, params Params) (response Response, err error) { - response, err = s.h.LegacyDeleteConnector(ctx, params) - return response, err - }, - ) - } else { - response, err = s.h.LegacyDeleteConnector(ctx, params) - } - if err != nil { - recordError("Internal", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - if err := encodeLegacyDeleteConnectorResponse(response, w, span); err != nil { - recordError("EncodeResponse", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } -} - -// handleLegacyGetConnectorRequest handles legacyGetConnector operation. -// -// Deprecated in 7.13.0. Use the get connector API instead. -// -// Deprecated: schema marks this operation as deprecated. -// -// GET /s/{spaceId}/api/actions/action/{actionId} -func (s *Server) handleLegacyGetConnectorRequest(args [2]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("legacyGetConnector"), - semconv.HTTPMethodKey.String("GET"), - semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/action/{actionId}"), - } - - // Start a span for this request. - ctx, span := s.cfg.Tracer.Start(r.Context(), "LegacyGetConnector", - trace.WithAttributes(otelAttrs...), - serverSpanKind, - ) - defer span.End() - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - s.requests.Add(ctx, 1, otelAttrs...) - - var ( - recordError = func(stage string, err error) { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - s.errors.Add(ctx, 1, otelAttrs...) - } - err error - opErrContext = ogenerrors.OperationContext{ - Name: "LegacyGetConnector", - ID: "legacyGetConnector", - } - ) - { - type bitset = [1]uint8 - var satisfied bitset - { - sctx, ok, err := s.securityBasicAuth(ctx, "LegacyGetConnector", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "BasicAuth", - Err: err, - } - recordError("Security:BasicAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 0 - ctx = sctx - } - } - { - sctx, ok, err := s.securityApiKeyAuth(ctx, "LegacyGetConnector", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "ApiKeyAuth", - Err: err, - } - recordError("Security:ApiKeyAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 1 - ctx = sctx - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, - } - recordError("Security", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - } - params, err := decodeLegacyGetConnectorParams(args, argsEscaped, r) - if err != nil { - err = &ogenerrors.DecodeParamsError{ - OperationContext: opErrContext, - Err: err, - } - recordError("DecodeParams", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - var response LegacyGetConnectorRes - if m := s.cfg.Middleware; m != nil { - mreq := middleware.Request{ - Context: ctx, - OperationName: "LegacyGetConnector", - OperationID: "legacyGetConnector", - Body: nil, - Params: middleware.Parameters{ - { - Name: "actionId", - In: "path", - }: params.ActionId, - { - Name: "spaceId", - In: "path", - }: params.SpaceId, - }, - Raw: r, - } - - type ( - Request = struct{} - Params = LegacyGetConnectorParams - Response = LegacyGetConnectorRes - ) - response, err = middleware.HookMiddleware[ - Request, - Params, - Response, - ]( - m, - mreq, - unpackLegacyGetConnectorParams, - func(ctx context.Context, request Request, params Params) (response Response, err error) { - response, err = s.h.LegacyGetConnector(ctx, params) - return response, err - }, - ) - } else { - response, err = s.h.LegacyGetConnector(ctx, params) - } - if err != nil { - recordError("Internal", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - if err := encodeLegacyGetConnectorResponse(response, w, span); err != nil { - recordError("EncodeResponse", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } -} - -// handleLegacyGetConnectorTypesRequest handles legacyGetConnectorTypes operation. -// -// Deprecated in 7.13.0. Use the get all connector types API instead. -// -// Deprecated: schema marks this operation as deprecated. -// -// GET /s/{spaceId}/api/actions/list_action_types -func (s *Server) handleLegacyGetConnectorTypesRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("legacyGetConnectorTypes"), - semconv.HTTPMethodKey.String("GET"), - semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/list_action_types"), - } - - // Start a span for this request. - ctx, span := s.cfg.Tracer.Start(r.Context(), "LegacyGetConnectorTypes", - trace.WithAttributes(otelAttrs...), - serverSpanKind, - ) - defer span.End() - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - s.requests.Add(ctx, 1, otelAttrs...) - - var ( - recordError = func(stage string, err error) { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - s.errors.Add(ctx, 1, otelAttrs...) - } - err error - opErrContext = ogenerrors.OperationContext{ - Name: "LegacyGetConnectorTypes", - ID: "legacyGetConnectorTypes", - } - ) - { - type bitset = [1]uint8 - var satisfied bitset - { - sctx, ok, err := s.securityBasicAuth(ctx, "LegacyGetConnectorTypes", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "BasicAuth", - Err: err, - } - recordError("Security:BasicAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 0 - ctx = sctx - } - } - { - sctx, ok, err := s.securityApiKeyAuth(ctx, "LegacyGetConnectorTypes", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "ApiKeyAuth", - Err: err, - } - recordError("Security:ApiKeyAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 1 - ctx = sctx - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, - } - recordError("Security", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - } - params, err := decodeLegacyGetConnectorTypesParams(args, argsEscaped, r) - if err != nil { - err = &ogenerrors.DecodeParamsError{ - OperationContext: opErrContext, - Err: err, - } - recordError("DecodeParams", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - var response LegacyGetConnectorTypesRes - if m := s.cfg.Middleware; m != nil { - mreq := middleware.Request{ - Context: ctx, - OperationName: "LegacyGetConnectorTypes", - OperationID: "legacyGetConnectorTypes", - Body: nil, - Params: middleware.Parameters{ - { - Name: "spaceId", - In: "path", - }: params.SpaceId, - }, - Raw: r, - } - - type ( - Request = struct{} - Params = LegacyGetConnectorTypesParams - Response = LegacyGetConnectorTypesRes - ) - response, err = middleware.HookMiddleware[ - Request, - Params, - Response, - ]( - m, - mreq, - unpackLegacyGetConnectorTypesParams, - func(ctx context.Context, request Request, params Params) (response Response, err error) { - response, err = s.h.LegacyGetConnectorTypes(ctx, params) - return response, err - }, - ) - } else { - response, err = s.h.LegacyGetConnectorTypes(ctx, params) - } - if err != nil { - recordError("Internal", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - if err := encodeLegacyGetConnectorTypesResponse(response, w, span); err != nil { - recordError("EncodeResponse", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } -} - -// handleLegacyGetConnectorsRequest handles legacyGetConnectors operation. -// -// Deprecated in 7.13.0. Use the get all connectors API instead. -// -// Deprecated: schema marks this operation as deprecated. -// -// GET /s/{spaceId}/api/actions -func (s *Server) handleLegacyGetConnectorsRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("legacyGetConnectors"), - semconv.HTTPMethodKey.String("GET"), - semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions"), - } - - // Start a span for this request. - ctx, span := s.cfg.Tracer.Start(r.Context(), "LegacyGetConnectors", - trace.WithAttributes(otelAttrs...), - serverSpanKind, - ) - defer span.End() - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - s.requests.Add(ctx, 1, otelAttrs...) - - var ( - recordError = func(stage string, err error) { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - s.errors.Add(ctx, 1, otelAttrs...) - } - err error - opErrContext = ogenerrors.OperationContext{ - Name: "LegacyGetConnectors", - ID: "legacyGetConnectors", - } - ) - { - type bitset = [1]uint8 - var satisfied bitset - { - sctx, ok, err := s.securityBasicAuth(ctx, "LegacyGetConnectors", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "BasicAuth", - Err: err, - } - recordError("Security:BasicAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 0 - ctx = sctx - } - } - { - sctx, ok, err := s.securityApiKeyAuth(ctx, "LegacyGetConnectors", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "ApiKeyAuth", - Err: err, - } - recordError("Security:ApiKeyAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 1 - ctx = sctx - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, - } - recordError("Security", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - } - params, err := decodeLegacyGetConnectorsParams(args, argsEscaped, r) - if err != nil { - err = &ogenerrors.DecodeParamsError{ - OperationContext: opErrContext, - Err: err, - } - recordError("DecodeParams", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - var response LegacyGetConnectorsRes - if m := s.cfg.Middleware; m != nil { - mreq := middleware.Request{ - Context: ctx, - OperationName: "LegacyGetConnectors", - OperationID: "legacyGetConnectors", - Body: nil, - Params: middleware.Parameters{ - { - Name: "spaceId", - In: "path", - }: params.SpaceId, - }, - Raw: r, - } - - type ( - Request = struct{} - Params = LegacyGetConnectorsParams - Response = LegacyGetConnectorsRes - ) - response, err = middleware.HookMiddleware[ - Request, - Params, - Response, - ]( - m, - mreq, - unpackLegacyGetConnectorsParams, - func(ctx context.Context, request Request, params Params) (response Response, err error) { - response, err = s.h.LegacyGetConnectors(ctx, params) - return response, err - }, - ) - } else { - response, err = s.h.LegacyGetConnectors(ctx, params) - } - if err != nil { - recordError("Internal", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - if err := encodeLegacyGetConnectorsResponse(response, w, span); err != nil { - recordError("EncodeResponse", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } -} - -// handleLegacyRunConnectorRequest handles legacyRunConnector operation. -// -// Deprecated in 7.13.0. Use the run connector API instead. -// -// Deprecated: schema marks this operation as deprecated. -// -// POST /s/{spaceId}/api/actions/action/{actionId}/_execute -func (s *Server) handleLegacyRunConnectorRequest(args [2]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("legacyRunConnector"), - semconv.HTTPMethodKey.String("POST"), - semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/action/{actionId}/_execute"), - } - - // Start a span for this request. - ctx, span := s.cfg.Tracer.Start(r.Context(), "LegacyRunConnector", - trace.WithAttributes(otelAttrs...), - serverSpanKind, - ) - defer span.End() - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - s.requests.Add(ctx, 1, otelAttrs...) - - var ( - recordError = func(stage string, err error) { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - s.errors.Add(ctx, 1, otelAttrs...) - } - err error - opErrContext = ogenerrors.OperationContext{ - Name: "LegacyRunConnector", - ID: "legacyRunConnector", - } - ) - { - type bitset = [1]uint8 - var satisfied bitset - { - sctx, ok, err := s.securityBasicAuth(ctx, "LegacyRunConnector", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "BasicAuth", - Err: err, - } - recordError("Security:BasicAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 0 - ctx = sctx - } - } - { - sctx, ok, err := s.securityApiKeyAuth(ctx, "LegacyRunConnector", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "ApiKeyAuth", - Err: err, - } - recordError("Security:ApiKeyAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 1 - ctx = sctx - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, - } - recordError("Security", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - } - params, err := decodeLegacyRunConnectorParams(args, argsEscaped, r) - if err != nil { - err = &ogenerrors.DecodeParamsError{ - OperationContext: opErrContext, - Err: err, - } - recordError("DecodeParams", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - request, close, err := s.decodeLegacyRunConnectorRequest(r) - if err != nil { - err = &ogenerrors.DecodeRequestError{ - OperationContext: opErrContext, - Err: err, - } - recordError("DecodeRequest", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - defer func() { - if err := close(); err != nil { - recordError("CloseRequest", err) - } - }() - - var response LegacyRunConnectorRes - if m := s.cfg.Middleware; m != nil { - mreq := middleware.Request{ - Context: ctx, - OperationName: "LegacyRunConnector", - OperationID: "legacyRunConnector", - Body: request, - Params: middleware.Parameters{ - { - Name: "kbn-xsrf", - In: "header", - }: params.KbnXSRF, - { - Name: "actionId", - In: "path", - }: params.ActionId, - { - Name: "spaceId", - In: "path", - }: params.SpaceId, - }, - Raw: r, - } - - type ( - Request = *LegacyRunConnectorReq - Params = LegacyRunConnectorParams - Response = LegacyRunConnectorRes - ) - response, err = middleware.HookMiddleware[ - Request, - Params, - Response, - ]( - m, - mreq, - unpackLegacyRunConnectorParams, - func(ctx context.Context, request Request, params Params) (response Response, err error) { - response, err = s.h.LegacyRunConnector(ctx, request, params) - return response, err - }, - ) - } else { - response, err = s.h.LegacyRunConnector(ctx, request, params) - } - if err != nil { - recordError("Internal", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - if err := encodeLegacyRunConnectorResponse(response, w, span); err != nil { - recordError("EncodeResponse", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } -} - -// handleLegacyUpdateConnectorRequest handles legacyUpdateConnector operation. -// -// Deprecated in 7.13.0. Use the update connector API instead. -// -// Deprecated: schema marks this operation as deprecated. -// -// PUT /s/{spaceId}/api/actions/action/{actionId} -func (s *Server) handleLegacyUpdateConnectorRequest(args [2]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("legacyUpdateConnector"), - semconv.HTTPMethodKey.String("PUT"), - semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/action/{actionId}"), - } - - // Start a span for this request. - ctx, span := s.cfg.Tracer.Start(r.Context(), "LegacyUpdateConnector", - trace.WithAttributes(otelAttrs...), - serverSpanKind, - ) - defer span.End() - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - s.requests.Add(ctx, 1, otelAttrs...) - - var ( - recordError = func(stage string, err error) { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - s.errors.Add(ctx, 1, otelAttrs...) - } - err error - opErrContext = ogenerrors.OperationContext{ - Name: "LegacyUpdateConnector", - ID: "legacyUpdateConnector", - } - ) - { - type bitset = [1]uint8 - var satisfied bitset - { - sctx, ok, err := s.securityBasicAuth(ctx, "LegacyUpdateConnector", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "BasicAuth", - Err: err, - } - recordError("Security:BasicAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 0 - ctx = sctx - } - } - { - sctx, ok, err := s.securityApiKeyAuth(ctx, "LegacyUpdateConnector", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "ApiKeyAuth", - Err: err, - } - recordError("Security:ApiKeyAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 1 - ctx = sctx - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, - } - recordError("Security", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - } - params, err := decodeLegacyUpdateConnectorParams(args, argsEscaped, r) - if err != nil { - err = &ogenerrors.DecodeParamsError{ - OperationContext: opErrContext, - Err: err, - } - recordError("DecodeParams", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - request, close, err := s.decodeLegacyUpdateConnectorRequest(r) - if err != nil { - err = &ogenerrors.DecodeRequestError{ - OperationContext: opErrContext, - Err: err, - } - recordError("DecodeRequest", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - defer func() { - if err := close(); err != nil { - recordError("CloseRequest", err) - } - }() - - var response LegacyUpdateConnectorRes - if m := s.cfg.Middleware; m != nil { - mreq := middleware.Request{ - Context: ctx, - OperationName: "LegacyUpdateConnector", - OperationID: "legacyUpdateConnector", - Body: request, - Params: middleware.Parameters{ - { - Name: "kbn-xsrf", - In: "header", - }: params.KbnXSRF, - { - Name: "actionId", - In: "path", - }: params.ActionId, - { - Name: "spaceId", - In: "path", - }: params.SpaceId, - }, - Raw: r, - } - - type ( - Request = *LegacyUpdateConnectorReq - Params = LegacyUpdateConnectorParams - Response = LegacyUpdateConnectorRes - ) - response, err = middleware.HookMiddleware[ - Request, - Params, - Response, - ]( - m, - mreq, - unpackLegacyUpdateConnectorParams, - func(ctx context.Context, request Request, params Params) (response Response, err error) { - response, err = s.h.LegacyUpdateConnector(ctx, request, params) - return response, err - }, - ) - } else { - response, err = s.h.LegacyUpdateConnector(ctx, request, params) - } - if err != nil { - recordError("Internal", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - if err := encodeLegacyUpdateConnectorResponse(response, w, span); err != nil { - recordError("EncodeResponse", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } -} - -// handleUpdateConnectorRequest handles updateConnector operation. -// -// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** -// section of the Kibana feature privileges. -// -// PUT /s/{spaceId}/api/actions/connector/{connectorId} -func (s *Server) handleUpdateConnectorRequest(args [2]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("updateConnector"), - semconv.HTTPMethodKey.String("PUT"), - semconv.HTTPRouteKey.String("/s/{spaceId}/api/actions/connector/{connectorId}"), - } - - // Start a span for this request. - ctx, span := s.cfg.Tracer.Start(r.Context(), "UpdateConnector", - trace.WithAttributes(otelAttrs...), - serverSpanKind, - ) - defer span.End() - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - s.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - s.requests.Add(ctx, 1, otelAttrs...) - - var ( - recordError = func(stage string, err error) { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - s.errors.Add(ctx, 1, otelAttrs...) - } - err error - opErrContext = ogenerrors.OperationContext{ - Name: "UpdateConnector", - ID: "updateConnector", - } - ) - { - type bitset = [1]uint8 - var satisfied bitset - { - sctx, ok, err := s.securityBasicAuth(ctx, "UpdateConnector", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "BasicAuth", - Err: err, - } - recordError("Security:BasicAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 0 - ctx = sctx - } - } - { - sctx, ok, err := s.securityApiKeyAuth(ctx, "UpdateConnector", r) - if err != nil { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Security: "ApiKeyAuth", - Err: err, - } - recordError("Security:ApiKeyAuth", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - if ok { - satisfied[0] |= 1 << 1 - ctx = sctx - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - err = &ogenerrors.SecurityError{ - OperationContext: opErrContext, - Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, - } - recordError("Security", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - } - params, err := decodeUpdateConnectorParams(args, argsEscaped, r) - if err != nil { - err = &ogenerrors.DecodeParamsError{ - OperationContext: opErrContext, - Err: err, - } - recordError("DecodeParams", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - request, close, err := s.decodeUpdateConnectorRequest(r) - if err != nil { - err = &ogenerrors.DecodeRequestError{ - OperationContext: opErrContext, - Err: err, - } - recordError("DecodeRequest", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - defer func() { - if err := close(); err != nil { - recordError("CloseRequest", err) - } - }() - - var response UpdateConnectorRes - if m := s.cfg.Middleware; m != nil { - mreq := middleware.Request{ - Context: ctx, - OperationName: "UpdateConnector", - OperationID: "updateConnector", - Body: request, - Params: middleware.Parameters{ - { - Name: "kbn-xsrf", - In: "header", - }: params.KbnXSRF, - { - Name: "connectorId", - In: "path", - }: params.ConnectorId, - { - Name: "spaceId", - In: "path", - }: params.SpaceId, - }, - Raw: r, - } - - type ( - Request = UpdateConnectorReq - Params = UpdateConnectorParams - Response = UpdateConnectorRes - ) - response, err = middleware.HookMiddleware[ - Request, - Params, - Response, - ]( - m, - mreq, - unpackUpdateConnectorParams, - func(ctx context.Context, request Request, params Params) (response Response, err error) { - response, err = s.h.UpdateConnector(ctx, request, params) - return response, err - }, - ) - } else { - response, err = s.h.UpdateConnector(ctx, request, params) - } - if err != nil { - recordError("Internal", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } - - if err := encodeUpdateConnectorResponse(response, w, span); err != nil { - recordError("EncodeResponse", err) - s.cfg.ErrorHandler(ctx, w, r, err) - return - } -} diff --git a/generated/connectors/oas_middleware_gen.go b/generated/connectors/oas_middleware_gen.go deleted file mode 100644 index ada1fd0c6..000000000 --- a/generated/connectors/oas_middleware_gen.go +++ /dev/null @@ -1,10 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package connectors - -import ( - "github.com/ogen-go/ogen/middleware" -) - -// Middleware is middleware type. -type Middleware = middleware.Middleware diff --git a/generated/connectors/oas_parameters_gen.go b/generated/connectors/oas_parameters_gen.go index 9fe6bc9d0..4950f23e4 100644 --- a/generated/connectors/oas_parameters_gen.go +++ b/generated/connectors/oas_parameters_gen.go @@ -2,19 +2,6 @@ package connectors -import ( - "net/http" - "net/url" - - "github.com/go-faster/errors" - - "github.com/ogen-go/ogen/conv" - "github.com/ogen-go/ogen/middleware" - "github.com/ogen-go/ogen/ogenerrors" - "github.com/ogen-go/ogen/uri" - "github.com/ogen-go/ogen/validate" -) - // CreateConnectorParams is parameters of createConnector operation. type CreateConnectorParams struct { // Cross-site request forgery protection. @@ -24,108 +11,6 @@ type CreateConnectorParams struct { SpaceId string } -func unpackCreateConnectorParams(packed middleware.Parameters) (params CreateConnectorParams) { - { - key := middleware.ParameterKey{ - Name: "kbn-xsrf", - In: "header", - } - params.KbnXSRF = packed[key].(string) - } - { - key := middleware.ParameterKey{ - Name: "spaceId", - In: "path", - } - params.SpaceId = packed[key].(string) - } - return params -} - -func decodeCreateConnectorParams(args [1]string, argsEscaped bool, r *http.Request) (params CreateConnectorParams, _ error) { - h := uri.NewHeaderDecoder(r.Header) - // Decode header: kbn-xsrf. - if err := func() error { - cfg := uri.HeaderParameterDecodingConfig{ - Name: "kbn-xsrf", - Explode: false, - } - if err := h.HasParam(cfg); err == nil { - if err := h.DecodeParam(cfg, func(d uri.Decoder) error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.KbnXSRF = c - return nil - }); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "kbn-xsrf", - In: "header", - Err: err, - } - } - // Decode path: spaceId. - if err := func() error { - param := args[0] - if argsEscaped { - unescaped, err := url.PathUnescape(args[0]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "spaceId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.SpaceId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "spaceId", - In: "path", - Err: err, - } - } - return params, nil -} - // DeleteConnectorParams is parameters of deleteConnector operation. type DeleteConnectorParams struct { // Cross-site request forgery protection. @@ -137,160 +22,6 @@ type DeleteConnectorParams struct { SpaceId string } -func unpackDeleteConnectorParams(packed middleware.Parameters) (params DeleteConnectorParams) { - { - key := middleware.ParameterKey{ - Name: "kbn-xsrf", - In: "header", - } - params.KbnXSRF = packed[key].(string) - } - { - key := middleware.ParameterKey{ - Name: "connectorId", - In: "path", - } - params.ConnectorId = packed[key].(string) - } - { - key := middleware.ParameterKey{ - Name: "spaceId", - In: "path", - } - params.SpaceId = packed[key].(string) - } - return params -} - -func decodeDeleteConnectorParams(args [2]string, argsEscaped bool, r *http.Request) (params DeleteConnectorParams, _ error) { - h := uri.NewHeaderDecoder(r.Header) - // Decode header: kbn-xsrf. - if err := func() error { - cfg := uri.HeaderParameterDecodingConfig{ - Name: "kbn-xsrf", - Explode: false, - } - if err := h.HasParam(cfg); err == nil { - if err := h.DecodeParam(cfg, func(d uri.Decoder) error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.KbnXSRF = c - return nil - }); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "kbn-xsrf", - In: "header", - Err: err, - } - } - // Decode path: connectorId. - if err := func() error { - param := args[1] - if argsEscaped { - unescaped, err := url.PathUnescape(args[1]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "connectorId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.ConnectorId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "connectorId", - In: "path", - Err: err, - } - } - // Decode path: spaceId. - if err := func() error { - param := args[0] - if argsEscaped { - unescaped, err := url.PathUnescape(args[0]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "spaceId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.SpaceId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "spaceId", - In: "path", - Err: err, - } - } - return params, nil -} - // GetConnectorParams is parameters of getConnector operation. type GetConnectorParams struct { // An identifier for the connector. @@ -300,118 +31,6 @@ type GetConnectorParams struct { SpaceId string } -func unpackGetConnectorParams(packed middleware.Parameters) (params GetConnectorParams) { - { - key := middleware.ParameterKey{ - Name: "connectorId", - In: "path", - } - params.ConnectorId = packed[key].(string) - } - { - key := middleware.ParameterKey{ - Name: "spaceId", - In: "path", - } - params.SpaceId = packed[key].(string) - } - return params -} - -func decodeGetConnectorParams(args [2]string, argsEscaped bool, r *http.Request) (params GetConnectorParams, _ error) { - // Decode path: connectorId. - if err := func() error { - param := args[1] - if argsEscaped { - unescaped, err := url.PathUnescape(args[1]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "connectorId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.ConnectorId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "connectorId", - In: "path", - Err: err, - } - } - // Decode path: spaceId. - if err := func() error { - param := args[0] - if argsEscaped { - unescaped, err := url.PathUnescape(args[0]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "spaceId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.SpaceId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "spaceId", - In: "path", - Err: err, - } - } - return params, nil -} - // GetConnectorTypesParams is parameters of getConnectorTypes operation. type GetConnectorTypesParams struct { // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default @@ -422,132 +41,6 @@ type GetConnectorTypesParams struct { FeatureID OptFeatures } -func unpackGetConnectorTypesParams(packed middleware.Parameters) (params GetConnectorTypesParams) { - { - key := middleware.ParameterKey{ - Name: "spaceId", - In: "path", - } - params.SpaceId = packed[key].(string) - } - { - key := middleware.ParameterKey{ - Name: "feature_id", - In: "query", - } - if v, ok := packed[key]; ok { - params.FeatureID = v.(OptFeatures) - } - } - return params -} - -func decodeGetConnectorTypesParams(args [1]string, argsEscaped bool, r *http.Request) (params GetConnectorTypesParams, _ error) { - q := uri.NewQueryDecoder(r.URL.Query()) - // Decode path: spaceId. - if err := func() error { - param := args[0] - if argsEscaped { - unescaped, err := url.PathUnescape(args[0]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "spaceId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.SpaceId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "spaceId", - In: "path", - Err: err, - } - } - // Decode query: feature_id. - if err := func() error { - cfg := uri.QueryParameterDecodingConfig{ - Name: "feature_id", - Style: uri.QueryStyleForm, - Explode: true, - } - - if err := q.HasParam(cfg); err == nil { - if err := q.DecodeParam(cfg, func(d uri.Decoder) error { - var paramsDotFeatureIDVal Features - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - paramsDotFeatureIDVal = Features(c) - return nil - }(); err != nil { - return err - } - params.FeatureID.SetTo(paramsDotFeatureIDVal) - return nil - }); err != nil { - return err - } - if err := func() error { - if params.FeatureID.Set { - if err := func() error { - if err := params.FeatureID.Value.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "feature_id", - In: "query", - Err: err, - } - } - return params, nil -} - // GetConnectorsParams is parameters of getConnectors operation. type GetConnectorsParams struct { // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default @@ -555,66 +48,6 @@ type GetConnectorsParams struct { SpaceId string } -func unpackGetConnectorsParams(packed middleware.Parameters) (params GetConnectorsParams) { - { - key := middleware.ParameterKey{ - Name: "spaceId", - In: "path", - } - params.SpaceId = packed[key].(string) - } - return params -} - -func decodeGetConnectorsParams(args [1]string, argsEscaped bool, r *http.Request) (params GetConnectorsParams, _ error) { - // Decode path: spaceId. - if err := func() error { - param := args[0] - if argsEscaped { - unescaped, err := url.PathUnescape(args[0]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "spaceId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.SpaceId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "spaceId", - In: "path", - Err: err, - } - } - return params, nil -} - // LegacyCreateConnectorParams is parameters of legacyCreateConnector operation. type LegacyCreateConnectorParams struct { // Cross-site request forgery protection. @@ -624,108 +57,6 @@ type LegacyCreateConnectorParams struct { SpaceId string } -func unpackLegacyCreateConnectorParams(packed middleware.Parameters) (params LegacyCreateConnectorParams) { - { - key := middleware.ParameterKey{ - Name: "kbn-xsrf", - In: "header", - } - params.KbnXSRF = packed[key].(string) - } - { - key := middleware.ParameterKey{ - Name: "spaceId", - In: "path", - } - params.SpaceId = packed[key].(string) - } - return params -} - -func decodeLegacyCreateConnectorParams(args [1]string, argsEscaped bool, r *http.Request) (params LegacyCreateConnectorParams, _ error) { - h := uri.NewHeaderDecoder(r.Header) - // Decode header: kbn-xsrf. - if err := func() error { - cfg := uri.HeaderParameterDecodingConfig{ - Name: "kbn-xsrf", - Explode: false, - } - if err := h.HasParam(cfg); err == nil { - if err := h.DecodeParam(cfg, func(d uri.Decoder) error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.KbnXSRF = c - return nil - }); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "kbn-xsrf", - In: "header", - Err: err, - } - } - // Decode path: spaceId. - if err := func() error { - param := args[0] - if argsEscaped { - unescaped, err := url.PathUnescape(args[0]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "spaceId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.SpaceId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "spaceId", - In: "path", - Err: err, - } - } - return params, nil -} - // LegacyDeleteConnectorParams is parameters of legacyDeleteConnector operation. type LegacyDeleteConnectorParams struct { // Cross-site request forgery protection. @@ -737,160 +68,6 @@ type LegacyDeleteConnectorParams struct { SpaceId string } -func unpackLegacyDeleteConnectorParams(packed middleware.Parameters) (params LegacyDeleteConnectorParams) { - { - key := middleware.ParameterKey{ - Name: "kbn-xsrf", - In: "header", - } - params.KbnXSRF = packed[key].(string) - } - { - key := middleware.ParameterKey{ - Name: "actionId", - In: "path", - } - params.ActionId = packed[key].(string) - } - { - key := middleware.ParameterKey{ - Name: "spaceId", - In: "path", - } - params.SpaceId = packed[key].(string) - } - return params -} - -func decodeLegacyDeleteConnectorParams(args [2]string, argsEscaped bool, r *http.Request) (params LegacyDeleteConnectorParams, _ error) { - h := uri.NewHeaderDecoder(r.Header) - // Decode header: kbn-xsrf. - if err := func() error { - cfg := uri.HeaderParameterDecodingConfig{ - Name: "kbn-xsrf", - Explode: false, - } - if err := h.HasParam(cfg); err == nil { - if err := h.DecodeParam(cfg, func(d uri.Decoder) error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.KbnXSRF = c - return nil - }); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "kbn-xsrf", - In: "header", - Err: err, - } - } - // Decode path: actionId. - if err := func() error { - param := args[1] - if argsEscaped { - unescaped, err := url.PathUnescape(args[1]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "actionId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.ActionId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "actionId", - In: "path", - Err: err, - } - } - // Decode path: spaceId. - if err := func() error { - param := args[0] - if argsEscaped { - unescaped, err := url.PathUnescape(args[0]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "spaceId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.SpaceId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "spaceId", - In: "path", - Err: err, - } - } - return params, nil -} - // LegacyGetConnectorParams is parameters of legacyGetConnector operation. type LegacyGetConnectorParams struct { // An identifier for the action. @@ -900,118 +77,6 @@ type LegacyGetConnectorParams struct { SpaceId string } -func unpackLegacyGetConnectorParams(packed middleware.Parameters) (params LegacyGetConnectorParams) { - { - key := middleware.ParameterKey{ - Name: "actionId", - In: "path", - } - params.ActionId = packed[key].(string) - } - { - key := middleware.ParameterKey{ - Name: "spaceId", - In: "path", - } - params.SpaceId = packed[key].(string) - } - return params -} - -func decodeLegacyGetConnectorParams(args [2]string, argsEscaped bool, r *http.Request) (params LegacyGetConnectorParams, _ error) { - // Decode path: actionId. - if err := func() error { - param := args[1] - if argsEscaped { - unescaped, err := url.PathUnescape(args[1]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "actionId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.ActionId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "actionId", - In: "path", - Err: err, - } - } - // Decode path: spaceId. - if err := func() error { - param := args[0] - if argsEscaped { - unescaped, err := url.PathUnescape(args[0]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "spaceId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.SpaceId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "spaceId", - In: "path", - Err: err, - } - } - return params, nil -} - // LegacyGetConnectorTypesParams is parameters of legacyGetConnectorTypes operation. type LegacyGetConnectorTypesParams struct { // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default @@ -1019,66 +84,6 @@ type LegacyGetConnectorTypesParams struct { SpaceId string } -func unpackLegacyGetConnectorTypesParams(packed middleware.Parameters) (params LegacyGetConnectorTypesParams) { - { - key := middleware.ParameterKey{ - Name: "spaceId", - In: "path", - } - params.SpaceId = packed[key].(string) - } - return params -} - -func decodeLegacyGetConnectorTypesParams(args [1]string, argsEscaped bool, r *http.Request) (params LegacyGetConnectorTypesParams, _ error) { - // Decode path: spaceId. - if err := func() error { - param := args[0] - if argsEscaped { - unescaped, err := url.PathUnescape(args[0]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "spaceId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.SpaceId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "spaceId", - In: "path", - Err: err, - } - } - return params, nil -} - // LegacyGetConnectorsParams is parameters of legacyGetConnectors operation. type LegacyGetConnectorsParams struct { // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default @@ -1086,66 +91,6 @@ type LegacyGetConnectorsParams struct { SpaceId string } -func unpackLegacyGetConnectorsParams(packed middleware.Parameters) (params LegacyGetConnectorsParams) { - { - key := middleware.ParameterKey{ - Name: "spaceId", - In: "path", - } - params.SpaceId = packed[key].(string) - } - return params -} - -func decodeLegacyGetConnectorsParams(args [1]string, argsEscaped bool, r *http.Request) (params LegacyGetConnectorsParams, _ error) { - // Decode path: spaceId. - if err := func() error { - param := args[0] - if argsEscaped { - unescaped, err := url.PathUnescape(args[0]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "spaceId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.SpaceId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "spaceId", - In: "path", - Err: err, - } - } - return params, nil -} - // LegacyRunConnectorParams is parameters of legacyRunConnector operation. type LegacyRunConnectorParams struct { // Cross-site request forgery protection. @@ -1157,160 +102,6 @@ type LegacyRunConnectorParams struct { SpaceId string } -func unpackLegacyRunConnectorParams(packed middleware.Parameters) (params LegacyRunConnectorParams) { - { - key := middleware.ParameterKey{ - Name: "kbn-xsrf", - In: "header", - } - params.KbnXSRF = packed[key].(string) - } - { - key := middleware.ParameterKey{ - Name: "actionId", - In: "path", - } - params.ActionId = packed[key].(string) - } - { - key := middleware.ParameterKey{ - Name: "spaceId", - In: "path", - } - params.SpaceId = packed[key].(string) - } - return params -} - -func decodeLegacyRunConnectorParams(args [2]string, argsEscaped bool, r *http.Request) (params LegacyRunConnectorParams, _ error) { - h := uri.NewHeaderDecoder(r.Header) - // Decode header: kbn-xsrf. - if err := func() error { - cfg := uri.HeaderParameterDecodingConfig{ - Name: "kbn-xsrf", - Explode: false, - } - if err := h.HasParam(cfg); err == nil { - if err := h.DecodeParam(cfg, func(d uri.Decoder) error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.KbnXSRF = c - return nil - }); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "kbn-xsrf", - In: "header", - Err: err, - } - } - // Decode path: actionId. - if err := func() error { - param := args[1] - if argsEscaped { - unescaped, err := url.PathUnescape(args[1]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "actionId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.ActionId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "actionId", - In: "path", - Err: err, - } - } - // Decode path: spaceId. - if err := func() error { - param := args[0] - if argsEscaped { - unescaped, err := url.PathUnescape(args[0]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "spaceId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.SpaceId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "spaceId", - In: "path", - Err: err, - } - } - return params, nil -} - // LegacyUpdateConnectorParams is parameters of legacyUpdateConnector operation. type LegacyUpdateConnectorParams struct { // Cross-site request forgery protection. @@ -1322,160 +113,6 @@ type LegacyUpdateConnectorParams struct { SpaceId string } -func unpackLegacyUpdateConnectorParams(packed middleware.Parameters) (params LegacyUpdateConnectorParams) { - { - key := middleware.ParameterKey{ - Name: "kbn-xsrf", - In: "header", - } - params.KbnXSRF = packed[key].(string) - } - { - key := middleware.ParameterKey{ - Name: "actionId", - In: "path", - } - params.ActionId = packed[key].(string) - } - { - key := middleware.ParameterKey{ - Name: "spaceId", - In: "path", - } - params.SpaceId = packed[key].(string) - } - return params -} - -func decodeLegacyUpdateConnectorParams(args [2]string, argsEscaped bool, r *http.Request) (params LegacyUpdateConnectorParams, _ error) { - h := uri.NewHeaderDecoder(r.Header) - // Decode header: kbn-xsrf. - if err := func() error { - cfg := uri.HeaderParameterDecodingConfig{ - Name: "kbn-xsrf", - Explode: false, - } - if err := h.HasParam(cfg); err == nil { - if err := h.DecodeParam(cfg, func(d uri.Decoder) error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.KbnXSRF = c - return nil - }); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "kbn-xsrf", - In: "header", - Err: err, - } - } - // Decode path: actionId. - if err := func() error { - param := args[1] - if argsEscaped { - unescaped, err := url.PathUnescape(args[1]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "actionId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.ActionId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "actionId", - In: "path", - Err: err, - } - } - // Decode path: spaceId. - if err := func() error { - param := args[0] - if argsEscaped { - unescaped, err := url.PathUnescape(args[0]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "spaceId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.SpaceId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "spaceId", - In: "path", - Err: err, - } - } - return params, nil -} - // UpdateConnectorParams is parameters of updateConnector operation. type UpdateConnectorParams struct { // Cross-site request forgery protection. @@ -1486,157 +123,3 @@ type UpdateConnectorParams struct { // space is used. SpaceId string } - -func unpackUpdateConnectorParams(packed middleware.Parameters) (params UpdateConnectorParams) { - { - key := middleware.ParameterKey{ - Name: "kbn-xsrf", - In: "header", - } - params.KbnXSRF = packed[key].(string) - } - { - key := middleware.ParameterKey{ - Name: "connectorId", - In: "path", - } - params.ConnectorId = packed[key].(string) - } - { - key := middleware.ParameterKey{ - Name: "spaceId", - In: "path", - } - params.SpaceId = packed[key].(string) - } - return params -} - -func decodeUpdateConnectorParams(args [2]string, argsEscaped bool, r *http.Request) (params UpdateConnectorParams, _ error) { - h := uri.NewHeaderDecoder(r.Header) - // Decode header: kbn-xsrf. - if err := func() error { - cfg := uri.HeaderParameterDecodingConfig{ - Name: "kbn-xsrf", - Explode: false, - } - if err := h.HasParam(cfg); err == nil { - if err := h.DecodeParam(cfg, func(d uri.Decoder) error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.KbnXSRF = c - return nil - }); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "kbn-xsrf", - In: "header", - Err: err, - } - } - // Decode path: connectorId. - if err := func() error { - param := args[1] - if argsEscaped { - unescaped, err := url.PathUnescape(args[1]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "connectorId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.ConnectorId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "connectorId", - In: "path", - Err: err, - } - } - // Decode path: spaceId. - if err := func() error { - param := args[0] - if argsEscaped { - unescaped, err := url.PathUnescape(args[0]) - if err != nil { - return errors.Wrap(err, "unescape path") - } - param = unescaped - } - if len(param) > 0 { - d := uri.NewPathDecoder(uri.PathDecoderConfig{ - Param: "spaceId", - Value: param, - Style: uri.PathStyleSimple, - Explode: false, - }) - - if err := func() error { - val, err := d.DecodeValue() - if err != nil { - return err - } - - c, err := conv.ToString(val) - if err != nil { - return err - } - - params.SpaceId = c - return nil - }(); err != nil { - return err - } - } else { - return validate.ErrFieldRequired - } - return nil - }(); err != nil { - return params, &ogenerrors.DecodeParamError{ - Name: "spaceId", - In: "path", - Err: err, - } - } - return params, nil -} diff --git a/generated/connectors/oas_request_decoders_gen.go b/generated/connectors/oas_request_decoders_gen.go deleted file mode 100644 index dc622b548..000000000 --- a/generated/connectors/oas_request_decoders_gen.go +++ /dev/null @@ -1,347 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package connectors - -import ( - "io" - "mime" - "net/http" - - "github.com/go-faster/errors" - "github.com/go-faster/jx" - "go.uber.org/multierr" - - "github.com/ogen-go/ogen/ogenerrors" - "github.com/ogen-go/ogen/validate" -) - -func (s *Server) decodeCreateConnectorRequest(r *http.Request) ( - req CreateConnectorReq, - close func() error, - rerr error, -) { - var closers []func() error - close = func() error { - var merr error - // Close in reverse order, to match defer behavior. - for i := len(closers) - 1; i >= 0; i-- { - c := closers[i] - merr = multierr.Append(merr, c()) - } - return merr - } - defer func() { - if rerr != nil { - rerr = multierr.Append(rerr, close()) - } - }() - ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - if err != nil { - return req, close, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - if r.ContentLength == 0 { - return req, close, validate.ErrBodyRequired - } - buf, err := io.ReadAll(r.Body) - if err != nil { - return req, close, err - } - - if len(buf) == 0 { - return req, close, validate.ErrBodyRequired - } - - d := jx.DecodeBytes(buf) - - var request CreateConnectorReq - if err := func() error { - if err := request.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return req, close, err - } - if err := func() error { - if err := request.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return req, close, errors.Wrap(err, "validate") - } - return request, close, nil - default: - return req, close, validate.InvalidContentType(ct) - } -} - -func (s *Server) decodeLegacyCreateConnectorRequest(r *http.Request) ( - req *LegacyCreateConnectorReq, - close func() error, - rerr error, -) { - var closers []func() error - close = func() error { - var merr error - // Close in reverse order, to match defer behavior. - for i := len(closers) - 1; i >= 0; i-- { - c := closers[i] - merr = multierr.Append(merr, c()) - } - return merr - } - defer func() { - if rerr != nil { - rerr = multierr.Append(rerr, close()) - } - }() - ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - if err != nil { - return req, close, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - if r.ContentLength == 0 { - return req, close, validate.ErrBodyRequired - } - buf, err := io.ReadAll(r.Body) - if err != nil { - return req, close, err - } - - if len(buf) == 0 { - return req, close, validate.ErrBodyRequired - } - - d := jx.DecodeBytes(buf) - - var request LegacyCreateConnectorReq - if err := func() error { - if err := request.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return req, close, err - } - return &request, close, nil - default: - return req, close, validate.InvalidContentType(ct) - } -} - -func (s *Server) decodeLegacyRunConnectorRequest(r *http.Request) ( - req *LegacyRunConnectorReq, - close func() error, - rerr error, -) { - var closers []func() error - close = func() error { - var merr error - // Close in reverse order, to match defer behavior. - for i := len(closers) - 1; i >= 0; i-- { - c := closers[i] - merr = multierr.Append(merr, c()) - } - return merr - } - defer func() { - if rerr != nil { - rerr = multierr.Append(rerr, close()) - } - }() - ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - if err != nil { - return req, close, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - if r.ContentLength == 0 { - return req, close, validate.ErrBodyRequired - } - buf, err := io.ReadAll(r.Body) - if err != nil { - return req, close, err - } - - if len(buf) == 0 { - return req, close, validate.ErrBodyRequired - } - - d := jx.DecodeBytes(buf) - - var request LegacyRunConnectorReq - if err := func() error { - if err := request.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return req, close, err - } - return &request, close, nil - default: - return req, close, validate.InvalidContentType(ct) - } -} - -func (s *Server) decodeLegacyUpdateConnectorRequest(r *http.Request) ( - req *LegacyUpdateConnectorReq, - close func() error, - rerr error, -) { - var closers []func() error - close = func() error { - var merr error - // Close in reverse order, to match defer behavior. - for i := len(closers) - 1; i >= 0; i-- { - c := closers[i] - merr = multierr.Append(merr, c()) - } - return merr - } - defer func() { - if rerr != nil { - rerr = multierr.Append(rerr, close()) - } - }() - ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - if err != nil { - return req, close, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - if r.ContentLength == 0 { - return req, close, validate.ErrBodyRequired - } - buf, err := io.ReadAll(r.Body) - if err != nil { - return req, close, err - } - - if len(buf) == 0 { - return req, close, validate.ErrBodyRequired - } - - d := jx.DecodeBytes(buf) - - var request LegacyUpdateConnectorReq - if err := func() error { - if err := request.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return req, close, err - } - return &request, close, nil - default: - return req, close, validate.InvalidContentType(ct) - } -} - -func (s *Server) decodeUpdateConnectorRequest(r *http.Request) ( - req UpdateConnectorReq, - close func() error, - rerr error, -) { - var closers []func() error - close = func() error { - var merr error - // Close in reverse order, to match defer behavior. - for i := len(closers) - 1; i >= 0; i-- { - c := closers[i] - merr = multierr.Append(merr, c()) - } - return merr - } - defer func() { - if rerr != nil { - rerr = multierr.Append(rerr, close()) - } - }() - ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) - if err != nil { - return req, close, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - if r.ContentLength == 0 { - return req, close, validate.ErrBodyRequired - } - buf, err := io.ReadAll(r.Body) - if err != nil { - return req, close, err - } - - if len(buf) == 0 { - return req, close, validate.ErrBodyRequired - } - - d := jx.DecodeBytes(buf) - - var request UpdateConnectorReq - if err := func() error { - if err := request.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return req, close, err - } - if err := func() error { - if err := request.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return req, close, errors.Wrap(err, "validate") - } - return request, close, nil - default: - return req, close, validate.InvalidContentType(ct) - } -} diff --git a/generated/connectors/oas_response_encoders_gen.go b/generated/connectors/oas_response_encoders_gen.go deleted file mode 100644 index 283223fbf..000000000 --- a/generated/connectors/oas_response_encoders_gen.go +++ /dev/null @@ -1,463 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package connectors - -import ( - "net/http" - - "github.com/go-faster/errors" - "github.com/go-faster/jx" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/trace" -) - -func encodeCreateConnectorResponse(response CreateConnectorRes, w http.ResponseWriter, span trace.Span) error { - switch response := response.(type) { - case *ConnectorResponseProperties: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(200) - span.SetStatus(codes.Ok, http.StatusText(200)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - case *R400: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(400) - span.SetStatus(codes.Error, http.StatusText(400)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - case *R401: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(401) - span.SetStatus(codes.Error, http.StatusText(401)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - default: - return errors.Errorf("unexpected response type: %T", response) - } -} - -func encodeDeleteConnectorResponse(response DeleteConnectorRes, w http.ResponseWriter, span trace.Span) error { - switch response := response.(type) { - case *DeleteConnectorNoContent: - w.WriteHeader(204) - span.SetStatus(codes.Ok, http.StatusText(204)) - - return nil - - case *R401: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(401) - span.SetStatus(codes.Error, http.StatusText(401)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - case *DeleteConnectorNotFound: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(404) - span.SetStatus(codes.Error, http.StatusText(404)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - default: - return errors.Errorf("unexpected response type: %T", response) - } -} - -func encodeGetConnectorResponse(response GetConnectorRes, w http.ResponseWriter, span trace.Span) error { - switch response := response.(type) { - case *ConnectorResponseProperties: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(200) - span.SetStatus(codes.Ok, http.StatusText(200)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - case *R401: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(401) - span.SetStatus(codes.Error, http.StatusText(401)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - case *GetConnectorNotFound: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(404) - span.SetStatus(codes.Error, http.StatusText(404)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - default: - return errors.Errorf("unexpected response type: %T", response) - } -} - -func encodeGetConnectorTypesResponse(response GetConnectorTypesRes, w http.ResponseWriter, span trace.Span) error { - switch response := response.(type) { - case *GetConnectorTypesOKApplicationJSON: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(200) - span.SetStatus(codes.Ok, http.StatusText(200)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - case *R401: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(401) - span.SetStatus(codes.Error, http.StatusText(401)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - default: - return errors.Errorf("unexpected response type: %T", response) - } -} - -func encodeGetConnectorsResponse(response GetConnectorsRes, w http.ResponseWriter, span trace.Span) error { - switch response := response.(type) { - case *GetConnectorsOKApplicationJSON: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(200) - span.SetStatus(codes.Ok, http.StatusText(200)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - case *R401: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(401) - span.SetStatus(codes.Error, http.StatusText(401)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - default: - return errors.Errorf("unexpected response type: %T", response) - } -} - -func encodeLegacyCreateConnectorResponse(response LegacyCreateConnectorRes, w http.ResponseWriter, span trace.Span) error { - switch response := response.(type) { - case *ActionResponseProperties: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(200) - span.SetStatus(codes.Ok, http.StatusText(200)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - case *R401: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(401) - span.SetStatus(codes.Error, http.StatusText(401)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - default: - return errors.Errorf("unexpected response type: %T", response) - } -} - -func encodeLegacyDeleteConnectorResponse(response LegacyDeleteConnectorRes, w http.ResponseWriter, span trace.Span) error { - switch response := response.(type) { - case *LegacyDeleteConnectorNoContent: - w.WriteHeader(204) - span.SetStatus(codes.Ok, http.StatusText(204)) - - return nil - - case *R401: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(401) - span.SetStatus(codes.Error, http.StatusText(401)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - default: - return errors.Errorf("unexpected response type: %T", response) - } -} - -func encodeLegacyGetConnectorResponse(response LegacyGetConnectorRes, w http.ResponseWriter, span trace.Span) error { - switch response := response.(type) { - case *ActionResponseProperties: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(200) - span.SetStatus(codes.Ok, http.StatusText(200)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - case *R401: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(401) - span.SetStatus(codes.Error, http.StatusText(401)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - default: - return errors.Errorf("unexpected response type: %T", response) - } -} - -func encodeLegacyGetConnectorTypesResponse(response LegacyGetConnectorTypesRes, w http.ResponseWriter, span trace.Span) error { - switch response := response.(type) { - case *LegacyGetConnectorTypesOKApplicationJSON: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(200) - span.SetStatus(codes.Ok, http.StatusText(200)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - case *R401: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(401) - span.SetStatus(codes.Error, http.StatusText(401)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - default: - return errors.Errorf("unexpected response type: %T", response) - } -} - -func encodeLegacyGetConnectorsResponse(response LegacyGetConnectorsRes, w http.ResponseWriter, span trace.Span) error { - switch response := response.(type) { - case *LegacyGetConnectorsOKApplicationJSON: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(200) - span.SetStatus(codes.Ok, http.StatusText(200)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - case *R401: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(401) - span.SetStatus(codes.Error, http.StatusText(401)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - default: - return errors.Errorf("unexpected response type: %T", response) - } -} - -func encodeLegacyRunConnectorResponse(response LegacyRunConnectorRes, w http.ResponseWriter, span trace.Span) error { - switch response := response.(type) { - case *LegacyRunConnectorOK: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(200) - span.SetStatus(codes.Ok, http.StatusText(200)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - case *R401: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(401) - span.SetStatus(codes.Error, http.StatusText(401)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - default: - return errors.Errorf("unexpected response type: %T", response) - } -} - -func encodeLegacyUpdateConnectorResponse(response LegacyUpdateConnectorRes, w http.ResponseWriter, span trace.Span) error { - switch response := response.(type) { - case *ActionResponseProperties: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(200) - span.SetStatus(codes.Ok, http.StatusText(200)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - case *R404: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(404) - span.SetStatus(codes.Error, http.StatusText(404)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - default: - return errors.Errorf("unexpected response type: %T", response) - } -} - -func encodeUpdateConnectorResponse(response UpdateConnectorRes, w http.ResponseWriter, span trace.Span) error { - switch response := response.(type) { - case *ConnectorResponseProperties: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(200) - span.SetStatus(codes.Ok, http.StatusText(200)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - case *R400: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(400) - span.SetStatus(codes.Error, http.StatusText(400)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - case *R401: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(401) - span.SetStatus(codes.Error, http.StatusText(401)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - case *R404: - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(404) - span.SetStatus(codes.Error, http.StatusText(404)) - - e := jx.GetEncoder() - response.Encode(e) - if _, err := e.WriteTo(w); err != nil { - return errors.Wrap(err, "write") - } - return nil - - default: - return errors.Errorf("unexpected response type: %T", response) - } -} diff --git a/generated/connectors/oas_router_gen.go b/generated/connectors/oas_router_gen.go deleted file mode 100644 index 87287e9b8..000000000 --- a/generated/connectors/oas_router_gen.go +++ /dev/null @@ -1,611 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package connectors - -import ( - "net/http" - "net/url" - "strings" - - "github.com/ogen-go/ogen/uri" -) - -// ServeHTTP serves http request as defined by OpenAPI v3 specification, -// calling handler that matches the path or returning not found error. -func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { - elem := r.URL.Path - elemIsEscaped := false - if rawPath := r.URL.RawPath; rawPath != "" { - if normalized, ok := uri.NormalizeEscapedPath(rawPath); ok { - elem = normalized - elemIsEscaped = strings.ContainsRune(elem, '%') - } - } - if prefix := s.cfg.Prefix; len(prefix) > 0 { - if strings.HasPrefix(elem, prefix) { - // Cut prefix from the path. - elem = strings.TrimPrefix(elem, prefix) - } else { - // Prefix doesn't match. - s.notFound(w, r) - return - } - } - if len(elem) == 0 { - s.notFound(w, r) - return - } - args := [2]string{} - - // Static code generated router with unwrapped path search. - switch { - default: - if len(elem) == 0 { - break - } - switch elem[0] { - case '/': // Prefix: "/s/" - if l := len("/s/"); len(elem) >= l && elem[0:l] == "/s/" { - elem = elem[l:] - } else { - break - } - - // Param: "spaceId" - // Match until "/" - idx := strings.IndexByte(elem, '/') - if idx < 0 { - idx = len(elem) - } - args[0] = elem[:idx] - elem = elem[idx:] - - if len(elem) == 0 { - break - } - switch elem[0] { - case '/': // Prefix: "/api/actions" - if l := len("/api/actions"); len(elem) >= l && elem[0:l] == "/api/actions" { - elem = elem[l:] - } else { - break - } - - if len(elem) == 0 { - switch r.Method { - case "GET": - s.handleLegacyGetConnectorsRequest([1]string{ - args[0], - }, elemIsEscaped, w, r) - case "POST": - s.handleLegacyCreateConnectorRequest([1]string{ - args[0], - }, elemIsEscaped, w, r) - default: - s.notAllowed(w, r, "GET,POST") - } - - return - } - switch elem[0] { - case '/': // Prefix: "/" - if l := len("/"); len(elem) >= l && elem[0:l] == "/" { - elem = elem[l:] - } else { - break - } - - if len(elem) == 0 { - break - } - switch elem[0] { - case 'a': // Prefix: "action/" - if l := len("action/"); len(elem) >= l && elem[0:l] == "action/" { - elem = elem[l:] - } else { - break - } - - // Param: "actionId" - // Match until "/" - idx := strings.IndexByte(elem, '/') - if idx < 0 { - idx = len(elem) - } - args[1] = elem[:idx] - elem = elem[idx:] - - if len(elem) == 0 { - switch r.Method { - case "DELETE": - s.handleLegacyDeleteConnectorRequest([2]string{ - args[0], - args[1], - }, elemIsEscaped, w, r) - case "GET": - s.handleLegacyGetConnectorRequest([2]string{ - args[0], - args[1], - }, elemIsEscaped, w, r) - case "PUT": - s.handleLegacyUpdateConnectorRequest([2]string{ - args[0], - args[1], - }, elemIsEscaped, w, r) - default: - s.notAllowed(w, r, "DELETE,GET,PUT") - } - - return - } - switch elem[0] { - case '/': // Prefix: "/_execute" - if l := len("/_execute"); len(elem) >= l && elem[0:l] == "/_execute" { - elem = elem[l:] - } else { - break - } - - if len(elem) == 0 { - // Leaf node. - switch r.Method { - case "POST": - s.handleLegacyRunConnectorRequest([2]string{ - args[0], - args[1], - }, elemIsEscaped, w, r) - default: - s.notAllowed(w, r, "POST") - } - - return - } - } - case 'c': // Prefix: "connector" - if l := len("connector"); len(elem) >= l && elem[0:l] == "connector" { - elem = elem[l:] - } else { - break - } - - if len(elem) == 0 { - switch r.Method { - case "POST": - s.handleCreateConnectorRequest([1]string{ - args[0], - }, elemIsEscaped, w, r) - default: - s.notAllowed(w, r, "POST") - } - - return - } - switch elem[0] { - case '/': // Prefix: "/" - if l := len("/"); len(elem) >= l && elem[0:l] == "/" { - elem = elem[l:] - } else { - break - } - - // Param: "connectorId" - // Leaf parameter - args[1] = elem - elem = "" - - if len(elem) == 0 { - // Leaf node. - switch r.Method { - case "DELETE": - s.handleDeleteConnectorRequest([2]string{ - args[0], - args[1], - }, elemIsEscaped, w, r) - case "GET": - s.handleGetConnectorRequest([2]string{ - args[0], - args[1], - }, elemIsEscaped, w, r) - case "PUT": - s.handleUpdateConnectorRequest([2]string{ - args[0], - args[1], - }, elemIsEscaped, w, r) - default: - s.notAllowed(w, r, "DELETE,GET,PUT") - } - - return - } - case '_': // Prefix: "_types" - if l := len("_types"); len(elem) >= l && elem[0:l] == "_types" { - elem = elem[l:] - } else { - break - } - - if len(elem) == 0 { - // Leaf node. - switch r.Method { - case "GET": - s.handleGetConnectorTypesRequest([1]string{ - args[0], - }, elemIsEscaped, w, r) - default: - s.notAllowed(w, r, "GET") - } - - return - } - case 's': // Prefix: "s" - if l := len("s"); len(elem) >= l && elem[0:l] == "s" { - elem = elem[l:] - } else { - break - } - - if len(elem) == 0 { - // Leaf node. - switch r.Method { - case "GET": - s.handleGetConnectorsRequest([1]string{ - args[0], - }, elemIsEscaped, w, r) - default: - s.notAllowed(w, r, "GET") - } - - return - } - } - case 'l': // Prefix: "list_action_types" - if l := len("list_action_types"); len(elem) >= l && elem[0:l] == "list_action_types" { - elem = elem[l:] - } else { - break - } - - if len(elem) == 0 { - // Leaf node. - switch r.Method { - case "GET": - s.handleLegacyGetConnectorTypesRequest([1]string{ - args[0], - }, elemIsEscaped, w, r) - default: - s.notAllowed(w, r, "GET") - } - - return - } - } - } - } - } - } - s.notFound(w, r) -} - -// Route is route object. -type Route struct { - name string - operationID string - pathPattern string - count int - args [2]string -} - -// Name returns ogen operation name. -// -// It is guaranteed to be unique and not empty. -func (r Route) Name() string { - return r.name -} - -// OperationID returns OpenAPI operationId. -func (r Route) OperationID() string { - return r.operationID -} - -// PathPattern returns OpenAPI path. -func (r Route) PathPattern() string { - return r.pathPattern -} - -// Args returns parsed arguments. -func (r Route) Args() []string { - return r.args[:r.count] -} - -// FindRoute finds Route for given method and path. -// -// Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead. -func (s *Server) FindRoute(method, path string) (Route, bool) { - return s.FindPath(method, &url.URL{Path: path}) -} - -// FindPath finds Route for given method and URL. -func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool) { - var ( - elem = u.Path - args = r.args - ) - if rawPath := u.RawPath; rawPath != "" { - if normalized, ok := uri.NormalizeEscapedPath(rawPath); ok { - elem = normalized - } - defer func() { - for i, arg := range r.args[:r.count] { - if unescaped, err := url.PathUnescape(arg); err == nil { - r.args[i] = unescaped - } - } - }() - } - - // Static code generated router with unwrapped path search. - switch { - default: - if len(elem) == 0 { - break - } - switch elem[0] { - case '/': // Prefix: "/s/" - if l := len("/s/"); len(elem) >= l && elem[0:l] == "/s/" { - elem = elem[l:] - } else { - break - } - - // Param: "spaceId" - // Match until "/" - idx := strings.IndexByte(elem, '/') - if idx < 0 { - idx = len(elem) - } - args[0] = elem[:idx] - elem = elem[idx:] - - if len(elem) == 0 { - break - } - switch elem[0] { - case '/': // Prefix: "/api/actions" - if l := len("/api/actions"); len(elem) >= l && elem[0:l] == "/api/actions" { - elem = elem[l:] - } else { - break - } - - if len(elem) == 0 { - switch method { - case "GET": - r.name = "LegacyGetConnectors" - r.operationID = "legacyGetConnectors" - r.pathPattern = "/s/{spaceId}/api/actions" - r.args = args - r.count = 1 - return r, true - case "POST": - r.name = "LegacyCreateConnector" - r.operationID = "legacyCreateConnector" - r.pathPattern = "/s/{spaceId}/api/actions" - r.args = args - r.count = 1 - return r, true - default: - return - } - } - switch elem[0] { - case '/': // Prefix: "/" - if l := len("/"); len(elem) >= l && elem[0:l] == "/" { - elem = elem[l:] - } else { - break - } - - if len(elem) == 0 { - break - } - switch elem[0] { - case 'a': // Prefix: "action/" - if l := len("action/"); len(elem) >= l && elem[0:l] == "action/" { - elem = elem[l:] - } else { - break - } - - // Param: "actionId" - // Match until "/" - idx := strings.IndexByte(elem, '/') - if idx < 0 { - idx = len(elem) - } - args[1] = elem[:idx] - elem = elem[idx:] - - if len(elem) == 0 { - switch method { - case "DELETE": - r.name = "LegacyDeleteConnector" - r.operationID = "legacyDeleteConnector" - r.pathPattern = "/s/{spaceId}/api/actions/action/{actionId}" - r.args = args - r.count = 2 - return r, true - case "GET": - r.name = "LegacyGetConnector" - r.operationID = "legacyGetConnector" - r.pathPattern = "/s/{spaceId}/api/actions/action/{actionId}" - r.args = args - r.count = 2 - return r, true - case "PUT": - r.name = "LegacyUpdateConnector" - r.operationID = "legacyUpdateConnector" - r.pathPattern = "/s/{spaceId}/api/actions/action/{actionId}" - r.args = args - r.count = 2 - return r, true - default: - return - } - } - switch elem[0] { - case '/': // Prefix: "/_execute" - if l := len("/_execute"); len(elem) >= l && elem[0:l] == "/_execute" { - elem = elem[l:] - } else { - break - } - - if len(elem) == 0 { - switch method { - case "POST": - // Leaf: LegacyRunConnector - r.name = "LegacyRunConnector" - r.operationID = "legacyRunConnector" - r.pathPattern = "/s/{spaceId}/api/actions/action/{actionId}/_execute" - r.args = args - r.count = 2 - return r, true - default: - return - } - } - } - case 'c': // Prefix: "connector" - if l := len("connector"); len(elem) >= l && elem[0:l] == "connector" { - elem = elem[l:] - } else { - break - } - - if len(elem) == 0 { - switch method { - case "POST": - r.name = "CreateConnector" - r.operationID = "createConnector" - r.pathPattern = "/s/{spaceId}/api/actions/connector" - r.args = args - r.count = 1 - return r, true - default: - return - } - } - switch elem[0] { - case '/': // Prefix: "/" - if l := len("/"); len(elem) >= l && elem[0:l] == "/" { - elem = elem[l:] - } else { - break - } - - // Param: "connectorId" - // Leaf parameter - args[1] = elem - elem = "" - - if len(elem) == 0 { - switch method { - case "DELETE": - // Leaf: DeleteConnector - r.name = "DeleteConnector" - r.operationID = "deleteConnector" - r.pathPattern = "/s/{spaceId}/api/actions/connector/{connectorId}" - r.args = args - r.count = 2 - return r, true - case "GET": - // Leaf: GetConnector - r.name = "GetConnector" - r.operationID = "getConnector" - r.pathPattern = "/s/{spaceId}/api/actions/connector/{connectorId}" - r.args = args - r.count = 2 - return r, true - case "PUT": - // Leaf: UpdateConnector - r.name = "UpdateConnector" - r.operationID = "updateConnector" - r.pathPattern = "/s/{spaceId}/api/actions/connector/{connectorId}" - r.args = args - r.count = 2 - return r, true - default: - return - } - } - case '_': // Prefix: "_types" - if l := len("_types"); len(elem) >= l && elem[0:l] == "_types" { - elem = elem[l:] - } else { - break - } - - if len(elem) == 0 { - switch method { - case "GET": - // Leaf: GetConnectorTypes - r.name = "GetConnectorTypes" - r.operationID = "getConnectorTypes" - r.pathPattern = "/s/{spaceId}/api/actions/connector_types" - r.args = args - r.count = 1 - return r, true - default: - return - } - } - case 's': // Prefix: "s" - if l := len("s"); len(elem) >= l && elem[0:l] == "s" { - elem = elem[l:] - } else { - break - } - - if len(elem) == 0 { - switch method { - case "GET": - // Leaf: GetConnectors - r.name = "GetConnectors" - r.operationID = "getConnectors" - r.pathPattern = "/s/{spaceId}/api/actions/connectors" - r.args = args - r.count = 1 - return r, true - default: - return - } - } - } - case 'l': // Prefix: "list_action_types" - if l := len("list_action_types"); len(elem) >= l && elem[0:l] == "list_action_types" { - elem = elem[l:] - } else { - break - } - - if len(elem) == 0 { - switch method { - case "GET": - // Leaf: LegacyGetConnectorTypes - r.name = "LegacyGetConnectorTypes" - r.operationID = "legacyGetConnectorTypes" - r.pathPattern = "/s/{spaceId}/api/actions/list_action_types" - r.args = args - r.count = 1 - return r, true - default: - return - } - } - } - } - } - } - } - return r, false -} diff --git a/generated/connectors/oas_security_gen.go b/generated/connectors/oas_security_gen.go index b2bb4406d..1bbb09de2 100644 --- a/generated/connectors/oas_security_gen.go +++ b/generated/connectors/oas_security_gen.go @@ -5,68 +5,12 @@ package connectors import ( "context" "net/http" - "strings" "github.com/go-faster/errors" "github.com/ogen-go/ogen/ogenerrors" ) -// SecurityHandler is handler for security parameters. -type SecurityHandler interface { - // HandleApiKeyAuth handles apiKeyAuth security. - HandleApiKeyAuth(ctx context.Context, operationName string, t ApiKeyAuth) (context.Context, error) - // HandleBasicAuth handles basicAuth security. - HandleBasicAuth(ctx context.Context, operationName string, t BasicAuth) (context.Context, error) -} - -func findAuthorization(h http.Header, prefix string) (string, bool) { - v, ok := h["Authorization"] - if !ok { - return "", false - } - for _, vv := range v { - scheme, value, ok := strings.Cut(vv, " ") - if !ok || !strings.EqualFold(scheme, prefix) { - continue - } - return value, true - } - return "", false -} - -func (s *Server) securityApiKeyAuth(ctx context.Context, operationName string, req *http.Request) (context.Context, bool, error) { - var t ApiKeyAuth - const parameterName = "ApiKey" - value := req.Header.Get(parameterName) - if value == "" { - return ctx, false, nil - } - t.APIKey = value - rctx, err := s.sec.HandleApiKeyAuth(ctx, operationName, t) - if err != nil { - return nil, false, err - } - return rctx, true, err -} -func (s *Server) securityBasicAuth(ctx context.Context, operationName string, req *http.Request) (context.Context, bool, error) { - var t BasicAuth - if _, ok := findAuthorization(req.Header, "Basic"); !ok { - return ctx, false, nil - } - username, password, ok := req.BasicAuth() - if !ok { - return nil, false, errors.New("invalid basic auth") - } - t.Username = username - t.Password = password - rctx, err := s.sec.HandleBasicAuth(ctx, operationName, t) - if err != nil { - return nil, false, err - } - return rctx, true, err -} - // SecuritySource is provider of security values (tokens, passwords, etc.). type SecuritySource interface { // ApiKeyAuth provides apiKeyAuth security value. diff --git a/generated/connectors/oas_server_gen.go b/generated/connectors/oas_server_gen.go deleted file mode 100644 index ecb87e410..000000000 --- a/generated/connectors/oas_server_gen.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package connectors - -import ( - "context" -) - -// Handler handles operations described by OpenAPI v3 specification. -type Handler interface { - // CreateConnector implements createConnector operation. - // - // You must have `all` privileges for the **Actions and Connectors** feature in the **Management** - // section of the Kibana feature privileges. - // - // POST /s/{spaceId}/api/actions/connector - CreateConnector(ctx context.Context, req CreateConnectorReq, params CreateConnectorParams) (CreateConnectorRes, error) - // DeleteConnector implements deleteConnector operation. - // - // You must have `all` privileges for the **Actions and Connectors** feature in the **Management** - // section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be - // recovered. - // - // DELETE /s/{spaceId}/api/actions/connector/{connectorId} - DeleteConnector(ctx context.Context, params DeleteConnectorParams) (DeleteConnectorRes, error) - // GetConnector implements getConnector operation. - // - // You must have `read` privileges for the **Actions and Connectors** feature in the **Management** - // section of the Kibana feature privileges. - // - // GET /s/{spaceId}/api/actions/connector/{connectorId} - GetConnector(ctx context.Context, params GetConnectorParams) (GetConnectorRes, error) - // GetConnectorTypes implements getConnectorTypes operation. - // - // You do not need any Kibana feature privileges to run this API. - // - // GET /s/{spaceId}/api/actions/connector_types - GetConnectorTypes(ctx context.Context, params GetConnectorTypesParams) (GetConnectorTypesRes, error) - // GetConnectors implements getConnectors operation. - // - // You must have `read` privileges for the **Actions and Connectors** feature in the **Management** - // section of the Kibana feature privileges. - // - // GET /s/{spaceId}/api/actions/connectors - GetConnectors(ctx context.Context, params GetConnectorsParams) (GetConnectorsRes, error) - // LegacyCreateConnector implements legacyCreateConnector operation. - // - // Deprecated in 7.13.0. Use the create connector API instead. - // - // Deprecated: schema marks this operation as deprecated. - // - // POST /s/{spaceId}/api/actions - LegacyCreateConnector(ctx context.Context, req *LegacyCreateConnectorReq, params LegacyCreateConnectorParams) (LegacyCreateConnectorRes, error) - // LegacyDeleteConnector implements legacyDeleteConnector operation. - // - // Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, - // it cannot be recovered. - // - // Deprecated: schema marks this operation as deprecated. - // - // DELETE /s/{spaceId}/api/actions/action/{actionId} - LegacyDeleteConnector(ctx context.Context, params LegacyDeleteConnectorParams) (LegacyDeleteConnectorRes, error) - // LegacyGetConnector implements legacyGetConnector operation. - // - // Deprecated in 7.13.0. Use the get connector API instead. - // - // Deprecated: schema marks this operation as deprecated. - // - // GET /s/{spaceId}/api/actions/action/{actionId} - LegacyGetConnector(ctx context.Context, params LegacyGetConnectorParams) (LegacyGetConnectorRes, error) - // LegacyGetConnectorTypes implements legacyGetConnectorTypes operation. - // - // Deprecated in 7.13.0. Use the get all connector types API instead. - // - // Deprecated: schema marks this operation as deprecated. - // - // GET /s/{spaceId}/api/actions/list_action_types - LegacyGetConnectorTypes(ctx context.Context, params LegacyGetConnectorTypesParams) (LegacyGetConnectorTypesRes, error) - // LegacyGetConnectors implements legacyGetConnectors operation. - // - // Deprecated in 7.13.0. Use the get all connectors API instead. - // - // Deprecated: schema marks this operation as deprecated. - // - // GET /s/{spaceId}/api/actions - LegacyGetConnectors(ctx context.Context, params LegacyGetConnectorsParams) (LegacyGetConnectorsRes, error) - // LegacyRunConnector implements legacyRunConnector operation. - // - // Deprecated in 7.13.0. Use the run connector API instead. - // - // Deprecated: schema marks this operation as deprecated. - // - // POST /s/{spaceId}/api/actions/action/{actionId}/_execute - LegacyRunConnector(ctx context.Context, req *LegacyRunConnectorReq, params LegacyRunConnectorParams) (LegacyRunConnectorRes, error) - // LegacyUpdateConnector implements legacyUpdateConnector operation. - // - // Deprecated in 7.13.0. Use the update connector API instead. - // - // Deprecated: schema marks this operation as deprecated. - // - // PUT /s/{spaceId}/api/actions/action/{actionId} - LegacyUpdateConnector(ctx context.Context, req *LegacyUpdateConnectorReq, params LegacyUpdateConnectorParams) (LegacyUpdateConnectorRes, error) - // UpdateConnector implements updateConnector operation. - // - // You must have `all` privileges for the **Actions and Connectors** feature in the **Management** - // section of the Kibana feature privileges. - // - // PUT /s/{spaceId}/api/actions/connector/{connectorId} - UpdateConnector(ctx context.Context, req UpdateConnectorReq, params UpdateConnectorParams) (UpdateConnectorRes, error) -} - -// Server implements http server based on OpenAPI v3 specification and -// calls Handler to handle requests. -type Server struct { - h Handler - sec SecurityHandler - baseServer -} - -// NewServer creates new Server. -func NewServer(h Handler, sec SecurityHandler, opts ...ServerOption) (*Server, error) { - s, err := newServerConfig(opts...).baseServer() - if err != nil { - return nil, err - } - return &Server{ - h: h, - sec: sec, - baseServer: s, - }, nil -} diff --git a/generated/connectors/oas_unimplemented_gen.go b/generated/connectors/oas_unimplemented_gen.go deleted file mode 100644 index 03e90c68c..000000000 --- a/generated/connectors/oas_unimplemented_gen.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package connectors - -import ( - "context" - - ht "github.com/ogen-go/ogen/http" -) - -// UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented. -type UnimplementedHandler struct{} - -var _ Handler = UnimplementedHandler{} - -// CreateConnector implements createConnector operation. -// -// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** -// section of the Kibana feature privileges. -// -// POST /s/{spaceId}/api/actions/connector -func (UnimplementedHandler) CreateConnector(ctx context.Context, req CreateConnectorReq, params CreateConnectorParams) (r CreateConnectorRes, _ error) { - return r, ht.ErrNotImplemented -} - -// DeleteConnector implements deleteConnector operation. -// -// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** -// section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be -// recovered. -// -// DELETE /s/{spaceId}/api/actions/connector/{connectorId} -func (UnimplementedHandler) DeleteConnector(ctx context.Context, params DeleteConnectorParams) (r DeleteConnectorRes, _ error) { - return r, ht.ErrNotImplemented -} - -// GetConnector implements getConnector operation. -// -// You must have `read` privileges for the **Actions and Connectors** feature in the **Management** -// section of the Kibana feature privileges. -// -// GET /s/{spaceId}/api/actions/connector/{connectorId} -func (UnimplementedHandler) GetConnector(ctx context.Context, params GetConnectorParams) (r GetConnectorRes, _ error) { - return r, ht.ErrNotImplemented -} - -// GetConnectorTypes implements getConnectorTypes operation. -// -// You do not need any Kibana feature privileges to run this API. -// -// GET /s/{spaceId}/api/actions/connector_types -func (UnimplementedHandler) GetConnectorTypes(ctx context.Context, params GetConnectorTypesParams) (r GetConnectorTypesRes, _ error) { - return r, ht.ErrNotImplemented -} - -// GetConnectors implements getConnectors operation. -// -// You must have `read` privileges for the **Actions and Connectors** feature in the **Management** -// section of the Kibana feature privileges. -// -// GET /s/{spaceId}/api/actions/connectors -func (UnimplementedHandler) GetConnectors(ctx context.Context, params GetConnectorsParams) (r GetConnectorsRes, _ error) { - return r, ht.ErrNotImplemented -} - -// LegacyCreateConnector implements legacyCreateConnector operation. -// -// Deprecated in 7.13.0. Use the create connector API instead. -// -// Deprecated: schema marks this operation as deprecated. -// -// POST /s/{spaceId}/api/actions -func (UnimplementedHandler) LegacyCreateConnector(ctx context.Context, req *LegacyCreateConnectorReq, params LegacyCreateConnectorParams) (r LegacyCreateConnectorRes, _ error) { - return r, ht.ErrNotImplemented -} - -// LegacyDeleteConnector implements legacyDeleteConnector operation. -// -// Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, -// it cannot be recovered. -// -// Deprecated: schema marks this operation as deprecated. -// -// DELETE /s/{spaceId}/api/actions/action/{actionId} -func (UnimplementedHandler) LegacyDeleteConnector(ctx context.Context, params LegacyDeleteConnectorParams) (r LegacyDeleteConnectorRes, _ error) { - return r, ht.ErrNotImplemented -} - -// LegacyGetConnector implements legacyGetConnector operation. -// -// Deprecated in 7.13.0. Use the get connector API instead. -// -// Deprecated: schema marks this operation as deprecated. -// -// GET /s/{spaceId}/api/actions/action/{actionId} -func (UnimplementedHandler) LegacyGetConnector(ctx context.Context, params LegacyGetConnectorParams) (r LegacyGetConnectorRes, _ error) { - return r, ht.ErrNotImplemented -} - -// LegacyGetConnectorTypes implements legacyGetConnectorTypes operation. -// -// Deprecated in 7.13.0. Use the get all connector types API instead. -// -// Deprecated: schema marks this operation as deprecated. -// -// GET /s/{spaceId}/api/actions/list_action_types -func (UnimplementedHandler) LegacyGetConnectorTypes(ctx context.Context, params LegacyGetConnectorTypesParams) (r LegacyGetConnectorTypesRes, _ error) { - return r, ht.ErrNotImplemented -} - -// LegacyGetConnectors implements legacyGetConnectors operation. -// -// Deprecated in 7.13.0. Use the get all connectors API instead. -// -// Deprecated: schema marks this operation as deprecated. -// -// GET /s/{spaceId}/api/actions -func (UnimplementedHandler) LegacyGetConnectors(ctx context.Context, params LegacyGetConnectorsParams) (r LegacyGetConnectorsRes, _ error) { - return r, ht.ErrNotImplemented -} - -// LegacyRunConnector implements legacyRunConnector operation. -// -// Deprecated in 7.13.0. Use the run connector API instead. -// -// Deprecated: schema marks this operation as deprecated. -// -// POST /s/{spaceId}/api/actions/action/{actionId}/_execute -func (UnimplementedHandler) LegacyRunConnector(ctx context.Context, req *LegacyRunConnectorReq, params LegacyRunConnectorParams) (r LegacyRunConnectorRes, _ error) { - return r, ht.ErrNotImplemented -} - -// LegacyUpdateConnector implements legacyUpdateConnector operation. -// -// Deprecated in 7.13.0. Use the update connector API instead. -// -// Deprecated: schema marks this operation as deprecated. -// -// PUT /s/{spaceId}/api/actions/action/{actionId} -func (UnimplementedHandler) LegacyUpdateConnector(ctx context.Context, req *LegacyUpdateConnectorReq, params LegacyUpdateConnectorParams) (r LegacyUpdateConnectorRes, _ error) { - return r, ht.ErrNotImplemented -} - -// UpdateConnector implements updateConnector operation. -// -// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** -// section of the Kibana feature privileges. -// -// PUT /s/{spaceId}/api/actions/connector/{connectorId} -func (UnimplementedHandler) UpdateConnector(ctx context.Context, req UpdateConnectorReq, params UpdateConnectorParams) (r UpdateConnectorRes, _ error) { - return r, ht.ErrNotImplemented -} diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index 6e48bc4cf..e30ce1821 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" ) -func CreateActionConnector(ctx context.Context, apiClient *clients.ApiClient, connectorOld models.KibanaActionConnector) (string, diag.Diagnostics) { +func CreateConnector(ctx context.Context, apiClient *clients.ApiClient, connectorOld models.KibanaActionConnector) (string, diag.Diagnostics) { client, ctxWithAuth, err := apiClient.GetKibanaActionConnectorClient(ctx) if err != nil { return "", diag.FromErr(err) @@ -39,7 +39,7 @@ func CreateActionConnector(ctx context.Context, apiClient *clients.ApiClient, co return connectorNew.ConnectorID, nil } -func UpdateActionConnector(ctx context.Context, apiClient *clients.ApiClient, connectorOld models.KibanaActionConnector) (string, diag.Diagnostics) { +func UpdateConnector(ctx context.Context, apiClient *clients.ApiClient, connectorOld models.KibanaActionConnector) (string, diag.Diagnostics) { client, ctxWithAuth, err := apiClient.GetKibanaActionConnectorClient(ctx) if err != nil { return "", diag.FromErr(err) @@ -87,7 +87,7 @@ func UpdateActionConnector(ctx context.Context, apiClient *clients.ApiClient, co return connectorNew.ConnectorID, nil } -func GetActionConnector(ctx context.Context, apiClient *clients.ApiClient, connectorID, spaceID string, connectorTypeID string) (*models.KibanaActionConnector, diag.Diagnostics) { +func GetConnector(ctx context.Context, apiClient *clients.ApiClient, connectorID, spaceID string, connectorTypeID string) (*models.KibanaActionConnector, diag.Diagnostics) { client, ctxWithAuth, err := apiClient.GetKibanaActionConnectorClient(ctx) if err != nil { return nil, diag.FromErr(err) @@ -112,7 +112,7 @@ func GetActionConnector(ctx context.Context, apiClient *clients.ApiClient, conne return connector, nil } -func DeleteActionConnector(ctx context.Context, apiClient *clients.ApiClient, connectorID string, spaceID string) diag.Diagnostics { +func DeleteConnector(ctx context.Context, apiClient *clients.ApiClient, connectorID string, spaceID string) diag.Diagnostics { client, ctxWithAuth, err := apiClient.GetKibanaActionConnectorClient(ctx) if err != nil { return diag.FromErr(err) diff --git a/internal/kibana/connector.go b/internal/kibana/connector.go index 6521113cd..78d30fbd9 100644 --- a/internal/kibana/connector.go +++ b/internal/kibana/connector.go @@ -97,7 +97,7 @@ func resourceConnectorCreate(ctx context.Context, d *schema.ResourceData, meta i return diags } - connectorID, diags := kibana.CreateActionConnector(ctx, client, connectorOld) + connectorID, diags := kibana.CreateConnector(ctx, client, connectorOld) if diags.HasError() { return diags @@ -126,7 +126,7 @@ func resourceConnectorUpdate(ctx context.Context, d *schema.ResourceData, meta i } connectorOld.ConnectorID = compositeIDold.ResourceId - connectorID, diags := kibana.UpdateActionConnector(ctx, client, connectorOld) + connectorID, diags := kibana.UpdateConnector(ctx, client, connectorOld) if diags.HasError() { return diags @@ -154,7 +154,7 @@ func resourceConnectorRead(ctx context.Context, d *schema.ResourceData, meta int return diags } - connector, diags := kibana.GetActionConnector(ctx, client, compositeID.ResourceId, compositeID.ClusterId, connectorOld.ConnectorTypeID) + connector, diags := kibana.GetConnector(ctx, client, compositeID.ResourceId, compositeID.ClusterId, connectorOld.ConnectorTypeID) if connector == nil && diags == nil { d.SetId("") return diags @@ -179,7 +179,7 @@ func resourceConnectorDelete(ctx context.Context, d *schema.ResourceData, meta i spaceId := d.Get("space_id").(string) - if diags := kibana.DeleteActionConnector(ctx, client, compositeID.ResourceId, spaceId); diags.HasError() { + if diags := kibana.DeleteConnector(ctx, client, compositeID.ResourceId, spaceId); diags.HasError() { return diags } diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index 8d6e0dfd7..79ffc3fbc 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -96,7 +96,7 @@ func checkResourceActionConnectorDestroy(s *terraform.State) error { } compId, _ := clients.CompositeIdFromStr(rs.Primary.ID) - rule, diags := kibana.GetActionConnector(context.Background(), client, compId.ResourceId, compId.ClusterId, ".index") + rule, diags := kibana.GetConnector(context.Background(), client, compId.ResourceId, compId.ClusterId, ".index") if diags.HasError() { return fmt.Errorf("Failed to get action connector: %v", diags) } From e3d7055a4eebcd18625cdd536851ec4bdadd4be2 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 4 May 2023 17:07:59 +0200 Subject: [PATCH 12/59] Switch code generation for Kibana connectors to oapi-codegen. --- Makefile | 4 +- connectors_gen.go | 4 +- generated/connectors/bundled.yaml | 338 +- generated/connectors/connectors.gen.go | 5347 ++++++ generated/connectors/oas_cfg_gen.go | 136 - generated/connectors/oas_client_gen.go | 2109 --- generated/connectors/oas_defaults_gen.go | 62 - generated/connectors/oas_interfaces_gen.go | 54 - generated/connectors/oas_json_gen.go | 14547 ---------------- generated/connectors/oas_parameters_gen.go | 125 - .../connectors/oas_request_encoders_gen.go | 82 - .../connectors/oas_response_decoders_gen.go | 1114 -- generated/connectors/oas_schemas_gen.go | 8319 --------- generated/connectors/oas_security_gen.go | 43 - generated/connectors/oas_validators_gen.go | 1040 -- go.mod | 23 +- go.sum | 59 +- internal/clients/api_client.go | 32 +- internal/clients/kibana/alerting.go | 2 +- internal/clients/kibana/connector.go | 233 +- internal/kibana/connector.go | 2 +- internal/utils/diffs.go | 18 + 22 files changed, 5747 insertions(+), 27946 deletions(-) create mode 100644 generated/connectors/connectors.gen.go delete mode 100644 generated/connectors/oas_cfg_gen.go delete mode 100644 generated/connectors/oas_client_gen.go delete mode 100644 generated/connectors/oas_defaults_gen.go delete mode 100644 generated/connectors/oas_interfaces_gen.go delete mode 100644 generated/connectors/oas_json_gen.go delete mode 100644 generated/connectors/oas_parameters_gen.go delete mode 100644 generated/connectors/oas_request_encoders_gen.go delete mode 100644 generated/connectors/oas_response_decoders_gen.go delete mode 100644 generated/connectors/oas_schemas_gen.go delete mode 100644 generated/connectors/oas_security_gen.go delete mode 100644 generated/connectors/oas_validators_gen.go diff --git a/Makefile b/Makefile index 8a465fab9..e7516c94f 100644 --- a/Makefile +++ b/Makefile @@ -257,9 +257,7 @@ generate-alerting-client: ## generate Kibana alerting client @ rm -rf generated/alerting/go.mod generated/alerting/go.sum generated/alerting/test @ go fmt ./generated/alerting/... -## -i https://raw.githubusercontent.com/elastic/kibana/$(SWAGGER_VERSION)/x-pack/plugins/actions/docs/openapi/bundled.json \ - .PHONY: generate-connectors-client generate-connectors-client: ## generate Kibana connectors client - @ go get github.com/ogen-go/ogen/gen@v0.63.0 + @ go get github.com/deepmap/oapi-codegen/pkg/codegen@v1.12.4 @ go generate diff --git a/connectors_gen.go b/connectors_gen.go index 5ef7046c8..dada56086 100644 --- a/connectors_gen.go +++ b/connectors_gen.go @@ -1,5 +1,3 @@ -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --infer-types --no-server --target generated/connectors -package connectors --clean --debug.ignoreNotImplemented "discriminator inference" ./generated/connectors/bundled.yaml - -// go:generate go run github.com/ogen-go/ogen/cmd/ogen --help +//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen -package connectors -o ./generated/connectors/connectors.gen.go -generate "types,client" ./generated/connectors/bundled.yaml package main diff --git a/generated/connectors/bundled.yaml b/generated/connectors/bundled.yaml index 7f77c8fc1..6ba58a4cb 100644 --- a/generated/connectors/bundled.yaml +++ b/generated/connectors/bundled.yaml @@ -85,9 +85,17 @@ paths: createIndexConnectorResponse: $ref: '#/components/examples/create_index_connector_response' '400': - $ref: '#/components/responses/400' + description: Indicates a bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/bad_request_error' '401': - $ref: '#/components/responses/401' + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/authorization_error' servers: - url: https://localhost:5601 servers: @@ -114,7 +122,11 @@ paths: getConnectorResponse: $ref: '#/components/examples/get_connector_response' '401': - $ref: '#/components/responses/401' + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/authorization_error' '404': description: Object is not found. content: @@ -148,7 +160,11 @@ paths: '204': description: Indicates a successful call. '401': - $ref: '#/components/responses/401' + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/authorization_error' '404': description: Object is not found. content: @@ -195,26 +211,26 @@ paths: - $ref: '#/components/schemas/update_connector_request_servicenow' - $ref: '#/components/schemas/update_connector_request_servicenow_itom' - $ref: '#/components/schemas/update_connector_request_swimlane' - discriminator: - propertyName: connector_type_id - mapping: - .cases-webhook: '#/components/schemas/update_connector_request_cases_webhook' -# .email: '#/components/schemas/update_connector_request_email' - .index: '#/components/schemas/update_connector_request_index' - .jira: '#/components/schemas/update_connector_request_jira' - .opsgenie: '#/components/schemas/update_connector_request_opsgenie' -# .pagerduty: '#/components/schemas/update_connector_request_pagerduty' - .resilient: '#/components/schemas/update_connector_request_resilient' - .server-log: '#/components/schemas/update_connector_request_serverlog' - .servicenow: '#/components/schemas/update_connector_request_servicenow' - .servicenow-itom: '#/components/schemas/update_connector_request_servicenow_itom' -# .servicenow-sir: '#/components/schemas/create_connector_request_servicenow_sir' -# .slack: '#/components/schemas/create_connector_request_slack' - .swimlane: '#/components/schemas/update_connector_request_swimlane' - # .teams: '#/components/schemas/create_connector_request_teams' - # .tines: '#/components/schemas/create_connector_request_tines' - # .webhook: '#/components/schemas/create_connector_request_webhook' - # .xmatters: '#/components/schemas/create_connector_request_xmatters' +# discriminator: +# propertyName: connector_type_id +# mapping: +# .cases-webhook: '#/components/schemas/update_connector_request_cases_webhook' +# # .email: '#/components/schemas/update_connector_request_email' +# .index: '#/components/schemas/update_connector_request_index' +# .jira: '#/components/schemas/update_connector_request_jira' +# .opsgenie: '#/components/schemas/update_connector_request_opsgenie' +# # .pagerduty: '#/components/schemas/update_connector_request_pagerduty' +# .resilient: '#/components/schemas/update_connector_request_resilient' +# .server-log: '#/components/schemas/update_connector_request_serverlog' +# .servicenow: '#/components/schemas/update_connector_request_servicenow' +# .servicenow-itom: '#/components/schemas/update_connector_request_servicenow_itom' +# # .servicenow-sir: '#/components/schemas/create_connector_request_servicenow_sir' +# # .slack: '#/components/schemas/create_connector_request_slack' +# .swimlane: '#/components/schemas/update_connector_request_swimlane' +# # .teams: '#/components/schemas/create_connector_request_teams' +# # .tines: '#/components/schemas/create_connector_request_tines' +# # .webhook: '#/components/schemas/create_connector_request_webhook' +# # .xmatters: '#/components/schemas/create_connector_request_xmatters' examples: updateIndexConnectorRequest: $ref: '#/components/examples/update_index_connector_request' @@ -226,11 +242,23 @@ paths: schema: $ref: '#/components/schemas/connector_response_properties' '400': - $ref: '#/components/responses/400' + description: Indicates a bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/bad_request_error' '401': - $ref: '#/components/responses/401' + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/authorization_error' '404': - $ref: '#/components/responses/404' + description: Object is not found. + content: + application/json: + schema: + $ref: '#/components/schemas/object_not_found_error' servers: - url: https://localhost:5601 servers: @@ -294,7 +322,11 @@ paths: getConnectorsResponse: $ref: '#/components/examples/get_connectors_response' '401': - $ref: '#/components/responses/401' + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/authorization_error' servers: - url: https://localhost:5601 servers: @@ -361,7 +393,11 @@ paths: getConnectorTypesResponse: $ref: '#/components/examples/get_connector_types_response' '401': - $ref: '#/components/responses/401' + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/authorization_error' servers: - url: https://localhost:5601 servers: @@ -426,29 +462,7 @@ paths: content: application/json: schema: - type: object - required: - - connector_id - - status - properties: - connector_id: - type: string - description: The identifier for the connector. - data: - oneOf: - - type: object - description: Information returned from the action. - additionalProperties: true - - type: array - description: An array of information returned from the action. - items: - type: object - status: - type: string - description: The status of the action. - enum: - - error - - ok + $ref: '#/components/schemas/run_connector_general_response' examples: runIndexConnectorResponse: $ref: '#/components/examples/run_index_connector_response' @@ -461,7 +475,11 @@ paths: runSwimlaneConnectorResponse: $ref: '#/components/examples/run_swimlane_connector_response' '401': - $ref: '#/components/responses/401' + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/authorization_error' servers: - url: https://localhost:5601 servers: @@ -483,7 +501,11 @@ paths: '204': description: Indicates a successful call. '401': - $ref: '#/components/responses/401' + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/authorization_error' servers: - url: https://localhost:5601 get: @@ -500,7 +522,11 @@ paths: '200': $ref: '#/components/responses/200_actions' '401': - $ref: '#/components/responses/401' + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/authorization_error' servers: - url: https://localhost:5601 put: @@ -536,7 +562,11 @@ paths: '200': $ref: '#/components/responses/200_actions' '404': - $ref: '#/components/responses/404' + description: Object is not found. + content: + application/json: + schema: + $ref: '#/components/schemas/object_not_found_error' servers: - url: https://localhost:5601 servers: @@ -561,7 +591,11 @@ paths: items: $ref: '#/components/schemas/action_response_properties' '401': - $ref: '#/components/responses/401' + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/authorization_error' servers: - url: https://localhost:5601 post: @@ -599,7 +633,11 @@ paths: '200': $ref: '#/components/responses/200_actions' '401': - $ref: '#/components/responses/401' + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/authorization_error' servers: - url: https://localhost:5601 servers: @@ -646,7 +684,11 @@ paths: type: string description: The name of the connector type. '401': - $ref: '#/components/responses/401' + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/authorization_error' servers: - url: https://localhost:5601 servers: @@ -683,24 +725,13 @@ paths: content: application/json: schema: - type: object - properties: - actionId: - type: string - data: - oneOf: - - type: object - description: Information returned from the action. - additionalProperties: true - - type: array - description: An array of information returned from the action. - items: - type: object - status: - type: string - description: The status of the action. + $ref: '#/components/schemas/legacy_run_connector_general_response' '401': - $ref: '#/components/responses/401' + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/authorization_error' servers: - url: https://localhost:5601 servers: @@ -2921,6 +2952,99 @@ components: description: Indicates whether it is a preconfigured action. name: type: string + run_connector_general_response: + title: Response from running a connector. + type: object + required: + - connector_id + - status + properties: + connector_id: + type: string + description: The identifier for the connector. + data: + oneOf: + - type: object + description: Information returned from the action. + additionalProperties: true + - type: array + description: An array of information returned from the action. + items: + type: object + status: + type: string + description: The status of the action. + enum: + - error + - ok + legacy_run_connector_general_response: + title: Response from legacy endpoint for running a connector. + type: object + properties: + actionId: + type: string + data: + oneOf: + - type: object + description: Information returned from the action. + additionalProperties: true + - type: array + description: An array of information returned from the action. + items: + type: object + status: + type: string + description: The status of the action. + bad_request_error: + title: Bad request + type: object + properties: + error: + type: string + example: Bad Request + enum: + - Bad Request + message: + type: string + example: 'error validating action type config: [index]: expected value of type [string] but got [undefined]' + statusCode: + type: integer + example: 400 + enum: + - 400 + authorization_error: + type: object + title: Unauthorized response + properties: + error: + type: string + example: Unauthorized + enum: + - Unauthorized + message: + type: string + statusCode: + type: integer + example: 401 + enum: + - 401 + object_not_found_error: + type: object + title: Not found response + properties: + error: + type: string + example: Not Found + enum: + - Not Found + message: + type: string + example: Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found + statusCode: + type: integer + example: 404 + enum: + - 404 examples: create_index_connector_request: summary: Create an index connector. @@ -3151,68 +3275,6 @@ components: pushedDate: '2022-09-08T16:52:27.865Z' status: ok responses: - '400': - description: Indicates a bad request. - content: - application/json: - schema: - type: object - title: Bad request - properties: - error: - type: string - example: Bad Request - enum: - - Bad Request - message: - type: string - example: 'error validating action type config: [index]: expected value of type [string] but got [undefined]' - statusCode: - type: integer - example: 400 - enum: - - 400 - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - type: object - title: Unauthorized response - properties: - error: - type: string - example: Unauthorized - enum: - - Unauthorized - message: - type: string - statusCode: - type: integer - example: 401 - enum: - - 401 - '404': - description: Object is not found. - content: - application/json: - schema: - type: object - title: Not found response - properties: - error: - type: string - example: Not Found - enum: - - Not Found - message: - type: string - example: Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found - statusCode: - type: integer - example: 404 - enum: - - 404 200_actions: description: Indicates a successful call. content: diff --git a/generated/connectors/connectors.gen.go b/generated/connectors/connectors.gen.go new file mode 100644 index 000000000..260a83582 --- /dev/null +++ b/generated/connectors/connectors.gen.go @@ -0,0 +1,5347 @@ +// Package connectors provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT. +package connectors + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strings" + + "github.com/deepmap/oapi-codegen/pkg/runtime" +) + +const ( + ApiKeyAuthScopes = "apiKeyAuth.Scopes" + BasicAuthScopes = "basicAuth.Scopes" +) + +// Defines values for AuthorizationErrorError. +const ( + Unauthorized AuthorizationErrorError = "Unauthorized" +) + +// Defines values for AuthorizationErrorStatusCode. +const ( + N401 AuthorizationErrorStatusCode = 401 +) + +// Defines values for BadRequestErrorError. +const ( + BadRequest BadRequestErrorError = "Bad Request" +) + +// Defines values for BadRequestErrorStatusCode. +const ( + N400 BadRequestErrorStatusCode = 400 +) + +// Defines values for ConfigPropertiesCasesWebhookCreateCommentMethod. +const ( + ConfigPropertiesCasesWebhookCreateCommentMethodPatch ConfigPropertiesCasesWebhookCreateCommentMethod = "patch" + ConfigPropertiesCasesWebhookCreateCommentMethodPost ConfigPropertiesCasesWebhookCreateCommentMethod = "post" + ConfigPropertiesCasesWebhookCreateCommentMethodPut ConfigPropertiesCasesWebhookCreateCommentMethod = "put" +) + +// Defines values for ConfigPropertiesCasesWebhookCreateIncidentMethod. +const ( + ConfigPropertiesCasesWebhookCreateIncidentMethodPatch ConfigPropertiesCasesWebhookCreateIncidentMethod = "patch" + ConfigPropertiesCasesWebhookCreateIncidentMethodPost ConfigPropertiesCasesWebhookCreateIncidentMethod = "post" + ConfigPropertiesCasesWebhookCreateIncidentMethodPut ConfigPropertiesCasesWebhookCreateIncidentMethod = "put" +) + +// Defines values for ConfigPropertiesCasesWebhookUpdateIncidentMethod. +const ( + Patch ConfigPropertiesCasesWebhookUpdateIncidentMethod = "patch" + Post ConfigPropertiesCasesWebhookUpdateIncidentMethod = "post" + Put ConfigPropertiesCasesWebhookUpdateIncidentMethod = "put" +) + +// Defines values for ConfigPropertiesSwimlaneConnectorType. +const ( + ConfigPropertiesSwimlaneConnectorTypeAlerts ConfigPropertiesSwimlaneConnectorType = "alerts" + ConfigPropertiesSwimlaneConnectorTypeAll ConfigPropertiesSwimlaneConnectorType = "all" + ConfigPropertiesSwimlaneConnectorTypeCases ConfigPropertiesSwimlaneConnectorType = "cases" +) + +// Defines values for ConnectorResponsePropertiesCasesWebhookConnectorTypeId. +const ( + ConnectorResponsePropertiesCasesWebhookConnectorTypeIdDotCasesWebhook ConnectorResponsePropertiesCasesWebhookConnectorTypeId = ".cases-webhook" +) + +// Defines values for ConnectorResponsePropertiesEmailConnectorTypeId. +const ( + ConnectorResponsePropertiesEmailConnectorTypeIdDotEmail ConnectorResponsePropertiesEmailConnectorTypeId = ".email" +) + +// Defines values for ConnectorResponsePropertiesIndexConnectorTypeId. +const ( + ConnectorResponsePropertiesIndexConnectorTypeIdDotIndex ConnectorResponsePropertiesIndexConnectorTypeId = ".index" +) + +// Defines values for ConnectorResponsePropertiesJiraConnectorTypeId. +const ( + ConnectorResponsePropertiesJiraConnectorTypeIdDotJira ConnectorResponsePropertiesJiraConnectorTypeId = ".jira" +) + +// Defines values for ConnectorResponsePropertiesOpsgenieConnectorTypeId. +const ( + ConnectorResponsePropertiesOpsgenieConnectorTypeIdDotOpsgenie ConnectorResponsePropertiesOpsgenieConnectorTypeId = ".opsgenie" +) + +// Defines values for ConnectorResponsePropertiesPagerdutyConnectorTypeId. +const ( + ConnectorResponsePropertiesPagerdutyConnectorTypeIdDotPagerduty ConnectorResponsePropertiesPagerdutyConnectorTypeId = ".pagerduty" +) + +// Defines values for ConnectorResponsePropertiesResilientConnectorTypeId. +const ( + ConnectorResponsePropertiesResilientConnectorTypeIdDotResilient ConnectorResponsePropertiesResilientConnectorTypeId = ".resilient" +) + +// Defines values for ConnectorResponsePropertiesServerlogConnectorTypeId. +const ( + ConnectorResponsePropertiesServerlogConnectorTypeIdDotServerLog ConnectorResponsePropertiesServerlogConnectorTypeId = ".server-log" +) + +// Defines values for ConnectorResponsePropertiesServicenowConnectorTypeId. +const ( + ConnectorResponsePropertiesServicenowConnectorTypeIdDotServicenow ConnectorResponsePropertiesServicenowConnectorTypeId = ".servicenow" +) + +// Defines values for ConnectorResponsePropertiesServicenowItomConnectorTypeId. +const ( + ConnectorResponsePropertiesServicenowItomConnectorTypeIdDotServicenowItom ConnectorResponsePropertiesServicenowItomConnectorTypeId = ".servicenow-itom" +) + +// Defines values for ConnectorResponsePropertiesServicenowSirConnectorTypeId. +const ( + ConnectorResponsePropertiesServicenowSirConnectorTypeIdDotServicenowSir ConnectorResponsePropertiesServicenowSirConnectorTypeId = ".servicenow-sir" +) + +// Defines values for ConnectorResponsePropertiesSlackConnectorTypeId. +const ( + ConnectorResponsePropertiesSlackConnectorTypeIdDotSlack ConnectorResponsePropertiesSlackConnectorTypeId = ".slack" +) + +// Defines values for ConnectorResponsePropertiesSwimlaneConnectorTypeId. +const ( + ConnectorResponsePropertiesSwimlaneConnectorTypeIdDotSwimlane ConnectorResponsePropertiesSwimlaneConnectorTypeId = ".swimlane" +) + +// Defines values for ConnectorResponsePropertiesTeamsConnectorTypeId. +const ( + ConnectorResponsePropertiesTeamsConnectorTypeIdDotTeams ConnectorResponsePropertiesTeamsConnectorTypeId = ".teams" +) + +// Defines values for ConnectorResponsePropertiesTinesConnectorTypeId. +const ( + ConnectorResponsePropertiesTinesConnectorTypeIdDotTines ConnectorResponsePropertiesTinesConnectorTypeId = ".tines" +) + +// Defines values for ConnectorResponsePropertiesWebhookConnectorTypeId. +const ( + ConnectorResponsePropertiesWebhookConnectorTypeIdDotWebhook ConnectorResponsePropertiesWebhookConnectorTypeId = ".webhook" +) + +// Defines values for ConnectorResponsePropertiesXmattersConnectorTypeId. +const ( + ConnectorResponsePropertiesXmattersConnectorTypeIdDotXmatters ConnectorResponsePropertiesXmattersConnectorTypeId = ".xmatters" +) + +// Defines values for ConnectorTypes. +const ( + ConnectorTypesDotCasesWebhook ConnectorTypes = ".cases-webhook" + ConnectorTypesDotEmail ConnectorTypes = ".email" + ConnectorTypesDotIndex ConnectorTypes = ".index" + ConnectorTypesDotJira ConnectorTypes = ".jira" + ConnectorTypesDotOpsgenie ConnectorTypes = ".opsgenie" + ConnectorTypesDotPagerduty ConnectorTypes = ".pagerduty" + ConnectorTypesDotResilient ConnectorTypes = ".resilient" + ConnectorTypesDotServerLog ConnectorTypes = ".server-log" + ConnectorTypesDotServicenow ConnectorTypes = ".servicenow" + ConnectorTypesDotServicenowItom ConnectorTypes = ".servicenow-itom" + ConnectorTypesDotServicenowSir ConnectorTypes = ".servicenow-sir" + ConnectorTypesDotSlack ConnectorTypes = ".slack" + ConnectorTypesDotSwimlane ConnectorTypes = ".swimlane" + ConnectorTypesDotTeams ConnectorTypes = ".teams" + ConnectorTypesDotTines ConnectorTypes = ".tines" + ConnectorTypesDotWebhook ConnectorTypes = ".webhook" + ConnectorTypesDotXmatters ConnectorTypes = ".xmatters" +) + +// Defines values for CreateConnectorRequestCasesWebhookConnectorTypeId. +const ( + DotCasesWebhook CreateConnectorRequestCasesWebhookConnectorTypeId = ".cases-webhook" +) + +// Defines values for CreateConnectorRequestEmailConnectorTypeId. +const ( + CreateConnectorRequestEmailConnectorTypeIdDotEmail CreateConnectorRequestEmailConnectorTypeId = ".email" +) + +// Defines values for CreateConnectorRequestIndexConnectorTypeId. +const ( + CreateConnectorRequestIndexConnectorTypeIdDotIndex CreateConnectorRequestIndexConnectorTypeId = ".index" +) + +// Defines values for CreateConnectorRequestJiraConnectorTypeId. +const ( + CreateConnectorRequestJiraConnectorTypeIdDotJira CreateConnectorRequestJiraConnectorTypeId = ".jira" +) + +// Defines values for CreateConnectorRequestOpsgenieConnectorTypeId. +const ( + CreateConnectorRequestOpsgenieConnectorTypeIdDotOpsgenie CreateConnectorRequestOpsgenieConnectorTypeId = ".opsgenie" +) + +// Defines values for CreateConnectorRequestPagerdutyConnectorTypeId. +const ( + CreateConnectorRequestPagerdutyConnectorTypeIdDotPagerduty CreateConnectorRequestPagerdutyConnectorTypeId = ".pagerduty" +) + +// Defines values for CreateConnectorRequestResilientConnectorTypeId. +const ( + CreateConnectorRequestResilientConnectorTypeIdDotResilient CreateConnectorRequestResilientConnectorTypeId = ".resilient" +) + +// Defines values for CreateConnectorRequestServerlogConnectorTypeId. +const ( + CreateConnectorRequestServerlogConnectorTypeIdDotServerLog CreateConnectorRequestServerlogConnectorTypeId = ".server-log" +) + +// Defines values for CreateConnectorRequestServicenowConnectorTypeId. +const ( + CreateConnectorRequestServicenowConnectorTypeIdDotServicenow CreateConnectorRequestServicenowConnectorTypeId = ".servicenow" +) + +// Defines values for CreateConnectorRequestServicenowItomConnectorTypeId. +const ( + CreateConnectorRequestServicenowItomConnectorTypeIdDotServicenowItom CreateConnectorRequestServicenowItomConnectorTypeId = ".servicenow-itom" +) + +// Defines values for CreateConnectorRequestServicenowSirConnectorTypeId. +const ( + CreateConnectorRequestServicenowSirConnectorTypeIdDotServicenowSir CreateConnectorRequestServicenowSirConnectorTypeId = ".servicenow-sir" +) + +// Defines values for CreateConnectorRequestSlackConnectorTypeId. +const ( + CreateConnectorRequestSlackConnectorTypeIdDotSlack CreateConnectorRequestSlackConnectorTypeId = ".slack" +) + +// Defines values for CreateConnectorRequestSwimlaneConnectorTypeId. +const ( + CreateConnectorRequestSwimlaneConnectorTypeIdDotSwimlane CreateConnectorRequestSwimlaneConnectorTypeId = ".swimlane" +) + +// Defines values for CreateConnectorRequestTeamsConnectorTypeId. +const ( + CreateConnectorRequestTeamsConnectorTypeIdDotTeams CreateConnectorRequestTeamsConnectorTypeId = ".teams" +) + +// Defines values for CreateConnectorRequestTinesConnectorTypeId. +const ( + CreateConnectorRequestTinesConnectorTypeIdDotTines CreateConnectorRequestTinesConnectorTypeId = ".tines" +) + +// Defines values for CreateConnectorRequestWebhookConnectorTypeId. +const ( + CreateConnectorRequestWebhookConnectorTypeIdDotWebhook CreateConnectorRequestWebhookConnectorTypeId = ".webhook" +) + +// Defines values for CreateConnectorRequestXmattersConnectorTypeId. +const ( + CreateConnectorRequestXmattersConnectorTypeIdDotXmatters CreateConnectorRequestXmattersConnectorTypeId = ".xmatters" +) + +// Defines values for Features. +const ( + FeaturesAlerting Features = "alerting" + FeaturesCases Features = "cases" + FeaturesSiem Features = "siem" + FeaturesUptime Features = "uptime" +) + +// Defines values for ObjectNotFoundErrorError. +const ( + NotFound ObjectNotFoundErrorError = "Not Found" +) + +// Defines values for ObjectNotFoundErrorStatusCode. +const ( + N404 ObjectNotFoundErrorStatusCode = 404 +) + +// Defines values for RunConnectorGeneralResponseStatus. +const ( + RunConnectorGeneralResponseStatusError RunConnectorGeneralResponseStatus = "error" + RunConnectorGeneralResponseStatusOk RunConnectorGeneralResponseStatus = "ok" +) + +// Defines values for RunConnectorParamsLevelMessageLevel. +const ( + RunConnectorParamsLevelMessageLevelDebug RunConnectorParamsLevelMessageLevel = "debug" + RunConnectorParamsLevelMessageLevelError RunConnectorParamsLevelMessageLevel = "error" + RunConnectorParamsLevelMessageLevelFatal RunConnectorParamsLevelMessageLevel = "fatal" + RunConnectorParamsLevelMessageLevelInfo RunConnectorParamsLevelMessageLevel = "info" + RunConnectorParamsLevelMessageLevelTrace RunConnectorParamsLevelMessageLevel = "trace" + RunConnectorParamsLevelMessageLevelWarn RunConnectorParamsLevelMessageLevel = "warn" +) + +// Defines values for RunConnectorSubactionAddeventSubAction. +const ( + AddEvent RunConnectorSubactionAddeventSubAction = "addEvent" +) + +// Defines values for RunConnectorSubactionClosealertSubAction. +const ( + CloseAlert RunConnectorSubactionClosealertSubAction = "closeAlert" +) + +// Defines values for RunConnectorSubactionCreatealertSubAction. +const ( + CreateAlert RunConnectorSubactionCreatealertSubAction = "createAlert" +) + +// Defines values for RunConnectorSubactionCreatealertSubActionParamsPriority. +const ( + P1 RunConnectorSubactionCreatealertSubActionParamsPriority = "P1" + P2 RunConnectorSubactionCreatealertSubActionParamsPriority = "P2" + P3 RunConnectorSubactionCreatealertSubActionParamsPriority = "P3" + P4 RunConnectorSubactionCreatealertSubActionParamsPriority = "P4" + P5 RunConnectorSubactionCreatealertSubActionParamsPriority = "P5" +) + +// Defines values for RunConnectorSubactionCreatealertSubActionParamsRespondersType. +const ( + RunConnectorSubactionCreatealertSubActionParamsRespondersTypeEscalation RunConnectorSubactionCreatealertSubActionParamsRespondersType = "escalation" + RunConnectorSubactionCreatealertSubActionParamsRespondersTypeSchedule RunConnectorSubactionCreatealertSubActionParamsRespondersType = "schedule" + RunConnectorSubactionCreatealertSubActionParamsRespondersTypeTeam RunConnectorSubactionCreatealertSubActionParamsRespondersType = "team" + RunConnectorSubactionCreatealertSubActionParamsRespondersTypeUser RunConnectorSubactionCreatealertSubActionParamsRespondersType = "user" +) + +// Defines values for RunConnectorSubactionCreatealertSubActionParamsVisibleToType. +const ( + RunConnectorSubactionCreatealertSubActionParamsVisibleToTypeTeam RunConnectorSubactionCreatealertSubActionParamsVisibleToType = "team" + RunConnectorSubactionCreatealertSubActionParamsVisibleToTypeUser RunConnectorSubactionCreatealertSubActionParamsVisibleToType = "user" +) + +// Defines values for RunConnectorSubactionFieldsbyissuetypeSubAction. +const ( + FieldsByIssueType RunConnectorSubactionFieldsbyissuetypeSubAction = "fieldsByIssueType" +) + +// Defines values for RunConnectorSubactionGetchoicesSubAction. +const ( + GetChoices RunConnectorSubactionGetchoicesSubAction = "getChoices" +) + +// Defines values for RunConnectorSubactionGetfieldsSubAction. +const ( + GetFields RunConnectorSubactionGetfieldsSubAction = "getFields" +) + +// Defines values for RunConnectorSubactionGetincidentSubAction. +const ( + GetIncident RunConnectorSubactionGetincidentSubAction = "getIncident" +) + +// Defines values for RunConnectorSubactionIssueSubAction. +const ( + Issue RunConnectorSubactionIssueSubAction = "issue" +) + +// Defines values for RunConnectorSubactionIssuesSubAction. +const ( + Issues RunConnectorSubactionIssuesSubAction = "issues" +) + +// Defines values for RunConnectorSubactionIssuetypesSubAction. +const ( + IssueTypes RunConnectorSubactionIssuetypesSubAction = "issueTypes" +) + +// Defines values for RunConnectorSubactionPushtoserviceSubAction. +const ( + PushToService RunConnectorSubactionPushtoserviceSubAction = "pushToService" +) + +// ActionResponseProperties The properties vary depending on the action type. +type ActionResponseProperties struct { + ActionTypeId *string `json:"actionTypeId,omitempty"` + Config *map[string]interface{} `json:"config,omitempty"` + Id *string `json:"id,omitempty"` + + // IsDeprecated Indicates whether the action type is deprecated. + IsDeprecated *bool `json:"isDeprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the action. + IsMissingSecrets *bool `json:"isMissingSecrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured action. + IsPreconfigured *bool `json:"isPreconfigured,omitempty"` + Name *string `json:"name,omitempty"` +} + +// AuthorizationError defines model for authorization_error. +type AuthorizationError struct { + Error *AuthorizationErrorError `json:"error,omitempty"` + Message *string `json:"message,omitempty"` + StatusCode *AuthorizationErrorStatusCode `json:"statusCode,omitempty"` +} + +// AuthorizationErrorError defines model for AuthorizationError.Error. +type AuthorizationErrorError string + +// AuthorizationErrorStatusCode defines model for AuthorizationError.StatusCode. +type AuthorizationErrorStatusCode int + +// BadRequestError defines model for bad_request_error. +type BadRequestError struct { + Error *BadRequestErrorError `json:"error,omitempty"` + Message *string `json:"message,omitempty"` + StatusCode *BadRequestErrorStatusCode `json:"statusCode,omitempty"` +} + +// BadRequestErrorError defines model for BadRequestError.Error. +type BadRequestErrorError string + +// BadRequestErrorStatusCode defines model for BadRequestError.StatusCode. +type BadRequestErrorStatusCode int + +// ConfigPropertiesCasesWebhook Defines properties for connectors when type is `.cases-webhook`. +type ConfigPropertiesCasesWebhook struct { + // CreateCommentJson A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. + CreateCommentJson *string `json:"createCommentJson,omitempty"` + + // CreateCommentMethod The REST API HTTP request method to create a case comment in the third-party system. Valid values are `patch`, `post`, and `put`. + CreateCommentMethod *ConfigPropertiesCasesWebhookCreateCommentMethod `json:"createCommentMethod,omitempty"` + + // CreateCommentUrl The REST API URL to create a case comment by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts setting`, add the hostname to the allowed hosts. + CreateCommentUrl *string `json:"createCommentUrl,omitempty"` + + // CreateIncidentJson A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. + CreateIncidentJson string `json:"createIncidentJson"` + + // CreateIncidentMethod The REST API HTTP request method to create a case in the third-party system. Valid values are `patch`, `post`, and `put`. + CreateIncidentMethod *ConfigPropertiesCasesWebhookCreateIncidentMethod `json:"createIncidentMethod,omitempty"` + + // CreateIncidentResponseKey The JSON key in the create case response that contains the external case ID. + CreateIncidentResponseKey string `json:"createIncidentResponseKey"` + + // CreateIncidentUrl The REST API URL to create a case in the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. + CreateIncidentUrl string `json:"createIncidentUrl"` + + // GetIncidentResponseExternalTitleKey The JSON key in get case response that contains the external case title. + GetIncidentResponseExternalTitleKey string `json:"getIncidentResponseExternalTitleKey"` + + // GetIncidentUrl The REST API URL to get the case by ID from the third-party system. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. You can use a variable to add the external system ID to the URL. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass. + GetIncidentUrl string `json:"getIncidentUrl"` + + // HasAuth If true, a username and password for login type authentication must be provided. + HasAuth *bool `json:"hasAuth,omitempty"` + + // Headers A set of key-value pairs sent as headers with the request URLs for the create case, update case, get case, and create comment methods. + Headers *string `json:"headers,omitempty"` + + // UpdateIncidentJson The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review. + UpdateIncidentJson string `json:"updateIncidentJson"` + + // UpdateIncidentMethod The REST API HTTP request method to update the case in the third-party system. Valid values are `patch`, `post`, and `put`. + UpdateIncidentMethod *ConfigPropertiesCasesWebhookUpdateIncidentMethod `json:"updateIncidentMethod,omitempty"` + + // UpdateIncidentUrl The REST API URL to update the case by ID in the third-party system. You can use a variable to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. + UpdateIncidentUrl string `json:"updateIncidentUrl"` + + // ViewIncidentUrl The URL to view the case in the external system. You can use variables to add the external system ID or external system title to the URL. + ViewIncidentUrl string `json:"viewIncidentUrl"` +} + +// ConfigPropertiesCasesWebhookCreateCommentMethod The REST API HTTP request method to create a case comment in the third-party system. Valid values are `patch`, `post`, and `put`. +type ConfigPropertiesCasesWebhookCreateCommentMethod string + +// ConfigPropertiesCasesWebhookCreateIncidentMethod The REST API HTTP request method to create a case in the third-party system. Valid values are `patch`, `post`, and `put`. +type ConfigPropertiesCasesWebhookCreateIncidentMethod string + +// ConfigPropertiesCasesWebhookUpdateIncidentMethod The REST API HTTP request method to update the case in the third-party system. Valid values are `patch`, `post`, and `put`. +type ConfigPropertiesCasesWebhookUpdateIncidentMethod string + +// ConfigPropertiesEmail Defines properties for connectors when type is `.email`. +type ConfigPropertiesEmail map[string]interface{} + +// ConfigPropertiesIndex Defines properties for connectors when type is `.index`. +type ConfigPropertiesIndex struct { + // ExecutionTimeField Specifies a field that will contain the time the alert condition was detected. + ExecutionTimeField *string `json:"executionTimeField"` + + // Index The Elasticsearch index to be written to. + Index string `json:"index"` + + // Refresh The refresh policy for the write request, which affects when changes are made visible to search. Refer to the refresh setting for Elasticsearch document APIs. + Refresh *bool `json:"refresh,omitempty"` +} + +// ConfigPropertiesJira Defines properties for connectors when type is `.jira`. +type ConfigPropertiesJira struct { + // ApiUrl The Jira instance URL. + ApiUrl string `json:"apiUrl"` + + // ProjectKey The Jira project key. + ProjectKey string `json:"projectKey"` +} + +// ConfigPropertiesOpsgenie Defines properties for connectors when type is `.opsgenie`. +type ConfigPropertiesOpsgenie struct { + // ApiUrl The Opsgenie URL. For example, `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. + ApiUrl string `json:"apiUrl"` +} + +// ConfigPropertiesPagerduty Defines properties for connectors when type is `.pagerduty`. +type ConfigPropertiesPagerduty map[string]interface{} + +// ConfigPropertiesResilient Defines properties for connectors when type is `.resilient`. +type ConfigPropertiesResilient struct { + // ApiUrl The IBM Resilient instance URL. + ApiUrl string `json:"apiUrl"` + + // OrgId The IBM Resilient organization ID. + OrgId string `json:"orgId"` +} + +// ConfigPropertiesServicenow Defines properties for connectors when type is `.servicenow`. +type ConfigPropertiesServicenow struct { + // ApiUrl The ServiceNow instance URL. + ApiUrl string `json:"apiUrl"` + + // ClientId The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. + ClientId *string `json:"clientId,omitempty"` + + // IsOAuth The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). + IsOAuth *bool `json:"isOAuth,omitempty"` + + // JwtKeyId The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. + JwtKeyId *string `json:"jwtKeyId,omitempty"` + + // UserIdentifierValue The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. + UserIdentifierValue *string `json:"userIdentifierValue,omitempty"` + + // UsesTableApi Determines whether the connector uses the Table API or the Import Set API. This property is supported only for ServiceNow ITSM and ServiceNow SecOps connectors. NOTE: If this property is set to `false`, the Elastic application should be installed in ServiceNow. + UsesTableApi *bool `json:"usesTableApi,omitempty"` +} + +// ConfigPropertiesServicenowItom Defines properties for connectors when type is `.servicenow`. +type ConfigPropertiesServicenowItom struct { + // ApiUrl The ServiceNow instance URL. + ApiUrl string `json:"apiUrl"` + + // ClientId The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. + ClientId *string `json:"clientId,omitempty"` + + // IsOAuth The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). + IsOAuth *bool `json:"isOAuth,omitempty"` + + // JwtKeyId The key identifier assigned to the JWT verifier map of your OAuth application. This property is required when `isOAuth` is `true`. + JwtKeyId *string `json:"jwtKeyId,omitempty"` + + // UserIdentifierValue The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`. + UserIdentifierValue *string `json:"userIdentifierValue,omitempty"` +} + +// ConfigPropertiesSwimlane Defines properties for connectors when type is `.swimlane`. +type ConfigPropertiesSwimlane struct { + // ApiUrl The Swimlane instance URL. + ApiUrl string `json:"apiUrl"` + + // AppId The Swimlane application ID. + AppId string `json:"appId"` + + // ConnectorType The type of connector. Valid values are `all`, `alerts`, and `cases`. + ConnectorType ConfigPropertiesSwimlaneConnectorType `json:"connectorType"` + + // Mappings The field mapping. + Mappings *struct { + // AlertIdConfig Mapping for the alert ID. + AlertIdConfig *struct { + // FieldType The type of field in Swimlane. + FieldType string `json:"fieldType"` + + // Id The identifier for the field in Swimlane. + Id string `json:"id"` + + // Key The key for the field in Swimlane. + Key string `json:"key"` + + // Name The name of the field in Swimlane. + Name string `json:"name"` + } `json:"alertIdConfig,omitempty"` + + // CaseIdConfig Mapping for the case ID. + CaseIdConfig *struct { + // FieldType The type of field in Swimlane. + FieldType string `json:"fieldType"` + + // Id The identifier for the field in Swimlane. + Id string `json:"id"` + + // Key The key for the field in Swimlane. + Key string `json:"key"` + + // Name The name of the field in Swimlane. + Name string `json:"name"` + } `json:"caseIdConfig,omitempty"` + + // CaseNameConfig Mapping for the case name. + CaseNameConfig *struct { + // FieldType The type of field in Swimlane. + FieldType string `json:"fieldType"` + + // Id The identifier for the field in Swimlane. + Id string `json:"id"` + + // Key The key for the field in Swimlane. + Key string `json:"key"` + + // Name The name of the field in Swimlane. + Name string `json:"name"` + } `json:"caseNameConfig,omitempty"` + + // CommentsConfig Mapping for the case comments. + CommentsConfig *struct { + // FieldType The type of field in Swimlane. + FieldType string `json:"fieldType"` + + // Id The identifier for the field in Swimlane. + Id string `json:"id"` + + // Key The key for the field in Swimlane. + Key string `json:"key"` + + // Name The name of the field in Swimlane. + Name string `json:"name"` + } `json:"commentsConfig,omitempty"` + + // DescriptionConfig Mapping for the case description. + DescriptionConfig *struct { + // FieldType The type of field in Swimlane. + FieldType string `json:"fieldType"` + + // Id The identifier for the field in Swimlane. + Id string `json:"id"` + + // Key The key for the field in Swimlane. + Key string `json:"key"` + + // Name The name of the field in Swimlane. + Name string `json:"name"` + } `json:"descriptionConfig,omitempty"` + + // RuleNameConfig Mapping for the name of the alert's rule. + RuleNameConfig *struct { + // FieldType The type of field in Swimlane. + FieldType string `json:"fieldType"` + + // Id The identifier for the field in Swimlane. + Id string `json:"id"` + + // Key The key for the field in Swimlane. + Key string `json:"key"` + + // Name The name of the field in Swimlane. + Name string `json:"name"` + } `json:"ruleNameConfig,omitempty"` + + // SeverityConfig Mapping for the severity. + SeverityConfig *struct { + // FieldType The type of field in Swimlane. + FieldType string `json:"fieldType"` + + // Id The identifier for the field in Swimlane. + Id string `json:"id"` + + // Key The key for the field in Swimlane. + Key string `json:"key"` + + // Name The name of the field in Swimlane. + Name string `json:"name"` + } `json:"severityConfig,omitempty"` + } `json:"mappings,omitempty"` +} + +// ConfigPropertiesSwimlaneConnectorType The type of connector. Valid values are `all`, `alerts`, and `cases`. +type ConfigPropertiesSwimlaneConnectorType string + +// ConfigPropertiesTines Defines properties for connectors when type is `.tines`. +type ConfigPropertiesTines map[string]interface{} + +// ConfigPropertiesWebhook Defines properties for connectors when type is `.webhook`. +type ConfigPropertiesWebhook map[string]interface{} + +// ConfigPropertiesXmatters Defines properties for connectors when type is `.xmatters`. +type ConfigPropertiesXmatters map[string]interface{} + +// ConnectorResponseProperties The properties vary depending on the connector type. +type ConnectorResponseProperties struct { + union json.RawMessage +} + +// ConnectorResponsePropertiesCasesWebhook defines model for connector_response_properties_cases_webhook. +type ConnectorResponsePropertiesCasesWebhook struct { + // Config Defines properties for connectors when type is `.cases-webhook`. + Config ConfigPropertiesCasesWebhook `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId ConnectorResponsePropertiesCasesWebhookConnectorTypeId `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// ConnectorResponsePropertiesCasesWebhookConnectorTypeId The type of connector. +type ConnectorResponsePropertiesCasesWebhookConnectorTypeId string + +// ConnectorResponsePropertiesEmail defines model for connector_response_properties_email. +type ConnectorResponsePropertiesEmail struct { + // Config Defines properties for connectors when type is `.email`. + Config ConfigPropertiesEmail `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId ConnectorResponsePropertiesEmailConnectorTypeId `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// ConnectorResponsePropertiesEmailConnectorTypeId The type of connector. +type ConnectorResponsePropertiesEmailConnectorTypeId string + +// ConnectorResponsePropertiesIndex defines model for connector_response_properties_index. +type ConnectorResponsePropertiesIndex struct { + // Config Defines properties for connectors when type is `.index`. + Config ConfigPropertiesIndex `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId ConnectorResponsePropertiesIndexConnectorTypeId `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// ConnectorResponsePropertiesIndexConnectorTypeId The type of connector. +type ConnectorResponsePropertiesIndexConnectorTypeId string + +// ConnectorResponsePropertiesJira defines model for connector_response_properties_jira. +type ConnectorResponsePropertiesJira struct { + // Config Defines properties for connectors when type is `.jira`. + Config ConfigPropertiesJira `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId ConnectorResponsePropertiesJiraConnectorTypeId `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// ConnectorResponsePropertiesJiraConnectorTypeId The type of connector. +type ConnectorResponsePropertiesJiraConnectorTypeId string + +// ConnectorResponsePropertiesOpsgenie defines model for connector_response_properties_opsgenie. +type ConnectorResponsePropertiesOpsgenie struct { + // Config Defines properties for connectors when type is `.opsgenie`. + Config ConfigPropertiesOpsgenie `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId ConnectorResponsePropertiesOpsgenieConnectorTypeId `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// ConnectorResponsePropertiesOpsgenieConnectorTypeId The type of connector. +type ConnectorResponsePropertiesOpsgenieConnectorTypeId string + +// ConnectorResponsePropertiesPagerduty defines model for connector_response_properties_pagerduty. +type ConnectorResponsePropertiesPagerduty struct { + // Config Defines properties for connectors when type is `.pagerduty`. + Config ConfigPropertiesPagerduty `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId ConnectorResponsePropertiesPagerdutyConnectorTypeId `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// ConnectorResponsePropertiesPagerdutyConnectorTypeId The type of connector. +type ConnectorResponsePropertiesPagerdutyConnectorTypeId string + +// ConnectorResponsePropertiesResilient defines model for connector_response_properties_resilient. +type ConnectorResponsePropertiesResilient struct { + // Config Defines properties for connectors when type is `.resilient`. + Config ConfigPropertiesResilient `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId ConnectorResponsePropertiesResilientConnectorTypeId `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// ConnectorResponsePropertiesResilientConnectorTypeId The type of connector. +type ConnectorResponsePropertiesResilientConnectorTypeId string + +// ConnectorResponsePropertiesServerlog defines model for connector_response_properties_serverlog. +type ConnectorResponsePropertiesServerlog struct { + Config *map[string]interface{} `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId ConnectorResponsePropertiesServerlogConnectorTypeId `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// ConnectorResponsePropertiesServerlogConnectorTypeId The type of connector. +type ConnectorResponsePropertiesServerlogConnectorTypeId string + +// ConnectorResponsePropertiesServicenow defines model for connector_response_properties_servicenow. +type ConnectorResponsePropertiesServicenow struct { + // Config Defines properties for connectors when type is `.servicenow`. + Config ConfigPropertiesServicenow `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId ConnectorResponsePropertiesServicenowConnectorTypeId `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// ConnectorResponsePropertiesServicenowConnectorTypeId The type of connector. +type ConnectorResponsePropertiesServicenowConnectorTypeId string + +// ConnectorResponsePropertiesServicenowItom defines model for connector_response_properties_servicenow_itom. +type ConnectorResponsePropertiesServicenowItom struct { + // Config Defines properties for connectors when type is `.servicenow`. + Config ConfigPropertiesServicenowItom `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId ConnectorResponsePropertiesServicenowItomConnectorTypeId `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// ConnectorResponsePropertiesServicenowItomConnectorTypeId The type of connector. +type ConnectorResponsePropertiesServicenowItomConnectorTypeId string + +// ConnectorResponsePropertiesServicenowSir defines model for connector_response_properties_servicenow_sir. +type ConnectorResponsePropertiesServicenowSir struct { + // Config Defines properties for connectors when type is `.servicenow`. + Config ConfigPropertiesServicenow `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId ConnectorResponsePropertiesServicenowSirConnectorTypeId `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// ConnectorResponsePropertiesServicenowSirConnectorTypeId The type of connector. +type ConnectorResponsePropertiesServicenowSirConnectorTypeId string + +// ConnectorResponsePropertiesSlack defines model for connector_response_properties_slack. +type ConnectorResponsePropertiesSlack struct { + // ConnectorTypeId The type of connector. + ConnectorTypeId ConnectorResponsePropertiesSlackConnectorTypeId `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// ConnectorResponsePropertiesSlackConnectorTypeId The type of connector. +type ConnectorResponsePropertiesSlackConnectorTypeId string + +// ConnectorResponsePropertiesSwimlane defines model for connector_response_properties_swimlane. +type ConnectorResponsePropertiesSwimlane struct { + // Config Defines properties for connectors when type is `.swimlane`. + Config ConfigPropertiesSwimlane `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId ConnectorResponsePropertiesSwimlaneConnectorTypeId `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// ConnectorResponsePropertiesSwimlaneConnectorTypeId The type of connector. +type ConnectorResponsePropertiesSwimlaneConnectorTypeId string + +// ConnectorResponsePropertiesTeams defines model for connector_response_properties_teams. +type ConnectorResponsePropertiesTeams struct { + // ConnectorTypeId The type of connector. + ConnectorTypeId ConnectorResponsePropertiesTeamsConnectorTypeId `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// ConnectorResponsePropertiesTeamsConnectorTypeId The type of connector. +type ConnectorResponsePropertiesTeamsConnectorTypeId string + +// ConnectorResponsePropertiesTines defines model for connector_response_properties_tines. +type ConnectorResponsePropertiesTines struct { + // Config Defines properties for connectors when type is `.tines`. + Config ConfigPropertiesTines `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId ConnectorResponsePropertiesTinesConnectorTypeId `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// ConnectorResponsePropertiesTinesConnectorTypeId The type of connector. +type ConnectorResponsePropertiesTinesConnectorTypeId string + +// ConnectorResponsePropertiesWebhook defines model for connector_response_properties_webhook. +type ConnectorResponsePropertiesWebhook struct { + // Config Defines properties for connectors when type is `.webhook`. + Config ConfigPropertiesWebhook `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId ConnectorResponsePropertiesWebhookConnectorTypeId `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// ConnectorResponsePropertiesWebhookConnectorTypeId The type of connector. +type ConnectorResponsePropertiesWebhookConnectorTypeId string + +// ConnectorResponsePropertiesXmatters defines model for connector_response_properties_xmatters. +type ConnectorResponsePropertiesXmatters struct { + // Config Defines properties for connectors when type is `.xmatters`. + Config ConfigPropertiesXmatters `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId ConnectorResponsePropertiesXmattersConnectorTypeId `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// ConnectorResponsePropertiesXmattersConnectorTypeId The type of connector. +type ConnectorResponsePropertiesXmattersConnectorTypeId string + +// ConnectorTypes The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`. +type ConnectorTypes string + +// CreateConnectorRequestCasesWebhook The Webhook - Case Management connector uses axios to send POST, PUT, and GET requests to a case management RESTful API web service. +type CreateConnectorRequestCasesWebhook struct { + // Config Defines properties for connectors when type is `.cases-webhook`. + Config ConfigPropertiesCasesWebhook `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId CreateConnectorRequestCasesWebhookConnectorTypeId `json:"connector_type_id"` + + // Name The display name for the connector. + Name string `json:"name"` + Secrets *SecretsPropertiesCasesWebhook `json:"secrets,omitempty"` +} + +// CreateConnectorRequestCasesWebhookConnectorTypeId The type of connector. +type CreateConnectorRequestCasesWebhookConnectorTypeId string + +// CreateConnectorRequestEmail The email connector uses the SMTP protocol to send mail messages, using an integration of Nodemailer. An exception is Microsoft Exchange, which uses HTTP protocol for sending emails, Send mail. Email message text is sent as both plain text and html text. +type CreateConnectorRequestEmail struct { + // Config Defines properties for connectors when type is `.email`. + Config ConfigPropertiesEmail `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId CreateConnectorRequestEmailConnectorTypeId `json:"connector_type_id"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.email`. + Secrets SecretsPropertiesEmail `json:"secrets"` +} + +// CreateConnectorRequestEmailConnectorTypeId The type of connector. +type CreateConnectorRequestEmailConnectorTypeId string + +// CreateConnectorRequestIndex The index connector indexes a document into Elasticsearch. +type CreateConnectorRequestIndex struct { + // Config Defines properties for connectors when type is `.index`. + Config ConfigPropertiesIndex `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId CreateConnectorRequestIndexConnectorTypeId `json:"connector_type_id"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// CreateConnectorRequestIndexConnectorTypeId The type of connector. +type CreateConnectorRequestIndexConnectorTypeId string + +// CreateConnectorRequestJira The Jira connector uses the REST API v2 to create Jira issues. +type CreateConnectorRequestJira struct { + // Config Defines properties for connectors when type is `.jira`. + Config ConfigPropertiesJira `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId CreateConnectorRequestJiraConnectorTypeId `json:"connector_type_id"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.jira`. + Secrets SecretsPropertiesJira `json:"secrets"` +} + +// CreateConnectorRequestJiraConnectorTypeId The type of connector. +type CreateConnectorRequestJiraConnectorTypeId string + +// CreateConnectorRequestOpsgenie The Opsgenie connector uses the Opsgenie alert API. +type CreateConnectorRequestOpsgenie struct { + // Config Defines properties for connectors when type is `.opsgenie`. + Config ConfigPropertiesOpsgenie `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId CreateConnectorRequestOpsgenieConnectorTypeId `json:"connector_type_id"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.opsgenie`. + Secrets SecretsPropertiesOpsgenie `json:"secrets"` +} + +// CreateConnectorRequestOpsgenieConnectorTypeId The type of connector. +type CreateConnectorRequestOpsgenieConnectorTypeId string + +// CreateConnectorRequestPagerduty The PagerDuty connector uses the v2 Events API to trigger, acknowledge, and resolve PagerDuty alerts. +type CreateConnectorRequestPagerduty struct { + // Config Defines properties for connectors when type is `.pagerduty`. + Config ConfigPropertiesPagerduty `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId CreateConnectorRequestPagerdutyConnectorTypeId `json:"connector_type_id"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.pagerduty`. + Secrets SecretsPropertiesPagerduty `json:"secrets"` +} + +// CreateConnectorRequestPagerdutyConnectorTypeId The type of connector. +type CreateConnectorRequestPagerdutyConnectorTypeId string + +// CreateConnectorRequestResilient The IBM Resilient connector uses the RESILIENT REST v2 to create IBM Resilient incidents. +type CreateConnectorRequestResilient struct { + // Config Defines properties for connectors when type is `.resilient`. + Config ConfigPropertiesResilient `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId CreateConnectorRequestResilientConnectorTypeId `json:"connector_type_id"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.resilient`. + Secrets SecretsPropertiesResilient `json:"secrets"` +} + +// CreateConnectorRequestResilientConnectorTypeId The type of connector. +type CreateConnectorRequestResilientConnectorTypeId string + +// CreateConnectorRequestServerlog This connector writes an entry to the Kibana server log. +type CreateConnectorRequestServerlog struct { + // ConnectorTypeId The type of connector. + ConnectorTypeId CreateConnectorRequestServerlogConnectorTypeId `json:"connector_type_id"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// CreateConnectorRequestServerlogConnectorTypeId The type of connector. +type CreateConnectorRequestServerlogConnectorTypeId string + +// CreateConnectorRequestServicenow The ServiceNow ITSM connector uses the import set API to create ServiceNow incidents. You can use the connector for rule actions and cases. +type CreateConnectorRequestServicenow struct { + // Config Defines properties for connectors when type is `.servicenow`. + Config ConfigPropertiesServicenow `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId CreateConnectorRequestServicenowConnectorTypeId `json:"connector_type_id"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `.servicenow-itom`. + Secrets SecretsPropertiesServicenow `json:"secrets"` +} + +// CreateConnectorRequestServicenowConnectorTypeId The type of connector. +type CreateConnectorRequestServicenowConnectorTypeId string + +// CreateConnectorRequestServicenowItom The ServiceNow ITOM connector uses the event API to create ServiceNow events. You can use the connector for rule actions. +type CreateConnectorRequestServicenowItom struct { + // Config Defines properties for connectors when type is `.servicenow`. + Config ConfigPropertiesServicenowItom `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId CreateConnectorRequestServicenowItomConnectorTypeId `json:"connector_type_id"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `.servicenow-itom`. + Secrets SecretsPropertiesServicenow `json:"secrets"` +} + +// CreateConnectorRequestServicenowItomConnectorTypeId The type of connector. +type CreateConnectorRequestServicenowItomConnectorTypeId string + +// CreateConnectorRequestServicenowSir The ServiceNow SecOps connector uses the import set API to create ServiceNow security incidents. You can use the connector for rule actions and cases. +type CreateConnectorRequestServicenowSir struct { + // Config Defines properties for connectors when type is `.servicenow`. + Config ConfigPropertiesServicenow `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId CreateConnectorRequestServicenowSirConnectorTypeId `json:"connector_type_id"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `.servicenow-itom`. + Secrets SecretsPropertiesServicenow `json:"secrets"` +} + +// CreateConnectorRequestServicenowSirConnectorTypeId The type of connector. +type CreateConnectorRequestServicenowSirConnectorTypeId string + +// CreateConnectorRequestSlack The Slack connector uses Slack Incoming Webhooks. +type CreateConnectorRequestSlack struct { + // ConnectorTypeId The type of connector. + ConnectorTypeId CreateConnectorRequestSlackConnectorTypeId `json:"connector_type_id"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.slack`. + Secrets SecretsPropertiesSlack `json:"secrets"` +} + +// CreateConnectorRequestSlackConnectorTypeId The type of connector. +type CreateConnectorRequestSlackConnectorTypeId string + +// CreateConnectorRequestSwimlane The Swimlane connector uses the Swimlane REST API to create Swimlane records. +type CreateConnectorRequestSwimlane struct { + // Config Defines properties for connectors when type is `.swimlane`. + Config ConfigPropertiesSwimlane `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId CreateConnectorRequestSwimlaneConnectorTypeId `json:"connector_type_id"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.swimlane`. + Secrets SecretsPropertiesSwimlane `json:"secrets"` +} + +// CreateConnectorRequestSwimlaneConnectorTypeId The type of connector. +type CreateConnectorRequestSwimlaneConnectorTypeId string + +// CreateConnectorRequestTeams The Microsoft Teams connector uses Incoming Webhooks. +type CreateConnectorRequestTeams struct { + // ConnectorTypeId The type of connector. + ConnectorTypeId CreateConnectorRequestTeamsConnectorTypeId `json:"connector_type_id"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.teams`. + Secrets SecretsPropertiesTeams `json:"secrets"` +} + +// CreateConnectorRequestTeamsConnectorTypeId The type of connector. +type CreateConnectorRequestTeamsConnectorTypeId string + +// CreateConnectorRequestTines The Tines connector uses Tines Webhook actions to send events via POST request. +type CreateConnectorRequestTines struct { + // Config Defines properties for connectors when type is `.tines`. + Config ConfigPropertiesTines `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId CreateConnectorRequestTinesConnectorTypeId `json:"connector_type_id"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.tines`. + Secrets SecretsPropertiesTines `json:"secrets"` +} + +// CreateConnectorRequestTinesConnectorTypeId The type of connector. +type CreateConnectorRequestTinesConnectorTypeId string + +// CreateConnectorRequestWebhook The Webhook connector uses axios to send a POST or PUT request to a web service. +type CreateConnectorRequestWebhook struct { + // Config Defines properties for connectors when type is `.webhook`. + Config ConfigPropertiesWebhook `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId CreateConnectorRequestWebhookConnectorTypeId `json:"connector_type_id"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.webhook`. + Secrets SecretsPropertiesWebhook `json:"secrets"` +} + +// CreateConnectorRequestWebhookConnectorTypeId The type of connector. +type CreateConnectorRequestWebhookConnectorTypeId string + +// CreateConnectorRequestXmatters The xMatters connector uses the xMatters Workflow for Elastic to send actionable alerts to on-call xMatters resources. +type CreateConnectorRequestXmatters struct { + // Config Defines properties for connectors when type is `.xmatters`. + Config ConfigPropertiesXmatters `json:"config"` + + // ConnectorTypeId The type of connector. + ConnectorTypeId CreateConnectorRequestXmattersConnectorTypeId `json:"connector_type_id"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.xmatters`. + Secrets SecretsPropertiesXmatters `json:"secrets"` +} + +// CreateConnectorRequestXmattersConnectorTypeId The type of connector. +type CreateConnectorRequestXmattersConnectorTypeId string + +// Features The feature that uses the connector. Valid values are `alerting`, `cases`, `uptime`, and `siem`. +type Features string + +// IsDeprecated Indicates whether the connector type is deprecated. +type IsDeprecated = bool + +// IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. +type IsMissingSecrets = bool + +// IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. +type IsPreconfigured = bool + +// LegacyRunConnectorGeneralResponse defines model for legacy_run_connector_general_response. +type LegacyRunConnectorGeneralResponse struct { + ActionId *string `json:"actionId,omitempty"` + Data *LegacyRunConnectorGeneralResponse_Data `json:"data,omitempty"` + + // Status The status of the action. + Status *string `json:"status,omitempty"` +} + +// LegacyRunConnectorGeneralResponseData0 Information returned from the action. +type LegacyRunConnectorGeneralResponseData0 map[string]interface{} + +// LegacyRunConnectorGeneralResponseData1 An array of information returned from the action. +type LegacyRunConnectorGeneralResponseData1 = []map[string]interface{} + +// LegacyRunConnectorGeneralResponse_Data defines model for LegacyRunConnectorGeneralResponse.Data. +type LegacyRunConnectorGeneralResponse_Data struct { + union json.RawMessage +} + +// ObjectNotFoundError defines model for object_not_found_error. +type ObjectNotFoundError struct { + Error *ObjectNotFoundErrorError `json:"error,omitempty"` + Message *string `json:"message,omitempty"` + StatusCode *ObjectNotFoundErrorStatusCode `json:"statusCode,omitempty"` +} + +// ObjectNotFoundErrorError defines model for ObjectNotFoundError.Error. +type ObjectNotFoundErrorError string + +// ObjectNotFoundErrorStatusCode defines model for ObjectNotFoundError.StatusCode. +type ObjectNotFoundErrorStatusCode int + +// RunConnectorGeneralResponse defines model for run_connector_general_response. +type RunConnectorGeneralResponse struct { + // ConnectorId The identifier for the connector. + ConnectorId string `json:"connector_id"` + Data *RunConnectorGeneralResponse_Data `json:"data,omitempty"` + + // Status The status of the action. + Status RunConnectorGeneralResponseStatus `json:"status"` +} + +// RunConnectorGeneralResponseData0 Information returned from the action. +type RunConnectorGeneralResponseData0 map[string]interface{} + +// RunConnectorGeneralResponseData1 An array of information returned from the action. +type RunConnectorGeneralResponseData1 = []map[string]interface{} + +// RunConnectorGeneralResponse_Data defines model for RunConnectorGeneralResponse.Data. +type RunConnectorGeneralResponse_Data struct { + union json.RawMessage +} + +// RunConnectorGeneralResponseStatus The status of the action. +type RunConnectorGeneralResponseStatus string + +// RunConnectorParamsDocuments Test an action that indexes a document into Elasticsearch. +type RunConnectorParamsDocuments struct { + // Documents The documents in JSON format for index connectors. + Documents []map[string]interface{} `json:"documents"` +} + +// RunConnectorParamsLevelMessage Test an action that writes an entry to the Kibana server log. +type RunConnectorParamsLevelMessage struct { + // Level The log level of the message for server log connectors. + Level *RunConnectorParamsLevelMessageLevel `json:"level,omitempty"` + + // Message The message for server log connectors. + Message string `json:"message"` +} + +// RunConnectorParamsLevelMessageLevel The log level of the message for server log connectors. +type RunConnectorParamsLevelMessageLevel string + +// RunConnectorSubactionAddevent The `addEvent` subaction for ServiceNow ITOM connectors. +type RunConnectorSubactionAddevent struct { + // SubAction The action to test. + SubAction RunConnectorSubactionAddeventSubAction `json:"subAction"` + + // SubActionParams The set of configuration properties for the action. + SubActionParams *struct { + // AdditionalInfo Additional information about the event. + AdditionalInfo *string `json:"additional_info,omitempty"` + + // Description The details about the event. + Description *string `json:"description,omitempty"` + + // EventClass A specific instance of the source. + EventClass *string `json:"event_class,omitempty"` + + // MessageKey All actions sharing this key are associated with the same ServiceNow alert. The default value is `:`. + MessageKey *string `json:"message_key,omitempty"` + + // MetricName The name of the metric. + MetricName *string `json:"metric_name,omitempty"` + + // Node The host that the event was triggered for. + Node *string `json:"node,omitempty"` + + // Resource The name of the resource. + Resource *string `json:"resource,omitempty"` + + // Severity The severity of the event. + Severity *string `json:"severity,omitempty"` + + // Source The name of the event source type. + Source *string `json:"source,omitempty"` + + // TimeOfEvent The time of the event. + TimeOfEvent *string `json:"time_of_event,omitempty"` + + // Type The type of event. + Type *string `json:"type,omitempty"` + } `json:"subActionParams,omitempty"` +} + +// RunConnectorSubactionAddeventSubAction The action to test. +type RunConnectorSubactionAddeventSubAction string + +// RunConnectorSubactionClosealert The `closeAlert` subaction for Opsgenie connectors. +type RunConnectorSubactionClosealert struct { + // SubAction The action to test. + SubAction RunConnectorSubactionClosealertSubAction `json:"subAction"` + SubActionParams struct { + // Alias The unique identifier used for alert deduplication in Opsgenie. The alias must match the value used when creating the alert. + Alias string `json:"alias"` + + // Note Additional information for the alert. + Note *string `json:"note,omitempty"` + + // Source The display name for the source of the alert. + Source *string `json:"source,omitempty"` + + // User The display name for the owner. + User *string `json:"user,omitempty"` + } `json:"subActionParams"` +} + +// RunConnectorSubactionClosealertSubAction The action to test. +type RunConnectorSubactionClosealertSubAction string + +// RunConnectorSubactionCreatealert The `createAlert` subaction for Opsgenie connectors. +type RunConnectorSubactionCreatealert struct { + // SubAction The action to test. + SubAction RunConnectorSubactionCreatealertSubAction `json:"subAction"` + SubActionParams struct { + // Actions The custom actions available to the alert. + Actions *[]string `json:"actions,omitempty"` + + // Alias The unique identifier used for alert deduplication in Opsgenie. + Alias *string `json:"alias,omitempty"` + + // Description A description that provides detailed information about the alert. + Description *string `json:"description,omitempty"` + + // Details The custom properties of the alert. + Details *map[string]interface{} `json:"details,omitempty"` + + // Entity The domain of the alert. For example, the application or server name. + Entity *string `json:"entity,omitempty"` + + // Message The alert message. + Message string `json:"message"` + + // Note Additional information for the alert. + Note *string `json:"note,omitempty"` + + // Priority The priority level for the alert. + Priority *RunConnectorSubactionCreatealertSubActionParamsPriority `json:"priority,omitempty"` + + // Responders The entities to receive notifications about the alert. If `type` is `user`, either `id` or `username` is required. If `type` is `team`, either `id` or `name` is required. + Responders *[]struct { + // Id The identifier for the entity. + Id *string `json:"id,omitempty"` + + // Name The name of the entity. + Name *string `json:"name,omitempty"` + + // Type The type of responders, in this case `escalation`. + Type *RunConnectorSubactionCreatealertSubActionParamsRespondersType `json:"type,omitempty"` + + // Username A valid email address for the user. + Username *string `json:"username,omitempty"` + } `json:"responders,omitempty"` + + // Source The display name for the source of the alert. + Source *string `json:"source,omitempty"` + + // Tags The tags for the alert. + Tags *[]string `json:"tags,omitempty"` + + // User The display name for the owner. + User *string `json:"user,omitempty"` + + // VisibleTo The teams and users that the alert will be visible to without sending a notification. Only one of `id`, `name`, or `username` is required. + VisibleTo *[]struct { + // Id The identifier for the entity. + Id *string `json:"id,omitempty"` + + // Name The name of the entity. + Name *string `json:"name,omitempty"` + + // Type Valid values are `team` and `user`. + Type RunConnectorSubactionCreatealertSubActionParamsVisibleToType `json:"type"` + + // Username The user name. This property is required only when the `type` is `user`. + Username *string `json:"username,omitempty"` + } `json:"visibleTo,omitempty"` + } `json:"subActionParams"` +} + +// RunConnectorSubactionCreatealertSubAction The action to test. +type RunConnectorSubactionCreatealertSubAction string + +// RunConnectorSubactionCreatealertSubActionParamsPriority The priority level for the alert. +type RunConnectorSubactionCreatealertSubActionParamsPriority string + +// RunConnectorSubactionCreatealertSubActionParamsRespondersType The type of responders, in this case `escalation`. +type RunConnectorSubactionCreatealertSubActionParamsRespondersType string + +// RunConnectorSubactionCreatealertSubActionParamsVisibleToType Valid values are `team` and `user`. +type RunConnectorSubactionCreatealertSubActionParamsVisibleToType string + +// RunConnectorSubactionFieldsbyissuetype The `fieldsByIssueType` subaction for Jira connectors. +type RunConnectorSubactionFieldsbyissuetype struct { + // SubAction The action to test. + SubAction RunConnectorSubactionFieldsbyissuetypeSubAction `json:"subAction"` + SubActionParams struct { + // Id The Jira issue type identifier. + Id string `json:"id"` + } `json:"subActionParams"` +} + +// RunConnectorSubactionFieldsbyissuetypeSubAction The action to test. +type RunConnectorSubactionFieldsbyissuetypeSubAction string + +// RunConnectorSubactionGetchoices The `getChoices` subaction for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors. +type RunConnectorSubactionGetchoices struct { + // SubAction The action to test. + SubAction RunConnectorSubactionGetchoicesSubAction `json:"subAction"` + + // SubActionParams The set of configuration properties for the action. + SubActionParams struct { + // Fields An array of fields. + Fields []string `json:"fields"` + } `json:"subActionParams"` +} + +// RunConnectorSubactionGetchoicesSubAction The action to test. +type RunConnectorSubactionGetchoicesSubAction string + +// RunConnectorSubactionGetfields The `getFields` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors. +type RunConnectorSubactionGetfields struct { + // SubAction The action to test. + SubAction RunConnectorSubactionGetfieldsSubAction `json:"subAction"` +} + +// RunConnectorSubactionGetfieldsSubAction The action to test. +type RunConnectorSubactionGetfieldsSubAction string + +// RunConnectorSubactionGetincident The `getIncident` subaction for Jira, ServiceNow ITSM, and ServiceNow SecOps connectors. +type RunConnectorSubactionGetincident struct { + // SubAction The action to test. + SubAction RunConnectorSubactionGetincidentSubAction `json:"subAction"` + SubActionParams struct { + // ExternalId The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. + ExternalId string `json:"externalId"` + } `json:"subActionParams"` +} + +// RunConnectorSubactionGetincidentSubAction The action to test. +type RunConnectorSubactionGetincidentSubAction string + +// RunConnectorSubactionIssue The `issue` subaction for Jira connectors. +type RunConnectorSubactionIssue struct { + // SubAction The action to test. + SubAction RunConnectorSubactionIssueSubAction `json:"subAction"` + SubActionParams *struct { + // Id The Jira issue identifier. + Id string `json:"id"` + } `json:"subActionParams,omitempty"` +} + +// RunConnectorSubactionIssueSubAction The action to test. +type RunConnectorSubactionIssueSubAction string + +// RunConnectorSubactionIssues The `issues` subaction for Jira connectors. +type RunConnectorSubactionIssues struct { + // SubAction The action to test. + SubAction RunConnectorSubactionIssuesSubAction `json:"subAction"` + SubActionParams struct { + // Title The title of the Jira issue. + Title string `json:"title"` + } `json:"subActionParams"` +} + +// RunConnectorSubactionIssuesSubAction The action to test. +type RunConnectorSubactionIssuesSubAction string + +// RunConnectorSubactionIssuetypes The `issueTypes` subaction for Jira connectors. +type RunConnectorSubactionIssuetypes struct { + // SubAction The action to test. + SubAction RunConnectorSubactionIssuetypesSubAction `json:"subAction"` +} + +// RunConnectorSubactionIssuetypesSubAction The action to test. +type RunConnectorSubactionIssuetypesSubAction string + +// RunConnectorSubactionPushtoservice The `pushToService` subaction for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors. +type RunConnectorSubactionPushtoservice struct { + // SubAction The action to test. + SubAction RunConnectorSubactionPushtoserviceSubAction `json:"subAction"` + + // SubActionParams The set of configuration properties for the action. + SubActionParams struct { + // Comments Additional information that is sent to Jira, ServiceNow ITSM, ServiceNow SecOps, or Swimlane. + Comments *[]struct { + // Comment A comment related to the incident. For example, describe how to troubleshoot the issue. + Comment *string `json:"comment,omitempty"` + + // CommentId A unique identifier for the comment. + CommentId *int `json:"commentId,omitempty"` + } `json:"comments,omitempty"` + + // Incident Information necessary to create or update a Jira, ServiceNow ITSM, ServiveNow SecOps, or Swimlane incident. + Incident *struct { + // AlertId The alert identifier for Swimlane connectors. + AlertId *string `json:"alertId,omitempty"` + + // CaseId The case identifier for the incident for Swimlane connectors. + CaseId *string `json:"caseId,omitempty"` + + // CaseName The case name for the incident for Swimlane connectors. + CaseName *string `json:"caseName,omitempty"` + + // Category The category of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. + Category *string `json:"category,omitempty"` + + // CorrelationDisplay A descriptive label of the alert for correlation purposes for ServiceNow ITSM and ServiceNow SecOps connectors. + CorrelationDisplay *string `json:"correlation_display,omitempty"` + + // CorrelationId The correlation identifier for the security incident for ServiceNow ITSM and ServiveNow SecOps connectors. Connectors using the same correlation ID are associated with the same ServiceNow incident. This value determines whether a new ServiceNow incident is created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the correlation ID value in ServiceNow. The maximum character length for this value is 100 characters. NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that ServiceNow creates a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, ServiceNow creates and continually updates a single incident record for the alert. + CorrelationId *string `json:"correlation_id,omitempty"` + + // Description The description of the incident for Jira, ServiceNow ITSM, ServiceNow SecOps, and Swimlane connectors. + Description *string `json:"description,omitempty"` + + // DestIp A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. + DestIp *RunConnectorSubactionPushtoservice_SubActionParams_Incident_DestIp `json:"dest_ip,omitempty"` + + // ExternalId The Jira, ServiceNow ITSM, or ServiceNow SecOps issue identifier. If present, the incident is updated. Otherwise, a new incident is created. + ExternalId *string `json:"externalId,omitempty"` + + // Impact The impact of the incident for ServiceNow ITSM connectors. + Impact *string `json:"impact,omitempty"` + + // IssueType The type of incident for Jira connectors. For example, 10006. To obtain the list of valid values, set `subAction` to `issueTypes`. + IssueType *int `json:"issueType,omitempty"` + + // Labels The labels for the incident for Jira connectors. NOTE: Labels cannot contain spaces. + Labels *[]string `json:"labels,omitempty"` + + // MalwareHash A list of malware hashes related to the security incident for ServiceNow SecOps connectors. The hashes are added as observables to the security incident. + MalwareHash *RunConnectorSubactionPushtoservice_SubActionParams_Incident_MalwareHash `json:"malware_hash,omitempty"` + + // MalwareUrl A list of malware URLs related to the security incident for ServiceNow SecOps connectors. The URLs are added as observables to the security incident. + MalwareUrl *string `json:"malware_url,omitempty"` + + // Parent The ID or key of the parent issue for Jira connectors. Applies only to `Sub-task` types of issues. + Parent *string `json:"parent,omitempty"` + + // Priority The priority of the incident in Jira and ServiceNow SecOps connectors. + Priority *string `json:"priority,omitempty"` + + // RuleName The rule name for Swimlane connectors. + RuleName *string `json:"ruleName,omitempty"` + + // Severity The severity of the incident for ServiceNow ITSM and Swimlane connectors. + Severity *string `json:"severity,omitempty"` + + // ShortDescription A short description of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. It is used for searching the contents of the knowledge base. + ShortDescription *string `json:"short_description,omitempty"` + + // SourceIp A list of source IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. + SourceIp *RunConnectorSubactionPushtoservice_SubActionParams_Incident_SourceIp `json:"source_ip,omitempty"` + + // Subcategory The subcategory of the incident for ServiceNow ITSM and ServiceNow SecOps connectors. + Subcategory *string `json:"subcategory,omitempty"` + + // Summary A summary of the incident for Jira connectors. + Summary *string `json:"summary,omitempty"` + + // Title A title for the incident for Jira connectors. It is used for searching the contents of the knowledge base. + Title *string `json:"title,omitempty"` + + // Urgency The urgency of the incident for ServiceNow ITSM connectors. + Urgency *string `json:"urgency,omitempty"` + } `json:"incident,omitempty"` + } `json:"subActionParams"` +} + +// RunConnectorSubactionPushtoserviceSubAction The action to test. +type RunConnectorSubactionPushtoserviceSubAction string + +// RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp0 defines model for . +type RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp0 = string + +// RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp1 defines model for . +type RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp1 = []string + +// RunConnectorSubactionPushtoservice_SubActionParams_Incident_DestIp A list of destination IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. +type RunConnectorSubactionPushtoservice_SubActionParams_Incident_DestIp struct { + union json.RawMessage +} + +// RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash0 defines model for . +type RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash0 = string + +// RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash1 defines model for . +type RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash1 = []string + +// RunConnectorSubactionPushtoservice_SubActionParams_Incident_MalwareHash A list of malware hashes related to the security incident for ServiceNow SecOps connectors. The hashes are added as observables to the security incident. +type RunConnectorSubactionPushtoservice_SubActionParams_Incident_MalwareHash struct { + union json.RawMessage +} + +// RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp0 defines model for . +type RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp0 = string + +// RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp1 defines model for . +type RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp1 = []string + +// RunConnectorSubactionPushtoservice_SubActionParams_Incident_SourceIp A list of source IP addresses related to the security incident for ServiceNow SecOps connectors. The IPs are added as observables to the security incident. +type RunConnectorSubactionPushtoservice_SubActionParams_Incident_SourceIp struct { + union json.RawMessage +} + +// SecretsPropertiesCasesWebhook defines model for secrets_properties_cases_webhook. +type SecretsPropertiesCasesWebhook struct { + // Password The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. + Password *string `json:"password,omitempty"` + + // User The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. + User *string `json:"user,omitempty"` +} + +// SecretsPropertiesEmail Defines secrets for connectors when type is `.email`. +type SecretsPropertiesEmail map[string]interface{} + +// SecretsPropertiesJira Defines secrets for connectors when type is `.jira`. +type SecretsPropertiesJira struct { + // ApiToken The Jira API authentication token for HTTP basic authentication. + ApiToken string `json:"apiToken"` + + // Email The account email for HTTP Basic authentication. + Email string `json:"email"` +} + +// SecretsPropertiesOpsgenie Defines secrets for connectors when type is `.opsgenie`. +type SecretsPropertiesOpsgenie struct { + // ApiKey The Opsgenie API authentication key for HTTP Basic authentication. + ApiKey string `json:"apiKey"` +} + +// SecretsPropertiesPagerduty Defines secrets for connectors when type is `.pagerduty`. +type SecretsPropertiesPagerduty map[string]interface{} + +// SecretsPropertiesResilient Defines secrets for connectors when type is `.resilient`. +type SecretsPropertiesResilient struct { + // ApiKeyId The authentication key ID for HTTP Basic authentication. + ApiKeyId string `json:"apiKeyId"` + + // ApiKeySecret The authentication key secret for HTTP Basic authentication. + ApiKeySecret string `json:"apiKeySecret"` +} + +// SecretsPropertiesServicenow Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `.servicenow-itom`. +type SecretsPropertiesServicenow struct { + // ClientSecret The client secret assigned to your OAuth application. This property is required when `isOAuth` is `true`. + ClientSecret *string `json:"clientSecret,omitempty"` + + // Password The password for HTTP basic authentication. This property is required when `isOAuth` is `false`. + Password *string `json:"password,omitempty"` + + // PrivateKey The RSA private key that you created for use in ServiceNow. This property is required when `isOAuth` is `true`. + PrivateKey *string `json:"privateKey,omitempty"` + + // PrivateKeyPassword The password for the RSA private key. This property is required when `isOAuth` is `true` and you set a password on your private key. + PrivateKeyPassword *string `json:"privateKeyPassword,omitempty"` + + // Username The username for HTTP basic authentication. This property is required when `isOAuth` is `false`. + Username *string `json:"username,omitempty"` +} + +// SecretsPropertiesSlack Defines secrets for connectors when type is `.slack`. +type SecretsPropertiesSlack map[string]interface{} + +// SecretsPropertiesSwimlane Defines secrets for connectors when type is `.swimlane`. +type SecretsPropertiesSwimlane struct { + // ApiToken Swimlane API authentication token. + ApiToken *string `json:"apiToken,omitempty"` +} + +// SecretsPropertiesTeams Defines secrets for connectors when type is `.teams`. +type SecretsPropertiesTeams map[string]interface{} + +// SecretsPropertiesTines Defines secrets for connectors when type is `.tines`. +type SecretsPropertiesTines map[string]interface{} + +// SecretsPropertiesWebhook Defines secrets for connectors when type is `.webhook`. +type SecretsPropertiesWebhook map[string]interface{} + +// SecretsPropertiesXmatters Defines secrets for connectors when type is `.xmatters`. +type SecretsPropertiesXmatters map[string]interface{} + +// UpdateConnectorRequestCasesWebhook defines model for update_connector_request_cases_webhook. +type UpdateConnectorRequestCasesWebhook struct { + // Config Defines properties for connectors when type is `.cases-webhook`. + Config ConfigPropertiesCasesWebhook `json:"config"` + + // Name The display name for the connector. + Name string `json:"name"` + Secrets *SecretsPropertiesCasesWebhook `json:"secrets,omitempty"` +} + +// UpdateConnectorRequestIndex defines model for update_connector_request_index. +type UpdateConnectorRequestIndex struct { + // Config Defines properties for connectors when type is `.index`. + Config ConfigPropertiesIndex `json:"config"` + + // Name The display name for the connector. + Name string `json:"name"` +} + +// UpdateConnectorRequestJira defines model for update_connector_request_jira. +type UpdateConnectorRequestJira struct { + // Config Defines properties for connectors when type is `.jira`. + Config ConfigPropertiesJira `json:"config"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.jira`. + Secrets SecretsPropertiesJira `json:"secrets"` +} + +// UpdateConnectorRequestOpsgenie defines model for update_connector_request_opsgenie. +type UpdateConnectorRequestOpsgenie struct { + // Config Defines properties for connectors when type is `.opsgenie`. + Config ConfigPropertiesOpsgenie `json:"config"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.opsgenie`. + Secrets SecretsPropertiesOpsgenie `json:"secrets"` +} + +// UpdateConnectorRequestResilient defines model for update_connector_request_resilient. +type UpdateConnectorRequestResilient struct { + // Config Defines properties for connectors when type is `.resilient`. + Config ConfigPropertiesResilient `json:"config"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.resilient`. + Secrets SecretsPropertiesResilient `json:"secrets"` +} + +// UpdateConnectorRequestServerlog defines model for update_connector_request_serverlog. +type UpdateConnectorRequestServerlog struct { + // Name The display name for the connector. + Name string `json:"name"` +} + +// UpdateConnectorRequestServicenow defines model for update_connector_request_servicenow. +type UpdateConnectorRequestServicenow struct { + // Config Defines properties for connectors when type is `.servicenow`. + Config ConfigPropertiesServicenow `json:"config"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `.servicenow-itom`. + Secrets SecretsPropertiesServicenow `json:"secrets"` +} + +// UpdateConnectorRequestServicenowItom defines model for update_connector_request_servicenow_itom. +type UpdateConnectorRequestServicenowItom struct { + // Config Defines properties for connectors when type is `.servicenow`. + Config ConfigPropertiesServicenowItom `json:"config"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `.servicenow-itom`. + Secrets SecretsPropertiesServicenow `json:"secrets"` +} + +// UpdateConnectorRequestSwimlane defines model for update_connector_request_swimlane. +type UpdateConnectorRequestSwimlane struct { + // Config Defines properties for connectors when type is `.swimlane`. + Config ConfigPropertiesSwimlane `json:"config"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.swimlane`. + Secrets SecretsPropertiesSwimlane `json:"secrets"` +} + +// ActionId defines model for action_id. +type ActionId = string + +// ConnectorId defines model for connector_id. +type ConnectorId = string + +// KbnXsrf defines model for kbn_xsrf. +type KbnXsrf = string + +// SpaceId defines model for space_id. +type SpaceId = string + +// N200Actions The properties vary depending on the action type. +type N200Actions = ActionResponseProperties + +// LegacyCreateConnectorJSONBody defines parameters for LegacyCreateConnector. +type LegacyCreateConnectorJSONBody struct { + // ActionTypeId The connector type identifier. + ActionTypeId *string `json:"actionTypeId,omitempty"` + + // Config The configuration for the connector. Configuration properties vary depending on the connector type. + Config *map[string]interface{} `json:"config,omitempty"` + + // Name The display name for the connector. + Name *string `json:"name,omitempty"` + + // Secrets The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. NOTE: Remember these values. You must provide them each time you update the connector. + Secrets *map[string]interface{} `json:"secrets,omitempty"` +} + +// LegacyCreateConnectorParams defines parameters for LegacyCreateConnector. +type LegacyCreateConnectorParams struct { + // KbnXsrf Cross-site request forgery protection + KbnXsrf KbnXsrf `json:"kbn-xsrf"` +} + +// LegacyDeleteConnectorParams defines parameters for LegacyDeleteConnector. +type LegacyDeleteConnectorParams struct { + // KbnXsrf Cross-site request forgery protection + KbnXsrf KbnXsrf `json:"kbn-xsrf"` +} + +// LegacyUpdateConnectorJSONBody defines parameters for LegacyUpdateConnector. +type LegacyUpdateConnectorJSONBody struct { + // Config The new connector configuration. Configuration properties vary depending on the connector type. + Config *map[string]interface{} `json:"config,omitempty"` + + // Name The new name for the connector. + Name *string `json:"name,omitempty"` + + // Secrets The updated secrets configuration for the connector. Secrets properties vary depending on the connector type. + Secrets *map[string]interface{} `json:"secrets,omitempty"` +} + +// LegacyUpdateConnectorParams defines parameters for LegacyUpdateConnector. +type LegacyUpdateConnectorParams struct { + // KbnXsrf Cross-site request forgery protection + KbnXsrf KbnXsrf `json:"kbn-xsrf"` +} + +// LegacyRunConnectorJSONBody defines parameters for LegacyRunConnector. +type LegacyRunConnectorJSONBody struct { + // Params The parameters of the connector. Parameter properties vary depending on the connector type. + Params map[string]interface{} `json:"params"` +} + +// LegacyRunConnectorParams defines parameters for LegacyRunConnector. +type LegacyRunConnectorParams struct { + // KbnXsrf Cross-site request forgery protection + KbnXsrf KbnXsrf `json:"kbn-xsrf"` +} + +// CreateConnectorJSONBody defines parameters for CreateConnector. +type CreateConnectorJSONBody struct { + union json.RawMessage +} + +// CreateConnectorParams defines parameters for CreateConnector. +type CreateConnectorParams struct { + // KbnXsrf Cross-site request forgery protection + KbnXsrf KbnXsrf `json:"kbn-xsrf"` +} + +// DeleteConnectorParams defines parameters for DeleteConnector. +type DeleteConnectorParams struct { + // KbnXsrf Cross-site request forgery protection + KbnXsrf KbnXsrf `json:"kbn-xsrf"` +} + +// UpdateConnectorJSONBody defines parameters for UpdateConnector. +type UpdateConnectorJSONBody struct { + union json.RawMessage +} + +// UpdateConnectorParams defines parameters for UpdateConnector. +type UpdateConnectorParams struct { + // KbnXsrf Cross-site request forgery protection + KbnXsrf KbnXsrf `json:"kbn-xsrf"` +} + +// RunConnectorJSONBody defines parameters for RunConnector. +type RunConnectorJSONBody struct { + Params RunConnectorJSONBody_Params `json:"params"` +} + +// RunConnectorParams defines parameters for RunConnector. +type RunConnectorParams struct { + // KbnXsrf Cross-site request forgery protection + KbnXsrf KbnXsrf `json:"kbn-xsrf"` +} + +// RunConnectorJSONBodyParams2 defines parameters for RunConnector. +type RunConnectorJSONBodyParams2 struct { + union json.RawMessage +} + +// RunConnectorJSONBody_Params defines parameters for RunConnector. +type RunConnectorJSONBody_Params struct { + union json.RawMessage +} + +// GetConnectorTypesParams defines parameters for GetConnectorTypes. +type GetConnectorTypesParams struct { + // FeatureId A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases). + FeatureId *Features `form:"feature_id,omitempty" json:"feature_id,omitempty"` +} + +// LegacyCreateConnectorJSONRequestBody defines body for LegacyCreateConnector for application/json ContentType. +type LegacyCreateConnectorJSONRequestBody LegacyCreateConnectorJSONBody + +// LegacyUpdateConnectorJSONRequestBody defines body for LegacyUpdateConnector for application/json ContentType. +type LegacyUpdateConnectorJSONRequestBody LegacyUpdateConnectorJSONBody + +// LegacyRunConnectorJSONRequestBody defines body for LegacyRunConnector for application/json ContentType. +type LegacyRunConnectorJSONRequestBody LegacyRunConnectorJSONBody + +// CreateConnectorJSONRequestBody defines body for CreateConnector for application/json ContentType. +type CreateConnectorJSONRequestBody CreateConnectorJSONBody + +// UpdateConnectorJSONRequestBody defines body for UpdateConnector for application/json ContentType. +type UpdateConnectorJSONRequestBody UpdateConnectorJSONBody + +// RunConnectorJSONRequestBody defines body for RunConnector for application/json ContentType. +type RunConnectorJSONRequestBody RunConnectorJSONBody + +// AsConnectorResponsePropertiesCasesWebhook returns the union data inside the ConnectorResponseProperties as a ConnectorResponsePropertiesCasesWebhook +func (t ConnectorResponseProperties) AsConnectorResponsePropertiesCasesWebhook() (ConnectorResponsePropertiesCasesWebhook, error) { + var body ConnectorResponsePropertiesCasesWebhook + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromConnectorResponsePropertiesCasesWebhook overwrites any union data inside the ConnectorResponseProperties as the provided ConnectorResponsePropertiesCasesWebhook +func (t *ConnectorResponseProperties) FromConnectorResponsePropertiesCasesWebhook(v ConnectorResponsePropertiesCasesWebhook) error { + v.ConnectorTypeId = ".cases-webhook" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeConnectorResponsePropertiesCasesWebhook performs a merge with any union data inside the ConnectorResponseProperties, using the provided ConnectorResponsePropertiesCasesWebhook +func (t *ConnectorResponseProperties) MergeConnectorResponsePropertiesCasesWebhook(v ConnectorResponsePropertiesCasesWebhook) error { + v.ConnectorTypeId = ".cases-webhook" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsConnectorResponsePropertiesEmail returns the union data inside the ConnectorResponseProperties as a ConnectorResponsePropertiesEmail +func (t ConnectorResponseProperties) AsConnectorResponsePropertiesEmail() (ConnectorResponsePropertiesEmail, error) { + var body ConnectorResponsePropertiesEmail + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromConnectorResponsePropertiesEmail overwrites any union data inside the ConnectorResponseProperties as the provided ConnectorResponsePropertiesEmail +func (t *ConnectorResponseProperties) FromConnectorResponsePropertiesEmail(v ConnectorResponsePropertiesEmail) error { + v.ConnectorTypeId = ".email" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeConnectorResponsePropertiesEmail performs a merge with any union data inside the ConnectorResponseProperties, using the provided ConnectorResponsePropertiesEmail +func (t *ConnectorResponseProperties) MergeConnectorResponsePropertiesEmail(v ConnectorResponsePropertiesEmail) error { + v.ConnectorTypeId = ".email" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsConnectorResponsePropertiesIndex returns the union data inside the ConnectorResponseProperties as a ConnectorResponsePropertiesIndex +func (t ConnectorResponseProperties) AsConnectorResponsePropertiesIndex() (ConnectorResponsePropertiesIndex, error) { + var body ConnectorResponsePropertiesIndex + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromConnectorResponsePropertiesIndex overwrites any union data inside the ConnectorResponseProperties as the provided ConnectorResponsePropertiesIndex +func (t *ConnectorResponseProperties) FromConnectorResponsePropertiesIndex(v ConnectorResponsePropertiesIndex) error { + v.ConnectorTypeId = ".index" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeConnectorResponsePropertiesIndex performs a merge with any union data inside the ConnectorResponseProperties, using the provided ConnectorResponsePropertiesIndex +func (t *ConnectorResponseProperties) MergeConnectorResponsePropertiesIndex(v ConnectorResponsePropertiesIndex) error { + v.ConnectorTypeId = ".index" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsConnectorResponsePropertiesJira returns the union data inside the ConnectorResponseProperties as a ConnectorResponsePropertiesJira +func (t ConnectorResponseProperties) AsConnectorResponsePropertiesJira() (ConnectorResponsePropertiesJira, error) { + var body ConnectorResponsePropertiesJira + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromConnectorResponsePropertiesJira overwrites any union data inside the ConnectorResponseProperties as the provided ConnectorResponsePropertiesJira +func (t *ConnectorResponseProperties) FromConnectorResponsePropertiesJira(v ConnectorResponsePropertiesJira) error { + v.ConnectorTypeId = ".jira" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeConnectorResponsePropertiesJira performs a merge with any union data inside the ConnectorResponseProperties, using the provided ConnectorResponsePropertiesJira +func (t *ConnectorResponseProperties) MergeConnectorResponsePropertiesJira(v ConnectorResponsePropertiesJira) error { + v.ConnectorTypeId = ".jira" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsConnectorResponsePropertiesOpsgenie returns the union data inside the ConnectorResponseProperties as a ConnectorResponsePropertiesOpsgenie +func (t ConnectorResponseProperties) AsConnectorResponsePropertiesOpsgenie() (ConnectorResponsePropertiesOpsgenie, error) { + var body ConnectorResponsePropertiesOpsgenie + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromConnectorResponsePropertiesOpsgenie overwrites any union data inside the ConnectorResponseProperties as the provided ConnectorResponsePropertiesOpsgenie +func (t *ConnectorResponseProperties) FromConnectorResponsePropertiesOpsgenie(v ConnectorResponsePropertiesOpsgenie) error { + v.ConnectorTypeId = ".opsgenie" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeConnectorResponsePropertiesOpsgenie performs a merge with any union data inside the ConnectorResponseProperties, using the provided ConnectorResponsePropertiesOpsgenie +func (t *ConnectorResponseProperties) MergeConnectorResponsePropertiesOpsgenie(v ConnectorResponsePropertiesOpsgenie) error { + v.ConnectorTypeId = ".opsgenie" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsConnectorResponsePropertiesPagerduty returns the union data inside the ConnectorResponseProperties as a ConnectorResponsePropertiesPagerduty +func (t ConnectorResponseProperties) AsConnectorResponsePropertiesPagerduty() (ConnectorResponsePropertiesPagerduty, error) { + var body ConnectorResponsePropertiesPagerduty + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromConnectorResponsePropertiesPagerduty overwrites any union data inside the ConnectorResponseProperties as the provided ConnectorResponsePropertiesPagerduty +func (t *ConnectorResponseProperties) FromConnectorResponsePropertiesPagerduty(v ConnectorResponsePropertiesPagerduty) error { + v.ConnectorTypeId = ".pagerduty" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeConnectorResponsePropertiesPagerduty performs a merge with any union data inside the ConnectorResponseProperties, using the provided ConnectorResponsePropertiesPagerduty +func (t *ConnectorResponseProperties) MergeConnectorResponsePropertiesPagerduty(v ConnectorResponsePropertiesPagerduty) error { + v.ConnectorTypeId = ".pagerduty" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsConnectorResponsePropertiesResilient returns the union data inside the ConnectorResponseProperties as a ConnectorResponsePropertiesResilient +func (t ConnectorResponseProperties) AsConnectorResponsePropertiesResilient() (ConnectorResponsePropertiesResilient, error) { + var body ConnectorResponsePropertiesResilient + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromConnectorResponsePropertiesResilient overwrites any union data inside the ConnectorResponseProperties as the provided ConnectorResponsePropertiesResilient +func (t *ConnectorResponseProperties) FromConnectorResponsePropertiesResilient(v ConnectorResponsePropertiesResilient) error { + v.ConnectorTypeId = ".resilient" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeConnectorResponsePropertiesResilient performs a merge with any union data inside the ConnectorResponseProperties, using the provided ConnectorResponsePropertiesResilient +func (t *ConnectorResponseProperties) MergeConnectorResponsePropertiesResilient(v ConnectorResponsePropertiesResilient) error { + v.ConnectorTypeId = ".resilient" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsConnectorResponsePropertiesServerlog returns the union data inside the ConnectorResponseProperties as a ConnectorResponsePropertiesServerlog +func (t ConnectorResponseProperties) AsConnectorResponsePropertiesServerlog() (ConnectorResponsePropertiesServerlog, error) { + var body ConnectorResponsePropertiesServerlog + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromConnectorResponsePropertiesServerlog overwrites any union data inside the ConnectorResponseProperties as the provided ConnectorResponsePropertiesServerlog +func (t *ConnectorResponseProperties) FromConnectorResponsePropertiesServerlog(v ConnectorResponsePropertiesServerlog) error { + v.ConnectorTypeId = ".server-log" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeConnectorResponsePropertiesServerlog performs a merge with any union data inside the ConnectorResponseProperties, using the provided ConnectorResponsePropertiesServerlog +func (t *ConnectorResponseProperties) MergeConnectorResponsePropertiesServerlog(v ConnectorResponsePropertiesServerlog) error { + v.ConnectorTypeId = ".server-log" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsConnectorResponsePropertiesServicenow returns the union data inside the ConnectorResponseProperties as a ConnectorResponsePropertiesServicenow +func (t ConnectorResponseProperties) AsConnectorResponsePropertiesServicenow() (ConnectorResponsePropertiesServicenow, error) { + var body ConnectorResponsePropertiesServicenow + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromConnectorResponsePropertiesServicenow overwrites any union data inside the ConnectorResponseProperties as the provided ConnectorResponsePropertiesServicenow +func (t *ConnectorResponseProperties) FromConnectorResponsePropertiesServicenow(v ConnectorResponsePropertiesServicenow) error { + v.ConnectorTypeId = ".servicenow" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeConnectorResponsePropertiesServicenow performs a merge with any union data inside the ConnectorResponseProperties, using the provided ConnectorResponsePropertiesServicenow +func (t *ConnectorResponseProperties) MergeConnectorResponsePropertiesServicenow(v ConnectorResponsePropertiesServicenow) error { + v.ConnectorTypeId = ".servicenow" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsConnectorResponsePropertiesServicenowItom returns the union data inside the ConnectorResponseProperties as a ConnectorResponsePropertiesServicenowItom +func (t ConnectorResponseProperties) AsConnectorResponsePropertiesServicenowItom() (ConnectorResponsePropertiesServicenowItom, error) { + var body ConnectorResponsePropertiesServicenowItom + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromConnectorResponsePropertiesServicenowItom overwrites any union data inside the ConnectorResponseProperties as the provided ConnectorResponsePropertiesServicenowItom +func (t *ConnectorResponseProperties) FromConnectorResponsePropertiesServicenowItom(v ConnectorResponsePropertiesServicenowItom) error { + v.ConnectorTypeId = ".servicenow-itom" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeConnectorResponsePropertiesServicenowItom performs a merge with any union data inside the ConnectorResponseProperties, using the provided ConnectorResponsePropertiesServicenowItom +func (t *ConnectorResponseProperties) MergeConnectorResponsePropertiesServicenowItom(v ConnectorResponsePropertiesServicenowItom) error { + v.ConnectorTypeId = ".servicenow-itom" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsConnectorResponsePropertiesServicenowSir returns the union data inside the ConnectorResponseProperties as a ConnectorResponsePropertiesServicenowSir +func (t ConnectorResponseProperties) AsConnectorResponsePropertiesServicenowSir() (ConnectorResponsePropertiesServicenowSir, error) { + var body ConnectorResponsePropertiesServicenowSir + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromConnectorResponsePropertiesServicenowSir overwrites any union data inside the ConnectorResponseProperties as the provided ConnectorResponsePropertiesServicenowSir +func (t *ConnectorResponseProperties) FromConnectorResponsePropertiesServicenowSir(v ConnectorResponsePropertiesServicenowSir) error { + v.ConnectorTypeId = ".servicenow-sir" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeConnectorResponsePropertiesServicenowSir performs a merge with any union data inside the ConnectorResponseProperties, using the provided ConnectorResponsePropertiesServicenowSir +func (t *ConnectorResponseProperties) MergeConnectorResponsePropertiesServicenowSir(v ConnectorResponsePropertiesServicenowSir) error { + v.ConnectorTypeId = ".servicenow-sir" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsConnectorResponsePropertiesSlack returns the union data inside the ConnectorResponseProperties as a ConnectorResponsePropertiesSlack +func (t ConnectorResponseProperties) AsConnectorResponsePropertiesSlack() (ConnectorResponsePropertiesSlack, error) { + var body ConnectorResponsePropertiesSlack + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromConnectorResponsePropertiesSlack overwrites any union data inside the ConnectorResponseProperties as the provided ConnectorResponsePropertiesSlack +func (t *ConnectorResponseProperties) FromConnectorResponsePropertiesSlack(v ConnectorResponsePropertiesSlack) error { + v.ConnectorTypeId = ".slack" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeConnectorResponsePropertiesSlack performs a merge with any union data inside the ConnectorResponseProperties, using the provided ConnectorResponsePropertiesSlack +func (t *ConnectorResponseProperties) MergeConnectorResponsePropertiesSlack(v ConnectorResponsePropertiesSlack) error { + v.ConnectorTypeId = ".slack" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsConnectorResponsePropertiesSwimlane returns the union data inside the ConnectorResponseProperties as a ConnectorResponsePropertiesSwimlane +func (t ConnectorResponseProperties) AsConnectorResponsePropertiesSwimlane() (ConnectorResponsePropertiesSwimlane, error) { + var body ConnectorResponsePropertiesSwimlane + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromConnectorResponsePropertiesSwimlane overwrites any union data inside the ConnectorResponseProperties as the provided ConnectorResponsePropertiesSwimlane +func (t *ConnectorResponseProperties) FromConnectorResponsePropertiesSwimlane(v ConnectorResponsePropertiesSwimlane) error { + v.ConnectorTypeId = ".swimlane" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeConnectorResponsePropertiesSwimlane performs a merge with any union data inside the ConnectorResponseProperties, using the provided ConnectorResponsePropertiesSwimlane +func (t *ConnectorResponseProperties) MergeConnectorResponsePropertiesSwimlane(v ConnectorResponsePropertiesSwimlane) error { + v.ConnectorTypeId = ".swimlane" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsConnectorResponsePropertiesTeams returns the union data inside the ConnectorResponseProperties as a ConnectorResponsePropertiesTeams +func (t ConnectorResponseProperties) AsConnectorResponsePropertiesTeams() (ConnectorResponsePropertiesTeams, error) { + var body ConnectorResponsePropertiesTeams + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromConnectorResponsePropertiesTeams overwrites any union data inside the ConnectorResponseProperties as the provided ConnectorResponsePropertiesTeams +func (t *ConnectorResponseProperties) FromConnectorResponsePropertiesTeams(v ConnectorResponsePropertiesTeams) error { + v.ConnectorTypeId = ".teams" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeConnectorResponsePropertiesTeams performs a merge with any union data inside the ConnectorResponseProperties, using the provided ConnectorResponsePropertiesTeams +func (t *ConnectorResponseProperties) MergeConnectorResponsePropertiesTeams(v ConnectorResponsePropertiesTeams) error { + v.ConnectorTypeId = ".teams" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsConnectorResponsePropertiesTines returns the union data inside the ConnectorResponseProperties as a ConnectorResponsePropertiesTines +func (t ConnectorResponseProperties) AsConnectorResponsePropertiesTines() (ConnectorResponsePropertiesTines, error) { + var body ConnectorResponsePropertiesTines + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromConnectorResponsePropertiesTines overwrites any union data inside the ConnectorResponseProperties as the provided ConnectorResponsePropertiesTines +func (t *ConnectorResponseProperties) FromConnectorResponsePropertiesTines(v ConnectorResponsePropertiesTines) error { + v.ConnectorTypeId = ".tines" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeConnectorResponsePropertiesTines performs a merge with any union data inside the ConnectorResponseProperties, using the provided ConnectorResponsePropertiesTines +func (t *ConnectorResponseProperties) MergeConnectorResponsePropertiesTines(v ConnectorResponsePropertiesTines) error { + v.ConnectorTypeId = ".tines" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsConnectorResponsePropertiesWebhook returns the union data inside the ConnectorResponseProperties as a ConnectorResponsePropertiesWebhook +func (t ConnectorResponseProperties) AsConnectorResponsePropertiesWebhook() (ConnectorResponsePropertiesWebhook, error) { + var body ConnectorResponsePropertiesWebhook + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromConnectorResponsePropertiesWebhook overwrites any union data inside the ConnectorResponseProperties as the provided ConnectorResponsePropertiesWebhook +func (t *ConnectorResponseProperties) FromConnectorResponsePropertiesWebhook(v ConnectorResponsePropertiesWebhook) error { + v.ConnectorTypeId = ".webhook" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeConnectorResponsePropertiesWebhook performs a merge with any union data inside the ConnectorResponseProperties, using the provided ConnectorResponsePropertiesWebhook +func (t *ConnectorResponseProperties) MergeConnectorResponsePropertiesWebhook(v ConnectorResponsePropertiesWebhook) error { + v.ConnectorTypeId = ".webhook" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsConnectorResponsePropertiesXmatters returns the union data inside the ConnectorResponseProperties as a ConnectorResponsePropertiesXmatters +func (t ConnectorResponseProperties) AsConnectorResponsePropertiesXmatters() (ConnectorResponsePropertiesXmatters, error) { + var body ConnectorResponsePropertiesXmatters + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromConnectorResponsePropertiesXmatters overwrites any union data inside the ConnectorResponseProperties as the provided ConnectorResponsePropertiesXmatters +func (t *ConnectorResponseProperties) FromConnectorResponsePropertiesXmatters(v ConnectorResponsePropertiesXmatters) error { + v.ConnectorTypeId = ".xmatters" + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeConnectorResponsePropertiesXmatters performs a merge with any union data inside the ConnectorResponseProperties, using the provided ConnectorResponsePropertiesXmatters +func (t *ConnectorResponseProperties) MergeConnectorResponsePropertiesXmatters(v ConnectorResponsePropertiesXmatters) error { + v.ConnectorTypeId = ".xmatters" + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +func (t ConnectorResponseProperties) Discriminator() (string, error) { + var discriminator struct { + Discriminator string `json:"connector_type_id"` + } + err := json.Unmarshal(t.union, &discriminator) + return discriminator.Discriminator, err +} + +func (t ConnectorResponseProperties) ValueByDiscriminator() (interface{}, error) { + discriminator, err := t.Discriminator() + if err != nil { + return nil, err + } + switch discriminator { + case ".cases-webhook": + return t.AsConnectorResponsePropertiesCasesWebhook() + case ".email": + return t.AsConnectorResponsePropertiesEmail() + case ".index": + return t.AsConnectorResponsePropertiesIndex() + case ".jira": + return t.AsConnectorResponsePropertiesJira() + case ".opsgenie": + return t.AsConnectorResponsePropertiesOpsgenie() + case ".pagerduty": + return t.AsConnectorResponsePropertiesPagerduty() + case ".resilient": + return t.AsConnectorResponsePropertiesResilient() + case ".server-log": + return t.AsConnectorResponsePropertiesServerlog() + case ".servicenow": + return t.AsConnectorResponsePropertiesServicenow() + case ".servicenow-itom": + return t.AsConnectorResponsePropertiesServicenowItom() + case ".servicenow-sir": + return t.AsConnectorResponsePropertiesServicenowSir() + case ".slack": + return t.AsConnectorResponsePropertiesSlack() + case ".swimlane": + return t.AsConnectorResponsePropertiesSwimlane() + case ".teams": + return t.AsConnectorResponsePropertiesTeams() + case ".tines": + return t.AsConnectorResponsePropertiesTines() + case ".webhook": + return t.AsConnectorResponsePropertiesWebhook() + case ".xmatters": + return t.AsConnectorResponsePropertiesXmatters() + default: + return nil, errors.New("unknown discriminator value: " + discriminator) + } +} + +func (t ConnectorResponseProperties) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *ConnectorResponseProperties) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsLegacyRunConnectorGeneralResponseData0 returns the union data inside the LegacyRunConnectorGeneralResponse_Data as a LegacyRunConnectorGeneralResponseData0 +func (t LegacyRunConnectorGeneralResponse_Data) AsLegacyRunConnectorGeneralResponseData0() (LegacyRunConnectorGeneralResponseData0, error) { + var body LegacyRunConnectorGeneralResponseData0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromLegacyRunConnectorGeneralResponseData0 overwrites any union data inside the LegacyRunConnectorGeneralResponse_Data as the provided LegacyRunConnectorGeneralResponseData0 +func (t *LegacyRunConnectorGeneralResponse_Data) FromLegacyRunConnectorGeneralResponseData0(v LegacyRunConnectorGeneralResponseData0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeLegacyRunConnectorGeneralResponseData0 performs a merge with any union data inside the LegacyRunConnectorGeneralResponse_Data, using the provided LegacyRunConnectorGeneralResponseData0 +func (t *LegacyRunConnectorGeneralResponse_Data) MergeLegacyRunConnectorGeneralResponseData0(v LegacyRunConnectorGeneralResponseData0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsLegacyRunConnectorGeneralResponseData1 returns the union data inside the LegacyRunConnectorGeneralResponse_Data as a LegacyRunConnectorGeneralResponseData1 +func (t LegacyRunConnectorGeneralResponse_Data) AsLegacyRunConnectorGeneralResponseData1() (LegacyRunConnectorGeneralResponseData1, error) { + var body LegacyRunConnectorGeneralResponseData1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromLegacyRunConnectorGeneralResponseData1 overwrites any union data inside the LegacyRunConnectorGeneralResponse_Data as the provided LegacyRunConnectorGeneralResponseData1 +func (t *LegacyRunConnectorGeneralResponse_Data) FromLegacyRunConnectorGeneralResponseData1(v LegacyRunConnectorGeneralResponseData1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeLegacyRunConnectorGeneralResponseData1 performs a merge with any union data inside the LegacyRunConnectorGeneralResponse_Data, using the provided LegacyRunConnectorGeneralResponseData1 +func (t *LegacyRunConnectorGeneralResponse_Data) MergeLegacyRunConnectorGeneralResponseData1(v LegacyRunConnectorGeneralResponseData1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +func (t LegacyRunConnectorGeneralResponse_Data) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *LegacyRunConnectorGeneralResponse_Data) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsRunConnectorGeneralResponseData0 returns the union data inside the RunConnectorGeneralResponse_Data as a RunConnectorGeneralResponseData0 +func (t RunConnectorGeneralResponse_Data) AsRunConnectorGeneralResponseData0() (RunConnectorGeneralResponseData0, error) { + var body RunConnectorGeneralResponseData0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromRunConnectorGeneralResponseData0 overwrites any union data inside the RunConnectorGeneralResponse_Data as the provided RunConnectorGeneralResponseData0 +func (t *RunConnectorGeneralResponse_Data) FromRunConnectorGeneralResponseData0(v RunConnectorGeneralResponseData0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeRunConnectorGeneralResponseData0 performs a merge with any union data inside the RunConnectorGeneralResponse_Data, using the provided RunConnectorGeneralResponseData0 +func (t *RunConnectorGeneralResponse_Data) MergeRunConnectorGeneralResponseData0(v RunConnectorGeneralResponseData0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsRunConnectorGeneralResponseData1 returns the union data inside the RunConnectorGeneralResponse_Data as a RunConnectorGeneralResponseData1 +func (t RunConnectorGeneralResponse_Data) AsRunConnectorGeneralResponseData1() (RunConnectorGeneralResponseData1, error) { + var body RunConnectorGeneralResponseData1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromRunConnectorGeneralResponseData1 overwrites any union data inside the RunConnectorGeneralResponse_Data as the provided RunConnectorGeneralResponseData1 +func (t *RunConnectorGeneralResponse_Data) FromRunConnectorGeneralResponseData1(v RunConnectorGeneralResponseData1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeRunConnectorGeneralResponseData1 performs a merge with any union data inside the RunConnectorGeneralResponse_Data, using the provided RunConnectorGeneralResponseData1 +func (t *RunConnectorGeneralResponse_Data) MergeRunConnectorGeneralResponseData1(v RunConnectorGeneralResponseData1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +func (t RunConnectorGeneralResponse_Data) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *RunConnectorGeneralResponse_Data) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp0 returns the union data inside the RunConnectorSubactionPushtoservice_SubActionParams_Incident_DestIp as a RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp0 +func (t RunConnectorSubactionPushtoservice_SubActionParams_Incident_DestIp) AsRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp0() (RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp0, error) { + var body RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp0 overwrites any union data inside the RunConnectorSubactionPushtoservice_SubActionParams_Incident_DestIp as the provided RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp0 +func (t *RunConnectorSubactionPushtoservice_SubActionParams_Incident_DestIp) FromRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp0(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp0 performs a merge with any union data inside the RunConnectorSubactionPushtoservice_SubActionParams_Incident_DestIp, using the provided RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp0 +func (t *RunConnectorSubactionPushtoservice_SubActionParams_Incident_DestIp) MergeRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp0(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp1 returns the union data inside the RunConnectorSubactionPushtoservice_SubActionParams_Incident_DestIp as a RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp1 +func (t RunConnectorSubactionPushtoservice_SubActionParams_Incident_DestIp) AsRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp1() (RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp1, error) { + var body RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp1 overwrites any union data inside the RunConnectorSubactionPushtoservice_SubActionParams_Incident_DestIp as the provided RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp1 +func (t *RunConnectorSubactionPushtoservice_SubActionParams_Incident_DestIp) FromRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp1(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp1 performs a merge with any union data inside the RunConnectorSubactionPushtoservice_SubActionParams_Incident_DestIp, using the provided RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp1 +func (t *RunConnectorSubactionPushtoservice_SubActionParams_Incident_DestIp) MergeRunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp1(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentDestIp1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +func (t RunConnectorSubactionPushtoservice_SubActionParams_Incident_DestIp) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *RunConnectorSubactionPushtoservice_SubActionParams_Incident_DestIp) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash0 returns the union data inside the RunConnectorSubactionPushtoservice_SubActionParams_Incident_MalwareHash as a RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash0 +func (t RunConnectorSubactionPushtoservice_SubActionParams_Incident_MalwareHash) AsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash0() (RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash0, error) { + var body RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash0 overwrites any union data inside the RunConnectorSubactionPushtoservice_SubActionParams_Incident_MalwareHash as the provided RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash0 +func (t *RunConnectorSubactionPushtoservice_SubActionParams_Incident_MalwareHash) FromRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash0(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash0 performs a merge with any union data inside the RunConnectorSubactionPushtoservice_SubActionParams_Incident_MalwareHash, using the provided RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash0 +func (t *RunConnectorSubactionPushtoservice_SubActionParams_Incident_MalwareHash) MergeRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash0(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash1 returns the union data inside the RunConnectorSubactionPushtoservice_SubActionParams_Incident_MalwareHash as a RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash1 +func (t RunConnectorSubactionPushtoservice_SubActionParams_Incident_MalwareHash) AsRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash1() (RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash1, error) { + var body RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash1 overwrites any union data inside the RunConnectorSubactionPushtoservice_SubActionParams_Incident_MalwareHash as the provided RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash1 +func (t *RunConnectorSubactionPushtoservice_SubActionParams_Incident_MalwareHash) FromRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash1(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash1 performs a merge with any union data inside the RunConnectorSubactionPushtoservice_SubActionParams_Incident_MalwareHash, using the provided RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash1 +func (t *RunConnectorSubactionPushtoservice_SubActionParams_Incident_MalwareHash) MergeRunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash1(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentMalwareHash1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +func (t RunConnectorSubactionPushtoservice_SubActionParams_Incident_MalwareHash) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *RunConnectorSubactionPushtoservice_SubActionParams_Incident_MalwareHash) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp0 returns the union data inside the RunConnectorSubactionPushtoservice_SubActionParams_Incident_SourceIp as a RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp0 +func (t RunConnectorSubactionPushtoservice_SubActionParams_Incident_SourceIp) AsRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp0() (RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp0, error) { + var body RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp0 overwrites any union data inside the RunConnectorSubactionPushtoservice_SubActionParams_Incident_SourceIp as the provided RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp0 +func (t *RunConnectorSubactionPushtoservice_SubActionParams_Incident_SourceIp) FromRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp0(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp0 performs a merge with any union data inside the RunConnectorSubactionPushtoservice_SubActionParams_Incident_SourceIp, using the provided RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp0 +func (t *RunConnectorSubactionPushtoservice_SubActionParams_Incident_SourceIp) MergeRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp0(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +// AsRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp1 returns the union data inside the RunConnectorSubactionPushtoservice_SubActionParams_Incident_SourceIp as a RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp1 +func (t RunConnectorSubactionPushtoservice_SubActionParams_Incident_SourceIp) AsRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp1() (RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp1, error) { + var body RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp1 overwrites any union data inside the RunConnectorSubactionPushtoservice_SubActionParams_Incident_SourceIp as the provided RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp1 +func (t *RunConnectorSubactionPushtoservice_SubActionParams_Incident_SourceIp) FromRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp1(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp1 performs a merge with any union data inside the RunConnectorSubactionPushtoservice_SubActionParams_Incident_SourceIp, using the provided RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp1 +func (t *RunConnectorSubactionPushtoservice_SubActionParams_Incident_SourceIp) MergeRunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp1(v RunConnectorSubactionPushtoserviceSubActionParamsIncidentSourceIp1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(b, t.union) + t.union = merged + return err +} + +func (t RunConnectorSubactionPushtoservice_SubActionParams_Incident_SourceIp) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *RunConnectorSubactionPushtoservice_SubActionParams_Incident_SourceIp) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +// Client which conforms to the OpenAPI3 specification for this service. +type Client struct { + // The endpoint of the server conforming to this interface, with scheme, + // https://api.deepmap.com for example. This can contain a path relative + // to the server, such as https://api.deepmap.com/dev-test, and all the + // paths in the swagger spec will be appended to the server. + Server string + + // Doer for performing requests, typically a *http.Client with any + // customized settings, such as certificate chains. + Client HttpRequestDoer + + // A list of callbacks for modifying requests which are generated before sending over + // the network. + RequestEditors []RequestEditorFn +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*Client) error + +// Creates a new Client, with reasonable defaults +func NewClient(server string, opts ...ClientOption) (*Client, error) { + // create a client with sane default values + client := Client{ + Server: server, + } + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *Client) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *Client) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { + // LegacyGetConnectors request + LegacyGetConnectors(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // LegacyCreateConnector request with any body + LegacyCreateConnectorWithBody(ctx context.Context, spaceId SpaceId, params *LegacyCreateConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + LegacyCreateConnector(ctx context.Context, spaceId SpaceId, params *LegacyCreateConnectorParams, body LegacyCreateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // LegacyDeleteConnector request + LegacyDeleteConnector(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyDeleteConnectorParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // LegacyGetConnector request + LegacyGetConnector(ctx context.Context, spaceId SpaceId, actionId ActionId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // LegacyUpdateConnector request with any body + LegacyUpdateConnectorWithBody(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyUpdateConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + LegacyUpdateConnector(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyUpdateConnectorParams, body LegacyUpdateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // LegacyRunConnector request with any body + LegacyRunConnectorWithBody(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyRunConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + LegacyRunConnector(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyRunConnectorParams, body LegacyRunConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateConnector request with any body + CreateConnectorWithBody(ctx context.Context, spaceId SpaceId, params *CreateConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateConnector(ctx context.Context, spaceId SpaceId, params *CreateConnectorParams, body CreateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteConnector request + DeleteConnector(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *DeleteConnectorParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetConnector request + GetConnector(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateConnector request with any body + UpdateConnectorWithBody(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *UpdateConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateConnector(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *UpdateConnectorParams, body UpdateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // RunConnector request with any body + RunConnectorWithBody(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *RunConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + RunConnector(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *RunConnectorParams, body RunConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetConnectorTypes request + GetConnectorTypes(ctx context.Context, spaceId SpaceId, params *GetConnectorTypesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetConnectors request + GetConnectors(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error) + + // LegacyGetConnectorTypes request + LegacyGetConnectorTypes(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error) +} + +func (c *Client) LegacyGetConnectors(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLegacyGetConnectorsRequest(c.Server, spaceId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) LegacyCreateConnectorWithBody(ctx context.Context, spaceId SpaceId, params *LegacyCreateConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLegacyCreateConnectorRequestWithBody(c.Server, spaceId, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) LegacyCreateConnector(ctx context.Context, spaceId SpaceId, params *LegacyCreateConnectorParams, body LegacyCreateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLegacyCreateConnectorRequest(c.Server, spaceId, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) LegacyDeleteConnector(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyDeleteConnectorParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLegacyDeleteConnectorRequest(c.Server, spaceId, actionId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) LegacyGetConnector(ctx context.Context, spaceId SpaceId, actionId ActionId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLegacyGetConnectorRequest(c.Server, spaceId, actionId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) LegacyUpdateConnectorWithBody(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyUpdateConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLegacyUpdateConnectorRequestWithBody(c.Server, spaceId, actionId, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) LegacyUpdateConnector(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyUpdateConnectorParams, body LegacyUpdateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLegacyUpdateConnectorRequest(c.Server, spaceId, actionId, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) LegacyRunConnectorWithBody(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyRunConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLegacyRunConnectorRequestWithBody(c.Server, spaceId, actionId, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) LegacyRunConnector(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyRunConnectorParams, body LegacyRunConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLegacyRunConnectorRequest(c.Server, spaceId, actionId, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateConnectorWithBody(ctx context.Context, spaceId SpaceId, params *CreateConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateConnectorRequestWithBody(c.Server, spaceId, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateConnector(ctx context.Context, spaceId SpaceId, params *CreateConnectorParams, body CreateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateConnectorRequest(c.Server, spaceId, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteConnector(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *DeleteConnectorParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteConnectorRequest(c.Server, spaceId, connectorId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetConnector(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetConnectorRequest(c.Server, spaceId, connectorId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateConnectorWithBody(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *UpdateConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateConnectorRequestWithBody(c.Server, spaceId, connectorId, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateConnector(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *UpdateConnectorParams, body UpdateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateConnectorRequest(c.Server, spaceId, connectorId, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) RunConnectorWithBody(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *RunConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRunConnectorRequestWithBody(c.Server, spaceId, connectorId, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) RunConnector(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *RunConnectorParams, body RunConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRunConnectorRequest(c.Server, spaceId, connectorId, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetConnectorTypes(ctx context.Context, spaceId SpaceId, params *GetConnectorTypesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetConnectorTypesRequest(c.Server, spaceId, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetConnectors(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetConnectorsRequest(c.Server, spaceId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) LegacyGetConnectorTypes(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewLegacyGetConnectorTypesRequest(c.Server, spaceId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewLegacyGetConnectorsRequest generates requests for LegacyGetConnectors +func NewLegacyGetConnectorsRequest(server string, spaceId SpaceId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/actions", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewLegacyCreateConnectorRequest calls the generic LegacyCreateConnector builder with application/json body +func NewLegacyCreateConnectorRequest(server string, spaceId SpaceId, params *LegacyCreateConnectorParams, body LegacyCreateConnectorJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewLegacyCreateConnectorRequestWithBody(server, spaceId, params, "application/json", bodyReader) +} + +// NewLegacyCreateConnectorRequestWithBody generates requests for LegacyCreateConnector with any type of body +func NewLegacyCreateConnectorRequestWithBody(server string, spaceId SpaceId, params *LegacyCreateConnectorParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/actions", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "kbn-xsrf", runtime.ParamLocationHeader, params.KbnXsrf) + if err != nil { + return nil, err + } + + req.Header.Set("kbn-xsrf", headerParam0) + + return req, nil +} + +// NewLegacyDeleteConnectorRequest generates requests for LegacyDeleteConnector +func NewLegacyDeleteConnectorRequest(server string, spaceId SpaceId, actionId ActionId, params *LegacyDeleteConnectorParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "actionId", runtime.ParamLocationPath, actionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/actions/action/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "kbn-xsrf", runtime.ParamLocationHeader, params.KbnXsrf) + if err != nil { + return nil, err + } + + req.Header.Set("kbn-xsrf", headerParam0) + + return req, nil +} + +// NewLegacyGetConnectorRequest generates requests for LegacyGetConnector +func NewLegacyGetConnectorRequest(server string, spaceId SpaceId, actionId ActionId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "actionId", runtime.ParamLocationPath, actionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/actions/action/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewLegacyUpdateConnectorRequest calls the generic LegacyUpdateConnector builder with application/json body +func NewLegacyUpdateConnectorRequest(server string, spaceId SpaceId, actionId ActionId, params *LegacyUpdateConnectorParams, body LegacyUpdateConnectorJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewLegacyUpdateConnectorRequestWithBody(server, spaceId, actionId, params, "application/json", bodyReader) +} + +// NewLegacyUpdateConnectorRequestWithBody generates requests for LegacyUpdateConnector with any type of body +func NewLegacyUpdateConnectorRequestWithBody(server string, spaceId SpaceId, actionId ActionId, params *LegacyUpdateConnectorParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "actionId", runtime.ParamLocationPath, actionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/actions/action/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "kbn-xsrf", runtime.ParamLocationHeader, params.KbnXsrf) + if err != nil { + return nil, err + } + + req.Header.Set("kbn-xsrf", headerParam0) + + return req, nil +} + +// NewLegacyRunConnectorRequest calls the generic LegacyRunConnector builder with application/json body +func NewLegacyRunConnectorRequest(server string, spaceId SpaceId, actionId ActionId, params *LegacyRunConnectorParams, body LegacyRunConnectorJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewLegacyRunConnectorRequestWithBody(server, spaceId, actionId, params, "application/json", bodyReader) +} + +// NewLegacyRunConnectorRequestWithBody generates requests for LegacyRunConnector with any type of body +func NewLegacyRunConnectorRequestWithBody(server string, spaceId SpaceId, actionId ActionId, params *LegacyRunConnectorParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "actionId", runtime.ParamLocationPath, actionId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/actions/action/%s/_execute", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "kbn-xsrf", runtime.ParamLocationHeader, params.KbnXsrf) + if err != nil { + return nil, err + } + + req.Header.Set("kbn-xsrf", headerParam0) + + return req, nil +} + +// NewCreateConnectorRequest calls the generic CreateConnector builder with application/json body +func NewCreateConnectorRequest(server string, spaceId SpaceId, params *CreateConnectorParams, body CreateConnectorJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateConnectorRequestWithBody(server, spaceId, params, "application/json", bodyReader) +} + +// NewCreateConnectorRequestWithBody generates requests for CreateConnector with any type of body +func NewCreateConnectorRequestWithBody(server string, spaceId SpaceId, params *CreateConnectorParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/actions/connector", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "kbn-xsrf", runtime.ParamLocationHeader, params.KbnXsrf) + if err != nil { + return nil, err + } + + req.Header.Set("kbn-xsrf", headerParam0) + + return req, nil +} + +// NewDeleteConnectorRequest generates requests for DeleteConnector +func NewDeleteConnectorRequest(server string, spaceId SpaceId, connectorId ConnectorId, params *DeleteConnectorParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connectorId", runtime.ParamLocationPath, connectorId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/actions/connector/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "kbn-xsrf", runtime.ParamLocationHeader, params.KbnXsrf) + if err != nil { + return nil, err + } + + req.Header.Set("kbn-xsrf", headerParam0) + + return req, nil +} + +// NewGetConnectorRequest generates requests for GetConnector +func NewGetConnectorRequest(server string, spaceId SpaceId, connectorId ConnectorId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connectorId", runtime.ParamLocationPath, connectorId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/actions/connector/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUpdateConnectorRequest calls the generic UpdateConnector builder with application/json body +func NewUpdateConnectorRequest(server string, spaceId SpaceId, connectorId ConnectorId, params *UpdateConnectorParams, body UpdateConnectorJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewUpdateConnectorRequestWithBody(server, spaceId, connectorId, params, "application/json", bodyReader) +} + +// NewUpdateConnectorRequestWithBody generates requests for UpdateConnector with any type of body +func NewUpdateConnectorRequestWithBody(server string, spaceId SpaceId, connectorId ConnectorId, params *UpdateConnectorParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connectorId", runtime.ParamLocationPath, connectorId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/actions/connector/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "kbn-xsrf", runtime.ParamLocationHeader, params.KbnXsrf) + if err != nil { + return nil, err + } + + req.Header.Set("kbn-xsrf", headerParam0) + + return req, nil +} + +// NewRunConnectorRequest calls the generic RunConnector builder with application/json body +func NewRunConnectorRequest(server string, spaceId SpaceId, connectorId ConnectorId, params *RunConnectorParams, body RunConnectorJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewRunConnectorRequestWithBody(server, spaceId, connectorId, params, "application/json", bodyReader) +} + +// NewRunConnectorRequestWithBody generates requests for RunConnector with any type of body +func NewRunConnectorRequestWithBody(server string, spaceId SpaceId, connectorId ConnectorId, params *RunConnectorParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "connectorId", runtime.ParamLocationPath, connectorId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/actions/connector/%s/_execute", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "kbn-xsrf", runtime.ParamLocationHeader, params.KbnXsrf) + if err != nil { + return nil, err + } + + req.Header.Set("kbn-xsrf", headerParam0) + + return req, nil +} + +// NewGetConnectorTypesRequest generates requests for GetConnectorTypes +func NewGetConnectorTypesRequest(server string, spaceId SpaceId, params *GetConnectorTypesParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/actions/connector_types", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if params.FeatureId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "feature_id", runtime.ParamLocationQuery, *params.FeatureId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetConnectorsRequest generates requests for GetConnectors +func NewGetConnectorsRequest(server string, spaceId SpaceId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/actions/connectors", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewLegacyGetConnectorTypesRequest generates requests for LegacyGetConnectorTypes +func NewLegacyGetConnectorTypesRequest(server string, spaceId SpaceId) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "spaceId", runtime.ParamLocationPath, spaceId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/s/%s/api/actions/list_action_types", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // LegacyGetConnectors request + LegacyGetConnectorsWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*LegacyGetConnectorsResponse, error) + + // LegacyCreateConnector request with any body + LegacyCreateConnectorWithBodyWithResponse(ctx context.Context, spaceId SpaceId, params *LegacyCreateConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LegacyCreateConnectorResponse, error) + + LegacyCreateConnectorWithResponse(ctx context.Context, spaceId SpaceId, params *LegacyCreateConnectorParams, body LegacyCreateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*LegacyCreateConnectorResponse, error) + + // LegacyDeleteConnector request + LegacyDeleteConnectorWithResponse(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyDeleteConnectorParams, reqEditors ...RequestEditorFn) (*LegacyDeleteConnectorResponse, error) + + // LegacyGetConnector request + LegacyGetConnectorWithResponse(ctx context.Context, spaceId SpaceId, actionId ActionId, reqEditors ...RequestEditorFn) (*LegacyGetConnectorResponse, error) + + // LegacyUpdateConnector request with any body + LegacyUpdateConnectorWithBodyWithResponse(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyUpdateConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LegacyUpdateConnectorResponse, error) + + LegacyUpdateConnectorWithResponse(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyUpdateConnectorParams, body LegacyUpdateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*LegacyUpdateConnectorResponse, error) + + // LegacyRunConnector request with any body + LegacyRunConnectorWithBodyWithResponse(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyRunConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LegacyRunConnectorResponse, error) + + LegacyRunConnectorWithResponse(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyRunConnectorParams, body LegacyRunConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*LegacyRunConnectorResponse, error) + + // CreateConnector request with any body + CreateConnectorWithBodyWithResponse(ctx context.Context, spaceId SpaceId, params *CreateConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateConnectorResponse, error) + + CreateConnectorWithResponse(ctx context.Context, spaceId SpaceId, params *CreateConnectorParams, body CreateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateConnectorResponse, error) + + // DeleteConnector request + DeleteConnectorWithResponse(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *DeleteConnectorParams, reqEditors ...RequestEditorFn) (*DeleteConnectorResponse, error) + + // GetConnector request + GetConnectorWithResponse(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, reqEditors ...RequestEditorFn) (*GetConnectorResponse, error) + + // UpdateConnector request with any body + UpdateConnectorWithBodyWithResponse(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *UpdateConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateConnectorResponse, error) + + UpdateConnectorWithResponse(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *UpdateConnectorParams, body UpdateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateConnectorResponse, error) + + // RunConnector request with any body + RunConnectorWithBodyWithResponse(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *RunConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RunConnectorResponse, error) + + RunConnectorWithResponse(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *RunConnectorParams, body RunConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*RunConnectorResponse, error) + + // GetConnectorTypes request + GetConnectorTypesWithResponse(ctx context.Context, spaceId SpaceId, params *GetConnectorTypesParams, reqEditors ...RequestEditorFn) (*GetConnectorTypesResponse, error) + + // GetConnectors request + GetConnectorsWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*GetConnectorsResponse, error) + + // LegacyGetConnectorTypes request + LegacyGetConnectorTypesWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*LegacyGetConnectorTypesResponse, error) +} + +type LegacyGetConnectorsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]ActionResponseProperties + JSON401 *AuthorizationError +} + +// Status returns HTTPResponse.Status +func (r LegacyGetConnectorsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r LegacyGetConnectorsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type LegacyCreateConnectorResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ActionResponseProperties + JSON401 *AuthorizationError +} + +// Status returns HTTPResponse.Status +func (r LegacyCreateConnectorResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r LegacyCreateConnectorResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type LegacyDeleteConnectorResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *AuthorizationError +} + +// Status returns HTTPResponse.Status +func (r LegacyDeleteConnectorResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r LegacyDeleteConnectorResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type LegacyGetConnectorResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ActionResponseProperties + JSON401 *AuthorizationError +} + +// Status returns HTTPResponse.Status +func (r LegacyGetConnectorResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r LegacyGetConnectorResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type LegacyUpdateConnectorResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ActionResponseProperties + JSON404 *ObjectNotFoundError +} + +// Status returns HTTPResponse.Status +func (r LegacyUpdateConnectorResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r LegacyUpdateConnectorResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type LegacyRunConnectorResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *LegacyRunConnectorGeneralResponse + JSON401 *AuthorizationError +} + +// Status returns HTTPResponse.Status +func (r LegacyRunConnectorResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r LegacyRunConnectorResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateConnectorResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ConnectorResponseProperties + JSON400 *BadRequestError + JSON401 *AuthorizationError +} + +// Status returns HTTPResponse.Status +func (r CreateConnectorResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateConnectorResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteConnectorResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *AuthorizationError + JSON404 *struct { + Error *string `json:"error,omitempty"` + Message *string `json:"message,omitempty"` + StatusCode *int `json:"statusCode,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r DeleteConnectorResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteConnectorResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetConnectorResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ConnectorResponseProperties + JSON401 *AuthorizationError + JSON404 *struct { + Error *string `json:"error,omitempty"` + Message *string `json:"message,omitempty"` + StatusCode *int `json:"statusCode,omitempty"` + } +} + +// Status returns HTTPResponse.Status +func (r GetConnectorResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetConnectorResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateConnectorResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ConnectorResponseProperties + JSON400 *BadRequestError + JSON401 *AuthorizationError + JSON404 *ObjectNotFoundError +} + +// Status returns HTTPResponse.Status +func (r UpdateConnectorResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateConnectorResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type RunConnectorResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *RunConnectorGeneralResponse + JSON401 *AuthorizationError +} + +// Status returns HTTPResponse.Status +func (r RunConnectorResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r RunConnectorResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetConnectorTypesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]struct { + // Enabled Indicates whether the connector type is enabled in Kibana. + Enabled *bool `json:"enabled,omitempty"` + + // EnabledInConfig Indicates whether the connector type is enabled in the Kibana `.yml` file. + EnabledInConfig *bool `json:"enabled_in_config,omitempty"` + + // EnabledInLicense Indicates whether the connector is enabled in the license. + EnabledInLicense *bool `json:"enabled_in_license,omitempty"` + + // Id The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`. + Id *ConnectorTypes `json:"id,omitempty"` + + // MinimumLicenseRequired The license that is required to use the connector type. + MinimumLicenseRequired *string `json:"minimum_license_required,omitempty"` + + // Name The name of the connector type. + Name *string `json:"name,omitempty"` + + // SupportedFeatureIds The Kibana features that are supported by the connector type. + SupportedFeatureIds *[]Features `json:"supported_feature_ids,omitempty"` + } + JSON401 *AuthorizationError +} + +// Status returns HTTPResponse.Status +func (r GetConnectorTypesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetConnectorTypesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetConnectorsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]struct { + // Config The configuration for the connector. Configuration properties vary depending on the connector type. + Config *map[string]interface{} `json:"config"` + + // ConnectorTypeId The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`. + ConnectorTypeId ConnectorTypes `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` + + // ReferencedByCount Indicates the number of saved objects that reference the connector. If `is_preconfigured` is true, this value is not calculated. + ReferencedByCount int `json:"referenced_by_count"` + } + JSON401 *AuthorizationError +} + +// Status returns HTTPResponse.Status +func (r GetConnectorsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetConnectorsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type LegacyGetConnectorTypesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *[]struct { + // Enabled Indicates whether the connector type is enabled in Kibana. + Enabled *bool `json:"enabled,omitempty"` + + // EnabledInConfig Indicates whether the connector type is enabled in the Kibana `.yml` file. + EnabledInConfig *bool `json:"enabledInConfig,omitempty"` + + // EnabledInLicense Indicates whether the connector is enabled in the license. + EnabledInLicense *bool `json:"enabledInLicense,omitempty"` + + // Id The unique identifier for the connector type. + Id *string `json:"id,omitempty"` + + // MinimumLicenseRequired The license that is required to use the connector type. + MinimumLicenseRequired *string `json:"minimumLicenseRequired,omitempty"` + + // Name The name of the connector type. + Name *string `json:"name,omitempty"` + } + JSON401 *AuthorizationError +} + +// Status returns HTTPResponse.Status +func (r LegacyGetConnectorTypesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r LegacyGetConnectorTypesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// LegacyGetConnectorsWithResponse request returning *LegacyGetConnectorsResponse +func (c *ClientWithResponses) LegacyGetConnectorsWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*LegacyGetConnectorsResponse, error) { + rsp, err := c.LegacyGetConnectors(ctx, spaceId, reqEditors...) + if err != nil { + return nil, err + } + return ParseLegacyGetConnectorsResponse(rsp) +} + +// LegacyCreateConnectorWithBodyWithResponse request with arbitrary body returning *LegacyCreateConnectorResponse +func (c *ClientWithResponses) LegacyCreateConnectorWithBodyWithResponse(ctx context.Context, spaceId SpaceId, params *LegacyCreateConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LegacyCreateConnectorResponse, error) { + rsp, err := c.LegacyCreateConnectorWithBody(ctx, spaceId, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseLegacyCreateConnectorResponse(rsp) +} + +func (c *ClientWithResponses) LegacyCreateConnectorWithResponse(ctx context.Context, spaceId SpaceId, params *LegacyCreateConnectorParams, body LegacyCreateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*LegacyCreateConnectorResponse, error) { + rsp, err := c.LegacyCreateConnector(ctx, spaceId, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseLegacyCreateConnectorResponse(rsp) +} + +// LegacyDeleteConnectorWithResponse request returning *LegacyDeleteConnectorResponse +func (c *ClientWithResponses) LegacyDeleteConnectorWithResponse(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyDeleteConnectorParams, reqEditors ...RequestEditorFn) (*LegacyDeleteConnectorResponse, error) { + rsp, err := c.LegacyDeleteConnector(ctx, spaceId, actionId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseLegacyDeleteConnectorResponse(rsp) +} + +// LegacyGetConnectorWithResponse request returning *LegacyGetConnectorResponse +func (c *ClientWithResponses) LegacyGetConnectorWithResponse(ctx context.Context, spaceId SpaceId, actionId ActionId, reqEditors ...RequestEditorFn) (*LegacyGetConnectorResponse, error) { + rsp, err := c.LegacyGetConnector(ctx, spaceId, actionId, reqEditors...) + if err != nil { + return nil, err + } + return ParseLegacyGetConnectorResponse(rsp) +} + +// LegacyUpdateConnectorWithBodyWithResponse request with arbitrary body returning *LegacyUpdateConnectorResponse +func (c *ClientWithResponses) LegacyUpdateConnectorWithBodyWithResponse(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyUpdateConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LegacyUpdateConnectorResponse, error) { + rsp, err := c.LegacyUpdateConnectorWithBody(ctx, spaceId, actionId, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseLegacyUpdateConnectorResponse(rsp) +} + +func (c *ClientWithResponses) LegacyUpdateConnectorWithResponse(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyUpdateConnectorParams, body LegacyUpdateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*LegacyUpdateConnectorResponse, error) { + rsp, err := c.LegacyUpdateConnector(ctx, spaceId, actionId, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseLegacyUpdateConnectorResponse(rsp) +} + +// LegacyRunConnectorWithBodyWithResponse request with arbitrary body returning *LegacyRunConnectorResponse +func (c *ClientWithResponses) LegacyRunConnectorWithBodyWithResponse(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyRunConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LegacyRunConnectorResponse, error) { + rsp, err := c.LegacyRunConnectorWithBody(ctx, spaceId, actionId, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseLegacyRunConnectorResponse(rsp) +} + +func (c *ClientWithResponses) LegacyRunConnectorWithResponse(ctx context.Context, spaceId SpaceId, actionId ActionId, params *LegacyRunConnectorParams, body LegacyRunConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*LegacyRunConnectorResponse, error) { + rsp, err := c.LegacyRunConnector(ctx, spaceId, actionId, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseLegacyRunConnectorResponse(rsp) +} + +// CreateConnectorWithBodyWithResponse request with arbitrary body returning *CreateConnectorResponse +func (c *ClientWithResponses) CreateConnectorWithBodyWithResponse(ctx context.Context, spaceId SpaceId, params *CreateConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateConnectorResponse, error) { + rsp, err := c.CreateConnectorWithBody(ctx, spaceId, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateConnectorResponse(rsp) +} + +func (c *ClientWithResponses) CreateConnectorWithResponse(ctx context.Context, spaceId SpaceId, params *CreateConnectorParams, body CreateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateConnectorResponse, error) { + rsp, err := c.CreateConnector(ctx, spaceId, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateConnectorResponse(rsp) +} + +// DeleteConnectorWithResponse request returning *DeleteConnectorResponse +func (c *ClientWithResponses) DeleteConnectorWithResponse(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *DeleteConnectorParams, reqEditors ...RequestEditorFn) (*DeleteConnectorResponse, error) { + rsp, err := c.DeleteConnector(ctx, spaceId, connectorId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteConnectorResponse(rsp) +} + +// GetConnectorWithResponse request returning *GetConnectorResponse +func (c *ClientWithResponses) GetConnectorWithResponse(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, reqEditors ...RequestEditorFn) (*GetConnectorResponse, error) { + rsp, err := c.GetConnector(ctx, spaceId, connectorId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetConnectorResponse(rsp) +} + +// UpdateConnectorWithBodyWithResponse request with arbitrary body returning *UpdateConnectorResponse +func (c *ClientWithResponses) UpdateConnectorWithBodyWithResponse(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *UpdateConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateConnectorResponse, error) { + rsp, err := c.UpdateConnectorWithBody(ctx, spaceId, connectorId, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateConnectorResponse(rsp) +} + +func (c *ClientWithResponses) UpdateConnectorWithResponse(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *UpdateConnectorParams, body UpdateConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateConnectorResponse, error) { + rsp, err := c.UpdateConnector(ctx, spaceId, connectorId, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateConnectorResponse(rsp) +} + +// RunConnectorWithBodyWithResponse request with arbitrary body returning *RunConnectorResponse +func (c *ClientWithResponses) RunConnectorWithBodyWithResponse(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *RunConnectorParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RunConnectorResponse, error) { + rsp, err := c.RunConnectorWithBody(ctx, spaceId, connectorId, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRunConnectorResponse(rsp) +} + +func (c *ClientWithResponses) RunConnectorWithResponse(ctx context.Context, spaceId SpaceId, connectorId ConnectorId, params *RunConnectorParams, body RunConnectorJSONRequestBody, reqEditors ...RequestEditorFn) (*RunConnectorResponse, error) { + rsp, err := c.RunConnector(ctx, spaceId, connectorId, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseRunConnectorResponse(rsp) +} + +// GetConnectorTypesWithResponse request returning *GetConnectorTypesResponse +func (c *ClientWithResponses) GetConnectorTypesWithResponse(ctx context.Context, spaceId SpaceId, params *GetConnectorTypesParams, reqEditors ...RequestEditorFn) (*GetConnectorTypesResponse, error) { + rsp, err := c.GetConnectorTypes(ctx, spaceId, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetConnectorTypesResponse(rsp) +} + +// GetConnectorsWithResponse request returning *GetConnectorsResponse +func (c *ClientWithResponses) GetConnectorsWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*GetConnectorsResponse, error) { + rsp, err := c.GetConnectors(ctx, spaceId, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetConnectorsResponse(rsp) +} + +// LegacyGetConnectorTypesWithResponse request returning *LegacyGetConnectorTypesResponse +func (c *ClientWithResponses) LegacyGetConnectorTypesWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*LegacyGetConnectorTypesResponse, error) { + rsp, err := c.LegacyGetConnectorTypes(ctx, spaceId, reqEditors...) + if err != nil { + return nil, err + } + return ParseLegacyGetConnectorTypesResponse(rsp) +} + +// ParseLegacyGetConnectorsResponse parses an HTTP response from a LegacyGetConnectorsWithResponse call +func ParseLegacyGetConnectorsResponse(rsp *http.Response) (*LegacyGetConnectorsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &LegacyGetConnectorsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []ActionResponseProperties + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest AuthorizationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + } + + return response, nil +} + +// ParseLegacyCreateConnectorResponse parses an HTTP response from a LegacyCreateConnectorWithResponse call +func ParseLegacyCreateConnectorResponse(rsp *http.Response) (*LegacyCreateConnectorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &LegacyCreateConnectorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ActionResponseProperties + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest AuthorizationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + } + + return response, nil +} + +// ParseLegacyDeleteConnectorResponse parses an HTTP response from a LegacyDeleteConnectorWithResponse call +func ParseLegacyDeleteConnectorResponse(rsp *http.Response) (*LegacyDeleteConnectorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &LegacyDeleteConnectorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest AuthorizationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + } + + return response, nil +} + +// ParseLegacyGetConnectorResponse parses an HTTP response from a LegacyGetConnectorWithResponse call +func ParseLegacyGetConnectorResponse(rsp *http.Response) (*LegacyGetConnectorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &LegacyGetConnectorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ActionResponseProperties + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest AuthorizationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + } + + return response, nil +} + +// ParseLegacyUpdateConnectorResponse parses an HTTP response from a LegacyUpdateConnectorWithResponse call +func ParseLegacyUpdateConnectorResponse(rsp *http.Response) (*LegacyUpdateConnectorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &LegacyUpdateConnectorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ActionResponseProperties + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest ObjectNotFoundError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + } + + return response, nil +} + +// ParseLegacyRunConnectorResponse parses an HTTP response from a LegacyRunConnectorWithResponse call +func ParseLegacyRunConnectorResponse(rsp *http.Response) (*LegacyRunConnectorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &LegacyRunConnectorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest LegacyRunConnectorGeneralResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest AuthorizationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + } + + return response, nil +} + +// ParseCreateConnectorResponse parses an HTTP response from a CreateConnectorWithResponse call +func ParseCreateConnectorResponse(rsp *http.Response) (*CreateConnectorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateConnectorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ConnectorResponseProperties + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequestError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest AuthorizationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + } + + return response, nil +} + +// ParseDeleteConnectorResponse parses an HTTP response from a DeleteConnectorWithResponse call +func ParseDeleteConnectorResponse(rsp *http.Response) (*DeleteConnectorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteConnectorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest AuthorizationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest struct { + Error *string `json:"error,omitempty"` + Message *string `json:"message,omitempty"` + StatusCode *int `json:"statusCode,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + } + + return response, nil +} + +// ParseGetConnectorResponse parses an HTTP response from a GetConnectorWithResponse call +func ParseGetConnectorResponse(rsp *http.Response) (*GetConnectorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetConnectorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ConnectorResponseProperties + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest AuthorizationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest struct { + Error *string `json:"error,omitempty"` + Message *string `json:"message,omitempty"` + StatusCode *int `json:"statusCode,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + } + + return response, nil +} + +// ParseUpdateConnectorResponse parses an HTTP response from a UpdateConnectorWithResponse call +func ParseUpdateConnectorResponse(rsp *http.Response) (*UpdateConnectorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &UpdateConnectorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ConnectorResponseProperties + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest BadRequestError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest AuthorizationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest ObjectNotFoundError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + } + + return response, nil +} + +// ParseRunConnectorResponse parses an HTTP response from a RunConnectorWithResponse call +func ParseRunConnectorResponse(rsp *http.Response) (*RunConnectorResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &RunConnectorResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest RunConnectorGeneralResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest AuthorizationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + } + + return response, nil +} + +// ParseGetConnectorTypesResponse parses an HTTP response from a GetConnectorTypesWithResponse call +func ParseGetConnectorTypesResponse(rsp *http.Response) (*GetConnectorTypesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetConnectorTypesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []struct { + // Enabled Indicates whether the connector type is enabled in Kibana. + Enabled *bool `json:"enabled,omitempty"` + + // EnabledInConfig Indicates whether the connector type is enabled in the Kibana `.yml` file. + EnabledInConfig *bool `json:"enabled_in_config,omitempty"` + + // EnabledInLicense Indicates whether the connector is enabled in the license. + EnabledInLicense *bool `json:"enabled_in_license,omitempty"` + + // Id The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`. + Id *ConnectorTypes `json:"id,omitempty"` + + // MinimumLicenseRequired The license that is required to use the connector type. + MinimumLicenseRequired *string `json:"minimum_license_required,omitempty"` + + // Name The name of the connector type. + Name *string `json:"name,omitempty"` + + // SupportedFeatureIds The Kibana features that are supported by the connector type. + SupportedFeatureIds *[]Features `json:"supported_feature_ids,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest AuthorizationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + } + + return response, nil +} + +// ParseGetConnectorsResponse parses an HTTP response from a GetConnectorsWithResponse call +func ParseGetConnectorsResponse(rsp *http.Response) (*GetConnectorsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetConnectorsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []struct { + // Config The configuration for the connector. Configuration properties vary depending on the connector type. + Config *map[string]interface{} `json:"config"` + + // ConnectorTypeId The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`. + ConnectorTypeId ConnectorTypes `json:"connector_type_id"` + + // Id The identifier for the connector. + Id string `json:"id"` + + // IsDeprecated Indicates whether the connector type is deprecated. + IsDeprecated *IsDeprecated `json:"is_deprecated,omitempty"` + + // IsMissingSecrets Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + IsMissingSecrets *IsMissingSecrets `json:"is_missing_secrets,omitempty"` + + // IsPreconfigured Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + IsPreconfigured IsPreconfigured `json:"is_preconfigured"` + + // Name The display name for the connector. + Name string `json:"name"` + + // ReferencedByCount Indicates the number of saved objects that reference the connector. If `is_preconfigured` is true, this value is not calculated. + ReferencedByCount int `json:"referenced_by_count"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest AuthorizationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + } + + return response, nil +} + +// ParseLegacyGetConnectorTypesResponse parses an HTTP response from a LegacyGetConnectorTypesWithResponse call +func ParseLegacyGetConnectorTypesResponse(rsp *http.Response) (*LegacyGetConnectorTypesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &LegacyGetConnectorTypesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest []struct { + // Enabled Indicates whether the connector type is enabled in Kibana. + Enabled *bool `json:"enabled,omitempty"` + + // EnabledInConfig Indicates whether the connector type is enabled in the Kibana `.yml` file. + EnabledInConfig *bool `json:"enabledInConfig,omitempty"` + + // EnabledInLicense Indicates whether the connector is enabled in the license. + EnabledInLicense *bool `json:"enabledInLicense,omitempty"` + + // Id The unique identifier for the connector type. + Id *string `json:"id,omitempty"` + + // MinimumLicenseRequired The license that is required to use the connector type. + MinimumLicenseRequired *string `json:"minimumLicenseRequired,omitempty"` + + // Name The name of the connector type. + Name *string `json:"name,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest AuthorizationError + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + } + + return response, nil +} diff --git a/generated/connectors/oas_cfg_gen.go b/generated/connectors/oas_cfg_gen.go deleted file mode 100644 index 66e05cfbe..000000000 --- a/generated/connectors/oas_cfg_gen.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package connectors - -import ( - "net/http" - - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/instrument" - "go.opentelemetry.io/otel/trace" - - ht "github.com/ogen-go/ogen/http" - "github.com/ogen-go/ogen/otelogen" -) - -var ( - // Allocate option closure once. - clientSpanKind = trace.WithSpanKind(trace.SpanKindClient) -) - -type ( - optionFunc[C any] func(*C) - otelOptionFunc func(*otelConfig) -) - -type otelConfig struct { - TracerProvider trace.TracerProvider - Tracer trace.Tracer - MeterProvider metric.MeterProvider - Meter metric.Meter -} - -func (cfg *otelConfig) initOTEL() { - if cfg.TracerProvider == nil { - cfg.TracerProvider = otel.GetTracerProvider() - } - if cfg.MeterProvider == nil { - cfg.MeterProvider = metric.NewNoopMeterProvider() - } - cfg.Tracer = cfg.TracerProvider.Tracer(otelogen.Name, - trace.WithInstrumentationVersion(otelogen.SemVersion()), - ) - cfg.Meter = cfg.MeterProvider.Meter(otelogen.Name) -} - -type clientConfig struct { - otelConfig - Client ht.Client -} - -// ClientOption is client config option. -type ClientOption interface { - applyClient(*clientConfig) -} - -var _ = []ClientOption{ - (optionFunc[clientConfig])(nil), - (otelOptionFunc)(nil), -} - -func (o optionFunc[C]) applyClient(c *C) { - o(c) -} - -func (o otelOptionFunc) applyClient(c *clientConfig) { - o(&c.otelConfig) -} - -func newClientConfig(opts ...ClientOption) clientConfig { - cfg := clientConfig{ - Client: http.DefaultClient, - } - for _, opt := range opts { - opt.applyClient(&cfg) - } - cfg.initOTEL() - return cfg -} - -type baseClient struct { - cfg clientConfig - requests instrument.Int64Counter - errors instrument.Int64Counter - duration instrument.Int64Histogram -} - -func (cfg clientConfig) baseClient() (c baseClient, err error) { - c = baseClient{cfg: cfg} - if c.requests, err = c.cfg.Meter.Int64Counter(otelogen.ClientRequestCount); err != nil { - return c, err - } - if c.errors, err = c.cfg.Meter.Int64Counter(otelogen.ClientErrorsCount); err != nil { - return c, err - } - if c.duration, err = c.cfg.Meter.Int64Histogram(otelogen.ClientDuration); err != nil { - return c, err - } - return c, nil -} - -// Option is config option. -type Option interface { - ClientOption -} - -// WithTracerProvider specifies a tracer provider to use for creating a tracer. -// -// If none is specified, the global provider is used. -func WithTracerProvider(provider trace.TracerProvider) Option { - return otelOptionFunc(func(cfg *otelConfig) { - if provider != nil { - cfg.TracerProvider = provider - } - }) -} - -// WithMeterProvider specifies a meter provider to use for creating a meter. -// -// If none is specified, the metric.NewNoopMeterProvider is used. -func WithMeterProvider(provider metric.MeterProvider) Option { - return otelOptionFunc(func(cfg *otelConfig) { - if provider != nil { - cfg.MeterProvider = provider - } - }) -} - -// WithClient specifies http client to use. -func WithClient(client ht.Client) ClientOption { - return optionFunc[clientConfig](func(cfg *clientConfig) { - if client != nil { - cfg.Client = client - } - }) -} diff --git a/generated/connectors/oas_client_gen.go b/generated/connectors/oas_client_gen.go deleted file mode 100644 index d648a7e3e..000000000 --- a/generated/connectors/oas_client_gen.go +++ /dev/null @@ -1,2109 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package connectors - -import ( - "context" - "net/url" - "strings" - "time" - - "github.com/go-faster/errors" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/trace" - - "github.com/ogen-go/ogen/conv" - ht "github.com/ogen-go/ogen/http" - "github.com/ogen-go/ogen/ogenerrors" - "github.com/ogen-go/ogen/otelogen" - "github.com/ogen-go/ogen/uri" -) - -// Client implements OAS client. -type Client struct { - serverURL *url.URL - sec SecuritySource - baseClient -} - -func trimTrailingSlashes(u *url.URL) { - u.Path = strings.TrimRight(u.Path, "/") - u.RawPath = strings.TrimRight(u.RawPath, "/") -} - -// NewClient initializes new Client defined by OAS. -func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error) { - u, err := url.Parse(serverURL) - if err != nil { - return nil, err - } - trimTrailingSlashes(u) - - c, err := newClientConfig(opts...).baseClient() - if err != nil { - return nil, err - } - return &Client{ - serverURL: u, - sec: sec, - baseClient: c, - }, nil -} - -type serverURLKey struct{} - -// WithServerURL sets context key to override server URL. -func WithServerURL(ctx context.Context, u *url.URL) context.Context { - return context.WithValue(ctx, serverURLKey{}, u) -} - -func (c *Client) requestURL(ctx context.Context) *url.URL { - u, ok := ctx.Value(serverURLKey{}).(*url.URL) - if !ok { - return c.serverURL - } - return u -} - -// CreateConnector invokes createConnector operation. -// -// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** -// section of the Kibana feature privileges. -// -// POST /s/{spaceId}/api/actions/connector -func (c *Client) CreateConnector(ctx context.Context, request CreateConnectorReq, params CreateConnectorParams) (CreateConnectorRes, error) { - res, err := c.sendCreateConnector(ctx, request, params) - _ = res - return res, err -} - -func (c *Client) sendCreateConnector(ctx context.Context, request CreateConnectorReq, params CreateConnectorParams) (res CreateConnectorRes, err error) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("createConnector"), - } - // Validate request before sending. - if err := func() error { - if err := request.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "validate") - } - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, otelAttrs...) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "CreateConnector", - trace.WithAttributes(otelAttrs...), - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, otelAttrs...) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [3]string - pathParts[0] = "/s/" - { - // Encode "spaceId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "spaceId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.SpaceId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/api/actions/connector" - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "POST", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - if err := encodeCreateConnectorRequest(request, r); err != nil { - return res, errors.Wrap(err, "encode request") - } - - stage = "EncodeHeaderParams" - h := uri.NewHeaderEncoder(r.Header) - { - cfg := uri.HeaderParameterEncodingConfig{ - Name: "kbn-xsrf", - Explode: false, - } - if err := h.EncodeParam(cfg, func(e uri.Encoder) error { - return e.EncodeValue(conv.StringToString(params.KbnXSRF)) - }); err != nil { - return res, errors.Wrap(err, "encode header") - } - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:BasicAuth" - switch err := c.securityBasicAuth(ctx, "CreateConnector", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"BasicAuth\"") - } - } - { - stage = "Security:ApiKeyAuth" - switch err := c.securityApiKeyAuth(ctx, "CreateConnector", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 1 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"ApiKeyAuth\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, errors.New("no security requirement satisfied") - } - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeCreateConnectorResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} - -// DeleteConnector invokes deleteConnector operation. -// -// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** -// section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be -// recovered. -// -// DELETE /s/{spaceId}/api/actions/connector/{connectorId} -func (c *Client) DeleteConnector(ctx context.Context, params DeleteConnectorParams) (DeleteConnectorRes, error) { - res, err := c.sendDeleteConnector(ctx, params) - _ = res - return res, err -} - -func (c *Client) sendDeleteConnector(ctx context.Context, params DeleteConnectorParams) (res DeleteConnectorRes, err error) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("deleteConnector"), - } - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, otelAttrs...) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "DeleteConnector", - trace.WithAttributes(otelAttrs...), - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, otelAttrs...) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [4]string - pathParts[0] = "/s/" - { - // Encode "spaceId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "spaceId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.SpaceId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/api/actions/connector/" - { - // Encode "connectorId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "connectorId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.ConnectorId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[3] = encoded - } - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "DELETE", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - - stage = "EncodeHeaderParams" - h := uri.NewHeaderEncoder(r.Header) - { - cfg := uri.HeaderParameterEncodingConfig{ - Name: "kbn-xsrf", - Explode: false, - } - if err := h.EncodeParam(cfg, func(e uri.Encoder) error { - return e.EncodeValue(conv.StringToString(params.KbnXSRF)) - }); err != nil { - return res, errors.Wrap(err, "encode header") - } - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:BasicAuth" - switch err := c.securityBasicAuth(ctx, "DeleteConnector", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"BasicAuth\"") - } - } - { - stage = "Security:ApiKeyAuth" - switch err := c.securityApiKeyAuth(ctx, "DeleteConnector", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 1 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"ApiKeyAuth\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, errors.New("no security requirement satisfied") - } - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeDeleteConnectorResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} - -// GetConnector invokes getConnector operation. -// -// You must have `read` privileges for the **Actions and Connectors** feature in the **Management** -// section of the Kibana feature privileges. -// -// GET /s/{spaceId}/api/actions/connector/{connectorId} -func (c *Client) GetConnector(ctx context.Context, params GetConnectorParams) (GetConnectorRes, error) { - res, err := c.sendGetConnector(ctx, params) - _ = res - return res, err -} - -func (c *Client) sendGetConnector(ctx context.Context, params GetConnectorParams) (res GetConnectorRes, err error) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("getConnector"), - } - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, otelAttrs...) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "GetConnector", - trace.WithAttributes(otelAttrs...), - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, otelAttrs...) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [4]string - pathParts[0] = "/s/" - { - // Encode "spaceId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "spaceId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.SpaceId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/api/actions/connector/" - { - // Encode "connectorId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "connectorId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.ConnectorId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[3] = encoded - } - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "GET", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:BasicAuth" - switch err := c.securityBasicAuth(ctx, "GetConnector", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"BasicAuth\"") - } - } - { - stage = "Security:ApiKeyAuth" - switch err := c.securityApiKeyAuth(ctx, "GetConnector", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 1 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"ApiKeyAuth\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, errors.New("no security requirement satisfied") - } - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeGetConnectorResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} - -// GetConnectorTypes invokes getConnectorTypes operation. -// -// You do not need any Kibana feature privileges to run this API. -// -// GET /s/{spaceId}/api/actions/connector_types -func (c *Client) GetConnectorTypes(ctx context.Context, params GetConnectorTypesParams) (GetConnectorTypesRes, error) { - res, err := c.sendGetConnectorTypes(ctx, params) - _ = res - return res, err -} - -func (c *Client) sendGetConnectorTypes(ctx context.Context, params GetConnectorTypesParams) (res GetConnectorTypesRes, err error) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("getConnectorTypes"), - } - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, otelAttrs...) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "GetConnectorTypes", - trace.WithAttributes(otelAttrs...), - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, otelAttrs...) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [3]string - pathParts[0] = "/s/" - { - // Encode "spaceId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "spaceId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.SpaceId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/api/actions/connector_types" - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeQueryParams" - q := uri.NewQueryEncoder() - { - // Encode "feature_id" parameter. - cfg := uri.QueryParameterEncodingConfig{ - Name: "feature_id", - Style: uri.QueryStyleForm, - Explode: true, - } - - if err := q.EncodeParam(cfg, func(e uri.Encoder) error { - if val, ok := params.FeatureID.Get(); ok { - return e.EncodeValue(conv.StringToString(string(val))) - } - return nil - }); err != nil { - return res, errors.Wrap(err, "encode query") - } - } - u.RawQuery = q.Values().Encode() - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "GET", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:BasicAuth" - switch err := c.securityBasicAuth(ctx, "GetConnectorTypes", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"BasicAuth\"") - } - } - { - stage = "Security:ApiKeyAuth" - switch err := c.securityApiKeyAuth(ctx, "GetConnectorTypes", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 1 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"ApiKeyAuth\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, errors.New("no security requirement satisfied") - } - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeGetConnectorTypesResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} - -// GetConnectors invokes getConnectors operation. -// -// You must have `read` privileges for the **Actions and Connectors** feature in the **Management** -// section of the Kibana feature privileges. -// -// GET /s/{spaceId}/api/actions/connectors -func (c *Client) GetConnectors(ctx context.Context, params GetConnectorsParams) (GetConnectorsRes, error) { - res, err := c.sendGetConnectors(ctx, params) - _ = res - return res, err -} - -func (c *Client) sendGetConnectors(ctx context.Context, params GetConnectorsParams) (res GetConnectorsRes, err error) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("getConnectors"), - } - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, otelAttrs...) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "GetConnectors", - trace.WithAttributes(otelAttrs...), - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, otelAttrs...) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [3]string - pathParts[0] = "/s/" - { - // Encode "spaceId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "spaceId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.SpaceId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/api/actions/connectors" - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "GET", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:BasicAuth" - switch err := c.securityBasicAuth(ctx, "GetConnectors", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"BasicAuth\"") - } - } - { - stage = "Security:ApiKeyAuth" - switch err := c.securityApiKeyAuth(ctx, "GetConnectors", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 1 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"ApiKeyAuth\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, errors.New("no security requirement satisfied") - } - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeGetConnectorsResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} - -// LegacyCreateConnector invokes legacyCreateConnector operation. -// -// Deprecated in 7.13.0. Use the create connector API instead. -// -// Deprecated: schema marks this operation as deprecated. -// -// POST /s/{spaceId}/api/actions -func (c *Client) LegacyCreateConnector(ctx context.Context, request *LegacyCreateConnectorReq, params LegacyCreateConnectorParams) (LegacyCreateConnectorRes, error) { - res, err := c.sendLegacyCreateConnector(ctx, request, params) - _ = res - return res, err -} - -func (c *Client) sendLegacyCreateConnector(ctx context.Context, request *LegacyCreateConnectorReq, params LegacyCreateConnectorParams) (res LegacyCreateConnectorRes, err error) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("legacyCreateConnector"), - } - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, otelAttrs...) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "LegacyCreateConnector", - trace.WithAttributes(otelAttrs...), - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, otelAttrs...) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [3]string - pathParts[0] = "/s/" - { - // Encode "spaceId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "spaceId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.SpaceId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/api/actions" - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "POST", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - if err := encodeLegacyCreateConnectorRequest(request, r); err != nil { - return res, errors.Wrap(err, "encode request") - } - - stage = "EncodeHeaderParams" - h := uri.NewHeaderEncoder(r.Header) - { - cfg := uri.HeaderParameterEncodingConfig{ - Name: "kbn-xsrf", - Explode: false, - } - if err := h.EncodeParam(cfg, func(e uri.Encoder) error { - return e.EncodeValue(conv.StringToString(params.KbnXSRF)) - }); err != nil { - return res, errors.Wrap(err, "encode header") - } - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:BasicAuth" - switch err := c.securityBasicAuth(ctx, "LegacyCreateConnector", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"BasicAuth\"") - } - } - { - stage = "Security:ApiKeyAuth" - switch err := c.securityApiKeyAuth(ctx, "LegacyCreateConnector", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 1 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"ApiKeyAuth\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, errors.New("no security requirement satisfied") - } - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeLegacyCreateConnectorResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} - -// LegacyDeleteConnector invokes legacyDeleteConnector operation. -// -// Deprecated in 7.13.0. Use the delete connector API instead. WARNING: When you delete a connector, -// it cannot be recovered. -// -// Deprecated: schema marks this operation as deprecated. -// -// DELETE /s/{spaceId}/api/actions/action/{actionId} -func (c *Client) LegacyDeleteConnector(ctx context.Context, params LegacyDeleteConnectorParams) (LegacyDeleteConnectorRes, error) { - res, err := c.sendLegacyDeleteConnector(ctx, params) - _ = res - return res, err -} - -func (c *Client) sendLegacyDeleteConnector(ctx context.Context, params LegacyDeleteConnectorParams) (res LegacyDeleteConnectorRes, err error) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("legacyDeleteConnector"), - } - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, otelAttrs...) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "LegacyDeleteConnector", - trace.WithAttributes(otelAttrs...), - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, otelAttrs...) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [4]string - pathParts[0] = "/s/" - { - // Encode "spaceId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "spaceId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.SpaceId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/api/actions/action/" - { - // Encode "actionId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "actionId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.ActionId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[3] = encoded - } - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "DELETE", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - - stage = "EncodeHeaderParams" - h := uri.NewHeaderEncoder(r.Header) - { - cfg := uri.HeaderParameterEncodingConfig{ - Name: "kbn-xsrf", - Explode: false, - } - if err := h.EncodeParam(cfg, func(e uri.Encoder) error { - return e.EncodeValue(conv.StringToString(params.KbnXSRF)) - }); err != nil { - return res, errors.Wrap(err, "encode header") - } - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:BasicAuth" - switch err := c.securityBasicAuth(ctx, "LegacyDeleteConnector", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"BasicAuth\"") - } - } - { - stage = "Security:ApiKeyAuth" - switch err := c.securityApiKeyAuth(ctx, "LegacyDeleteConnector", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 1 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"ApiKeyAuth\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, errors.New("no security requirement satisfied") - } - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeLegacyDeleteConnectorResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} - -// LegacyGetConnector invokes legacyGetConnector operation. -// -// Deprecated in 7.13.0. Use the get connector API instead. -// -// Deprecated: schema marks this operation as deprecated. -// -// GET /s/{spaceId}/api/actions/action/{actionId} -func (c *Client) LegacyGetConnector(ctx context.Context, params LegacyGetConnectorParams) (LegacyGetConnectorRes, error) { - res, err := c.sendLegacyGetConnector(ctx, params) - _ = res - return res, err -} - -func (c *Client) sendLegacyGetConnector(ctx context.Context, params LegacyGetConnectorParams) (res LegacyGetConnectorRes, err error) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("legacyGetConnector"), - } - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, otelAttrs...) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "LegacyGetConnector", - trace.WithAttributes(otelAttrs...), - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, otelAttrs...) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [4]string - pathParts[0] = "/s/" - { - // Encode "spaceId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "spaceId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.SpaceId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/api/actions/action/" - { - // Encode "actionId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "actionId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.ActionId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[3] = encoded - } - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "GET", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:BasicAuth" - switch err := c.securityBasicAuth(ctx, "LegacyGetConnector", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"BasicAuth\"") - } - } - { - stage = "Security:ApiKeyAuth" - switch err := c.securityApiKeyAuth(ctx, "LegacyGetConnector", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 1 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"ApiKeyAuth\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, errors.New("no security requirement satisfied") - } - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeLegacyGetConnectorResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} - -// LegacyGetConnectorTypes invokes legacyGetConnectorTypes operation. -// -// Deprecated in 7.13.0. Use the get all connector types API instead. -// -// Deprecated: schema marks this operation as deprecated. -// -// GET /s/{spaceId}/api/actions/list_action_types -func (c *Client) LegacyGetConnectorTypes(ctx context.Context, params LegacyGetConnectorTypesParams) (LegacyGetConnectorTypesRes, error) { - res, err := c.sendLegacyGetConnectorTypes(ctx, params) - _ = res - return res, err -} - -func (c *Client) sendLegacyGetConnectorTypes(ctx context.Context, params LegacyGetConnectorTypesParams) (res LegacyGetConnectorTypesRes, err error) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("legacyGetConnectorTypes"), - } - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, otelAttrs...) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "LegacyGetConnectorTypes", - trace.WithAttributes(otelAttrs...), - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, otelAttrs...) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [3]string - pathParts[0] = "/s/" - { - // Encode "spaceId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "spaceId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.SpaceId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/api/actions/list_action_types" - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "GET", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:BasicAuth" - switch err := c.securityBasicAuth(ctx, "LegacyGetConnectorTypes", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"BasicAuth\"") - } - } - { - stage = "Security:ApiKeyAuth" - switch err := c.securityApiKeyAuth(ctx, "LegacyGetConnectorTypes", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 1 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"ApiKeyAuth\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, errors.New("no security requirement satisfied") - } - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeLegacyGetConnectorTypesResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} - -// LegacyGetConnectors invokes legacyGetConnectors operation. -// -// Deprecated in 7.13.0. Use the get all connectors API instead. -// -// Deprecated: schema marks this operation as deprecated. -// -// GET /s/{spaceId}/api/actions -func (c *Client) LegacyGetConnectors(ctx context.Context, params LegacyGetConnectorsParams) (LegacyGetConnectorsRes, error) { - res, err := c.sendLegacyGetConnectors(ctx, params) - _ = res - return res, err -} - -func (c *Client) sendLegacyGetConnectors(ctx context.Context, params LegacyGetConnectorsParams) (res LegacyGetConnectorsRes, err error) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("legacyGetConnectors"), - } - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, otelAttrs...) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "LegacyGetConnectors", - trace.WithAttributes(otelAttrs...), - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, otelAttrs...) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [3]string - pathParts[0] = "/s/" - { - // Encode "spaceId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "spaceId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.SpaceId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/api/actions" - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "GET", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:BasicAuth" - switch err := c.securityBasicAuth(ctx, "LegacyGetConnectors", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"BasicAuth\"") - } - } - { - stage = "Security:ApiKeyAuth" - switch err := c.securityApiKeyAuth(ctx, "LegacyGetConnectors", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 1 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"ApiKeyAuth\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, errors.New("no security requirement satisfied") - } - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeLegacyGetConnectorsResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} - -// LegacyRunConnector invokes legacyRunConnector operation. -// -// Deprecated in 7.13.0. Use the run connector API instead. -// -// Deprecated: schema marks this operation as deprecated. -// -// POST /s/{spaceId}/api/actions/action/{actionId}/_execute -func (c *Client) LegacyRunConnector(ctx context.Context, request *LegacyRunConnectorReq, params LegacyRunConnectorParams) (LegacyRunConnectorRes, error) { - res, err := c.sendLegacyRunConnector(ctx, request, params) - _ = res - return res, err -} - -func (c *Client) sendLegacyRunConnector(ctx context.Context, request *LegacyRunConnectorReq, params LegacyRunConnectorParams) (res LegacyRunConnectorRes, err error) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("legacyRunConnector"), - } - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, otelAttrs...) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "LegacyRunConnector", - trace.WithAttributes(otelAttrs...), - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, otelAttrs...) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [5]string - pathParts[0] = "/s/" - { - // Encode "spaceId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "spaceId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.SpaceId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/api/actions/action/" - { - // Encode "actionId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "actionId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.ActionId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[3] = encoded - } - pathParts[4] = "/_execute" - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "POST", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - if err := encodeLegacyRunConnectorRequest(request, r); err != nil { - return res, errors.Wrap(err, "encode request") - } - - stage = "EncodeHeaderParams" - h := uri.NewHeaderEncoder(r.Header) - { - cfg := uri.HeaderParameterEncodingConfig{ - Name: "kbn-xsrf", - Explode: false, - } - if err := h.EncodeParam(cfg, func(e uri.Encoder) error { - return e.EncodeValue(conv.StringToString(params.KbnXSRF)) - }); err != nil { - return res, errors.Wrap(err, "encode header") - } - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:BasicAuth" - switch err := c.securityBasicAuth(ctx, "LegacyRunConnector", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"BasicAuth\"") - } - } - { - stage = "Security:ApiKeyAuth" - switch err := c.securityApiKeyAuth(ctx, "LegacyRunConnector", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 1 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"ApiKeyAuth\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, errors.New("no security requirement satisfied") - } - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeLegacyRunConnectorResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} - -// LegacyUpdateConnector invokes legacyUpdateConnector operation. -// -// Deprecated in 7.13.0. Use the update connector API instead. -// -// Deprecated: schema marks this operation as deprecated. -// -// PUT /s/{spaceId}/api/actions/action/{actionId} -func (c *Client) LegacyUpdateConnector(ctx context.Context, request *LegacyUpdateConnectorReq, params LegacyUpdateConnectorParams) (LegacyUpdateConnectorRes, error) { - res, err := c.sendLegacyUpdateConnector(ctx, request, params) - _ = res - return res, err -} - -func (c *Client) sendLegacyUpdateConnector(ctx context.Context, request *LegacyUpdateConnectorReq, params LegacyUpdateConnectorParams) (res LegacyUpdateConnectorRes, err error) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("legacyUpdateConnector"), - } - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, otelAttrs...) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "LegacyUpdateConnector", - trace.WithAttributes(otelAttrs...), - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, otelAttrs...) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [4]string - pathParts[0] = "/s/" - { - // Encode "spaceId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "spaceId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.SpaceId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/api/actions/action/" - { - // Encode "actionId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "actionId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.ActionId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[3] = encoded - } - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "PUT", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - if err := encodeLegacyUpdateConnectorRequest(request, r); err != nil { - return res, errors.Wrap(err, "encode request") - } - - stage = "EncodeHeaderParams" - h := uri.NewHeaderEncoder(r.Header) - { - cfg := uri.HeaderParameterEncodingConfig{ - Name: "kbn-xsrf", - Explode: false, - } - if err := h.EncodeParam(cfg, func(e uri.Encoder) error { - return e.EncodeValue(conv.StringToString(params.KbnXSRF)) - }); err != nil { - return res, errors.Wrap(err, "encode header") - } - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:BasicAuth" - switch err := c.securityBasicAuth(ctx, "LegacyUpdateConnector", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"BasicAuth\"") - } - } - { - stage = "Security:ApiKeyAuth" - switch err := c.securityApiKeyAuth(ctx, "LegacyUpdateConnector", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 1 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"ApiKeyAuth\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, errors.New("no security requirement satisfied") - } - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeLegacyUpdateConnectorResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} - -// UpdateConnector invokes updateConnector operation. -// -// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** -// section of the Kibana feature privileges. -// -// PUT /s/{spaceId}/api/actions/connector/{connectorId} -func (c *Client) UpdateConnector(ctx context.Context, request UpdateConnectorReq, params UpdateConnectorParams) (UpdateConnectorRes, error) { - res, err := c.sendUpdateConnector(ctx, request, params) - _ = res - return res, err -} - -func (c *Client) sendUpdateConnector(ctx context.Context, request UpdateConnectorReq, params UpdateConnectorParams) (res UpdateConnectorRes, err error) { - otelAttrs := []attribute.KeyValue{ - otelogen.OperationID("updateConnector"), - } - // Validate request before sending. - if err := func() error { - if err := request.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "validate") - } - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), otelAttrs...) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, otelAttrs...) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "UpdateConnector", - trace.WithAttributes(otelAttrs...), - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, otelAttrs...) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [4]string - pathParts[0] = "/s/" - { - // Encode "spaceId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "spaceId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.SpaceId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/api/actions/connector/" - { - // Encode "connectorId" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "connectorId", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.ConnectorId)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[3] = encoded - } - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "PUT", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - if err := encodeUpdateConnectorRequest(request, r); err != nil { - return res, errors.Wrap(err, "encode request") - } - - stage = "EncodeHeaderParams" - h := uri.NewHeaderEncoder(r.Header) - { - cfg := uri.HeaderParameterEncodingConfig{ - Name: "kbn-xsrf", - Explode: false, - } - if err := h.EncodeParam(cfg, func(e uri.Encoder) error { - return e.EncodeValue(conv.StringToString(params.KbnXSRF)) - }); err != nil { - return res, errors.Wrap(err, "encode header") - } - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:BasicAuth" - switch err := c.securityBasicAuth(ctx, "UpdateConnector", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"BasicAuth\"") - } - } - { - stage = "Security:ApiKeyAuth" - switch err := c.securityApiKeyAuth(ctx, "UpdateConnector", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 1 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"ApiKeyAuth\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - {0b00000010}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, errors.New("no security requirement satisfied") - } - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeUpdateConnectorResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} diff --git a/generated/connectors/oas_defaults_gen.go b/generated/connectors/oas_defaults_gen.go deleted file mode 100644 index 085b77475..000000000 --- a/generated/connectors/oas_defaults_gen.go +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package connectors - -// setDefaults set default value of fields. -func (s *ConfigPropertiesCasesWebhook) setDefaults() { - { - val := ConfigPropertiesCasesWebhookCreateCommentMethod("put") - s.CreateCommentMethod.SetTo(val) - } - { - val := ConfigPropertiesCasesWebhookCreateIncidentMethod("post") - s.CreateIncidentMethod.SetTo(val) - } - { - val := bool(true) - s.HasAuth.SetTo(val) - } - { - val := ConfigPropertiesCasesWebhookUpdateIncidentMethod("put") - s.UpdateIncidentMethod.SetTo(val) - } -} - -// setDefaults set default value of fields. -func (s *ConfigPropertiesIndex) setDefaults() { - { - s.ExecutionTimeField.Null = true - } - { - val := bool(false) - s.Refresh.SetTo(val) - } -} - -// setDefaults set default value of fields. -func (s *ConfigPropertiesServicenow) setDefaults() { - { - val := bool(false) - s.IsOAuth.SetTo(val) - } - { - val := bool(true) - s.UsesTableApi.SetTo(val) - } -} - -// setDefaults set default value of fields. -func (s *ConfigPropertiesServicenowItom) setDefaults() { - { - val := bool(false) - s.IsOAuth.SetTo(val) - } -} - -// setDefaults set default value of fields. -func (s *GetConnectorsOKItem) setDefaults() { - { - val := int(0) - s.ReferencedByCount = val - } -} diff --git a/generated/connectors/oas_interfaces_gen.go b/generated/connectors/oas_interfaces_gen.go deleted file mode 100644 index 840a11a9f..000000000 --- a/generated/connectors/oas_interfaces_gen.go +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. -package connectors - -type CreateConnectorRes interface { - createConnectorRes() -} - -type DeleteConnectorRes interface { - deleteConnectorRes() -} - -type GetConnectorRes interface { - getConnectorRes() -} - -type GetConnectorTypesRes interface { - getConnectorTypesRes() -} - -type GetConnectorsRes interface { - getConnectorsRes() -} - -type LegacyCreateConnectorRes interface { - legacyCreateConnectorRes() -} - -type LegacyDeleteConnectorRes interface { - legacyDeleteConnectorRes() -} - -type LegacyGetConnectorRes interface { - legacyGetConnectorRes() -} - -type LegacyGetConnectorTypesRes interface { - legacyGetConnectorTypesRes() -} - -type LegacyGetConnectorsRes interface { - legacyGetConnectorsRes() -} - -type LegacyRunConnectorRes interface { - legacyRunConnectorRes() -} - -type LegacyUpdateConnectorRes interface { - legacyUpdateConnectorRes() -} - -type UpdateConnectorRes interface { - updateConnectorRes() -} diff --git a/generated/connectors/oas_json_gen.go b/generated/connectors/oas_json_gen.go deleted file mode 100644 index 107358d7f..000000000 --- a/generated/connectors/oas_json_gen.go +++ /dev/null @@ -1,14547 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package connectors - -import ( - "math/bits" - "strconv" - - "github.com/go-faster/errors" - "github.com/go-faster/jx" - - "github.com/ogen-go/ogen/validate" -) - -// Encode implements json.Marshaler. -func (s *ActionResponseProperties) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ActionResponseProperties) encodeFields(e *jx.Encoder) { - { - if s.ActionTypeId.Set { - e.FieldStart("actionTypeId") - s.ActionTypeId.Encode(e) - } - } - { - if s.Config != nil { - e.FieldStart("config") - s.Config.Encode(e) - } - } - { - if s.ID.Set { - e.FieldStart("id") - s.ID.Encode(e) - } - } - { - if s.IsDeprecated.Set { - e.FieldStart("isDeprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("isMissingSecrets") - s.IsMissingSecrets.Encode(e) - } - } - { - if s.IsPreconfigured.Set { - e.FieldStart("isPreconfigured") - s.IsPreconfigured.Encode(e) - } - } - { - if s.Name.Set { - e.FieldStart("name") - s.Name.Encode(e) - } - } -} - -var jsonFieldsNameOfActionResponseProperties = [7]string{ - 0: "actionTypeId", - 1: "config", - 2: "id", - 3: "isDeprecated", - 4: "isMissingSecrets", - 5: "isPreconfigured", - 6: "name", -} - -// Decode decodes ActionResponseProperties from json. -func (s *ActionResponseProperties) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ActionResponseProperties to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "actionTypeId": - if err := func() error { - s.ActionTypeId.Reset() - if err := s.ActionTypeId.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"actionTypeId\"") - } - case "config": - if err := func() error { - s.Config = nil - var elem ActionResponsePropertiesConfig - if err := elem.Decode(d); err != nil { - return err - } - s.Config = &elem - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "id": - if err := func() error { - s.ID.Reset() - if err := s.ID.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "isDeprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"isDeprecated\"") - } - case "isMissingSecrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"isMissingSecrets\"") - } - case "isPreconfigured": - if err := func() error { - s.IsPreconfigured.Reset() - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"isPreconfigured\"") - } - case "name": - if err := func() error { - s.Name.Reset() - if err := s.Name.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ActionResponseProperties") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ActionResponseProperties) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ActionResponseProperties) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ActionResponsePropertiesConfig) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ActionResponsePropertiesConfig) encodeFields(e *jx.Encoder) { -} - -var jsonFieldsNameOfActionResponsePropertiesConfig = [0]string{} - -// Decode decodes ActionResponsePropertiesConfig from json. -func (s *ActionResponsePropertiesConfig) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ActionResponsePropertiesConfig to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ActionResponsePropertiesConfig") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ActionResponsePropertiesConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ActionResponsePropertiesConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConfigPropertiesCasesWebhook) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConfigPropertiesCasesWebhook) encodeFields(e *jx.Encoder) { - { - if s.CreateCommentJson.Set { - e.FieldStart("createCommentJson") - s.CreateCommentJson.Encode(e) - } - } - { - if s.CreateCommentMethod.Set { - e.FieldStart("createCommentMethod") - s.CreateCommentMethod.Encode(e) - } - } - { - if s.CreateCommentUrl.Set { - e.FieldStart("createCommentUrl") - s.CreateCommentUrl.Encode(e) - } - } - { - e.FieldStart("createIncidentJson") - e.Str(s.CreateIncidentJson) - } - { - if s.CreateIncidentMethod.Set { - e.FieldStart("createIncidentMethod") - s.CreateIncidentMethod.Encode(e) - } - } - { - e.FieldStart("createIncidentResponseKey") - e.Str(s.CreateIncidentResponseKey) - } - { - e.FieldStart("createIncidentUrl") - e.Str(s.CreateIncidentUrl) - } - { - e.FieldStart("getIncidentResponseExternalTitleKey") - e.Str(s.GetIncidentResponseExternalTitleKey) - } - { - e.FieldStart("getIncidentUrl") - e.Str(s.GetIncidentUrl) - } - { - if s.HasAuth.Set { - e.FieldStart("hasAuth") - s.HasAuth.Encode(e) - } - } - { - if s.Headers.Set { - e.FieldStart("headers") - s.Headers.Encode(e) - } - } - { - e.FieldStart("updateIncidentJson") - e.Str(s.UpdateIncidentJson) - } - { - if s.UpdateIncidentMethod.Set { - e.FieldStart("updateIncidentMethod") - s.UpdateIncidentMethod.Encode(e) - } - } - { - e.FieldStart("updateIncidentUrl") - e.Str(s.UpdateIncidentUrl) - } - { - e.FieldStart("viewIncidentUrl") - e.Str(s.ViewIncidentUrl) - } -} - -var jsonFieldsNameOfConfigPropertiesCasesWebhook = [15]string{ - 0: "createCommentJson", - 1: "createCommentMethod", - 2: "createCommentUrl", - 3: "createIncidentJson", - 4: "createIncidentMethod", - 5: "createIncidentResponseKey", - 6: "createIncidentUrl", - 7: "getIncidentResponseExternalTitleKey", - 8: "getIncidentUrl", - 9: "hasAuth", - 10: "headers", - 11: "updateIncidentJson", - 12: "updateIncidentMethod", - 13: "updateIncidentUrl", - 14: "viewIncidentUrl", -} - -// Decode decodes ConfigPropertiesCasesWebhook from json. -func (s *ConfigPropertiesCasesWebhook) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesCasesWebhook to nil") - } - var requiredBitSet [2]uint8 - s.setDefaults() - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "createCommentJson": - if err := func() error { - s.CreateCommentJson.Reset() - if err := s.CreateCommentJson.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"createCommentJson\"") - } - case "createCommentMethod": - if err := func() error { - s.CreateCommentMethod.Reset() - if err := s.CreateCommentMethod.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"createCommentMethod\"") - } - case "createCommentUrl": - if err := func() error { - s.CreateCommentUrl.Reset() - if err := s.CreateCommentUrl.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"createCommentUrl\"") - } - case "createIncidentJson": - requiredBitSet[0] |= 1 << 3 - if err := func() error { - v, err := d.Str() - s.CreateIncidentJson = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"createIncidentJson\"") - } - case "createIncidentMethod": - if err := func() error { - s.CreateIncidentMethod.Reset() - if err := s.CreateIncidentMethod.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"createIncidentMethod\"") - } - case "createIncidentResponseKey": - requiredBitSet[0] |= 1 << 5 - if err := func() error { - v, err := d.Str() - s.CreateIncidentResponseKey = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"createIncidentResponseKey\"") - } - case "createIncidentUrl": - requiredBitSet[0] |= 1 << 6 - if err := func() error { - v, err := d.Str() - s.CreateIncidentUrl = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"createIncidentUrl\"") - } - case "getIncidentResponseExternalTitleKey": - requiredBitSet[0] |= 1 << 7 - if err := func() error { - v, err := d.Str() - s.GetIncidentResponseExternalTitleKey = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"getIncidentResponseExternalTitleKey\"") - } - case "getIncidentUrl": - requiredBitSet[1] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.GetIncidentUrl = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"getIncidentUrl\"") - } - case "hasAuth": - if err := func() error { - s.HasAuth.Reset() - if err := s.HasAuth.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"hasAuth\"") - } - case "headers": - if err := func() error { - s.Headers.Reset() - if err := s.Headers.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"headers\"") - } - case "updateIncidentJson": - requiredBitSet[1] |= 1 << 3 - if err := func() error { - v, err := d.Str() - s.UpdateIncidentJson = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"updateIncidentJson\"") - } - case "updateIncidentMethod": - if err := func() error { - s.UpdateIncidentMethod.Reset() - if err := s.UpdateIncidentMethod.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"updateIncidentMethod\"") - } - case "updateIncidentUrl": - requiredBitSet[1] |= 1 << 5 - if err := func() error { - v, err := d.Str() - s.UpdateIncidentUrl = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"updateIncidentUrl\"") - } - case "viewIncidentUrl": - requiredBitSet[1] |= 1 << 6 - if err := func() error { - v, err := d.Str() - s.ViewIncidentUrl = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"viewIncidentUrl\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesCasesWebhook") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [2]uint8{ - 0b11101000, - 0b01101001, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConfigPropertiesCasesWebhook) { - name = jsonFieldsNameOfConfigPropertiesCasesWebhook[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConfigPropertiesCasesWebhook) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesCasesWebhook) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ConfigPropertiesCasesWebhookCreateCommentMethod as json. -func (s ConfigPropertiesCasesWebhookCreateCommentMethod) Encode(e *jx.Encoder) { - e.Str(string(s)) -} - -// Decode decodes ConfigPropertiesCasesWebhookCreateCommentMethod from json. -func (s *ConfigPropertiesCasesWebhookCreateCommentMethod) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesCasesWebhookCreateCommentMethod to nil") - } - v, err := d.StrBytes() - if err != nil { - return err - } - // Try to use constant string. - switch ConfigPropertiesCasesWebhookCreateCommentMethod(v) { - case ConfigPropertiesCasesWebhookCreateCommentMethodPatch: - *s = ConfigPropertiesCasesWebhookCreateCommentMethodPatch - case ConfigPropertiesCasesWebhookCreateCommentMethodPost: - *s = ConfigPropertiesCasesWebhookCreateCommentMethodPost - case ConfigPropertiesCasesWebhookCreateCommentMethodPut: - *s = ConfigPropertiesCasesWebhookCreateCommentMethodPut - default: - *s = ConfigPropertiesCasesWebhookCreateCommentMethod(v) - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s ConfigPropertiesCasesWebhookCreateCommentMethod) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesCasesWebhookCreateCommentMethod) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ConfigPropertiesCasesWebhookCreateIncidentMethod as json. -func (s ConfigPropertiesCasesWebhookCreateIncidentMethod) Encode(e *jx.Encoder) { - e.Str(string(s)) -} - -// Decode decodes ConfigPropertiesCasesWebhookCreateIncidentMethod from json. -func (s *ConfigPropertiesCasesWebhookCreateIncidentMethod) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesCasesWebhookCreateIncidentMethod to nil") - } - v, err := d.StrBytes() - if err != nil { - return err - } - // Try to use constant string. - switch ConfigPropertiesCasesWebhookCreateIncidentMethod(v) { - case ConfigPropertiesCasesWebhookCreateIncidentMethodPatch: - *s = ConfigPropertiesCasesWebhookCreateIncidentMethodPatch - case ConfigPropertiesCasesWebhookCreateIncidentMethodPost: - *s = ConfigPropertiesCasesWebhookCreateIncidentMethodPost - case ConfigPropertiesCasesWebhookCreateIncidentMethodPut: - *s = ConfigPropertiesCasesWebhookCreateIncidentMethodPut - default: - *s = ConfigPropertiesCasesWebhookCreateIncidentMethod(v) - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s ConfigPropertiesCasesWebhookCreateIncidentMethod) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesCasesWebhookCreateIncidentMethod) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ConfigPropertiesCasesWebhookUpdateIncidentMethod as json. -func (s ConfigPropertiesCasesWebhookUpdateIncidentMethod) Encode(e *jx.Encoder) { - e.Str(string(s)) -} - -// Decode decodes ConfigPropertiesCasesWebhookUpdateIncidentMethod from json. -func (s *ConfigPropertiesCasesWebhookUpdateIncidentMethod) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesCasesWebhookUpdateIncidentMethod to nil") - } - v, err := d.StrBytes() - if err != nil { - return err - } - // Try to use constant string. - switch ConfigPropertiesCasesWebhookUpdateIncidentMethod(v) { - case ConfigPropertiesCasesWebhookUpdateIncidentMethodPatch: - *s = ConfigPropertiesCasesWebhookUpdateIncidentMethodPatch - case ConfigPropertiesCasesWebhookUpdateIncidentMethodPost: - *s = ConfigPropertiesCasesWebhookUpdateIncidentMethodPost - case ConfigPropertiesCasesWebhookUpdateIncidentMethodPut: - *s = ConfigPropertiesCasesWebhookUpdateIncidentMethodPut - default: - *s = ConfigPropertiesCasesWebhookUpdateIncidentMethod(v) - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s ConfigPropertiesCasesWebhookUpdateIncidentMethod) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesCasesWebhookUpdateIncidentMethod) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s ConfigPropertiesEmail) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields implements json.Marshaler. -func (s ConfigPropertiesEmail) encodeFields(e *jx.Encoder) { - for k, elem := range s { - e.FieldStart(k) - - if len(elem) != 0 { - e.Raw(elem) - } - } -} - -// Decode decodes ConfigPropertiesEmail from json. -func (s *ConfigPropertiesEmail) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesEmail to nil") - } - m := s.init() - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - var elem jx.Raw - if err := func() error { - v, err := d.RawAppend(nil) - elem = jx.Raw(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrapf(err, "decode field %q", k) - } - m[string(k)] = elem - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesEmail") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s ConfigPropertiesEmail) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesEmail) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConfigPropertiesIndex) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConfigPropertiesIndex) encodeFields(e *jx.Encoder) { - { - if s.ExecutionTimeField.Set { - e.FieldStart("executionTimeField") - s.ExecutionTimeField.Encode(e) - } - } - { - e.FieldStart("index") - e.Str(s.Index) - } - { - if s.Refresh.Set { - e.FieldStart("refresh") - s.Refresh.Encode(e) - } - } -} - -var jsonFieldsNameOfConfigPropertiesIndex = [3]string{ - 0: "executionTimeField", - 1: "index", - 2: "refresh", -} - -// Decode decodes ConfigPropertiesIndex from json. -func (s *ConfigPropertiesIndex) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesIndex to nil") - } - var requiredBitSet [1]uint8 - s.setDefaults() - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "executionTimeField": - if err := func() error { - s.ExecutionTimeField.Reset() - if err := s.ExecutionTimeField.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"executionTimeField\"") - } - case "index": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Index = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"index\"") - } - case "refresh": - if err := func() error { - s.Refresh.Reset() - if err := s.Refresh.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"refresh\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesIndex") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000010, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConfigPropertiesIndex) { - name = jsonFieldsNameOfConfigPropertiesIndex[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConfigPropertiesIndex) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesIndex) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConfigPropertiesJira) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConfigPropertiesJira) encodeFields(e *jx.Encoder) { - { - e.FieldStart("apiUrl") - e.Str(s.ApiUrl) - } - { - e.FieldStart("projectKey") - e.Str(s.ProjectKey) - } -} - -var jsonFieldsNameOfConfigPropertiesJira = [2]string{ - 0: "apiUrl", - 1: "projectKey", -} - -// Decode decodes ConfigPropertiesJira from json. -func (s *ConfigPropertiesJira) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesJira to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "apiUrl": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.ApiUrl = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"apiUrl\"") - } - case "projectKey": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ProjectKey = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"projectKey\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesJira") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConfigPropertiesJira) { - name = jsonFieldsNameOfConfigPropertiesJira[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConfigPropertiesJira) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesJira) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConfigPropertiesOpsgenie) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConfigPropertiesOpsgenie) encodeFields(e *jx.Encoder) { - { - e.FieldStart("apiUrl") - e.Str(s.ApiUrl) - } -} - -var jsonFieldsNameOfConfigPropertiesOpsgenie = [1]string{ - 0: "apiUrl", -} - -// Decode decodes ConfigPropertiesOpsgenie from json. -func (s *ConfigPropertiesOpsgenie) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesOpsgenie to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "apiUrl": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.ApiUrl = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"apiUrl\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesOpsgenie") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000001, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConfigPropertiesOpsgenie) { - name = jsonFieldsNameOfConfigPropertiesOpsgenie[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConfigPropertiesOpsgenie) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesOpsgenie) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s ConfigPropertiesPagerduty) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields implements json.Marshaler. -func (s ConfigPropertiesPagerduty) encodeFields(e *jx.Encoder) { - for k, elem := range s { - e.FieldStart(k) - - if len(elem) != 0 { - e.Raw(elem) - } - } -} - -// Decode decodes ConfigPropertiesPagerduty from json. -func (s *ConfigPropertiesPagerduty) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesPagerduty to nil") - } - m := s.init() - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - var elem jx.Raw - if err := func() error { - v, err := d.RawAppend(nil) - elem = jx.Raw(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrapf(err, "decode field %q", k) - } - m[string(k)] = elem - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesPagerduty") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s ConfigPropertiesPagerduty) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesPagerduty) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConfigPropertiesResilient) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConfigPropertiesResilient) encodeFields(e *jx.Encoder) { - { - e.FieldStart("apiUrl") - e.Str(s.ApiUrl) - } - { - e.FieldStart("orgId") - e.Str(s.OrgId) - } -} - -var jsonFieldsNameOfConfigPropertiesResilient = [2]string{ - 0: "apiUrl", - 1: "orgId", -} - -// Decode decodes ConfigPropertiesResilient from json. -func (s *ConfigPropertiesResilient) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesResilient to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "apiUrl": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.ApiUrl = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"apiUrl\"") - } - case "orgId": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.OrgId = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"orgId\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesResilient") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConfigPropertiesResilient) { - name = jsonFieldsNameOfConfigPropertiesResilient[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConfigPropertiesResilient) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesResilient) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConfigPropertiesServicenow) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConfigPropertiesServicenow) encodeFields(e *jx.Encoder) { - { - e.FieldStart("apiUrl") - e.Str(s.ApiUrl) - } - { - if s.ClientId.Set { - e.FieldStart("clientId") - s.ClientId.Encode(e) - } - } - { - if s.IsOAuth.Set { - e.FieldStart("isOAuth") - s.IsOAuth.Encode(e) - } - } - { - if s.JwtKeyId.Set { - e.FieldStart("jwtKeyId") - s.JwtKeyId.Encode(e) - } - } - { - if s.UserIdentifierValue.Set { - e.FieldStart("userIdentifierValue") - s.UserIdentifierValue.Encode(e) - } - } - { - if s.UsesTableApi.Set { - e.FieldStart("usesTableApi") - s.UsesTableApi.Encode(e) - } - } -} - -var jsonFieldsNameOfConfigPropertiesServicenow = [6]string{ - 0: "apiUrl", - 1: "clientId", - 2: "isOAuth", - 3: "jwtKeyId", - 4: "userIdentifierValue", - 5: "usesTableApi", -} - -// Decode decodes ConfigPropertiesServicenow from json. -func (s *ConfigPropertiesServicenow) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesServicenow to nil") - } - var requiredBitSet [1]uint8 - s.setDefaults() - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "apiUrl": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.ApiUrl = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"apiUrl\"") - } - case "clientId": - if err := func() error { - s.ClientId.Reset() - if err := s.ClientId.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"clientId\"") - } - case "isOAuth": - if err := func() error { - s.IsOAuth.Reset() - if err := s.IsOAuth.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"isOAuth\"") - } - case "jwtKeyId": - if err := func() error { - s.JwtKeyId.Reset() - if err := s.JwtKeyId.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"jwtKeyId\"") - } - case "userIdentifierValue": - if err := func() error { - s.UserIdentifierValue.Reset() - if err := s.UserIdentifierValue.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"userIdentifierValue\"") - } - case "usesTableApi": - if err := func() error { - s.UsesTableApi.Reset() - if err := s.UsesTableApi.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"usesTableApi\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesServicenow") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000001, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConfigPropertiesServicenow) { - name = jsonFieldsNameOfConfigPropertiesServicenow[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConfigPropertiesServicenow) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesServicenow) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConfigPropertiesServicenowItom) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConfigPropertiesServicenowItom) encodeFields(e *jx.Encoder) { - { - e.FieldStart("apiUrl") - e.Str(s.ApiUrl) - } - { - if s.ClientId.Set { - e.FieldStart("clientId") - s.ClientId.Encode(e) - } - } - { - if s.IsOAuth.Set { - e.FieldStart("isOAuth") - s.IsOAuth.Encode(e) - } - } - { - if s.JwtKeyId.Set { - e.FieldStart("jwtKeyId") - s.JwtKeyId.Encode(e) - } - } - { - if s.UserIdentifierValue.Set { - e.FieldStart("userIdentifierValue") - s.UserIdentifierValue.Encode(e) - } - } -} - -var jsonFieldsNameOfConfigPropertiesServicenowItom = [5]string{ - 0: "apiUrl", - 1: "clientId", - 2: "isOAuth", - 3: "jwtKeyId", - 4: "userIdentifierValue", -} - -// Decode decodes ConfigPropertiesServicenowItom from json. -func (s *ConfigPropertiesServicenowItom) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesServicenowItom to nil") - } - var requiredBitSet [1]uint8 - s.setDefaults() - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "apiUrl": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.ApiUrl = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"apiUrl\"") - } - case "clientId": - if err := func() error { - s.ClientId.Reset() - if err := s.ClientId.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"clientId\"") - } - case "isOAuth": - if err := func() error { - s.IsOAuth.Reset() - if err := s.IsOAuth.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"isOAuth\"") - } - case "jwtKeyId": - if err := func() error { - s.JwtKeyId.Reset() - if err := s.JwtKeyId.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"jwtKeyId\"") - } - case "userIdentifierValue": - if err := func() error { - s.UserIdentifierValue.Reset() - if err := s.UserIdentifierValue.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"userIdentifierValue\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesServicenowItom") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000001, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConfigPropertiesServicenowItom) { - name = jsonFieldsNameOfConfigPropertiesServicenowItom[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConfigPropertiesServicenowItom) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesServicenowItom) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConfigPropertiesSwimlane) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConfigPropertiesSwimlane) encodeFields(e *jx.Encoder) { - { - e.FieldStart("apiUrl") - e.Str(s.ApiUrl) - } - { - e.FieldStart("appId") - e.Str(s.AppId) - } - { - e.FieldStart("connectorType") - s.ConnectorType.Encode(e) - } - { - if s.Mappings.Set { - e.FieldStart("mappings") - s.Mappings.Encode(e) - } - } -} - -var jsonFieldsNameOfConfigPropertiesSwimlane = [4]string{ - 0: "apiUrl", - 1: "appId", - 2: "connectorType", - 3: "mappings", -} - -// Decode decodes ConfigPropertiesSwimlane from json. -func (s *ConfigPropertiesSwimlane) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesSwimlane to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "apiUrl": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.ApiUrl = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"apiUrl\"") - } - case "appId": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.AppId = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"appId\"") - } - case "connectorType": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.ConnectorType.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"connectorType\"") - } - case "mappings": - if err := func() error { - s.Mappings.Reset() - if err := s.Mappings.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"mappings\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesSwimlane") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConfigPropertiesSwimlane) { - name = jsonFieldsNameOfConfigPropertiesSwimlane[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConfigPropertiesSwimlane) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesSwimlane) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ConfigPropertiesSwimlaneConnectorType as json. -func (s ConfigPropertiesSwimlaneConnectorType) Encode(e *jx.Encoder) { - e.Str(string(s)) -} - -// Decode decodes ConfigPropertiesSwimlaneConnectorType from json. -func (s *ConfigPropertiesSwimlaneConnectorType) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesSwimlaneConnectorType to nil") - } - v, err := d.StrBytes() - if err != nil { - return err - } - // Try to use constant string. - switch ConfigPropertiesSwimlaneConnectorType(v) { - case ConfigPropertiesSwimlaneConnectorTypeAll: - *s = ConfigPropertiesSwimlaneConnectorTypeAll - case ConfigPropertiesSwimlaneConnectorTypeAlerts: - *s = ConfigPropertiesSwimlaneConnectorTypeAlerts - case ConfigPropertiesSwimlaneConnectorTypeCases: - *s = ConfigPropertiesSwimlaneConnectorTypeCases - default: - *s = ConfigPropertiesSwimlaneConnectorType(v) - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s ConfigPropertiesSwimlaneConnectorType) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesSwimlaneConnectorType) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConfigPropertiesSwimlaneMappings) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConfigPropertiesSwimlaneMappings) encodeFields(e *jx.Encoder) { - { - if s.AlertIdConfig.Set { - e.FieldStart("alertIdConfig") - s.AlertIdConfig.Encode(e) - } - } - { - if s.CaseIdConfig.Set { - e.FieldStart("caseIdConfig") - s.CaseIdConfig.Encode(e) - } - } - { - if s.CaseNameConfig.Set { - e.FieldStart("caseNameConfig") - s.CaseNameConfig.Encode(e) - } - } - { - if s.CommentsConfig.Set { - e.FieldStart("commentsConfig") - s.CommentsConfig.Encode(e) - } - } - { - if s.DescriptionConfig.Set { - e.FieldStart("descriptionConfig") - s.DescriptionConfig.Encode(e) - } - } - { - if s.RuleNameConfig.Set { - e.FieldStart("ruleNameConfig") - s.RuleNameConfig.Encode(e) - } - } - { - if s.SeverityConfig.Set { - e.FieldStart("severityConfig") - s.SeverityConfig.Encode(e) - } - } -} - -var jsonFieldsNameOfConfigPropertiesSwimlaneMappings = [7]string{ - 0: "alertIdConfig", - 1: "caseIdConfig", - 2: "caseNameConfig", - 3: "commentsConfig", - 4: "descriptionConfig", - 5: "ruleNameConfig", - 6: "severityConfig", -} - -// Decode decodes ConfigPropertiesSwimlaneMappings from json. -func (s *ConfigPropertiesSwimlaneMappings) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesSwimlaneMappings to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "alertIdConfig": - if err := func() error { - s.AlertIdConfig.Reset() - if err := s.AlertIdConfig.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"alertIdConfig\"") - } - case "caseIdConfig": - if err := func() error { - s.CaseIdConfig.Reset() - if err := s.CaseIdConfig.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"caseIdConfig\"") - } - case "caseNameConfig": - if err := func() error { - s.CaseNameConfig.Reset() - if err := s.CaseNameConfig.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"caseNameConfig\"") - } - case "commentsConfig": - if err := func() error { - s.CommentsConfig.Reset() - if err := s.CommentsConfig.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"commentsConfig\"") - } - case "descriptionConfig": - if err := func() error { - s.DescriptionConfig.Reset() - if err := s.DescriptionConfig.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"descriptionConfig\"") - } - case "ruleNameConfig": - if err := func() error { - s.RuleNameConfig.Reset() - if err := s.RuleNameConfig.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"ruleNameConfig\"") - } - case "severityConfig": - if err := func() error { - s.SeverityConfig.Reset() - if err := s.SeverityConfig.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"severityConfig\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesSwimlaneMappings") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConfigPropertiesSwimlaneMappings) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesSwimlaneMappings) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) encodeFields(e *jx.Encoder) { - { - e.FieldStart("fieldType") - e.Str(s.FieldType) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - e.FieldStart("key") - e.Str(s.Key) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConfigPropertiesSwimlaneMappingsAlertIdConfig = [4]string{ - 0: "fieldType", - 1: "id", - 2: "key", - 3: "name", -} - -// Decode decodes ConfigPropertiesSwimlaneMappingsAlertIdConfig from json. -func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesSwimlaneMappingsAlertIdConfig to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "fieldType": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.FieldType = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"fieldType\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "key": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - v, err := d.Str() - s.Key = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"key\"") - } - case "name": - requiredBitSet[0] |= 1 << 3 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesSwimlaneMappingsAlertIdConfig") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00001111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConfigPropertiesSwimlaneMappingsAlertIdConfig) { - name = jsonFieldsNameOfConfigPropertiesSwimlaneMappingsAlertIdConfig[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) encodeFields(e *jx.Encoder) { - { - e.FieldStart("fieldType") - e.Str(s.FieldType) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - e.FieldStart("key") - e.Str(s.Key) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConfigPropertiesSwimlaneMappingsCaseIdConfig = [4]string{ - 0: "fieldType", - 1: "id", - 2: "key", - 3: "name", -} - -// Decode decodes ConfigPropertiesSwimlaneMappingsCaseIdConfig from json. -func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesSwimlaneMappingsCaseIdConfig to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "fieldType": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.FieldType = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"fieldType\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "key": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - v, err := d.Str() - s.Key = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"key\"") - } - case "name": - requiredBitSet[0] |= 1 << 3 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesSwimlaneMappingsCaseIdConfig") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00001111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConfigPropertiesSwimlaneMappingsCaseIdConfig) { - name = jsonFieldsNameOfConfigPropertiesSwimlaneMappingsCaseIdConfig[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) encodeFields(e *jx.Encoder) { - { - e.FieldStart("fieldType") - e.Str(s.FieldType) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - e.FieldStart("key") - e.Str(s.Key) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConfigPropertiesSwimlaneMappingsCaseNameConfig = [4]string{ - 0: "fieldType", - 1: "id", - 2: "key", - 3: "name", -} - -// Decode decodes ConfigPropertiesSwimlaneMappingsCaseNameConfig from json. -func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesSwimlaneMappingsCaseNameConfig to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "fieldType": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.FieldType = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"fieldType\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "key": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - v, err := d.Str() - s.Key = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"key\"") - } - case "name": - requiredBitSet[0] |= 1 << 3 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesSwimlaneMappingsCaseNameConfig") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00001111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConfigPropertiesSwimlaneMappingsCaseNameConfig) { - name = jsonFieldsNameOfConfigPropertiesSwimlaneMappingsCaseNameConfig[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) encodeFields(e *jx.Encoder) { - { - e.FieldStart("fieldType") - e.Str(s.FieldType) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - e.FieldStart("key") - e.Str(s.Key) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConfigPropertiesSwimlaneMappingsCommentsConfig = [4]string{ - 0: "fieldType", - 1: "id", - 2: "key", - 3: "name", -} - -// Decode decodes ConfigPropertiesSwimlaneMappingsCommentsConfig from json. -func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesSwimlaneMappingsCommentsConfig to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "fieldType": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.FieldType = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"fieldType\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "key": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - v, err := d.Str() - s.Key = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"key\"") - } - case "name": - requiredBitSet[0] |= 1 << 3 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesSwimlaneMappingsCommentsConfig") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00001111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConfigPropertiesSwimlaneMappingsCommentsConfig) { - name = jsonFieldsNameOfConfigPropertiesSwimlaneMappingsCommentsConfig[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) encodeFields(e *jx.Encoder) { - { - e.FieldStart("fieldType") - e.Str(s.FieldType) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - e.FieldStart("key") - e.Str(s.Key) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConfigPropertiesSwimlaneMappingsDescriptionConfig = [4]string{ - 0: "fieldType", - 1: "id", - 2: "key", - 3: "name", -} - -// Decode decodes ConfigPropertiesSwimlaneMappingsDescriptionConfig from json. -func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesSwimlaneMappingsDescriptionConfig to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "fieldType": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.FieldType = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"fieldType\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "key": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - v, err := d.Str() - s.Key = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"key\"") - } - case "name": - requiredBitSet[0] |= 1 << 3 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesSwimlaneMappingsDescriptionConfig") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00001111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConfigPropertiesSwimlaneMappingsDescriptionConfig) { - name = jsonFieldsNameOfConfigPropertiesSwimlaneMappingsDescriptionConfig[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) encodeFields(e *jx.Encoder) { - { - e.FieldStart("fieldType") - e.Str(s.FieldType) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - e.FieldStart("key") - e.Str(s.Key) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConfigPropertiesSwimlaneMappingsRuleNameConfig = [4]string{ - 0: "fieldType", - 1: "id", - 2: "key", - 3: "name", -} - -// Decode decodes ConfigPropertiesSwimlaneMappingsRuleNameConfig from json. -func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesSwimlaneMappingsRuleNameConfig to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "fieldType": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.FieldType = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"fieldType\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "key": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - v, err := d.Str() - s.Key = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"key\"") - } - case "name": - requiredBitSet[0] |= 1 << 3 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesSwimlaneMappingsRuleNameConfig") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00001111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConfigPropertiesSwimlaneMappingsRuleNameConfig) { - name = jsonFieldsNameOfConfigPropertiesSwimlaneMappingsRuleNameConfig[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) encodeFields(e *jx.Encoder) { - { - e.FieldStart("fieldType") - e.Str(s.FieldType) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - e.FieldStart("key") - e.Str(s.Key) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConfigPropertiesSwimlaneMappingsSeverityConfig = [4]string{ - 0: "fieldType", - 1: "id", - 2: "key", - 3: "name", -} - -// Decode decodes ConfigPropertiesSwimlaneMappingsSeverityConfig from json. -func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesSwimlaneMappingsSeverityConfig to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "fieldType": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.FieldType = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"fieldType\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "key": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - v, err := d.Str() - s.Key = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"key\"") - } - case "name": - requiredBitSet[0] |= 1 << 3 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesSwimlaneMappingsSeverityConfig") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00001111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConfigPropertiesSwimlaneMappingsSeverityConfig) { - name = jsonFieldsNameOfConfigPropertiesSwimlaneMappingsSeverityConfig[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s ConfigPropertiesTines) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields implements json.Marshaler. -func (s ConfigPropertiesTines) encodeFields(e *jx.Encoder) { - for k, elem := range s { - e.FieldStart(k) - - if len(elem) != 0 { - e.Raw(elem) - } - } -} - -// Decode decodes ConfigPropertiesTines from json. -func (s *ConfigPropertiesTines) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesTines to nil") - } - m := s.init() - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - var elem jx.Raw - if err := func() error { - v, err := d.RawAppend(nil) - elem = jx.Raw(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrapf(err, "decode field %q", k) - } - m[string(k)] = elem - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesTines") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s ConfigPropertiesTines) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesTines) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s ConfigPropertiesWebhook) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields implements json.Marshaler. -func (s ConfigPropertiesWebhook) encodeFields(e *jx.Encoder) { - for k, elem := range s { - e.FieldStart(k) - - if len(elem) != 0 { - e.Raw(elem) - } - } -} - -// Decode decodes ConfigPropertiesWebhook from json. -func (s *ConfigPropertiesWebhook) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesWebhook to nil") - } - m := s.init() - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - var elem jx.Raw - if err := func() error { - v, err := d.RawAppend(nil) - elem = jx.Raw(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrapf(err, "decode field %q", k) - } - m[string(k)] = elem - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesWebhook") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s ConfigPropertiesWebhook) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesWebhook) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s ConfigPropertiesXmatters) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields implements json.Marshaler. -func (s ConfigPropertiesXmatters) encodeFields(e *jx.Encoder) { - for k, elem := range s { - e.FieldStart(k) - - if len(elem) != 0 { - e.Raw(elem) - } - } -} - -// Decode decodes ConfigPropertiesXmatters from json. -func (s *ConfigPropertiesXmatters) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConfigPropertiesXmatters to nil") - } - m := s.init() - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - var elem jx.Raw - if err := func() error { - v, err := d.RawAppend(nil) - elem = jx.Raw(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrapf(err, "decode field %q", k) - } - m[string(k)] = elem - return nil - }); err != nil { - return errors.Wrap(err, "decode ConfigPropertiesXmatters") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s ConfigPropertiesXmatters) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConfigPropertiesXmatters) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ConnectorResponseProperties as json. -func (s ConnectorResponseProperties) Encode(e *jx.Encoder) { - switch s.Type { - case ConnectorResponsePropertiesCasesWebhookConnectorResponseProperties: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".cases-webhook") - s.ConnectorResponsePropertiesCasesWebhook.encodeFields(e) - e.ObjEnd() - case ConnectorResponsePropertiesEmailConnectorResponseProperties: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".email") - s.ConnectorResponsePropertiesEmail.encodeFields(e) - e.ObjEnd() - case ConnectorResponsePropertiesIndexConnectorResponseProperties: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".index") - s.ConnectorResponsePropertiesIndex.encodeFields(e) - e.ObjEnd() - case ConnectorResponsePropertiesJiraConnectorResponseProperties: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".jira") - s.ConnectorResponsePropertiesJira.encodeFields(e) - e.ObjEnd() - case ConnectorResponsePropertiesOpsgenieConnectorResponseProperties: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".opsgenie") - s.ConnectorResponsePropertiesOpsgenie.encodeFields(e) - e.ObjEnd() - case ConnectorResponsePropertiesPagerdutyConnectorResponseProperties: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".pagerduty") - s.ConnectorResponsePropertiesPagerduty.encodeFields(e) - e.ObjEnd() - case ConnectorResponsePropertiesResilientConnectorResponseProperties: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".resilient") - s.ConnectorResponsePropertiesResilient.encodeFields(e) - e.ObjEnd() - case ConnectorResponsePropertiesServerlogConnectorResponseProperties: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".server-log") - s.ConnectorResponsePropertiesServerlog.encodeFields(e) - e.ObjEnd() - case ConnectorResponsePropertiesServicenowConnectorResponseProperties: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".servicenow") - s.ConnectorResponsePropertiesServicenow.encodeFields(e) - e.ObjEnd() - case ConnectorResponsePropertiesServicenowItomConnectorResponseProperties: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".servicenow-itom") - s.ConnectorResponsePropertiesServicenowItom.encodeFields(e) - e.ObjEnd() - case ConnectorResponsePropertiesServicenowSirConnectorResponseProperties: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".servicenow-sir") - s.ConnectorResponsePropertiesServicenowSir.encodeFields(e) - e.ObjEnd() - case ConnectorResponsePropertiesSlackConnectorResponseProperties: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".slack") - s.ConnectorResponsePropertiesSlack.encodeFields(e) - e.ObjEnd() - case ConnectorResponsePropertiesSwimlaneConnectorResponseProperties: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".swimlane") - s.ConnectorResponsePropertiesSwimlane.encodeFields(e) - e.ObjEnd() - case ConnectorResponsePropertiesTeamsConnectorResponseProperties: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".teams") - s.ConnectorResponsePropertiesTeams.encodeFields(e) - e.ObjEnd() - case ConnectorResponsePropertiesTinesConnectorResponseProperties: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".tines") - s.ConnectorResponsePropertiesTines.encodeFields(e) - e.ObjEnd() - case ConnectorResponsePropertiesWebhookConnectorResponseProperties: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".webhook") - s.ConnectorResponsePropertiesWebhook.encodeFields(e) - e.ObjEnd() - case ConnectorResponsePropertiesXmattersConnectorResponseProperties: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".xmatters") - s.ConnectorResponsePropertiesXmatters.encodeFields(e) - e.ObjEnd() - } -} - -// Decode decodes ConnectorResponseProperties from json. -func (s *ConnectorResponseProperties) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponseProperties to nil") - } - // Sum type discriminator. - if typ := d.Next(); typ != jx.Object { - return errors.Errorf("unexpected json type %q", typ) - } - - var found bool - if err := d.Capture(func(d *jx.Decoder) error { - return d.ObjBytes(func(d *jx.Decoder, key []byte) error { - if found { - return d.Skip() - } - switch string(key) { - case "connector_type_id": - typ, err := d.Str() - if err != nil { - return err - } - switch typ { - case ".cases-webhook": - s.Type = ConnectorResponsePropertiesCasesWebhookConnectorResponseProperties - found = true - case ".email": - s.Type = ConnectorResponsePropertiesEmailConnectorResponseProperties - found = true - case ".index": - s.Type = ConnectorResponsePropertiesIndexConnectorResponseProperties - found = true - case ".jira": - s.Type = ConnectorResponsePropertiesJiraConnectorResponseProperties - found = true - case ".opsgenie": - s.Type = ConnectorResponsePropertiesOpsgenieConnectorResponseProperties - found = true - case ".pagerduty": - s.Type = ConnectorResponsePropertiesPagerdutyConnectorResponseProperties - found = true - case ".resilient": - s.Type = ConnectorResponsePropertiesResilientConnectorResponseProperties - found = true - case ".server-log": - s.Type = ConnectorResponsePropertiesServerlogConnectorResponseProperties - found = true - case ".servicenow": - s.Type = ConnectorResponsePropertiesServicenowConnectorResponseProperties - found = true - case ".servicenow-itom": - s.Type = ConnectorResponsePropertiesServicenowItomConnectorResponseProperties - found = true - case ".servicenow-sir": - s.Type = ConnectorResponsePropertiesServicenowSirConnectorResponseProperties - found = true - case ".slack": - s.Type = ConnectorResponsePropertiesSlackConnectorResponseProperties - found = true - case ".swimlane": - s.Type = ConnectorResponsePropertiesSwimlaneConnectorResponseProperties - found = true - case ".teams": - s.Type = ConnectorResponsePropertiesTeamsConnectorResponseProperties - found = true - case ".tines": - s.Type = ConnectorResponsePropertiesTinesConnectorResponseProperties - found = true - case ".webhook": - s.Type = ConnectorResponsePropertiesWebhookConnectorResponseProperties - found = true - case ".xmatters": - s.Type = ConnectorResponsePropertiesXmattersConnectorResponseProperties - found = true - default: - return errors.Errorf("unknown type %s", typ) - } - return nil - } - return d.Skip() - }) - }); err != nil { - return errors.Wrap(err, "capture") - } - if !found { - return errors.New("unable to detect sum type variant") - } - switch s.Type { - case ConnectorResponsePropertiesCasesWebhookConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesCasesWebhook.Decode(d); err != nil { - return err - } - case ConnectorResponsePropertiesEmailConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesEmail.Decode(d); err != nil { - return err - } - case ConnectorResponsePropertiesIndexConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesIndex.Decode(d); err != nil { - return err - } - case ConnectorResponsePropertiesJiraConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesJira.Decode(d); err != nil { - return err - } - case ConnectorResponsePropertiesOpsgenieConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesOpsgenie.Decode(d); err != nil { - return err - } - case ConnectorResponsePropertiesPagerdutyConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesPagerduty.Decode(d); err != nil { - return err - } - case ConnectorResponsePropertiesResilientConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesResilient.Decode(d); err != nil { - return err - } - case ConnectorResponsePropertiesServerlogConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesServerlog.Decode(d); err != nil { - return err - } - case ConnectorResponsePropertiesServicenowConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesServicenow.Decode(d); err != nil { - return err - } - case ConnectorResponsePropertiesServicenowItomConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesServicenowItom.Decode(d); err != nil { - return err - } - case ConnectorResponsePropertiesServicenowSirConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesServicenowSir.Decode(d); err != nil { - return err - } - case ConnectorResponsePropertiesSlackConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesSlack.Decode(d); err != nil { - return err - } - case ConnectorResponsePropertiesSwimlaneConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesSwimlane.Decode(d); err != nil { - return err - } - case ConnectorResponsePropertiesTeamsConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesTeams.Decode(d); err != nil { - return err - } - case ConnectorResponsePropertiesTinesConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesTines.Decode(d); err != nil { - return err - } - case ConnectorResponsePropertiesWebhookConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesWebhook.Decode(d); err != nil { - return err - } - case ConnectorResponsePropertiesXmattersConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesXmatters.Decode(d); err != nil { - return err - } - default: - return errors.Errorf("inferred invalid type: %s", s.Type) - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s ConnectorResponseProperties) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponseProperties) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConnectorResponsePropertiesCasesWebhook) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConnectorResponsePropertiesCasesWebhook) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - if s.IsDeprecated.Set { - e.FieldStart("is_deprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("is_missing_secrets") - s.IsMissingSecrets.Encode(e) - } - } - { - e.FieldStart("is_preconfigured") - s.IsPreconfigured.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConnectorResponsePropertiesCasesWebhook = [6]string{ - 0: "config", - 1: "id", - 2: "is_deprecated", - 3: "is_missing_secrets", - 4: "is_preconfigured", - 5: "name", -} - -// Decode decodes ConnectorResponsePropertiesCasesWebhook from json. -func (s *ConnectorResponsePropertiesCasesWebhook) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponsePropertiesCasesWebhook to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "is_deprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_deprecated\"") - } - case "is_missing_secrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_missing_secrets\"") - } - case "is_preconfigured": - requiredBitSet[0] |= 1 << 4 - if err := func() error { - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_preconfigured\"") - } - case "name": - requiredBitSet[0] |= 1 << 5 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConnectorResponsePropertiesCasesWebhook") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00110011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesCasesWebhook) { - name = jsonFieldsNameOfConnectorResponsePropertiesCasesWebhook[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConnectorResponsePropertiesCasesWebhook) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponsePropertiesCasesWebhook) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConnectorResponsePropertiesEmail) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConnectorResponsePropertiesEmail) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - if s.IsDeprecated.Set { - e.FieldStart("is_deprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("is_missing_secrets") - s.IsMissingSecrets.Encode(e) - } - } - { - e.FieldStart("is_preconfigured") - s.IsPreconfigured.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConnectorResponsePropertiesEmail = [6]string{ - 0: "config", - 1: "id", - 2: "is_deprecated", - 3: "is_missing_secrets", - 4: "is_preconfigured", - 5: "name", -} - -// Decode decodes ConnectorResponsePropertiesEmail from json. -func (s *ConnectorResponsePropertiesEmail) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponsePropertiesEmail to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "is_deprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_deprecated\"") - } - case "is_missing_secrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_missing_secrets\"") - } - case "is_preconfigured": - requiredBitSet[0] |= 1 << 4 - if err := func() error { - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_preconfigured\"") - } - case "name": - requiredBitSet[0] |= 1 << 5 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConnectorResponsePropertiesEmail") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00110011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesEmail) { - name = jsonFieldsNameOfConnectorResponsePropertiesEmail[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConnectorResponsePropertiesEmail) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponsePropertiesEmail) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConnectorResponsePropertiesIndex) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConnectorResponsePropertiesIndex) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - if s.IsDeprecated.Set { - e.FieldStart("is_deprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("is_missing_secrets") - s.IsMissingSecrets.Encode(e) - } - } - { - e.FieldStart("is_preconfigured") - s.IsPreconfigured.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConnectorResponsePropertiesIndex = [6]string{ - 0: "config", - 1: "id", - 2: "is_deprecated", - 3: "is_missing_secrets", - 4: "is_preconfigured", - 5: "name", -} - -// Decode decodes ConnectorResponsePropertiesIndex from json. -func (s *ConnectorResponsePropertiesIndex) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponsePropertiesIndex to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "is_deprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_deprecated\"") - } - case "is_missing_secrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_missing_secrets\"") - } - case "is_preconfigured": - requiredBitSet[0] |= 1 << 4 - if err := func() error { - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_preconfigured\"") - } - case "name": - requiredBitSet[0] |= 1 << 5 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConnectorResponsePropertiesIndex") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00110011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesIndex) { - name = jsonFieldsNameOfConnectorResponsePropertiesIndex[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConnectorResponsePropertiesIndex) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponsePropertiesIndex) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConnectorResponsePropertiesJira) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConnectorResponsePropertiesJira) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - if s.IsDeprecated.Set { - e.FieldStart("is_deprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("is_missing_secrets") - s.IsMissingSecrets.Encode(e) - } - } - { - e.FieldStart("is_preconfigured") - s.IsPreconfigured.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConnectorResponsePropertiesJira = [6]string{ - 0: "config", - 1: "id", - 2: "is_deprecated", - 3: "is_missing_secrets", - 4: "is_preconfigured", - 5: "name", -} - -// Decode decodes ConnectorResponsePropertiesJira from json. -func (s *ConnectorResponsePropertiesJira) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponsePropertiesJira to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "is_deprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_deprecated\"") - } - case "is_missing_secrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_missing_secrets\"") - } - case "is_preconfigured": - requiredBitSet[0] |= 1 << 4 - if err := func() error { - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_preconfigured\"") - } - case "name": - requiredBitSet[0] |= 1 << 5 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConnectorResponsePropertiesJira") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00110011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesJira) { - name = jsonFieldsNameOfConnectorResponsePropertiesJira[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConnectorResponsePropertiesJira) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponsePropertiesJira) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConnectorResponsePropertiesOpsgenie) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConnectorResponsePropertiesOpsgenie) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - if s.IsDeprecated.Set { - e.FieldStart("is_deprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("is_missing_secrets") - s.IsMissingSecrets.Encode(e) - } - } - { - e.FieldStart("is_preconfigured") - s.IsPreconfigured.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConnectorResponsePropertiesOpsgenie = [6]string{ - 0: "config", - 1: "id", - 2: "is_deprecated", - 3: "is_missing_secrets", - 4: "is_preconfigured", - 5: "name", -} - -// Decode decodes ConnectorResponsePropertiesOpsgenie from json. -func (s *ConnectorResponsePropertiesOpsgenie) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponsePropertiesOpsgenie to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "is_deprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_deprecated\"") - } - case "is_missing_secrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_missing_secrets\"") - } - case "is_preconfigured": - requiredBitSet[0] |= 1 << 4 - if err := func() error { - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_preconfigured\"") - } - case "name": - requiredBitSet[0] |= 1 << 5 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConnectorResponsePropertiesOpsgenie") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00110011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesOpsgenie) { - name = jsonFieldsNameOfConnectorResponsePropertiesOpsgenie[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConnectorResponsePropertiesOpsgenie) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponsePropertiesOpsgenie) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConnectorResponsePropertiesPagerduty) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConnectorResponsePropertiesPagerduty) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - if s.IsDeprecated.Set { - e.FieldStart("is_deprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("is_missing_secrets") - s.IsMissingSecrets.Encode(e) - } - } - { - e.FieldStart("is_preconfigured") - s.IsPreconfigured.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConnectorResponsePropertiesPagerduty = [6]string{ - 0: "config", - 1: "id", - 2: "is_deprecated", - 3: "is_missing_secrets", - 4: "is_preconfigured", - 5: "name", -} - -// Decode decodes ConnectorResponsePropertiesPagerduty from json. -func (s *ConnectorResponsePropertiesPagerduty) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponsePropertiesPagerduty to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "is_deprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_deprecated\"") - } - case "is_missing_secrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_missing_secrets\"") - } - case "is_preconfigured": - requiredBitSet[0] |= 1 << 4 - if err := func() error { - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_preconfigured\"") - } - case "name": - requiredBitSet[0] |= 1 << 5 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConnectorResponsePropertiesPagerduty") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00110011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesPagerduty) { - name = jsonFieldsNameOfConnectorResponsePropertiesPagerduty[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConnectorResponsePropertiesPagerduty) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponsePropertiesPagerduty) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConnectorResponsePropertiesResilient) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConnectorResponsePropertiesResilient) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - if s.IsDeprecated.Set { - e.FieldStart("is_deprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("is_missing_secrets") - s.IsMissingSecrets.Encode(e) - } - } - { - e.FieldStart("is_preconfigured") - s.IsPreconfigured.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConnectorResponsePropertiesResilient = [6]string{ - 0: "config", - 1: "id", - 2: "is_deprecated", - 3: "is_missing_secrets", - 4: "is_preconfigured", - 5: "name", -} - -// Decode decodes ConnectorResponsePropertiesResilient from json. -func (s *ConnectorResponsePropertiesResilient) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponsePropertiesResilient to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "is_deprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_deprecated\"") - } - case "is_missing_secrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_missing_secrets\"") - } - case "is_preconfigured": - requiredBitSet[0] |= 1 << 4 - if err := func() error { - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_preconfigured\"") - } - case "name": - requiredBitSet[0] |= 1 << 5 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConnectorResponsePropertiesResilient") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00110011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesResilient) { - name = jsonFieldsNameOfConnectorResponsePropertiesResilient[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConnectorResponsePropertiesResilient) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponsePropertiesResilient) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConnectorResponsePropertiesServerlog) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConnectorResponsePropertiesServerlog) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - if s.Config == nil { - e.Null() - } else { - s.Config.Encode(e) - } - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - if s.IsDeprecated.Set { - e.FieldStart("is_deprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("is_missing_secrets") - s.IsMissingSecrets.Encode(e) - } - } - { - e.FieldStart("is_preconfigured") - s.IsPreconfigured.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConnectorResponsePropertiesServerlog = [6]string{ - 0: "config", - 1: "id", - 2: "is_deprecated", - 3: "is_missing_secrets", - 4: "is_preconfigured", - 5: "name", -} - -// Decode decodes ConnectorResponsePropertiesServerlog from json. -func (s *ConnectorResponsePropertiesServerlog) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponsePropertiesServerlog to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - s.Config = nil - var elem ConnectorResponsePropertiesServerlogConfig - if err := elem.Decode(d); err != nil { - return err - } - s.Config = &elem - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "is_deprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_deprecated\"") - } - case "is_missing_secrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_missing_secrets\"") - } - case "is_preconfigured": - requiredBitSet[0] |= 1 << 4 - if err := func() error { - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_preconfigured\"") - } - case "name": - requiredBitSet[0] |= 1 << 5 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConnectorResponsePropertiesServerlog") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00110011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesServerlog) { - name = jsonFieldsNameOfConnectorResponsePropertiesServerlog[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConnectorResponsePropertiesServerlog) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponsePropertiesServerlog) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConnectorResponsePropertiesServerlogConfig) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConnectorResponsePropertiesServerlogConfig) encodeFields(e *jx.Encoder) { -} - -var jsonFieldsNameOfConnectorResponsePropertiesServerlogConfig = [0]string{} - -// Decode decodes ConnectorResponsePropertiesServerlogConfig from json. -func (s *ConnectorResponsePropertiesServerlogConfig) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponsePropertiesServerlogConfig to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConnectorResponsePropertiesServerlogConfig") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConnectorResponsePropertiesServerlogConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponsePropertiesServerlogConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConnectorResponsePropertiesServicenow) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConnectorResponsePropertiesServicenow) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - if s.IsDeprecated.Set { - e.FieldStart("is_deprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("is_missing_secrets") - s.IsMissingSecrets.Encode(e) - } - } - { - e.FieldStart("is_preconfigured") - s.IsPreconfigured.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConnectorResponsePropertiesServicenow = [6]string{ - 0: "config", - 1: "id", - 2: "is_deprecated", - 3: "is_missing_secrets", - 4: "is_preconfigured", - 5: "name", -} - -// Decode decodes ConnectorResponsePropertiesServicenow from json. -func (s *ConnectorResponsePropertiesServicenow) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponsePropertiesServicenow to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "is_deprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_deprecated\"") - } - case "is_missing_secrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_missing_secrets\"") - } - case "is_preconfigured": - requiredBitSet[0] |= 1 << 4 - if err := func() error { - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_preconfigured\"") - } - case "name": - requiredBitSet[0] |= 1 << 5 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConnectorResponsePropertiesServicenow") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00110011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesServicenow) { - name = jsonFieldsNameOfConnectorResponsePropertiesServicenow[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConnectorResponsePropertiesServicenow) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponsePropertiesServicenow) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConnectorResponsePropertiesServicenowItom) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConnectorResponsePropertiesServicenowItom) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - if s.IsDeprecated.Set { - e.FieldStart("is_deprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("is_missing_secrets") - s.IsMissingSecrets.Encode(e) - } - } - { - e.FieldStart("is_preconfigured") - s.IsPreconfigured.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConnectorResponsePropertiesServicenowItom = [6]string{ - 0: "config", - 1: "id", - 2: "is_deprecated", - 3: "is_missing_secrets", - 4: "is_preconfigured", - 5: "name", -} - -// Decode decodes ConnectorResponsePropertiesServicenowItom from json. -func (s *ConnectorResponsePropertiesServicenowItom) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponsePropertiesServicenowItom to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "is_deprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_deprecated\"") - } - case "is_missing_secrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_missing_secrets\"") - } - case "is_preconfigured": - requiredBitSet[0] |= 1 << 4 - if err := func() error { - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_preconfigured\"") - } - case "name": - requiredBitSet[0] |= 1 << 5 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConnectorResponsePropertiesServicenowItom") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00110011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesServicenowItom) { - name = jsonFieldsNameOfConnectorResponsePropertiesServicenowItom[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConnectorResponsePropertiesServicenowItom) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponsePropertiesServicenowItom) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConnectorResponsePropertiesServicenowSir) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConnectorResponsePropertiesServicenowSir) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - if s.IsDeprecated.Set { - e.FieldStart("is_deprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("is_missing_secrets") - s.IsMissingSecrets.Encode(e) - } - } - { - e.FieldStart("is_preconfigured") - s.IsPreconfigured.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConnectorResponsePropertiesServicenowSir = [6]string{ - 0: "config", - 1: "id", - 2: "is_deprecated", - 3: "is_missing_secrets", - 4: "is_preconfigured", - 5: "name", -} - -// Decode decodes ConnectorResponsePropertiesServicenowSir from json. -func (s *ConnectorResponsePropertiesServicenowSir) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponsePropertiesServicenowSir to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "is_deprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_deprecated\"") - } - case "is_missing_secrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_missing_secrets\"") - } - case "is_preconfigured": - requiredBitSet[0] |= 1 << 4 - if err := func() error { - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_preconfigured\"") - } - case "name": - requiredBitSet[0] |= 1 << 5 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConnectorResponsePropertiesServicenowSir") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00110011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesServicenowSir) { - name = jsonFieldsNameOfConnectorResponsePropertiesServicenowSir[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConnectorResponsePropertiesServicenowSir) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponsePropertiesServicenowSir) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConnectorResponsePropertiesSlack) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConnectorResponsePropertiesSlack) encodeFields(e *jx.Encoder) { - { - e.FieldStart("id") - e.Str(s.ID) - } - { - if s.IsDeprecated.Set { - e.FieldStart("is_deprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("is_missing_secrets") - s.IsMissingSecrets.Encode(e) - } - } - { - e.FieldStart("is_preconfigured") - s.IsPreconfigured.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConnectorResponsePropertiesSlack = [5]string{ - 0: "id", - 1: "is_deprecated", - 2: "is_missing_secrets", - 3: "is_preconfigured", - 4: "name", -} - -// Decode decodes ConnectorResponsePropertiesSlack from json. -func (s *ConnectorResponsePropertiesSlack) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponsePropertiesSlack to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "id": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "is_deprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_deprecated\"") - } - case "is_missing_secrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_missing_secrets\"") - } - case "is_preconfigured": - requiredBitSet[0] |= 1 << 3 - if err := func() error { - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_preconfigured\"") - } - case "name": - requiredBitSet[0] |= 1 << 4 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConnectorResponsePropertiesSlack") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00011001, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesSlack) { - name = jsonFieldsNameOfConnectorResponsePropertiesSlack[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConnectorResponsePropertiesSlack) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponsePropertiesSlack) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConnectorResponsePropertiesSwimlane) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConnectorResponsePropertiesSwimlane) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - if s.IsDeprecated.Set { - e.FieldStart("is_deprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("is_missing_secrets") - s.IsMissingSecrets.Encode(e) - } - } - { - e.FieldStart("is_preconfigured") - s.IsPreconfigured.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConnectorResponsePropertiesSwimlane = [6]string{ - 0: "config", - 1: "id", - 2: "is_deprecated", - 3: "is_missing_secrets", - 4: "is_preconfigured", - 5: "name", -} - -// Decode decodes ConnectorResponsePropertiesSwimlane from json. -func (s *ConnectorResponsePropertiesSwimlane) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponsePropertiesSwimlane to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "is_deprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_deprecated\"") - } - case "is_missing_secrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_missing_secrets\"") - } - case "is_preconfigured": - requiredBitSet[0] |= 1 << 4 - if err := func() error { - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_preconfigured\"") - } - case "name": - requiredBitSet[0] |= 1 << 5 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConnectorResponsePropertiesSwimlane") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00110011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesSwimlane) { - name = jsonFieldsNameOfConnectorResponsePropertiesSwimlane[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConnectorResponsePropertiesSwimlane) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponsePropertiesSwimlane) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConnectorResponsePropertiesTeams) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConnectorResponsePropertiesTeams) encodeFields(e *jx.Encoder) { - { - e.FieldStart("id") - e.Str(s.ID) - } - { - if s.IsDeprecated.Set { - e.FieldStart("is_deprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("is_missing_secrets") - s.IsMissingSecrets.Encode(e) - } - } - { - e.FieldStart("is_preconfigured") - s.IsPreconfigured.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConnectorResponsePropertiesTeams = [5]string{ - 0: "id", - 1: "is_deprecated", - 2: "is_missing_secrets", - 3: "is_preconfigured", - 4: "name", -} - -// Decode decodes ConnectorResponsePropertiesTeams from json. -func (s *ConnectorResponsePropertiesTeams) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponsePropertiesTeams to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "id": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "is_deprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_deprecated\"") - } - case "is_missing_secrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_missing_secrets\"") - } - case "is_preconfigured": - requiredBitSet[0] |= 1 << 3 - if err := func() error { - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_preconfigured\"") - } - case "name": - requiredBitSet[0] |= 1 << 4 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConnectorResponsePropertiesTeams") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00011001, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesTeams) { - name = jsonFieldsNameOfConnectorResponsePropertiesTeams[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConnectorResponsePropertiesTeams) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponsePropertiesTeams) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConnectorResponsePropertiesTines) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConnectorResponsePropertiesTines) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - if s.IsDeprecated.Set { - e.FieldStart("is_deprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("is_missing_secrets") - s.IsMissingSecrets.Encode(e) - } - } - { - e.FieldStart("is_preconfigured") - s.IsPreconfigured.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConnectorResponsePropertiesTines = [6]string{ - 0: "config", - 1: "id", - 2: "is_deprecated", - 3: "is_missing_secrets", - 4: "is_preconfigured", - 5: "name", -} - -// Decode decodes ConnectorResponsePropertiesTines from json. -func (s *ConnectorResponsePropertiesTines) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponsePropertiesTines to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "is_deprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_deprecated\"") - } - case "is_missing_secrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_missing_secrets\"") - } - case "is_preconfigured": - requiredBitSet[0] |= 1 << 4 - if err := func() error { - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_preconfigured\"") - } - case "name": - requiredBitSet[0] |= 1 << 5 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConnectorResponsePropertiesTines") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00110011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesTines) { - name = jsonFieldsNameOfConnectorResponsePropertiesTines[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConnectorResponsePropertiesTines) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponsePropertiesTines) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConnectorResponsePropertiesWebhook) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConnectorResponsePropertiesWebhook) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - if s.IsDeprecated.Set { - e.FieldStart("is_deprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("is_missing_secrets") - s.IsMissingSecrets.Encode(e) - } - } - { - e.FieldStart("is_preconfigured") - s.IsPreconfigured.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConnectorResponsePropertiesWebhook = [6]string{ - 0: "config", - 1: "id", - 2: "is_deprecated", - 3: "is_missing_secrets", - 4: "is_preconfigured", - 5: "name", -} - -// Decode decodes ConnectorResponsePropertiesWebhook from json. -func (s *ConnectorResponsePropertiesWebhook) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponsePropertiesWebhook to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "is_deprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_deprecated\"") - } - case "is_missing_secrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_missing_secrets\"") - } - case "is_preconfigured": - requiredBitSet[0] |= 1 << 4 - if err := func() error { - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_preconfigured\"") - } - case "name": - requiredBitSet[0] |= 1 << 5 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConnectorResponsePropertiesWebhook") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00110011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesWebhook) { - name = jsonFieldsNameOfConnectorResponsePropertiesWebhook[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConnectorResponsePropertiesWebhook) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponsePropertiesWebhook) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ConnectorResponsePropertiesXmatters) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ConnectorResponsePropertiesXmatters) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - if s.IsDeprecated.Set { - e.FieldStart("is_deprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("is_missing_secrets") - s.IsMissingSecrets.Encode(e) - } - } - { - e.FieldStart("is_preconfigured") - s.IsPreconfigured.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfConnectorResponsePropertiesXmatters = [6]string{ - 0: "config", - 1: "id", - 2: "is_deprecated", - 3: "is_missing_secrets", - 4: "is_preconfigured", - 5: "name", -} - -// Decode decodes ConnectorResponsePropertiesXmatters from json. -func (s *ConnectorResponsePropertiesXmatters) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorResponsePropertiesXmatters to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "id": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "is_deprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_deprecated\"") - } - case "is_missing_secrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_missing_secrets\"") - } - case "is_preconfigured": - requiredBitSet[0] |= 1 << 4 - if err := func() error { - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_preconfigured\"") - } - case "name": - requiredBitSet[0] |= 1 << 5 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ConnectorResponsePropertiesXmatters") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00110011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfConnectorResponsePropertiesXmatters) { - name = jsonFieldsNameOfConnectorResponsePropertiesXmatters[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ConnectorResponsePropertiesXmatters) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorResponsePropertiesXmatters) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ConnectorTypes as json. -func (s ConnectorTypes) Encode(e *jx.Encoder) { - e.Str(string(s)) -} - -// Decode decodes ConnectorTypes from json. -func (s *ConnectorTypes) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ConnectorTypes to nil") - } - v, err := d.StrBytes() - if err != nil { - return err - } - // Try to use constant string. - switch ConnectorTypes(v) { - case ConnectorTypesDotCasesMinusWebhook: - *s = ConnectorTypesDotCasesMinusWebhook - case ConnectorTypesDotEmail: - *s = ConnectorTypesDotEmail - case ConnectorTypesDotIndex: - *s = ConnectorTypesDotIndex - case ConnectorTypesDotJira: - *s = ConnectorTypesDotJira - case ConnectorTypesDotOpsgenie: - *s = ConnectorTypesDotOpsgenie - case ConnectorTypesDotPagerduty: - *s = ConnectorTypesDotPagerduty - case ConnectorTypesDotResilient: - *s = ConnectorTypesDotResilient - case ConnectorTypesDotServicenow: - *s = ConnectorTypesDotServicenow - case ConnectorTypesDotServicenowMinusItom: - *s = ConnectorTypesDotServicenowMinusItom - case ConnectorTypesDotServicenowMinusSir: - *s = ConnectorTypesDotServicenowMinusSir - case ConnectorTypesDotServerMinusLog: - *s = ConnectorTypesDotServerMinusLog - case ConnectorTypesDotSlack: - *s = ConnectorTypesDotSlack - case ConnectorTypesDotSwimlane: - *s = ConnectorTypesDotSwimlane - case ConnectorTypesDotTeams: - *s = ConnectorTypesDotTeams - case ConnectorTypesDotTines: - *s = ConnectorTypesDotTines - case ConnectorTypesDotWebhook: - *s = ConnectorTypesDotWebhook - case ConnectorTypesDotXmatters: - *s = ConnectorTypesDotXmatters - default: - *s = ConnectorTypes(v) - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s ConnectorTypes) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ConnectorTypes) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes CreateConnectorReq as json. -func (s CreateConnectorReq) Encode(e *jx.Encoder) { - switch s.Type { - case CreateConnectorRequestCasesWebhookCreateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".cases-webhook") - s.CreateConnectorRequestCasesWebhook.encodeFields(e) - e.ObjEnd() - case CreateConnectorRequestEmailCreateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".email") - s.CreateConnectorRequestEmail.encodeFields(e) - e.ObjEnd() - case CreateConnectorRequestIndexCreateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".index") - s.CreateConnectorRequestIndex.encodeFields(e) - e.ObjEnd() - case CreateConnectorRequestJiraCreateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".jira") - s.CreateConnectorRequestJira.encodeFields(e) - e.ObjEnd() - case CreateConnectorRequestOpsgenieCreateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".opsgenie") - s.CreateConnectorRequestOpsgenie.encodeFields(e) - e.ObjEnd() - case CreateConnectorRequestPagerdutyCreateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".pagerduty") - s.CreateConnectorRequestPagerduty.encodeFields(e) - e.ObjEnd() - case CreateConnectorRequestResilientCreateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".resilient") - s.CreateConnectorRequestResilient.encodeFields(e) - e.ObjEnd() - case CreateConnectorRequestServerlogCreateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".server-log") - s.CreateConnectorRequestServerlog.encodeFields(e) - e.ObjEnd() - case CreateConnectorRequestServicenowCreateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".servicenow") - s.CreateConnectorRequestServicenow.encodeFields(e) - e.ObjEnd() - case CreateConnectorRequestServicenowItomCreateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".servicenow-itom") - s.CreateConnectorRequestServicenowItom.encodeFields(e) - e.ObjEnd() - case CreateConnectorRequestServicenowSirCreateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".servicenow-sir") - s.CreateConnectorRequestServicenowSir.encodeFields(e) - e.ObjEnd() - case CreateConnectorRequestSlackCreateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".slack") - s.CreateConnectorRequestSlack.encodeFields(e) - e.ObjEnd() - case CreateConnectorRequestSwimlaneCreateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".swimlane") - s.CreateConnectorRequestSwimlane.encodeFields(e) - e.ObjEnd() - case CreateConnectorRequestTeamsCreateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".teams") - s.CreateConnectorRequestTeams.encodeFields(e) - e.ObjEnd() - case CreateConnectorRequestTinesCreateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".tines") - s.CreateConnectorRequestTines.encodeFields(e) - e.ObjEnd() - case CreateConnectorRequestWebhookCreateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".webhook") - s.CreateConnectorRequestWebhook.encodeFields(e) - e.ObjEnd() - case CreateConnectorRequestXmattersCreateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".xmatters") - s.CreateConnectorRequestXmatters.encodeFields(e) - e.ObjEnd() - } -} - -// Decode decodes CreateConnectorReq from json. -func (s *CreateConnectorReq) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode CreateConnectorReq to nil") - } - // Sum type discriminator. - if typ := d.Next(); typ != jx.Object { - return errors.Errorf("unexpected json type %q", typ) - } - - var found bool - if err := d.Capture(func(d *jx.Decoder) error { - return d.ObjBytes(func(d *jx.Decoder, key []byte) error { - if found { - return d.Skip() - } - switch string(key) { - case "connector_type_id": - typ, err := d.Str() - if err != nil { - return err - } - switch typ { - case ".cases-webhook": - s.Type = CreateConnectorRequestCasesWebhookCreateConnectorReq - found = true - case ".email": - s.Type = CreateConnectorRequestEmailCreateConnectorReq - found = true - case ".index": - s.Type = CreateConnectorRequestIndexCreateConnectorReq - found = true - case ".jira": - s.Type = CreateConnectorRequestJiraCreateConnectorReq - found = true - case ".opsgenie": - s.Type = CreateConnectorRequestOpsgenieCreateConnectorReq - found = true - case ".pagerduty": - s.Type = CreateConnectorRequestPagerdutyCreateConnectorReq - found = true - case ".resilient": - s.Type = CreateConnectorRequestResilientCreateConnectorReq - found = true - case ".server-log": - s.Type = CreateConnectorRequestServerlogCreateConnectorReq - found = true - case ".servicenow": - s.Type = CreateConnectorRequestServicenowCreateConnectorReq - found = true - case ".servicenow-itom": - s.Type = CreateConnectorRequestServicenowItomCreateConnectorReq - found = true - case ".servicenow-sir": - s.Type = CreateConnectorRequestServicenowSirCreateConnectorReq - found = true - case ".slack": - s.Type = CreateConnectorRequestSlackCreateConnectorReq - found = true - case ".swimlane": - s.Type = CreateConnectorRequestSwimlaneCreateConnectorReq - found = true - case ".teams": - s.Type = CreateConnectorRequestTeamsCreateConnectorReq - found = true - case ".tines": - s.Type = CreateConnectorRequestTinesCreateConnectorReq - found = true - case ".webhook": - s.Type = CreateConnectorRequestWebhookCreateConnectorReq - found = true - case ".xmatters": - s.Type = CreateConnectorRequestXmattersCreateConnectorReq - found = true - default: - return errors.Errorf("unknown type %s", typ) - } - return nil - } - return d.Skip() - }) - }); err != nil { - return errors.Wrap(err, "capture") - } - if !found { - return errors.New("unable to detect sum type variant") - } - switch s.Type { - case CreateConnectorRequestCasesWebhookCreateConnectorReq: - if err := s.CreateConnectorRequestCasesWebhook.Decode(d); err != nil { - return err - } - case CreateConnectorRequestEmailCreateConnectorReq: - if err := s.CreateConnectorRequestEmail.Decode(d); err != nil { - return err - } - case CreateConnectorRequestIndexCreateConnectorReq: - if err := s.CreateConnectorRequestIndex.Decode(d); err != nil { - return err - } - case CreateConnectorRequestJiraCreateConnectorReq: - if err := s.CreateConnectorRequestJira.Decode(d); err != nil { - return err - } - case CreateConnectorRequestOpsgenieCreateConnectorReq: - if err := s.CreateConnectorRequestOpsgenie.Decode(d); err != nil { - return err - } - case CreateConnectorRequestPagerdutyCreateConnectorReq: - if err := s.CreateConnectorRequestPagerduty.Decode(d); err != nil { - return err - } - case CreateConnectorRequestResilientCreateConnectorReq: - if err := s.CreateConnectorRequestResilient.Decode(d); err != nil { - return err - } - case CreateConnectorRequestServerlogCreateConnectorReq: - if err := s.CreateConnectorRequestServerlog.Decode(d); err != nil { - return err - } - case CreateConnectorRequestServicenowCreateConnectorReq: - if err := s.CreateConnectorRequestServicenow.Decode(d); err != nil { - return err - } - case CreateConnectorRequestServicenowItomCreateConnectorReq: - if err := s.CreateConnectorRequestServicenowItom.Decode(d); err != nil { - return err - } - case CreateConnectorRequestServicenowSirCreateConnectorReq: - if err := s.CreateConnectorRequestServicenowSir.Decode(d); err != nil { - return err - } - case CreateConnectorRequestSlackCreateConnectorReq: - if err := s.CreateConnectorRequestSlack.Decode(d); err != nil { - return err - } - case CreateConnectorRequestSwimlaneCreateConnectorReq: - if err := s.CreateConnectorRequestSwimlane.Decode(d); err != nil { - return err - } - case CreateConnectorRequestTeamsCreateConnectorReq: - if err := s.CreateConnectorRequestTeams.Decode(d); err != nil { - return err - } - case CreateConnectorRequestTinesCreateConnectorReq: - if err := s.CreateConnectorRequestTines.Decode(d); err != nil { - return err - } - case CreateConnectorRequestWebhookCreateConnectorReq: - if err := s.CreateConnectorRequestWebhook.Decode(d); err != nil { - return err - } - case CreateConnectorRequestXmattersCreateConnectorReq: - if err := s.CreateConnectorRequestXmatters.Decode(d); err != nil { - return err - } - default: - return errors.Errorf("inferred invalid type: %s", s.Type) - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s CreateConnectorReq) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateConnectorReq) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *CreateConnectorRequestCasesWebhook) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *CreateConnectorRequestCasesWebhook) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - if s.Secrets.Set { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } - } -} - -var jsonFieldsNameOfCreateConnectorRequestCasesWebhook = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes CreateConnectorRequestCasesWebhook from json. -func (s *CreateConnectorRequestCasesWebhook) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode CreateConnectorRequestCasesWebhook to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - if err := func() error { - s.Secrets.Reset() - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode CreateConnectorRequestCasesWebhook") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestCasesWebhook) { - name = jsonFieldsNameOfCreateConnectorRequestCasesWebhook[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *CreateConnectorRequestCasesWebhook) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateConnectorRequestCasesWebhook) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *CreateConnectorRequestEmail) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *CreateConnectorRequestEmail) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfCreateConnectorRequestEmail = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes CreateConnectorRequestEmail from json. -func (s *CreateConnectorRequestEmail) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode CreateConnectorRequestEmail to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode CreateConnectorRequestEmail") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestEmail) { - name = jsonFieldsNameOfCreateConnectorRequestEmail[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *CreateConnectorRequestEmail) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateConnectorRequestEmail) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *CreateConnectorRequestIndex) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *CreateConnectorRequestIndex) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfCreateConnectorRequestIndex = [2]string{ - 0: "config", - 1: "name", -} - -// Decode decodes CreateConnectorRequestIndex from json. -func (s *CreateConnectorRequestIndex) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode CreateConnectorRequestIndex to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode CreateConnectorRequestIndex") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestIndex) { - name = jsonFieldsNameOfCreateConnectorRequestIndex[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *CreateConnectorRequestIndex) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateConnectorRequestIndex) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *CreateConnectorRequestJira) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *CreateConnectorRequestJira) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfCreateConnectorRequestJira = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes CreateConnectorRequestJira from json. -func (s *CreateConnectorRequestJira) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode CreateConnectorRequestJira to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode CreateConnectorRequestJira") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestJira) { - name = jsonFieldsNameOfCreateConnectorRequestJira[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *CreateConnectorRequestJira) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateConnectorRequestJira) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *CreateConnectorRequestOpsgenie) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *CreateConnectorRequestOpsgenie) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfCreateConnectorRequestOpsgenie = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes CreateConnectorRequestOpsgenie from json. -func (s *CreateConnectorRequestOpsgenie) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode CreateConnectorRequestOpsgenie to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode CreateConnectorRequestOpsgenie") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestOpsgenie) { - name = jsonFieldsNameOfCreateConnectorRequestOpsgenie[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *CreateConnectorRequestOpsgenie) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateConnectorRequestOpsgenie) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *CreateConnectorRequestPagerduty) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *CreateConnectorRequestPagerduty) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfCreateConnectorRequestPagerduty = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes CreateConnectorRequestPagerduty from json. -func (s *CreateConnectorRequestPagerduty) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode CreateConnectorRequestPagerduty to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode CreateConnectorRequestPagerduty") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestPagerduty) { - name = jsonFieldsNameOfCreateConnectorRequestPagerduty[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *CreateConnectorRequestPagerduty) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateConnectorRequestPagerduty) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *CreateConnectorRequestResilient) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *CreateConnectorRequestResilient) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfCreateConnectorRequestResilient = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes CreateConnectorRequestResilient from json. -func (s *CreateConnectorRequestResilient) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode CreateConnectorRequestResilient to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode CreateConnectorRequestResilient") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestResilient) { - name = jsonFieldsNameOfCreateConnectorRequestResilient[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *CreateConnectorRequestResilient) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateConnectorRequestResilient) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *CreateConnectorRequestServerlog) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *CreateConnectorRequestServerlog) encodeFields(e *jx.Encoder) { - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfCreateConnectorRequestServerlog = [1]string{ - 0: "name", -} - -// Decode decodes CreateConnectorRequestServerlog from json. -func (s *CreateConnectorRequestServerlog) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode CreateConnectorRequestServerlog to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "name": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode CreateConnectorRequestServerlog") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000001, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestServerlog) { - name = jsonFieldsNameOfCreateConnectorRequestServerlog[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *CreateConnectorRequestServerlog) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateConnectorRequestServerlog) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *CreateConnectorRequestServicenow) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *CreateConnectorRequestServicenow) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfCreateConnectorRequestServicenow = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes CreateConnectorRequestServicenow from json. -func (s *CreateConnectorRequestServicenow) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode CreateConnectorRequestServicenow to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode CreateConnectorRequestServicenow") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestServicenow) { - name = jsonFieldsNameOfCreateConnectorRequestServicenow[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *CreateConnectorRequestServicenow) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateConnectorRequestServicenow) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *CreateConnectorRequestServicenowItom) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *CreateConnectorRequestServicenowItom) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfCreateConnectorRequestServicenowItom = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes CreateConnectorRequestServicenowItom from json. -func (s *CreateConnectorRequestServicenowItom) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode CreateConnectorRequestServicenowItom to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode CreateConnectorRequestServicenowItom") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestServicenowItom) { - name = jsonFieldsNameOfCreateConnectorRequestServicenowItom[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *CreateConnectorRequestServicenowItom) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateConnectorRequestServicenowItom) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *CreateConnectorRequestServicenowSir) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *CreateConnectorRequestServicenowSir) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfCreateConnectorRequestServicenowSir = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes CreateConnectorRequestServicenowSir from json. -func (s *CreateConnectorRequestServicenowSir) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode CreateConnectorRequestServicenowSir to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode CreateConnectorRequestServicenowSir") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestServicenowSir) { - name = jsonFieldsNameOfCreateConnectorRequestServicenowSir[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *CreateConnectorRequestServicenowSir) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateConnectorRequestServicenowSir) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *CreateConnectorRequestSlack) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *CreateConnectorRequestSlack) encodeFields(e *jx.Encoder) { - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfCreateConnectorRequestSlack = [2]string{ - 0: "name", - 1: "secrets", -} - -// Decode decodes CreateConnectorRequestSlack from json. -func (s *CreateConnectorRequestSlack) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode CreateConnectorRequestSlack to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "name": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode CreateConnectorRequestSlack") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestSlack) { - name = jsonFieldsNameOfCreateConnectorRequestSlack[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *CreateConnectorRequestSlack) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateConnectorRequestSlack) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *CreateConnectorRequestSwimlane) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *CreateConnectorRequestSwimlane) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfCreateConnectorRequestSwimlane = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes CreateConnectorRequestSwimlane from json. -func (s *CreateConnectorRequestSwimlane) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode CreateConnectorRequestSwimlane to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode CreateConnectorRequestSwimlane") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestSwimlane) { - name = jsonFieldsNameOfCreateConnectorRequestSwimlane[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *CreateConnectorRequestSwimlane) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateConnectorRequestSwimlane) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *CreateConnectorRequestTeams) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *CreateConnectorRequestTeams) encodeFields(e *jx.Encoder) { - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfCreateConnectorRequestTeams = [2]string{ - 0: "name", - 1: "secrets", -} - -// Decode decodes CreateConnectorRequestTeams from json. -func (s *CreateConnectorRequestTeams) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode CreateConnectorRequestTeams to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "name": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode CreateConnectorRequestTeams") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestTeams) { - name = jsonFieldsNameOfCreateConnectorRequestTeams[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *CreateConnectorRequestTeams) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateConnectorRequestTeams) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *CreateConnectorRequestTines) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *CreateConnectorRequestTines) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfCreateConnectorRequestTines = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes CreateConnectorRequestTines from json. -func (s *CreateConnectorRequestTines) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode CreateConnectorRequestTines to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode CreateConnectorRequestTines") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestTines) { - name = jsonFieldsNameOfCreateConnectorRequestTines[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *CreateConnectorRequestTines) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateConnectorRequestTines) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *CreateConnectorRequestWebhook) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *CreateConnectorRequestWebhook) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfCreateConnectorRequestWebhook = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes CreateConnectorRequestWebhook from json. -func (s *CreateConnectorRequestWebhook) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode CreateConnectorRequestWebhook to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode CreateConnectorRequestWebhook") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestWebhook) { - name = jsonFieldsNameOfCreateConnectorRequestWebhook[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *CreateConnectorRequestWebhook) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateConnectorRequestWebhook) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *CreateConnectorRequestXmatters) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *CreateConnectorRequestXmatters) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfCreateConnectorRequestXmatters = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes CreateConnectorRequestXmatters from json. -func (s *CreateConnectorRequestXmatters) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode CreateConnectorRequestXmatters to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode CreateConnectorRequestXmatters") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfCreateConnectorRequestXmatters) { - name = jsonFieldsNameOfCreateConnectorRequestXmatters[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *CreateConnectorRequestXmatters) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *CreateConnectorRequestXmatters) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *DeleteConnectorNotFound) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *DeleteConnectorNotFound) encodeFields(e *jx.Encoder) { - { - if s.Error.Set { - e.FieldStart("error") - s.Error.Encode(e) - } - } - { - if s.Message.Set { - e.FieldStart("message") - s.Message.Encode(e) - } - } - { - if s.StatusCode.Set { - e.FieldStart("statusCode") - s.StatusCode.Encode(e) - } - } -} - -var jsonFieldsNameOfDeleteConnectorNotFound = [3]string{ - 0: "error", - 1: "message", - 2: "statusCode", -} - -// Decode decodes DeleteConnectorNotFound from json. -func (s *DeleteConnectorNotFound) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode DeleteConnectorNotFound to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "error": - if err := func() error { - s.Error.Reset() - if err := s.Error.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"error\"") - } - case "message": - if err := func() error { - s.Message.Reset() - if err := s.Message.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"message\"") - } - case "statusCode": - if err := func() error { - s.StatusCode.Reset() - if err := s.StatusCode.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"statusCode\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode DeleteConnectorNotFound") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *DeleteConnectorNotFound) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *DeleteConnectorNotFound) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes Features as json. -func (s Features) Encode(e *jx.Encoder) { - e.Str(string(s)) -} - -// Decode decodes Features from json. -func (s *Features) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode Features to nil") - } - v, err := d.StrBytes() - if err != nil { - return err - } - // Try to use constant string. - switch Features(v) { - case FeaturesAlerting: - *s = FeaturesAlerting - case FeaturesCases: - *s = FeaturesCases - case FeaturesUptime: - *s = FeaturesUptime - case FeaturesSiem: - *s = FeaturesSiem - default: - *s = Features(v) - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s Features) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *Features) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *GetConnectorNotFound) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *GetConnectorNotFound) encodeFields(e *jx.Encoder) { - { - if s.Error.Set { - e.FieldStart("error") - s.Error.Encode(e) - } - } - { - if s.Message.Set { - e.FieldStart("message") - s.Message.Encode(e) - } - } - { - if s.StatusCode.Set { - e.FieldStart("statusCode") - s.StatusCode.Encode(e) - } - } -} - -var jsonFieldsNameOfGetConnectorNotFound = [3]string{ - 0: "error", - 1: "message", - 2: "statusCode", -} - -// Decode decodes GetConnectorNotFound from json. -func (s *GetConnectorNotFound) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode GetConnectorNotFound to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "error": - if err := func() error { - s.Error.Reset() - if err := s.Error.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"error\"") - } - case "message": - if err := func() error { - s.Message.Reset() - if err := s.Message.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"message\"") - } - case "statusCode": - if err := func() error { - s.StatusCode.Reset() - if err := s.StatusCode.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"statusCode\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode GetConnectorNotFound") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *GetConnectorNotFound) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *GetConnectorNotFound) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes GetConnectorTypesOKApplicationJSON as json. -func (s GetConnectorTypesOKApplicationJSON) Encode(e *jx.Encoder) { - unwrapped := []GetConnectorTypesOKItem(s) - - e.ArrStart() - for _, elem := range unwrapped { - elem.Encode(e) - } - e.ArrEnd() -} - -// Decode decodes GetConnectorTypesOKApplicationJSON from json. -func (s *GetConnectorTypesOKApplicationJSON) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode GetConnectorTypesOKApplicationJSON to nil") - } - var unwrapped []GetConnectorTypesOKItem - if err := func() error { - unwrapped = make([]GetConnectorTypesOKItem, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem GetConnectorTypesOKItem - if err := elem.Decode(d); err != nil { - return err - } - unwrapped = append(unwrapped, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "alias") - } - *s = GetConnectorTypesOKApplicationJSON(unwrapped) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s GetConnectorTypesOKApplicationJSON) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *GetConnectorTypesOKApplicationJSON) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *GetConnectorTypesOKItem) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *GetConnectorTypesOKItem) encodeFields(e *jx.Encoder) { - { - if s.Enabled.Set { - e.FieldStart("enabled") - s.Enabled.Encode(e) - } - } - { - if s.EnabledInConfig.Set { - e.FieldStart("enabled_in_config") - s.EnabledInConfig.Encode(e) - } - } - { - if s.EnabledInLicense.Set { - e.FieldStart("enabled_in_license") - s.EnabledInLicense.Encode(e) - } - } - { - if s.ID.Set { - e.FieldStart("id") - s.ID.Encode(e) - } - } - { - if s.MinimumLicenseRequired.Set { - e.FieldStart("minimum_license_required") - s.MinimumLicenseRequired.Encode(e) - } - } - { - if s.Name.Set { - e.FieldStart("name") - s.Name.Encode(e) - } - } - { - if s.SupportedFeatureIds != nil { - e.FieldStart("supported_feature_ids") - e.ArrStart() - for _, elem := range s.SupportedFeatureIds { - elem.Encode(e) - } - e.ArrEnd() - } - } -} - -var jsonFieldsNameOfGetConnectorTypesOKItem = [7]string{ - 0: "enabled", - 1: "enabled_in_config", - 2: "enabled_in_license", - 3: "id", - 4: "minimum_license_required", - 5: "name", - 6: "supported_feature_ids", -} - -// Decode decodes GetConnectorTypesOKItem from json. -func (s *GetConnectorTypesOKItem) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode GetConnectorTypesOKItem to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "enabled": - if err := func() error { - s.Enabled.Reset() - if err := s.Enabled.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"enabled\"") - } - case "enabled_in_config": - if err := func() error { - s.EnabledInConfig.Reset() - if err := s.EnabledInConfig.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"enabled_in_config\"") - } - case "enabled_in_license": - if err := func() error { - s.EnabledInLicense.Reset() - if err := s.EnabledInLicense.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"enabled_in_license\"") - } - case "id": - if err := func() error { - s.ID.Reset() - if err := s.ID.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "minimum_license_required": - if err := func() error { - s.MinimumLicenseRequired.Reset() - if err := s.MinimumLicenseRequired.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"minimum_license_required\"") - } - case "name": - if err := func() error { - s.Name.Reset() - if err := s.Name.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "supported_feature_ids": - if err := func() error { - s.SupportedFeatureIds = make([]Features, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem Features - if err := elem.Decode(d); err != nil { - return err - } - s.SupportedFeatureIds = append(s.SupportedFeatureIds, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"supported_feature_ids\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode GetConnectorTypesOKItem") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *GetConnectorTypesOKItem) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *GetConnectorTypesOKItem) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes GetConnectorsOKApplicationJSON as json. -func (s GetConnectorsOKApplicationJSON) Encode(e *jx.Encoder) { - unwrapped := []GetConnectorsOKItem(s) - - e.ArrStart() - for _, elem := range unwrapped { - elem.Encode(e) - } - e.ArrEnd() -} - -// Decode decodes GetConnectorsOKApplicationJSON from json. -func (s *GetConnectorsOKApplicationJSON) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode GetConnectorsOKApplicationJSON to nil") - } - var unwrapped []GetConnectorsOKItem - if err := func() error { - unwrapped = make([]GetConnectorsOKItem, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem GetConnectorsOKItem - if err := elem.Decode(d); err != nil { - return err - } - unwrapped = append(unwrapped, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "alias") - } - *s = GetConnectorsOKApplicationJSON(unwrapped) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s GetConnectorsOKApplicationJSON) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *GetConnectorsOKApplicationJSON) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *GetConnectorsOKItem) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *GetConnectorsOKItem) encodeFields(e *jx.Encoder) { - { - e.FieldStart("connector_type_id") - s.ConnectorTypeID.Encode(e) - } - { - if s.Config.Set { - e.FieldStart("config") - s.Config.Encode(e) - } - } - { - e.FieldStart("id") - e.Str(s.ID) - } - { - if s.IsDeprecated.Set { - e.FieldStart("is_deprecated") - s.IsDeprecated.Encode(e) - } - } - { - if s.IsMissingSecrets.Set { - e.FieldStart("is_missing_secrets") - s.IsMissingSecrets.Encode(e) - } - } - { - e.FieldStart("is_preconfigured") - s.IsPreconfigured.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("referenced_by_count") - e.Int(s.ReferencedByCount) - } -} - -var jsonFieldsNameOfGetConnectorsOKItem = [8]string{ - 0: "connector_type_id", - 1: "config", - 2: "id", - 3: "is_deprecated", - 4: "is_missing_secrets", - 5: "is_preconfigured", - 6: "name", - 7: "referenced_by_count", -} - -// Decode decodes GetConnectorsOKItem from json. -func (s *GetConnectorsOKItem) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode GetConnectorsOKItem to nil") - } - var requiredBitSet [1]uint8 - s.setDefaults() - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "connector_type_id": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.ConnectorTypeID.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"connector_type_id\"") - } - case "config": - if err := func() error { - s.Config.Reset() - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "id": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - v, err := d.Str() - s.ID = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "is_deprecated": - if err := func() error { - s.IsDeprecated.Reset() - if err := s.IsDeprecated.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_deprecated\"") - } - case "is_missing_secrets": - if err := func() error { - s.IsMissingSecrets.Reset() - if err := s.IsMissingSecrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_missing_secrets\"") - } - case "is_preconfigured": - requiredBitSet[0] |= 1 << 5 - if err := func() error { - if err := s.IsPreconfigured.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"is_preconfigured\"") - } - case "name": - requiredBitSet[0] |= 1 << 6 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "referenced_by_count": - requiredBitSet[0] |= 1 << 7 - if err := func() error { - v, err := d.Int() - s.ReferencedByCount = int(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"referenced_by_count\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode GetConnectorsOKItem") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b11100101, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfGetConnectorsOKItem) { - name = jsonFieldsNameOfGetConnectorsOKItem[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *GetConnectorsOKItem) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *GetConnectorsOKItem) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s GetConnectorsOKItemConfig) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields implements json.Marshaler. -func (s GetConnectorsOKItemConfig) encodeFields(e *jx.Encoder) { - for k, elem := range s { - e.FieldStart(k) - - if len(elem) != 0 { - e.Raw(elem) - } - } -} - -// Decode decodes GetConnectorsOKItemConfig from json. -func (s *GetConnectorsOKItemConfig) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode GetConnectorsOKItemConfig to nil") - } - m := s.init() - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - var elem jx.Raw - if err := func() error { - v, err := d.RawAppend(nil) - elem = jx.Raw(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrapf(err, "decode field %q", k) - } - m[string(k)] = elem - return nil - }); err != nil { - return errors.Wrap(err, "decode GetConnectorsOKItemConfig") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s GetConnectorsOKItemConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *GetConnectorsOKItemConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes IsDeprecated as json. -func (s IsDeprecated) Encode(e *jx.Encoder) { - unwrapped := bool(s) - - e.Bool(unwrapped) -} - -// Decode decodes IsDeprecated from json. -func (s *IsDeprecated) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode IsDeprecated to nil") - } - var unwrapped bool - if err := func() error { - v, err := d.Bool() - unwrapped = bool(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "alias") - } - *s = IsDeprecated(unwrapped) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s IsDeprecated) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *IsDeprecated) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes IsMissingSecrets as json. -func (s IsMissingSecrets) Encode(e *jx.Encoder) { - unwrapped := bool(s) - - e.Bool(unwrapped) -} - -// Decode decodes IsMissingSecrets from json. -func (s *IsMissingSecrets) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode IsMissingSecrets to nil") - } - var unwrapped bool - if err := func() error { - v, err := d.Bool() - unwrapped = bool(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "alias") - } - *s = IsMissingSecrets(unwrapped) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s IsMissingSecrets) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *IsMissingSecrets) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes IsPreconfigured as json. -func (s IsPreconfigured) Encode(e *jx.Encoder) { - unwrapped := bool(s) - - e.Bool(unwrapped) -} - -// Decode decodes IsPreconfigured from json. -func (s *IsPreconfigured) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode IsPreconfigured to nil") - } - var unwrapped bool - if err := func() error { - v, err := d.Bool() - unwrapped = bool(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "alias") - } - *s = IsPreconfigured(unwrapped) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s IsPreconfigured) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *IsPreconfigured) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *LegacyCreateConnectorReq) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *LegacyCreateConnectorReq) encodeFields(e *jx.Encoder) { - { - if s.ActionTypeId.Set { - e.FieldStart("actionTypeId") - s.ActionTypeId.Encode(e) - } - } - { - if s.Config != nil { - e.FieldStart("config") - s.Config.Encode(e) - } - } - { - if s.Name.Set { - e.FieldStart("name") - s.Name.Encode(e) - } - } - { - if s.Secrets != nil { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } - } -} - -var jsonFieldsNameOfLegacyCreateConnectorReq = [4]string{ - 0: "actionTypeId", - 1: "config", - 2: "name", - 3: "secrets", -} - -// Decode decodes LegacyCreateConnectorReq from json. -func (s *LegacyCreateConnectorReq) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode LegacyCreateConnectorReq to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "actionTypeId": - if err := func() error { - s.ActionTypeId.Reset() - if err := s.ActionTypeId.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"actionTypeId\"") - } - case "config": - if err := func() error { - s.Config = nil - var elem LegacyCreateConnectorReqConfig - if err := elem.Decode(d); err != nil { - return err - } - s.Config = &elem - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - if err := func() error { - s.Name.Reset() - if err := s.Name.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - if err := func() error { - s.Secrets = nil - var elem LegacyCreateConnectorReqSecrets - if err := elem.Decode(d); err != nil { - return err - } - s.Secrets = &elem - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode LegacyCreateConnectorReq") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *LegacyCreateConnectorReq) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *LegacyCreateConnectorReq) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *LegacyCreateConnectorReqConfig) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *LegacyCreateConnectorReqConfig) encodeFields(e *jx.Encoder) { -} - -var jsonFieldsNameOfLegacyCreateConnectorReqConfig = [0]string{} - -// Decode decodes LegacyCreateConnectorReqConfig from json. -func (s *LegacyCreateConnectorReqConfig) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode LegacyCreateConnectorReqConfig to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode LegacyCreateConnectorReqConfig") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *LegacyCreateConnectorReqConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *LegacyCreateConnectorReqConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *LegacyCreateConnectorReqSecrets) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *LegacyCreateConnectorReqSecrets) encodeFields(e *jx.Encoder) { -} - -var jsonFieldsNameOfLegacyCreateConnectorReqSecrets = [0]string{} - -// Decode decodes LegacyCreateConnectorReqSecrets from json. -func (s *LegacyCreateConnectorReqSecrets) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode LegacyCreateConnectorReqSecrets to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode LegacyCreateConnectorReqSecrets") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *LegacyCreateConnectorReqSecrets) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *LegacyCreateConnectorReqSecrets) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes LegacyGetConnectorTypesOKApplicationJSON as json. -func (s LegacyGetConnectorTypesOKApplicationJSON) Encode(e *jx.Encoder) { - unwrapped := []LegacyGetConnectorTypesOKItem(s) - - e.ArrStart() - for _, elem := range unwrapped { - elem.Encode(e) - } - e.ArrEnd() -} - -// Decode decodes LegacyGetConnectorTypesOKApplicationJSON from json. -func (s *LegacyGetConnectorTypesOKApplicationJSON) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode LegacyGetConnectorTypesOKApplicationJSON to nil") - } - var unwrapped []LegacyGetConnectorTypesOKItem - if err := func() error { - unwrapped = make([]LegacyGetConnectorTypesOKItem, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem LegacyGetConnectorTypesOKItem - if err := elem.Decode(d); err != nil { - return err - } - unwrapped = append(unwrapped, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "alias") - } - *s = LegacyGetConnectorTypesOKApplicationJSON(unwrapped) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s LegacyGetConnectorTypesOKApplicationJSON) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *LegacyGetConnectorTypesOKApplicationJSON) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *LegacyGetConnectorTypesOKItem) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *LegacyGetConnectorTypesOKItem) encodeFields(e *jx.Encoder) { - { - if s.Enabled.Set { - e.FieldStart("enabled") - s.Enabled.Encode(e) - } - } - { - if s.EnabledInConfig.Set { - e.FieldStart("enabledInConfig") - s.EnabledInConfig.Encode(e) - } - } - { - if s.EnabledInLicense.Set { - e.FieldStart("enabledInLicense") - s.EnabledInLicense.Encode(e) - } - } - { - if s.ID.Set { - e.FieldStart("id") - s.ID.Encode(e) - } - } - { - if s.MinimumLicenseRequired.Set { - e.FieldStart("minimumLicenseRequired") - s.MinimumLicenseRequired.Encode(e) - } - } - { - if s.Name.Set { - e.FieldStart("name") - s.Name.Encode(e) - } - } -} - -var jsonFieldsNameOfLegacyGetConnectorTypesOKItem = [6]string{ - 0: "enabled", - 1: "enabledInConfig", - 2: "enabledInLicense", - 3: "id", - 4: "minimumLicenseRequired", - 5: "name", -} - -// Decode decodes LegacyGetConnectorTypesOKItem from json. -func (s *LegacyGetConnectorTypesOKItem) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode LegacyGetConnectorTypesOKItem to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "enabled": - if err := func() error { - s.Enabled.Reset() - if err := s.Enabled.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"enabled\"") - } - case "enabledInConfig": - if err := func() error { - s.EnabledInConfig.Reset() - if err := s.EnabledInConfig.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"enabledInConfig\"") - } - case "enabledInLicense": - if err := func() error { - s.EnabledInLicense.Reset() - if err := s.EnabledInLicense.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"enabledInLicense\"") - } - case "id": - if err := func() error { - s.ID.Reset() - if err := s.ID.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"id\"") - } - case "minimumLicenseRequired": - if err := func() error { - s.MinimumLicenseRequired.Reset() - if err := s.MinimumLicenseRequired.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"minimumLicenseRequired\"") - } - case "name": - if err := func() error { - s.Name.Reset() - if err := s.Name.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode LegacyGetConnectorTypesOKItem") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *LegacyGetConnectorTypesOKItem) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *LegacyGetConnectorTypesOKItem) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes LegacyGetConnectorsOKApplicationJSON as json. -func (s LegacyGetConnectorsOKApplicationJSON) Encode(e *jx.Encoder) { - unwrapped := []ActionResponseProperties(s) - - e.ArrStart() - for _, elem := range unwrapped { - elem.Encode(e) - } - e.ArrEnd() -} - -// Decode decodes LegacyGetConnectorsOKApplicationJSON from json. -func (s *LegacyGetConnectorsOKApplicationJSON) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode LegacyGetConnectorsOKApplicationJSON to nil") - } - var unwrapped []ActionResponseProperties - if err := func() error { - unwrapped = make([]ActionResponseProperties, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem ActionResponseProperties - if err := elem.Decode(d); err != nil { - return err - } - unwrapped = append(unwrapped, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "alias") - } - *s = LegacyGetConnectorsOKApplicationJSON(unwrapped) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s LegacyGetConnectorsOKApplicationJSON) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *LegacyGetConnectorsOKApplicationJSON) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *LegacyRunConnectorOK) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *LegacyRunConnectorOK) encodeFields(e *jx.Encoder) { - { - if s.ActionId.Set { - e.FieldStart("actionId") - s.ActionId.Encode(e) - } - } - { - if s.Data.Set { - e.FieldStart("data") - s.Data.Encode(e) - } - } - { - if s.Status.Set { - e.FieldStart("status") - s.Status.Encode(e) - } - } -} - -var jsonFieldsNameOfLegacyRunConnectorOK = [3]string{ - 0: "actionId", - 1: "data", - 2: "status", -} - -// Decode decodes LegacyRunConnectorOK from json. -func (s *LegacyRunConnectorOK) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode LegacyRunConnectorOK to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "actionId": - if err := func() error { - s.ActionId.Reset() - if err := s.ActionId.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"actionId\"") - } - case "data": - if err := func() error { - s.Data.Reset() - if err := s.Data.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"data\"") - } - case "status": - if err := func() error { - s.Status.Reset() - if err := s.Status.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"status\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode LegacyRunConnectorOK") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *LegacyRunConnectorOK) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *LegacyRunConnectorOK) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes LegacyRunConnectorOKData as json. -func (s LegacyRunConnectorOKData) Encode(e *jx.Encoder) { - switch s.Type { - case LegacyRunConnectorOKData0LegacyRunConnectorOKData: - s.LegacyRunConnectorOKData0.Encode(e) - case LegacyRunConnectorOKData1ItemArrayLegacyRunConnectorOKData: - e.ArrStart() - for _, elem := range s.LegacyRunConnectorOKData1ItemArray { - elem.Encode(e) - } - e.ArrEnd() - } -} - -// Decode decodes LegacyRunConnectorOKData from json. -func (s *LegacyRunConnectorOKData) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode LegacyRunConnectorOKData to nil") - } - // Sum type type_discriminator. - switch t := d.Next(); t { - case jx.Array: - s.LegacyRunConnectorOKData1ItemArray = make([]LegacyRunConnectorOKData1Item, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem LegacyRunConnectorOKData1Item - if err := elem.Decode(d); err != nil { - return err - } - s.LegacyRunConnectorOKData1ItemArray = append(s.LegacyRunConnectorOKData1ItemArray, elem) - return nil - }); err != nil { - return err - } - s.Type = LegacyRunConnectorOKData1ItemArrayLegacyRunConnectorOKData - case jx.Object: - if err := s.LegacyRunConnectorOKData0.Decode(d); err != nil { - return err - } - s.Type = LegacyRunConnectorOKData0LegacyRunConnectorOKData - default: - return errors.Errorf("unexpected json type %q", t) - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s LegacyRunConnectorOKData) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *LegacyRunConnectorOKData) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s LegacyRunConnectorOKData0) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields implements json.Marshaler. -func (s LegacyRunConnectorOKData0) encodeFields(e *jx.Encoder) { - for k, elem := range s { - e.FieldStart(k) - - if len(elem) != 0 { - e.Raw(elem) - } - } -} - -// Decode decodes LegacyRunConnectorOKData0 from json. -func (s *LegacyRunConnectorOKData0) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode LegacyRunConnectorOKData0 to nil") - } - m := s.init() - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - var elem jx.Raw - if err := func() error { - v, err := d.RawAppend(nil) - elem = jx.Raw(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrapf(err, "decode field %q", k) - } - m[string(k)] = elem - return nil - }); err != nil { - return errors.Wrap(err, "decode LegacyRunConnectorOKData0") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s LegacyRunConnectorOKData0) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *LegacyRunConnectorOKData0) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *LegacyRunConnectorOKData1Item) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *LegacyRunConnectorOKData1Item) encodeFields(e *jx.Encoder) { -} - -var jsonFieldsNameOfLegacyRunConnectorOKData1Item = [0]string{} - -// Decode decodes LegacyRunConnectorOKData1Item from json. -func (s *LegacyRunConnectorOKData1Item) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode LegacyRunConnectorOKData1Item to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode LegacyRunConnectorOKData1Item") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *LegacyRunConnectorOKData1Item) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *LegacyRunConnectorOKData1Item) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *LegacyRunConnectorReq) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *LegacyRunConnectorReq) encodeFields(e *jx.Encoder) { - { - e.FieldStart("params") - s.Params.Encode(e) - } -} - -var jsonFieldsNameOfLegacyRunConnectorReq = [1]string{ - 0: "params", -} - -// Decode decodes LegacyRunConnectorReq from json. -func (s *LegacyRunConnectorReq) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode LegacyRunConnectorReq to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "params": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Params.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"params\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode LegacyRunConnectorReq") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000001, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfLegacyRunConnectorReq) { - name = jsonFieldsNameOfLegacyRunConnectorReq[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *LegacyRunConnectorReq) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *LegacyRunConnectorReq) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *LegacyRunConnectorReqParams) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *LegacyRunConnectorReqParams) encodeFields(e *jx.Encoder) { -} - -var jsonFieldsNameOfLegacyRunConnectorReqParams = [0]string{} - -// Decode decodes LegacyRunConnectorReqParams from json. -func (s *LegacyRunConnectorReqParams) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode LegacyRunConnectorReqParams to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode LegacyRunConnectorReqParams") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *LegacyRunConnectorReqParams) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *LegacyRunConnectorReqParams) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *LegacyUpdateConnectorReq) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *LegacyUpdateConnectorReq) encodeFields(e *jx.Encoder) { - { - if s.Config != nil { - e.FieldStart("config") - s.Config.Encode(e) - } - } - { - if s.Name.Set { - e.FieldStart("name") - s.Name.Encode(e) - } - } - { - if s.Secrets != nil { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } - } -} - -var jsonFieldsNameOfLegacyUpdateConnectorReq = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes LegacyUpdateConnectorReq from json. -func (s *LegacyUpdateConnectorReq) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode LegacyUpdateConnectorReq to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - if err := func() error { - s.Config = nil - var elem LegacyUpdateConnectorReqConfig - if err := elem.Decode(d); err != nil { - return err - } - s.Config = &elem - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - if err := func() error { - s.Name.Reset() - if err := s.Name.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - if err := func() error { - s.Secrets = nil - var elem LegacyUpdateConnectorReqSecrets - if err := elem.Decode(d); err != nil { - return err - } - s.Secrets = &elem - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode LegacyUpdateConnectorReq") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *LegacyUpdateConnectorReq) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *LegacyUpdateConnectorReq) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *LegacyUpdateConnectorReqConfig) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *LegacyUpdateConnectorReqConfig) encodeFields(e *jx.Encoder) { -} - -var jsonFieldsNameOfLegacyUpdateConnectorReqConfig = [0]string{} - -// Decode decodes LegacyUpdateConnectorReqConfig from json. -func (s *LegacyUpdateConnectorReqConfig) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode LegacyUpdateConnectorReqConfig to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode LegacyUpdateConnectorReqConfig") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *LegacyUpdateConnectorReqConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *LegacyUpdateConnectorReqConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *LegacyUpdateConnectorReqSecrets) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *LegacyUpdateConnectorReqSecrets) encodeFields(e *jx.Encoder) { -} - -var jsonFieldsNameOfLegacyUpdateConnectorReqSecrets = [0]string{} - -// Decode decodes LegacyUpdateConnectorReqSecrets from json. -func (s *LegacyUpdateConnectorReqSecrets) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode LegacyUpdateConnectorReqSecrets to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode LegacyUpdateConnectorReqSecrets") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *LegacyUpdateConnectorReqSecrets) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *LegacyUpdateConnectorReqSecrets) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes bool as json. -func (o OptBool) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Bool(bool(o.Value)) -} - -// Decode decodes bool from json. -func (o *OptBool) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptBool to nil") - } - o.Set = true - v, err := d.Bool() - if err != nil { - return err - } - o.Value = bool(v) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptBool) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptBool) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ConfigPropertiesCasesWebhookCreateCommentMethod as json. -func (o OptConfigPropertiesCasesWebhookCreateCommentMethod) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Str(string(o.Value)) -} - -// Decode decodes ConfigPropertiesCasesWebhookCreateCommentMethod from json. -func (o *OptConfigPropertiesCasesWebhookCreateCommentMethod) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptConfigPropertiesCasesWebhookCreateCommentMethod to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptConfigPropertiesCasesWebhookCreateCommentMethod) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptConfigPropertiesCasesWebhookCreateCommentMethod) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ConfigPropertiesCasesWebhookCreateIncidentMethod as json. -func (o OptConfigPropertiesCasesWebhookCreateIncidentMethod) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Str(string(o.Value)) -} - -// Decode decodes ConfigPropertiesCasesWebhookCreateIncidentMethod from json. -func (o *OptConfigPropertiesCasesWebhookCreateIncidentMethod) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptConfigPropertiesCasesWebhookCreateIncidentMethod to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptConfigPropertiesCasesWebhookCreateIncidentMethod) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptConfigPropertiesCasesWebhookCreateIncidentMethod) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ConfigPropertiesCasesWebhookUpdateIncidentMethod as json. -func (o OptConfigPropertiesCasesWebhookUpdateIncidentMethod) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Str(string(o.Value)) -} - -// Decode decodes ConfigPropertiesCasesWebhookUpdateIncidentMethod from json. -func (o *OptConfigPropertiesCasesWebhookUpdateIncidentMethod) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptConfigPropertiesCasesWebhookUpdateIncidentMethod to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptConfigPropertiesCasesWebhookUpdateIncidentMethod) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptConfigPropertiesCasesWebhookUpdateIncidentMethod) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ConfigPropertiesSwimlaneMappings as json. -func (o OptConfigPropertiesSwimlaneMappings) Encode(e *jx.Encoder) { - if !o.Set { - return - } - o.Value.Encode(e) -} - -// Decode decodes ConfigPropertiesSwimlaneMappings from json. -func (o *OptConfigPropertiesSwimlaneMappings) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptConfigPropertiesSwimlaneMappings to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptConfigPropertiesSwimlaneMappings) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptConfigPropertiesSwimlaneMappings) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ConfigPropertiesSwimlaneMappingsAlertIdConfig as json. -func (o OptConfigPropertiesSwimlaneMappingsAlertIdConfig) Encode(e *jx.Encoder) { - if !o.Set { - return - } - o.Value.Encode(e) -} - -// Decode decodes ConfigPropertiesSwimlaneMappingsAlertIdConfig from json. -func (o *OptConfigPropertiesSwimlaneMappingsAlertIdConfig) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptConfigPropertiesSwimlaneMappingsAlertIdConfig to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptConfigPropertiesSwimlaneMappingsAlertIdConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptConfigPropertiesSwimlaneMappingsAlertIdConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ConfigPropertiesSwimlaneMappingsCaseIdConfig as json. -func (o OptConfigPropertiesSwimlaneMappingsCaseIdConfig) Encode(e *jx.Encoder) { - if !o.Set { - return - } - o.Value.Encode(e) -} - -// Decode decodes ConfigPropertiesSwimlaneMappingsCaseIdConfig from json. -func (o *OptConfigPropertiesSwimlaneMappingsCaseIdConfig) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptConfigPropertiesSwimlaneMappingsCaseIdConfig to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptConfigPropertiesSwimlaneMappingsCaseIdConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptConfigPropertiesSwimlaneMappingsCaseIdConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ConfigPropertiesSwimlaneMappingsCaseNameConfig as json. -func (o OptConfigPropertiesSwimlaneMappingsCaseNameConfig) Encode(e *jx.Encoder) { - if !o.Set { - return - } - o.Value.Encode(e) -} - -// Decode decodes ConfigPropertiesSwimlaneMappingsCaseNameConfig from json. -func (o *OptConfigPropertiesSwimlaneMappingsCaseNameConfig) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptConfigPropertiesSwimlaneMappingsCaseNameConfig to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptConfigPropertiesSwimlaneMappingsCaseNameConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptConfigPropertiesSwimlaneMappingsCaseNameConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ConfigPropertiesSwimlaneMappingsCommentsConfig as json. -func (o OptConfigPropertiesSwimlaneMappingsCommentsConfig) Encode(e *jx.Encoder) { - if !o.Set { - return - } - o.Value.Encode(e) -} - -// Decode decodes ConfigPropertiesSwimlaneMappingsCommentsConfig from json. -func (o *OptConfigPropertiesSwimlaneMappingsCommentsConfig) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptConfigPropertiesSwimlaneMappingsCommentsConfig to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptConfigPropertiesSwimlaneMappingsCommentsConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptConfigPropertiesSwimlaneMappingsCommentsConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ConfigPropertiesSwimlaneMappingsDescriptionConfig as json. -func (o OptConfigPropertiesSwimlaneMappingsDescriptionConfig) Encode(e *jx.Encoder) { - if !o.Set { - return - } - o.Value.Encode(e) -} - -// Decode decodes ConfigPropertiesSwimlaneMappingsDescriptionConfig from json. -func (o *OptConfigPropertiesSwimlaneMappingsDescriptionConfig) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptConfigPropertiesSwimlaneMappingsDescriptionConfig to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptConfigPropertiesSwimlaneMappingsDescriptionConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptConfigPropertiesSwimlaneMappingsDescriptionConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ConfigPropertiesSwimlaneMappingsRuleNameConfig as json. -func (o OptConfigPropertiesSwimlaneMappingsRuleNameConfig) Encode(e *jx.Encoder) { - if !o.Set { - return - } - o.Value.Encode(e) -} - -// Decode decodes ConfigPropertiesSwimlaneMappingsRuleNameConfig from json. -func (o *OptConfigPropertiesSwimlaneMappingsRuleNameConfig) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptConfigPropertiesSwimlaneMappingsRuleNameConfig to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptConfigPropertiesSwimlaneMappingsRuleNameConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptConfigPropertiesSwimlaneMappingsRuleNameConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ConfigPropertiesSwimlaneMappingsSeverityConfig as json. -func (o OptConfigPropertiesSwimlaneMappingsSeverityConfig) Encode(e *jx.Encoder) { - if !o.Set { - return - } - o.Value.Encode(e) -} - -// Decode decodes ConfigPropertiesSwimlaneMappingsSeverityConfig from json. -func (o *OptConfigPropertiesSwimlaneMappingsSeverityConfig) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptConfigPropertiesSwimlaneMappingsSeverityConfig to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptConfigPropertiesSwimlaneMappingsSeverityConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptConfigPropertiesSwimlaneMappingsSeverityConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ConnectorTypes as json. -func (o OptConnectorTypes) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Str(string(o.Value)) -} - -// Decode decodes ConnectorTypes from json. -func (o *OptConnectorTypes) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptConnectorTypes to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptConnectorTypes) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptConnectorTypes) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes int as json. -func (o OptInt) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Int(int(o.Value)) -} - -// Decode decodes int from json. -func (o *OptInt) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptInt to nil") - } - o.Set = true - v, err := d.Int() - if err != nil { - return err - } - o.Value = int(v) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptInt) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptInt) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes IsDeprecated as json. -func (o OptIsDeprecated) Encode(e *jx.Encoder) { - if !o.Set { - return - } - o.Value.Encode(e) -} - -// Decode decodes IsDeprecated from json. -func (o *OptIsDeprecated) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptIsDeprecated to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptIsDeprecated) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptIsDeprecated) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes IsMissingSecrets as json. -func (o OptIsMissingSecrets) Encode(e *jx.Encoder) { - if !o.Set { - return - } - o.Value.Encode(e) -} - -// Decode decodes IsMissingSecrets from json. -func (o *OptIsMissingSecrets) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptIsMissingSecrets to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptIsMissingSecrets) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptIsMissingSecrets) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes LegacyRunConnectorOKData as json. -func (o OptLegacyRunConnectorOKData) Encode(e *jx.Encoder) { - if !o.Set { - return - } - o.Value.Encode(e) -} - -// Decode decodes LegacyRunConnectorOKData from json. -func (o *OptLegacyRunConnectorOKData) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptLegacyRunConnectorOKData to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptLegacyRunConnectorOKData) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptLegacyRunConnectorOKData) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes GetConnectorsOKItemConfig as json. -func (o OptNilGetConnectorsOKItemConfig) Encode(e *jx.Encoder) { - if !o.Set { - return - } - if o.Null { - e.Null() - return - } - o.Value.Encode(e) -} - -// Decode decodes GetConnectorsOKItemConfig from json. -func (o *OptNilGetConnectorsOKItemConfig) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptNilGetConnectorsOKItemConfig to nil") - } - if d.Next() == jx.Null { - if err := d.Null(); err != nil { - return err - } - - var v GetConnectorsOKItemConfig - o.Value = v - o.Set = true - o.Null = true - return nil - } - o.Set = true - o.Null = false - o.Value = make(GetConnectorsOKItemConfig) - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptNilGetConnectorsOKItemConfig) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptNilGetConnectorsOKItemConfig) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes string as json. -func (o OptNilString) Encode(e *jx.Encoder) { - if !o.Set { - return - } - if o.Null { - e.Null() - return - } - e.Str(string(o.Value)) -} - -// Decode decodes string from json. -func (o *OptNilString) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptNilString to nil") - } - if d.Next() == jx.Null { - if err := d.Null(); err != nil { - return err - } - - var v string - o.Value = v - o.Set = true - o.Null = true - return nil - } - o.Set = true - o.Null = false - v, err := d.Str() - if err != nil { - return err - } - o.Value = string(v) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptNilString) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptNilString) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes R400Error as json. -func (o OptR400Error) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Str(string(o.Value)) -} - -// Decode decodes R400Error from json. -func (o *OptR400Error) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptR400Error to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptR400Error) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptR400Error) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes R400StatusCode as json. -func (o OptR400StatusCode) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Int(int(o.Value)) -} - -// Decode decodes R400StatusCode from json. -func (o *OptR400StatusCode) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptR400StatusCode to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptR400StatusCode) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptR400StatusCode) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes R401Error as json. -func (o OptR401Error) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Str(string(o.Value)) -} - -// Decode decodes R401Error from json. -func (o *OptR401Error) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptR401Error to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptR401Error) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptR401Error) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes R401StatusCode as json. -func (o OptR401StatusCode) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Int(int(o.Value)) -} - -// Decode decodes R401StatusCode from json. -func (o *OptR401StatusCode) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptR401StatusCode to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptR401StatusCode) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptR401StatusCode) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes R404Error as json. -func (o OptR404Error) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Str(string(o.Value)) -} - -// Decode decodes R404Error from json. -func (o *OptR404Error) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptR404Error to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptR404Error) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptR404Error) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes R404StatusCode as json. -func (o OptR404StatusCode) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Int(int(o.Value)) -} - -// Decode decodes R404StatusCode from json. -func (o *OptR404StatusCode) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptR404StatusCode to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptR404StatusCode) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptR404StatusCode) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes SecretsPropertiesCasesWebhook as json. -func (o OptSecretsPropertiesCasesWebhook) Encode(e *jx.Encoder) { - if !o.Set { - return - } - o.Value.Encode(e) -} - -// Decode decodes SecretsPropertiesCasesWebhook from json. -func (o *OptSecretsPropertiesCasesWebhook) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptSecretsPropertiesCasesWebhook to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptSecretsPropertiesCasesWebhook) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptSecretsPropertiesCasesWebhook) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes string as json. -func (o OptString) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Str(string(o.Value)) -} - -// Decode decodes string from json. -func (o *OptString) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptString to nil") - } - o.Set = true - v, err := d.Str() - if err != nil { - return err - } - o.Value = string(v) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptString) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptString) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *R400) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *R400) encodeFields(e *jx.Encoder) { - { - if s.Error.Set { - e.FieldStart("error") - s.Error.Encode(e) - } - } - { - if s.Message.Set { - e.FieldStart("message") - s.Message.Encode(e) - } - } - { - if s.StatusCode.Set { - e.FieldStart("statusCode") - s.StatusCode.Encode(e) - } - } -} - -var jsonFieldsNameOfR400 = [3]string{ - 0: "error", - 1: "message", - 2: "statusCode", -} - -// Decode decodes R400 from json. -func (s *R400) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode R400 to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "error": - if err := func() error { - s.Error.Reset() - if err := s.Error.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"error\"") - } - case "message": - if err := func() error { - s.Message.Reset() - if err := s.Message.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"message\"") - } - case "statusCode": - if err := func() error { - s.StatusCode.Reset() - if err := s.StatusCode.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"statusCode\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode R400") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *R400) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *R400) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes R400Error as json. -func (s R400Error) Encode(e *jx.Encoder) { - e.Str(string(s)) -} - -// Decode decodes R400Error from json. -func (s *R400Error) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode R400Error to nil") - } - v, err := d.StrBytes() - if err != nil { - return err - } - // Try to use constant string. - switch R400Error(v) { - case R400ErrorBadRequest: - *s = R400ErrorBadRequest - default: - *s = R400Error(v) - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s R400Error) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *R400Error) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes R400StatusCode as json. -func (s R400StatusCode) Encode(e *jx.Encoder) { - e.Int(int(s)) -} - -// Decode decodes R400StatusCode from json. -func (s *R400StatusCode) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode R400StatusCode to nil") - } - v, err := d.Int() - if err != nil { - return err - } - *s = R400StatusCode(v) - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s R400StatusCode) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *R400StatusCode) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *R401) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *R401) encodeFields(e *jx.Encoder) { - { - if s.Error.Set { - e.FieldStart("error") - s.Error.Encode(e) - } - } - { - if s.Message.Set { - e.FieldStart("message") - s.Message.Encode(e) - } - } - { - if s.StatusCode.Set { - e.FieldStart("statusCode") - s.StatusCode.Encode(e) - } - } -} - -var jsonFieldsNameOfR401 = [3]string{ - 0: "error", - 1: "message", - 2: "statusCode", -} - -// Decode decodes R401 from json. -func (s *R401) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode R401 to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "error": - if err := func() error { - s.Error.Reset() - if err := s.Error.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"error\"") - } - case "message": - if err := func() error { - s.Message.Reset() - if err := s.Message.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"message\"") - } - case "statusCode": - if err := func() error { - s.StatusCode.Reset() - if err := s.StatusCode.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"statusCode\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode R401") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *R401) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *R401) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes R401Error as json. -func (s R401Error) Encode(e *jx.Encoder) { - e.Str(string(s)) -} - -// Decode decodes R401Error from json. -func (s *R401Error) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode R401Error to nil") - } - v, err := d.StrBytes() - if err != nil { - return err - } - // Try to use constant string. - switch R401Error(v) { - case R401ErrorUnauthorized: - *s = R401ErrorUnauthorized - default: - *s = R401Error(v) - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s R401Error) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *R401Error) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes R401StatusCode as json. -func (s R401StatusCode) Encode(e *jx.Encoder) { - e.Int(int(s)) -} - -// Decode decodes R401StatusCode from json. -func (s *R401StatusCode) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode R401StatusCode to nil") - } - v, err := d.Int() - if err != nil { - return err - } - *s = R401StatusCode(v) - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s R401StatusCode) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *R401StatusCode) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *R404) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *R404) encodeFields(e *jx.Encoder) { - { - if s.Error.Set { - e.FieldStart("error") - s.Error.Encode(e) - } - } - { - if s.Message.Set { - e.FieldStart("message") - s.Message.Encode(e) - } - } - { - if s.StatusCode.Set { - e.FieldStart("statusCode") - s.StatusCode.Encode(e) - } - } -} - -var jsonFieldsNameOfR404 = [3]string{ - 0: "error", - 1: "message", - 2: "statusCode", -} - -// Decode decodes R404 from json. -func (s *R404) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode R404 to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "error": - if err := func() error { - s.Error.Reset() - if err := s.Error.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"error\"") - } - case "message": - if err := func() error { - s.Message.Reset() - if err := s.Message.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"message\"") - } - case "statusCode": - if err := func() error { - s.StatusCode.Reset() - if err := s.StatusCode.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"statusCode\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode R404") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *R404) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *R404) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes R404Error as json. -func (s R404Error) Encode(e *jx.Encoder) { - e.Str(string(s)) -} - -// Decode decodes R404Error from json. -func (s *R404Error) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode R404Error to nil") - } - v, err := d.StrBytes() - if err != nil { - return err - } - // Try to use constant string. - switch R404Error(v) { - case R404ErrorNotFound: - *s = R404ErrorNotFound - default: - *s = R404Error(v) - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s R404Error) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *R404Error) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes R404StatusCode as json. -func (s R404StatusCode) Encode(e *jx.Encoder) { - e.Int(int(s)) -} - -// Decode decodes R404StatusCode from json. -func (s *R404StatusCode) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode R404StatusCode to nil") - } - v, err := d.Int() - if err != nil { - return err - } - *s = R404StatusCode(v) - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s R404StatusCode) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *R404StatusCode) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *SecretsPropertiesCasesWebhook) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *SecretsPropertiesCasesWebhook) encodeFields(e *jx.Encoder) { - { - if s.Password.Set { - e.FieldStart("password") - s.Password.Encode(e) - } - } - { - if s.User.Set { - e.FieldStart("user") - s.User.Encode(e) - } - } -} - -var jsonFieldsNameOfSecretsPropertiesCasesWebhook = [2]string{ - 0: "password", - 1: "user", -} - -// Decode decodes SecretsPropertiesCasesWebhook from json. -func (s *SecretsPropertiesCasesWebhook) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode SecretsPropertiesCasesWebhook to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "password": - if err := func() error { - s.Password.Reset() - if err := s.Password.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"password\"") - } - case "user": - if err := func() error { - s.User.Reset() - if err := s.User.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"user\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode SecretsPropertiesCasesWebhook") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *SecretsPropertiesCasesWebhook) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *SecretsPropertiesCasesWebhook) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s SecretsPropertiesEmail) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields implements json.Marshaler. -func (s SecretsPropertiesEmail) encodeFields(e *jx.Encoder) { - for k, elem := range s { - e.FieldStart(k) - - if len(elem) != 0 { - e.Raw(elem) - } - } -} - -// Decode decodes SecretsPropertiesEmail from json. -func (s *SecretsPropertiesEmail) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode SecretsPropertiesEmail to nil") - } - m := s.init() - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - var elem jx.Raw - if err := func() error { - v, err := d.RawAppend(nil) - elem = jx.Raw(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrapf(err, "decode field %q", k) - } - m[string(k)] = elem - return nil - }); err != nil { - return errors.Wrap(err, "decode SecretsPropertiesEmail") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s SecretsPropertiesEmail) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *SecretsPropertiesEmail) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *SecretsPropertiesJira) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *SecretsPropertiesJira) encodeFields(e *jx.Encoder) { - { - e.FieldStart("apiToken") - e.Str(s.ApiToken) - } - { - e.FieldStart("email") - e.Str(s.Email) - } -} - -var jsonFieldsNameOfSecretsPropertiesJira = [2]string{ - 0: "apiToken", - 1: "email", -} - -// Decode decodes SecretsPropertiesJira from json. -func (s *SecretsPropertiesJira) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode SecretsPropertiesJira to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "apiToken": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.ApiToken = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"apiToken\"") - } - case "email": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Email = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"email\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode SecretsPropertiesJira") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfSecretsPropertiesJira) { - name = jsonFieldsNameOfSecretsPropertiesJira[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *SecretsPropertiesJira) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *SecretsPropertiesJira) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *SecretsPropertiesOpsgenie) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *SecretsPropertiesOpsgenie) encodeFields(e *jx.Encoder) { - { - e.FieldStart("apiKey") - e.Str(s.ApiKey) - } -} - -var jsonFieldsNameOfSecretsPropertiesOpsgenie = [1]string{ - 0: "apiKey", -} - -// Decode decodes SecretsPropertiesOpsgenie from json. -func (s *SecretsPropertiesOpsgenie) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode SecretsPropertiesOpsgenie to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "apiKey": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.ApiKey = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"apiKey\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode SecretsPropertiesOpsgenie") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000001, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfSecretsPropertiesOpsgenie) { - name = jsonFieldsNameOfSecretsPropertiesOpsgenie[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *SecretsPropertiesOpsgenie) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *SecretsPropertiesOpsgenie) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s SecretsPropertiesPagerduty) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields implements json.Marshaler. -func (s SecretsPropertiesPagerduty) encodeFields(e *jx.Encoder) { - for k, elem := range s { - e.FieldStart(k) - - if len(elem) != 0 { - e.Raw(elem) - } - } -} - -// Decode decodes SecretsPropertiesPagerduty from json. -func (s *SecretsPropertiesPagerduty) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode SecretsPropertiesPagerduty to nil") - } - m := s.init() - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - var elem jx.Raw - if err := func() error { - v, err := d.RawAppend(nil) - elem = jx.Raw(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrapf(err, "decode field %q", k) - } - m[string(k)] = elem - return nil - }); err != nil { - return errors.Wrap(err, "decode SecretsPropertiesPagerduty") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s SecretsPropertiesPagerduty) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *SecretsPropertiesPagerduty) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *SecretsPropertiesResilient) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *SecretsPropertiesResilient) encodeFields(e *jx.Encoder) { - { - e.FieldStart("apiKeyId") - e.Str(s.ApiKeyId) - } - { - e.FieldStart("apiKeySecret") - e.Str(s.ApiKeySecret) - } -} - -var jsonFieldsNameOfSecretsPropertiesResilient = [2]string{ - 0: "apiKeyId", - 1: "apiKeySecret", -} - -// Decode decodes SecretsPropertiesResilient from json. -func (s *SecretsPropertiesResilient) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode SecretsPropertiesResilient to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "apiKeyId": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.ApiKeyId = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"apiKeyId\"") - } - case "apiKeySecret": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.ApiKeySecret = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"apiKeySecret\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode SecretsPropertiesResilient") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfSecretsPropertiesResilient) { - name = jsonFieldsNameOfSecretsPropertiesResilient[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *SecretsPropertiesResilient) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *SecretsPropertiesResilient) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *SecretsPropertiesServicenow) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *SecretsPropertiesServicenow) encodeFields(e *jx.Encoder) { - { - if s.ClientSecret.Set { - e.FieldStart("clientSecret") - s.ClientSecret.Encode(e) - } - } - { - if s.Password.Set { - e.FieldStart("password") - s.Password.Encode(e) - } - } - { - if s.PrivateKey.Set { - e.FieldStart("privateKey") - s.PrivateKey.Encode(e) - } - } - { - if s.PrivateKeyPassword.Set { - e.FieldStart("privateKeyPassword") - s.PrivateKeyPassword.Encode(e) - } - } - { - if s.Username.Set { - e.FieldStart("username") - s.Username.Encode(e) - } - } -} - -var jsonFieldsNameOfSecretsPropertiesServicenow = [5]string{ - 0: "clientSecret", - 1: "password", - 2: "privateKey", - 3: "privateKeyPassword", - 4: "username", -} - -// Decode decodes SecretsPropertiesServicenow from json. -func (s *SecretsPropertiesServicenow) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode SecretsPropertiesServicenow to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "clientSecret": - if err := func() error { - s.ClientSecret.Reset() - if err := s.ClientSecret.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"clientSecret\"") - } - case "password": - if err := func() error { - s.Password.Reset() - if err := s.Password.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"password\"") - } - case "privateKey": - if err := func() error { - s.PrivateKey.Reset() - if err := s.PrivateKey.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"privateKey\"") - } - case "privateKeyPassword": - if err := func() error { - s.PrivateKeyPassword.Reset() - if err := s.PrivateKeyPassword.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"privateKeyPassword\"") - } - case "username": - if err := func() error { - s.Username.Reset() - if err := s.Username.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"username\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode SecretsPropertiesServicenow") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *SecretsPropertiesServicenow) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *SecretsPropertiesServicenow) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s SecretsPropertiesSlack) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields implements json.Marshaler. -func (s SecretsPropertiesSlack) encodeFields(e *jx.Encoder) { - for k, elem := range s { - e.FieldStart(k) - - if len(elem) != 0 { - e.Raw(elem) - } - } -} - -// Decode decodes SecretsPropertiesSlack from json. -func (s *SecretsPropertiesSlack) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode SecretsPropertiesSlack to nil") - } - m := s.init() - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - var elem jx.Raw - if err := func() error { - v, err := d.RawAppend(nil) - elem = jx.Raw(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrapf(err, "decode field %q", k) - } - m[string(k)] = elem - return nil - }); err != nil { - return errors.Wrap(err, "decode SecretsPropertiesSlack") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s SecretsPropertiesSlack) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *SecretsPropertiesSlack) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *SecretsPropertiesSwimlane) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *SecretsPropertiesSwimlane) encodeFields(e *jx.Encoder) { - { - if s.ApiToken.Set { - e.FieldStart("apiToken") - s.ApiToken.Encode(e) - } - } -} - -var jsonFieldsNameOfSecretsPropertiesSwimlane = [1]string{ - 0: "apiToken", -} - -// Decode decodes SecretsPropertiesSwimlane from json. -func (s *SecretsPropertiesSwimlane) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode SecretsPropertiesSwimlane to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "apiToken": - if err := func() error { - s.ApiToken.Reset() - if err := s.ApiToken.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"apiToken\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode SecretsPropertiesSwimlane") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *SecretsPropertiesSwimlane) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *SecretsPropertiesSwimlane) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s SecretsPropertiesTeams) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields implements json.Marshaler. -func (s SecretsPropertiesTeams) encodeFields(e *jx.Encoder) { - for k, elem := range s { - e.FieldStart(k) - - if len(elem) != 0 { - e.Raw(elem) - } - } -} - -// Decode decodes SecretsPropertiesTeams from json. -func (s *SecretsPropertiesTeams) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode SecretsPropertiesTeams to nil") - } - m := s.init() - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - var elem jx.Raw - if err := func() error { - v, err := d.RawAppend(nil) - elem = jx.Raw(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrapf(err, "decode field %q", k) - } - m[string(k)] = elem - return nil - }); err != nil { - return errors.Wrap(err, "decode SecretsPropertiesTeams") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s SecretsPropertiesTeams) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *SecretsPropertiesTeams) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s SecretsPropertiesTines) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields implements json.Marshaler. -func (s SecretsPropertiesTines) encodeFields(e *jx.Encoder) { - for k, elem := range s { - e.FieldStart(k) - - if len(elem) != 0 { - e.Raw(elem) - } - } -} - -// Decode decodes SecretsPropertiesTines from json. -func (s *SecretsPropertiesTines) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode SecretsPropertiesTines to nil") - } - m := s.init() - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - var elem jx.Raw - if err := func() error { - v, err := d.RawAppend(nil) - elem = jx.Raw(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrapf(err, "decode field %q", k) - } - m[string(k)] = elem - return nil - }); err != nil { - return errors.Wrap(err, "decode SecretsPropertiesTines") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s SecretsPropertiesTines) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *SecretsPropertiesTines) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s SecretsPropertiesWebhook) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields implements json.Marshaler. -func (s SecretsPropertiesWebhook) encodeFields(e *jx.Encoder) { - for k, elem := range s { - e.FieldStart(k) - - if len(elem) != 0 { - e.Raw(elem) - } - } -} - -// Decode decodes SecretsPropertiesWebhook from json. -func (s *SecretsPropertiesWebhook) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode SecretsPropertiesWebhook to nil") - } - m := s.init() - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - var elem jx.Raw - if err := func() error { - v, err := d.RawAppend(nil) - elem = jx.Raw(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrapf(err, "decode field %q", k) - } - m[string(k)] = elem - return nil - }); err != nil { - return errors.Wrap(err, "decode SecretsPropertiesWebhook") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s SecretsPropertiesWebhook) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *SecretsPropertiesWebhook) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s SecretsPropertiesXmatters) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields implements json.Marshaler. -func (s SecretsPropertiesXmatters) encodeFields(e *jx.Encoder) { - for k, elem := range s { - e.FieldStart(k) - - if len(elem) != 0 { - e.Raw(elem) - } - } -} - -// Decode decodes SecretsPropertiesXmatters from json. -func (s *SecretsPropertiesXmatters) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode SecretsPropertiesXmatters to nil") - } - m := s.init() - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - var elem jx.Raw - if err := func() error { - v, err := d.RawAppend(nil) - elem = jx.Raw(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrapf(err, "decode field %q", k) - } - m[string(k)] = elem - return nil - }); err != nil { - return errors.Wrap(err, "decode SecretsPropertiesXmatters") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s SecretsPropertiesXmatters) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *SecretsPropertiesXmatters) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes UpdateConnectorReq as json. -func (s UpdateConnectorReq) Encode(e *jx.Encoder) { - switch s.Type { - case UpdateConnectorRequestCasesWebhookUpdateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".cases-webhook") - s.UpdateConnectorRequestCasesWebhook.encodeFields(e) - e.ObjEnd() - case UpdateConnectorRequestIndexUpdateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".index") - s.UpdateConnectorRequestIndex.encodeFields(e) - e.ObjEnd() - case UpdateConnectorRequestJiraUpdateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".jira") - s.UpdateConnectorRequestJira.encodeFields(e) - e.ObjEnd() - case UpdateConnectorRequestOpsgenieUpdateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".opsgenie") - s.UpdateConnectorRequestOpsgenie.encodeFields(e) - e.ObjEnd() - case UpdateConnectorRequestResilientUpdateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".resilient") - s.UpdateConnectorRequestResilient.encodeFields(e) - e.ObjEnd() - case UpdateConnectorRequestServerlogUpdateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".server-log") - s.UpdateConnectorRequestServerlog.encodeFields(e) - e.ObjEnd() - case UpdateConnectorRequestServicenowUpdateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".servicenow") - s.UpdateConnectorRequestServicenow.encodeFields(e) - e.ObjEnd() - case UpdateConnectorRequestServicenowItomUpdateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".servicenow-itom") - s.UpdateConnectorRequestServicenowItom.encodeFields(e) - e.ObjEnd() - case UpdateConnectorRequestSwimlaneUpdateConnectorReq: - e.ObjStart() - e.FieldStart("connector_type_id") - e.Str(".swimlane") - s.UpdateConnectorRequestSwimlane.encodeFields(e) - e.ObjEnd() - } -} - -// Decode decodes UpdateConnectorReq from json. -func (s *UpdateConnectorReq) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode UpdateConnectorReq to nil") - } - // Sum type discriminator. - if typ := d.Next(); typ != jx.Object { - return errors.Errorf("unexpected json type %q", typ) - } - - var found bool - if err := d.Capture(func(d *jx.Decoder) error { - return d.ObjBytes(func(d *jx.Decoder, key []byte) error { - if found { - return d.Skip() - } - switch string(key) { - case "connector_type_id": - typ, err := d.Str() - if err != nil { - return err - } - switch typ { - case ".cases-webhook": - s.Type = UpdateConnectorRequestCasesWebhookUpdateConnectorReq - found = true - case ".index": - s.Type = UpdateConnectorRequestIndexUpdateConnectorReq - found = true - case ".jira": - s.Type = UpdateConnectorRequestJiraUpdateConnectorReq - found = true - case ".opsgenie": - s.Type = UpdateConnectorRequestOpsgenieUpdateConnectorReq - found = true - case ".resilient": - s.Type = UpdateConnectorRequestResilientUpdateConnectorReq - found = true - case ".server-log": - s.Type = UpdateConnectorRequestServerlogUpdateConnectorReq - found = true - case ".servicenow": - s.Type = UpdateConnectorRequestServicenowUpdateConnectorReq - found = true - case ".servicenow-itom": - s.Type = UpdateConnectorRequestServicenowItomUpdateConnectorReq - found = true - case ".swimlane": - s.Type = UpdateConnectorRequestSwimlaneUpdateConnectorReq - found = true - default: - return errors.Errorf("unknown type %s", typ) - } - return nil - } - return d.Skip() - }) - }); err != nil { - return errors.Wrap(err, "capture") - } - if !found { - return errors.New("unable to detect sum type variant") - } - switch s.Type { - case UpdateConnectorRequestCasesWebhookUpdateConnectorReq: - if err := s.UpdateConnectorRequestCasesWebhook.Decode(d); err != nil { - return err - } - case UpdateConnectorRequestIndexUpdateConnectorReq: - if err := s.UpdateConnectorRequestIndex.Decode(d); err != nil { - return err - } - case UpdateConnectorRequestJiraUpdateConnectorReq: - if err := s.UpdateConnectorRequestJira.Decode(d); err != nil { - return err - } - case UpdateConnectorRequestOpsgenieUpdateConnectorReq: - if err := s.UpdateConnectorRequestOpsgenie.Decode(d); err != nil { - return err - } - case UpdateConnectorRequestResilientUpdateConnectorReq: - if err := s.UpdateConnectorRequestResilient.Decode(d); err != nil { - return err - } - case UpdateConnectorRequestServerlogUpdateConnectorReq: - if err := s.UpdateConnectorRequestServerlog.Decode(d); err != nil { - return err - } - case UpdateConnectorRequestServicenowUpdateConnectorReq: - if err := s.UpdateConnectorRequestServicenow.Decode(d); err != nil { - return err - } - case UpdateConnectorRequestServicenowItomUpdateConnectorReq: - if err := s.UpdateConnectorRequestServicenowItom.Decode(d); err != nil { - return err - } - case UpdateConnectorRequestSwimlaneUpdateConnectorReq: - if err := s.UpdateConnectorRequestSwimlane.Decode(d); err != nil { - return err - } - default: - return errors.Errorf("inferred invalid type: %s", s.Type) - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s UpdateConnectorReq) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *UpdateConnectorReq) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *UpdateConnectorRequestCasesWebhook) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *UpdateConnectorRequestCasesWebhook) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - if s.Secrets.Set { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } - } -} - -var jsonFieldsNameOfUpdateConnectorRequestCasesWebhook = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes UpdateConnectorRequestCasesWebhook from json. -func (s *UpdateConnectorRequestCasesWebhook) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode UpdateConnectorRequestCasesWebhook to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - if err := func() error { - s.Secrets.Reset() - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode UpdateConnectorRequestCasesWebhook") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfUpdateConnectorRequestCasesWebhook) { - name = jsonFieldsNameOfUpdateConnectorRequestCasesWebhook[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *UpdateConnectorRequestCasesWebhook) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *UpdateConnectorRequestCasesWebhook) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *UpdateConnectorRequestIndex) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *UpdateConnectorRequestIndex) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfUpdateConnectorRequestIndex = [2]string{ - 0: "config", - 1: "name", -} - -// Decode decodes UpdateConnectorRequestIndex from json. -func (s *UpdateConnectorRequestIndex) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode UpdateConnectorRequestIndex to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode UpdateConnectorRequestIndex") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfUpdateConnectorRequestIndex) { - name = jsonFieldsNameOfUpdateConnectorRequestIndex[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *UpdateConnectorRequestIndex) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *UpdateConnectorRequestIndex) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *UpdateConnectorRequestJira) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *UpdateConnectorRequestJira) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfUpdateConnectorRequestJira = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes UpdateConnectorRequestJira from json. -func (s *UpdateConnectorRequestJira) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode UpdateConnectorRequestJira to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode UpdateConnectorRequestJira") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfUpdateConnectorRequestJira) { - name = jsonFieldsNameOfUpdateConnectorRequestJira[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *UpdateConnectorRequestJira) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *UpdateConnectorRequestJira) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *UpdateConnectorRequestOpsgenie) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *UpdateConnectorRequestOpsgenie) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfUpdateConnectorRequestOpsgenie = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes UpdateConnectorRequestOpsgenie from json. -func (s *UpdateConnectorRequestOpsgenie) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode UpdateConnectorRequestOpsgenie to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode UpdateConnectorRequestOpsgenie") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfUpdateConnectorRequestOpsgenie) { - name = jsonFieldsNameOfUpdateConnectorRequestOpsgenie[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *UpdateConnectorRequestOpsgenie) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *UpdateConnectorRequestOpsgenie) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *UpdateConnectorRequestResilient) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *UpdateConnectorRequestResilient) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfUpdateConnectorRequestResilient = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes UpdateConnectorRequestResilient from json. -func (s *UpdateConnectorRequestResilient) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode UpdateConnectorRequestResilient to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode UpdateConnectorRequestResilient") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfUpdateConnectorRequestResilient) { - name = jsonFieldsNameOfUpdateConnectorRequestResilient[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *UpdateConnectorRequestResilient) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *UpdateConnectorRequestResilient) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *UpdateConnectorRequestServerlog) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *UpdateConnectorRequestServerlog) encodeFields(e *jx.Encoder) { - { - e.FieldStart("name") - e.Str(s.Name) - } -} - -var jsonFieldsNameOfUpdateConnectorRequestServerlog = [1]string{ - 0: "name", -} - -// Decode decodes UpdateConnectorRequestServerlog from json. -func (s *UpdateConnectorRequestServerlog) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode UpdateConnectorRequestServerlog to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "name": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode UpdateConnectorRequestServerlog") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000001, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfUpdateConnectorRequestServerlog) { - name = jsonFieldsNameOfUpdateConnectorRequestServerlog[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *UpdateConnectorRequestServerlog) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *UpdateConnectorRequestServerlog) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *UpdateConnectorRequestServicenow) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *UpdateConnectorRequestServicenow) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfUpdateConnectorRequestServicenow = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes UpdateConnectorRequestServicenow from json. -func (s *UpdateConnectorRequestServicenow) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode UpdateConnectorRequestServicenow to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode UpdateConnectorRequestServicenow") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfUpdateConnectorRequestServicenow) { - name = jsonFieldsNameOfUpdateConnectorRequestServicenow[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *UpdateConnectorRequestServicenow) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *UpdateConnectorRequestServicenow) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *UpdateConnectorRequestServicenowItom) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *UpdateConnectorRequestServicenowItom) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfUpdateConnectorRequestServicenowItom = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes UpdateConnectorRequestServicenowItom from json. -func (s *UpdateConnectorRequestServicenowItom) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode UpdateConnectorRequestServicenowItom to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode UpdateConnectorRequestServicenowItom") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfUpdateConnectorRequestServicenowItom) { - name = jsonFieldsNameOfUpdateConnectorRequestServicenowItom[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *UpdateConnectorRequestServicenowItom) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *UpdateConnectorRequestServicenowItom) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *UpdateConnectorRequestSwimlane) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *UpdateConnectorRequestSwimlane) encodeFields(e *jx.Encoder) { - { - e.FieldStart("config") - s.Config.Encode(e) - } - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("secrets") - s.Secrets.Encode(e) - } -} - -var jsonFieldsNameOfUpdateConnectorRequestSwimlane = [3]string{ - 0: "config", - 1: "name", - 2: "secrets", -} - -// Decode decodes UpdateConnectorRequestSwimlane from json. -func (s *UpdateConnectorRequestSwimlane) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode UpdateConnectorRequestSwimlane to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "config": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - if err := s.Config.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"config\"") - } - case "name": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "secrets": - requiredBitSet[0] |= 1 << 2 - if err := func() error { - if err := s.Secrets.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"secrets\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode UpdateConnectorRequestSwimlane") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000111, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfUpdateConnectorRequestSwimlane) { - name = jsonFieldsNameOfUpdateConnectorRequestSwimlane[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *UpdateConnectorRequestSwimlane) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *UpdateConnectorRequestSwimlane) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} diff --git a/generated/connectors/oas_parameters_gen.go b/generated/connectors/oas_parameters_gen.go deleted file mode 100644 index 4950f23e4..000000000 --- a/generated/connectors/oas_parameters_gen.go +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package connectors - -// CreateConnectorParams is parameters of createConnector operation. -type CreateConnectorParams struct { - // Cross-site request forgery protection. - KbnXSRF string - // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default - // space is used. - SpaceId string -} - -// DeleteConnectorParams is parameters of deleteConnector operation. -type DeleteConnectorParams struct { - // Cross-site request forgery protection. - KbnXSRF string - // An identifier for the connector. - ConnectorId string - // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default - // space is used. - SpaceId string -} - -// GetConnectorParams is parameters of getConnector operation. -type GetConnectorParams struct { - // An identifier for the connector. - ConnectorId string - // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default - // space is used. - SpaceId string -} - -// GetConnectorTypesParams is parameters of getConnectorTypes operation. -type GetConnectorTypesParams struct { - // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default - // space is used. - SpaceId string - // A filter to limit the retrieved connector types to those that support a specific feature (such as - // alerting or cases). - FeatureID OptFeatures -} - -// GetConnectorsParams is parameters of getConnectors operation. -type GetConnectorsParams struct { - // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default - // space is used. - SpaceId string -} - -// LegacyCreateConnectorParams is parameters of legacyCreateConnector operation. -type LegacyCreateConnectorParams struct { - // Cross-site request forgery protection. - KbnXSRF string - // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default - // space is used. - SpaceId string -} - -// LegacyDeleteConnectorParams is parameters of legacyDeleteConnector operation. -type LegacyDeleteConnectorParams struct { - // Cross-site request forgery protection. - KbnXSRF string - // An identifier for the action. - ActionId string - // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default - // space is used. - SpaceId string -} - -// LegacyGetConnectorParams is parameters of legacyGetConnector operation. -type LegacyGetConnectorParams struct { - // An identifier for the action. - ActionId string - // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default - // space is used. - SpaceId string -} - -// LegacyGetConnectorTypesParams is parameters of legacyGetConnectorTypes operation. -type LegacyGetConnectorTypesParams struct { - // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default - // space is used. - SpaceId string -} - -// LegacyGetConnectorsParams is parameters of legacyGetConnectors operation. -type LegacyGetConnectorsParams struct { - // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default - // space is used. - SpaceId string -} - -// LegacyRunConnectorParams is parameters of legacyRunConnector operation. -type LegacyRunConnectorParams struct { - // Cross-site request forgery protection. - KbnXSRF string - // An identifier for the action. - ActionId string - // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default - // space is used. - SpaceId string -} - -// LegacyUpdateConnectorParams is parameters of legacyUpdateConnector operation. -type LegacyUpdateConnectorParams struct { - // Cross-site request forgery protection. - KbnXSRF string - // An identifier for the action. - ActionId string - // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default - // space is used. - SpaceId string -} - -// UpdateConnectorParams is parameters of updateConnector operation. -type UpdateConnectorParams struct { - // Cross-site request forgery protection. - KbnXSRF string - // An identifier for the connector. - ConnectorId string - // An identifier for the space. If `/s/` and the identifier are omitted from the path, the default - // space is used. - SpaceId string -} diff --git a/generated/connectors/oas_request_encoders_gen.go b/generated/connectors/oas_request_encoders_gen.go deleted file mode 100644 index ce7797465..000000000 --- a/generated/connectors/oas_request_encoders_gen.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package connectors - -import ( - "bytes" - "net/http" - - "github.com/go-faster/jx" - - ht "github.com/ogen-go/ogen/http" -) - -func encodeCreateConnectorRequest( - req CreateConnectorReq, - r *http.Request, -) error { - const contentType = "application/json" - e := jx.GetEncoder() - { - req.Encode(e) - } - encoded := e.Bytes() - ht.SetBody(r, bytes.NewReader(encoded), contentType) - return nil -} - -func encodeLegacyCreateConnectorRequest( - req *LegacyCreateConnectorReq, - r *http.Request, -) error { - const contentType = "application/json" - e := jx.GetEncoder() - { - req.Encode(e) - } - encoded := e.Bytes() - ht.SetBody(r, bytes.NewReader(encoded), contentType) - return nil -} - -func encodeLegacyRunConnectorRequest( - req *LegacyRunConnectorReq, - r *http.Request, -) error { - const contentType = "application/json" - e := jx.GetEncoder() - { - req.Encode(e) - } - encoded := e.Bytes() - ht.SetBody(r, bytes.NewReader(encoded), contentType) - return nil -} - -func encodeLegacyUpdateConnectorRequest( - req *LegacyUpdateConnectorReq, - r *http.Request, -) error { - const contentType = "application/json" - e := jx.GetEncoder() - { - req.Encode(e) - } - encoded := e.Bytes() - ht.SetBody(r, bytes.NewReader(encoded), contentType) - return nil -} - -func encodeUpdateConnectorRequest( - req UpdateConnectorReq, - r *http.Request, -) error { - const contentType = "application/json" - e := jx.GetEncoder() - { - req.Encode(e) - } - encoded := e.Bytes() - ht.SetBody(r, bytes.NewReader(encoded), contentType) - return nil -} diff --git a/generated/connectors/oas_response_decoders_gen.go b/generated/connectors/oas_response_decoders_gen.go deleted file mode 100644 index 13cf06891..000000000 --- a/generated/connectors/oas_response_decoders_gen.go +++ /dev/null @@ -1,1114 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package connectors - -import ( - "io" - "mime" - "net/http" - - "github.com/go-faster/errors" - "github.com/go-faster/jx" - - "github.com/ogen-go/ogen/ogenerrors" - "github.com/ogen-go/ogen/validate" -) - -func decodeCreateConnectorResponse(resp *http.Response) (res CreateConnectorRes, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response ConnectorResponseProperties - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 400: - // Code 400. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response R400 - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 401: - // Code 401. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response R401 - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeDeleteConnectorResponse(resp *http.Response) (res DeleteConnectorRes, _ error) { - switch resp.StatusCode { - case 204: - // Code 204. - return &DeleteConnectorNoContent{}, nil - case 401: - // Code 401. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response R401 - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 404: - // Code 404. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response DeleteConnectorNotFound - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeGetConnectorResponse(resp *http.Response) (res GetConnectorRes, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response ConnectorResponseProperties - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 401: - // Code 401. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response R401 - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 404: - // Code 404. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response GetConnectorNotFound - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeGetConnectorTypesResponse(resp *http.Response) (res GetConnectorTypesRes, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response GetConnectorTypesOKApplicationJSON - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 401: - // Code 401. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response R401 - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeGetConnectorsResponse(resp *http.Response) (res GetConnectorsRes, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response GetConnectorsOKApplicationJSON - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 401: - // Code 401. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response R401 - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeLegacyCreateConnectorResponse(resp *http.Response) (res LegacyCreateConnectorRes, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response ActionResponseProperties - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 401: - // Code 401. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response R401 - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeLegacyDeleteConnectorResponse(resp *http.Response) (res LegacyDeleteConnectorRes, _ error) { - switch resp.StatusCode { - case 204: - // Code 204. - return &LegacyDeleteConnectorNoContent{}, nil - case 401: - // Code 401. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response R401 - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeLegacyGetConnectorResponse(resp *http.Response) (res LegacyGetConnectorRes, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response ActionResponseProperties - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 401: - // Code 401. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response R401 - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeLegacyGetConnectorTypesResponse(resp *http.Response) (res LegacyGetConnectorTypesRes, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response LegacyGetConnectorTypesOKApplicationJSON - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 401: - // Code 401. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response R401 - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeLegacyGetConnectorsResponse(resp *http.Response) (res LegacyGetConnectorsRes, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response LegacyGetConnectorsOKApplicationJSON - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 401: - // Code 401. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response R401 - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeLegacyRunConnectorResponse(resp *http.Response) (res LegacyRunConnectorRes, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response LegacyRunConnectorOK - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 401: - // Code 401. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response R401 - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeLegacyUpdateConnectorResponse(resp *http.Response) (res LegacyUpdateConnectorRes, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response ActionResponseProperties - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 404: - // Code 404. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response R404 - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} - -func decodeUpdateConnectorResponse(resp *http.Response) (res UpdateConnectorRes, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response ConnectorResponseProperties - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 400: - // Code 400. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response R400 - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 401: - // Code 401. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response R401 - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - case 404: - // Code 404. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response R404 - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - return res, validate.UnexpectedStatusCode(resp.StatusCode) -} diff --git a/generated/connectors/oas_schemas_gen.go b/generated/connectors/oas_schemas_gen.go deleted file mode 100644 index e6d9b57fe..000000000 --- a/generated/connectors/oas_schemas_gen.go +++ /dev/null @@ -1,8319 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package connectors - -import ( - "github.com/go-faster/errors" - "github.com/go-faster/jx" -) - -// The properties vary depending on the action type. -// Ref: #/components/schemas/action_response_properties -type ActionResponseProperties struct { - ActionTypeId OptString `json:"actionTypeId"` - Config *ActionResponsePropertiesConfig `json:"config"` - ID OptString `json:"id"` - // Indicates whether the action type is deprecated. - IsDeprecated OptBool `json:"isDeprecated"` - // Indicates whether secrets are missing for the action. - IsMissingSecrets OptBool `json:"isMissingSecrets"` - // Indicates whether it is a preconfigured action. - IsPreconfigured OptBool `json:"isPreconfigured"` - Name OptString `json:"name"` -} - -// GetActionTypeId returns the value of ActionTypeId. -func (s *ActionResponseProperties) GetActionTypeId() OptString { - return s.ActionTypeId -} - -// GetConfig returns the value of Config. -func (s *ActionResponseProperties) GetConfig() *ActionResponsePropertiesConfig { - return s.Config -} - -// GetID returns the value of ID. -func (s *ActionResponseProperties) GetID() OptString { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *ActionResponseProperties) GetIsDeprecated() OptBool { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *ActionResponseProperties) GetIsMissingSecrets() OptBool { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *ActionResponseProperties) GetIsPreconfigured() OptBool { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *ActionResponseProperties) GetName() OptString { - return s.Name -} - -// SetActionTypeId sets the value of ActionTypeId. -func (s *ActionResponseProperties) SetActionTypeId(val OptString) { - s.ActionTypeId = val -} - -// SetConfig sets the value of Config. -func (s *ActionResponseProperties) SetConfig(val *ActionResponsePropertiesConfig) { - s.Config = val -} - -// SetID sets the value of ID. -func (s *ActionResponseProperties) SetID(val OptString) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *ActionResponseProperties) SetIsDeprecated(val OptBool) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *ActionResponseProperties) SetIsMissingSecrets(val OptBool) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *ActionResponseProperties) SetIsPreconfigured(val OptBool) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *ActionResponseProperties) SetName(val OptString) { - s.Name = val -} - -func (*ActionResponseProperties) legacyCreateConnectorRes() {} -func (*ActionResponseProperties) legacyGetConnectorRes() {} -func (*ActionResponseProperties) legacyUpdateConnectorRes() {} - -type ActionResponsePropertiesConfig struct{} - -type ApiKeyAuth struct { - APIKey string -} - -// GetAPIKey returns the value of APIKey. -func (s *ApiKeyAuth) GetAPIKey() string { - return s.APIKey -} - -// SetAPIKey sets the value of APIKey. -func (s *ApiKeyAuth) SetAPIKey(val string) { - s.APIKey = val -} - -type BasicAuth struct { - Username string - Password string -} - -// GetUsername returns the value of Username. -func (s *BasicAuth) GetUsername() string { - return s.Username -} - -// GetPassword returns the value of Password. -func (s *BasicAuth) GetPassword() string { - return s.Password -} - -// SetUsername sets the value of Username. -func (s *BasicAuth) SetUsername(val string) { - s.Username = val -} - -// SetPassword sets the value of Password. -func (s *BasicAuth) SetPassword(val string) { - s.Password = val -} - -// Defines properties for connectors when type is `.cases-webhook`. -// Ref: #/components/schemas/config_properties_cases_webhook -type ConfigPropertiesCasesWebhook struct { - // A JSON payload sent to the create comment URL to create a case comment. You can use variables to - // add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache - // template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON - // is not validated when you create the connector. The JSON is validated once the Mustache variables - // have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding - // the Mustache variables, so the later validation will pass. - CreateCommentJson OptString `json:"createCommentJson"` - // The REST API HTTP request method to create a case comment in the third-party system. Valid values - // are `patch`, `post`, and `put`. - CreateCommentMethod OptConfigPropertiesCasesWebhookCreateCommentMethod `json:"createCommentMethod"` - // The REST API URL to create a case comment by ID in the third-party system. You can use a variable - // to add the external system ID to the URL. If you are using the `xpack.actions.allowedHosts - // setting`, add the hostname to the allowed hosts. - CreateCommentUrl OptString `json:"createCommentUrl"` - // A JSON payload sent to the create case URL to create a case. You can use variables to add case - // data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache - // template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), - // the JSON is not validated when you create the connector. The JSON is validated after the Mustache - // variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid - // future validation errors; disregard Mustache variables during your review. - CreateIncidentJson string `json:"createIncidentJson"` - // The REST API HTTP request method to create a case in the third-party system. Valid values are - // `patch`, `post`, and `put`. - CreateIncidentMethod OptConfigPropertiesCasesWebhookCreateIncidentMethod `json:"createIncidentMethod"` - // The JSON key in the create case response that contains the external case ID. - CreateIncidentResponseKey string `json:"createIncidentResponseKey"` - // The REST API URL to create a case in the third-party system. If you are using the `xpack.actions. - // allowedHosts` setting, add the hostname to the allowed hosts. - CreateIncidentUrl string `json:"createIncidentUrl"` - // The JSON key in get case response that contains the external case title. - GetIncidentResponseExternalTitleKey string `json:"getIncidentResponseExternalTitleKey"` - // The REST API URL to get the case by ID from the third-party system. If you are using the `xpack. - // actions.allowedHosts` setting, add the hostname to the allowed hosts. You can use a variable to - // add the external system ID to the URL. Due to Mustache template variables (the text enclosed in - // triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the - // connector. The JSON is validated after the Mustache variables have been placed when REST method - // runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later - // validation will pass. - GetIncidentUrl string `json:"getIncidentUrl"` - // If true, a username and password for login type authentication must be provided. - HasAuth OptBool `json:"hasAuth"` - // A set of key-value pairs sent as headers with the request URLs for the create case, update case, - // get case, and create comment methods. - Headers OptString `json:"headers"` - // The JSON payload sent to the update case URL to update the case. You can use variables to add - // Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due - // to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case. - // title}}}`), the JSON is not validated when you create the connector. The JSON is validated after - // the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is - // valid to avoid future validation errors; disregard Mustache variables during your review. - UpdateIncidentJson string `json:"updateIncidentJson"` - // The REST API HTTP request method to update the case in the third-party system. Valid values are - // `patch`, `post`, and `put`. - UpdateIncidentMethod OptConfigPropertiesCasesWebhookUpdateIncidentMethod `json:"updateIncidentMethod"` - // The REST API URL to update the case by ID in the third-party system. You can use a variable to add - // the external system ID to the URL. If you are using the `xpack.actions.allowedHosts` setting, add - // the hostname to the allowed hosts. - UpdateIncidentUrl string `json:"updateIncidentUrl"` - // The URL to view the case in the external system. You can use variables to add the external system - // ID or external system title to the URL. - ViewIncidentUrl string `json:"viewIncidentUrl"` -} - -// GetCreateCommentJson returns the value of CreateCommentJson. -func (s *ConfigPropertiesCasesWebhook) GetCreateCommentJson() OptString { - return s.CreateCommentJson -} - -// GetCreateCommentMethod returns the value of CreateCommentMethod. -func (s *ConfigPropertiesCasesWebhook) GetCreateCommentMethod() OptConfigPropertiesCasesWebhookCreateCommentMethod { - return s.CreateCommentMethod -} - -// GetCreateCommentUrl returns the value of CreateCommentUrl. -func (s *ConfigPropertiesCasesWebhook) GetCreateCommentUrl() OptString { - return s.CreateCommentUrl -} - -// GetCreateIncidentJson returns the value of CreateIncidentJson. -func (s *ConfigPropertiesCasesWebhook) GetCreateIncidentJson() string { - return s.CreateIncidentJson -} - -// GetCreateIncidentMethod returns the value of CreateIncidentMethod. -func (s *ConfigPropertiesCasesWebhook) GetCreateIncidentMethod() OptConfigPropertiesCasesWebhookCreateIncidentMethod { - return s.CreateIncidentMethod -} - -// GetCreateIncidentResponseKey returns the value of CreateIncidentResponseKey. -func (s *ConfigPropertiesCasesWebhook) GetCreateIncidentResponseKey() string { - return s.CreateIncidentResponseKey -} - -// GetCreateIncidentUrl returns the value of CreateIncidentUrl. -func (s *ConfigPropertiesCasesWebhook) GetCreateIncidentUrl() string { - return s.CreateIncidentUrl -} - -// GetGetIncidentResponseExternalTitleKey returns the value of GetIncidentResponseExternalTitleKey. -func (s *ConfigPropertiesCasesWebhook) GetGetIncidentResponseExternalTitleKey() string { - return s.GetIncidentResponseExternalTitleKey -} - -// GetGetIncidentUrl returns the value of GetIncidentUrl. -func (s *ConfigPropertiesCasesWebhook) GetGetIncidentUrl() string { - return s.GetIncidentUrl -} - -// GetHasAuth returns the value of HasAuth. -func (s *ConfigPropertiesCasesWebhook) GetHasAuth() OptBool { - return s.HasAuth -} - -// GetHeaders returns the value of Headers. -func (s *ConfigPropertiesCasesWebhook) GetHeaders() OptString { - return s.Headers -} - -// GetUpdateIncidentJson returns the value of UpdateIncidentJson. -func (s *ConfigPropertiesCasesWebhook) GetUpdateIncidentJson() string { - return s.UpdateIncidentJson -} - -// GetUpdateIncidentMethod returns the value of UpdateIncidentMethod. -func (s *ConfigPropertiesCasesWebhook) GetUpdateIncidentMethod() OptConfigPropertiesCasesWebhookUpdateIncidentMethod { - return s.UpdateIncidentMethod -} - -// GetUpdateIncidentUrl returns the value of UpdateIncidentUrl. -func (s *ConfigPropertiesCasesWebhook) GetUpdateIncidentUrl() string { - return s.UpdateIncidentUrl -} - -// GetViewIncidentUrl returns the value of ViewIncidentUrl. -func (s *ConfigPropertiesCasesWebhook) GetViewIncidentUrl() string { - return s.ViewIncidentUrl -} - -// SetCreateCommentJson sets the value of CreateCommentJson. -func (s *ConfigPropertiesCasesWebhook) SetCreateCommentJson(val OptString) { - s.CreateCommentJson = val -} - -// SetCreateCommentMethod sets the value of CreateCommentMethod. -func (s *ConfigPropertiesCasesWebhook) SetCreateCommentMethod(val OptConfigPropertiesCasesWebhookCreateCommentMethod) { - s.CreateCommentMethod = val -} - -// SetCreateCommentUrl sets the value of CreateCommentUrl. -func (s *ConfigPropertiesCasesWebhook) SetCreateCommentUrl(val OptString) { - s.CreateCommentUrl = val -} - -// SetCreateIncidentJson sets the value of CreateIncidentJson. -func (s *ConfigPropertiesCasesWebhook) SetCreateIncidentJson(val string) { - s.CreateIncidentJson = val -} - -// SetCreateIncidentMethod sets the value of CreateIncidentMethod. -func (s *ConfigPropertiesCasesWebhook) SetCreateIncidentMethod(val OptConfigPropertiesCasesWebhookCreateIncidentMethod) { - s.CreateIncidentMethod = val -} - -// SetCreateIncidentResponseKey sets the value of CreateIncidentResponseKey. -func (s *ConfigPropertiesCasesWebhook) SetCreateIncidentResponseKey(val string) { - s.CreateIncidentResponseKey = val -} - -// SetCreateIncidentUrl sets the value of CreateIncidentUrl. -func (s *ConfigPropertiesCasesWebhook) SetCreateIncidentUrl(val string) { - s.CreateIncidentUrl = val -} - -// SetGetIncidentResponseExternalTitleKey sets the value of GetIncidentResponseExternalTitleKey. -func (s *ConfigPropertiesCasesWebhook) SetGetIncidentResponseExternalTitleKey(val string) { - s.GetIncidentResponseExternalTitleKey = val -} - -// SetGetIncidentUrl sets the value of GetIncidentUrl. -func (s *ConfigPropertiesCasesWebhook) SetGetIncidentUrl(val string) { - s.GetIncidentUrl = val -} - -// SetHasAuth sets the value of HasAuth. -func (s *ConfigPropertiesCasesWebhook) SetHasAuth(val OptBool) { - s.HasAuth = val -} - -// SetHeaders sets the value of Headers. -func (s *ConfigPropertiesCasesWebhook) SetHeaders(val OptString) { - s.Headers = val -} - -// SetUpdateIncidentJson sets the value of UpdateIncidentJson. -func (s *ConfigPropertiesCasesWebhook) SetUpdateIncidentJson(val string) { - s.UpdateIncidentJson = val -} - -// SetUpdateIncidentMethod sets the value of UpdateIncidentMethod. -func (s *ConfigPropertiesCasesWebhook) SetUpdateIncidentMethod(val OptConfigPropertiesCasesWebhookUpdateIncidentMethod) { - s.UpdateIncidentMethod = val -} - -// SetUpdateIncidentUrl sets the value of UpdateIncidentUrl. -func (s *ConfigPropertiesCasesWebhook) SetUpdateIncidentUrl(val string) { - s.UpdateIncidentUrl = val -} - -// SetViewIncidentUrl sets the value of ViewIncidentUrl. -func (s *ConfigPropertiesCasesWebhook) SetViewIncidentUrl(val string) { - s.ViewIncidentUrl = val -} - -// The REST API HTTP request method to create a case comment in the third-party system. Valid values -// are `patch`, `post`, and `put`. -type ConfigPropertiesCasesWebhookCreateCommentMethod string - -const ( - ConfigPropertiesCasesWebhookCreateCommentMethodPatch ConfigPropertiesCasesWebhookCreateCommentMethod = "patch" - ConfigPropertiesCasesWebhookCreateCommentMethodPost ConfigPropertiesCasesWebhookCreateCommentMethod = "post" - ConfigPropertiesCasesWebhookCreateCommentMethodPut ConfigPropertiesCasesWebhookCreateCommentMethod = "put" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConfigPropertiesCasesWebhookCreateCommentMethod) MarshalText() ([]byte, error) { - switch s { - case ConfigPropertiesCasesWebhookCreateCommentMethodPatch: - return []byte(s), nil - case ConfigPropertiesCasesWebhookCreateCommentMethodPost: - return []byte(s), nil - case ConfigPropertiesCasesWebhookCreateCommentMethodPut: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConfigPropertiesCasesWebhookCreateCommentMethod) UnmarshalText(data []byte) error { - switch ConfigPropertiesCasesWebhookCreateCommentMethod(data) { - case ConfigPropertiesCasesWebhookCreateCommentMethodPatch: - *s = ConfigPropertiesCasesWebhookCreateCommentMethodPatch - return nil - case ConfigPropertiesCasesWebhookCreateCommentMethodPost: - *s = ConfigPropertiesCasesWebhookCreateCommentMethodPost - return nil - case ConfigPropertiesCasesWebhookCreateCommentMethodPut: - *s = ConfigPropertiesCasesWebhookCreateCommentMethodPut - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The REST API HTTP request method to create a case in the third-party system. Valid values are -// `patch`, `post`, and `put`. -type ConfigPropertiesCasesWebhookCreateIncidentMethod string - -const ( - ConfigPropertiesCasesWebhookCreateIncidentMethodPatch ConfigPropertiesCasesWebhookCreateIncidentMethod = "patch" - ConfigPropertiesCasesWebhookCreateIncidentMethodPost ConfigPropertiesCasesWebhookCreateIncidentMethod = "post" - ConfigPropertiesCasesWebhookCreateIncidentMethodPut ConfigPropertiesCasesWebhookCreateIncidentMethod = "put" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConfigPropertiesCasesWebhookCreateIncidentMethod) MarshalText() ([]byte, error) { - switch s { - case ConfigPropertiesCasesWebhookCreateIncidentMethodPatch: - return []byte(s), nil - case ConfigPropertiesCasesWebhookCreateIncidentMethodPost: - return []byte(s), nil - case ConfigPropertiesCasesWebhookCreateIncidentMethodPut: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConfigPropertiesCasesWebhookCreateIncidentMethod) UnmarshalText(data []byte) error { - switch ConfigPropertiesCasesWebhookCreateIncidentMethod(data) { - case ConfigPropertiesCasesWebhookCreateIncidentMethodPatch: - *s = ConfigPropertiesCasesWebhookCreateIncidentMethodPatch - return nil - case ConfigPropertiesCasesWebhookCreateIncidentMethodPost: - *s = ConfigPropertiesCasesWebhookCreateIncidentMethodPost - return nil - case ConfigPropertiesCasesWebhookCreateIncidentMethodPut: - *s = ConfigPropertiesCasesWebhookCreateIncidentMethodPut - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The REST API HTTP request method to update the case in the third-party system. Valid values are -// `patch`, `post`, and `put`. -type ConfigPropertiesCasesWebhookUpdateIncidentMethod string - -const ( - ConfigPropertiesCasesWebhookUpdateIncidentMethodPatch ConfigPropertiesCasesWebhookUpdateIncidentMethod = "patch" - ConfigPropertiesCasesWebhookUpdateIncidentMethodPost ConfigPropertiesCasesWebhookUpdateIncidentMethod = "post" - ConfigPropertiesCasesWebhookUpdateIncidentMethodPut ConfigPropertiesCasesWebhookUpdateIncidentMethod = "put" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConfigPropertiesCasesWebhookUpdateIncidentMethod) MarshalText() ([]byte, error) { - switch s { - case ConfigPropertiesCasesWebhookUpdateIncidentMethodPatch: - return []byte(s), nil - case ConfigPropertiesCasesWebhookUpdateIncidentMethodPost: - return []byte(s), nil - case ConfigPropertiesCasesWebhookUpdateIncidentMethodPut: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConfigPropertiesCasesWebhookUpdateIncidentMethod) UnmarshalText(data []byte) error { - switch ConfigPropertiesCasesWebhookUpdateIncidentMethod(data) { - case ConfigPropertiesCasesWebhookUpdateIncidentMethodPatch: - *s = ConfigPropertiesCasesWebhookUpdateIncidentMethodPatch - return nil - case ConfigPropertiesCasesWebhookUpdateIncidentMethodPost: - *s = ConfigPropertiesCasesWebhookUpdateIncidentMethodPost - return nil - case ConfigPropertiesCasesWebhookUpdateIncidentMethodPut: - *s = ConfigPropertiesCasesWebhookUpdateIncidentMethodPut - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// Defines properties for connectors when type is `.email`. -// Ref: #/components/schemas/config_properties_email -type ConfigPropertiesEmail map[string]jx.Raw - -func (s *ConfigPropertiesEmail) init() ConfigPropertiesEmail { - m := *s - if m == nil { - m = map[string]jx.Raw{} - *s = m - } - return m -} - -// Defines properties for connectors when type is `.index`. -// Ref: #/components/schemas/config_properties_index -type ConfigPropertiesIndex struct { - // Specifies a field that will contain the time the alert condition was detected. - ExecutionTimeField OptNilString `json:"executionTimeField"` - // The Elasticsearch index to be written to. - Index string `json:"index"` - // The refresh policy for the write request, which affects when changes are made visible to search. - // Refer to the refresh setting for Elasticsearch document APIs. - Refresh OptBool `json:"refresh"` -} - -// GetExecutionTimeField returns the value of ExecutionTimeField. -func (s *ConfigPropertiesIndex) GetExecutionTimeField() OptNilString { - return s.ExecutionTimeField -} - -// GetIndex returns the value of Index. -func (s *ConfigPropertiesIndex) GetIndex() string { - return s.Index -} - -// GetRefresh returns the value of Refresh. -func (s *ConfigPropertiesIndex) GetRefresh() OptBool { - return s.Refresh -} - -// SetExecutionTimeField sets the value of ExecutionTimeField. -func (s *ConfigPropertiesIndex) SetExecutionTimeField(val OptNilString) { - s.ExecutionTimeField = val -} - -// SetIndex sets the value of Index. -func (s *ConfigPropertiesIndex) SetIndex(val string) { - s.Index = val -} - -// SetRefresh sets the value of Refresh. -func (s *ConfigPropertiesIndex) SetRefresh(val OptBool) { - s.Refresh = val -} - -// Defines properties for connectors when type is `.jira`. -// Ref: #/components/schemas/config_properties_jira -type ConfigPropertiesJira struct { - // The Jira instance URL. - ApiUrl string `json:"apiUrl"` - // The Jira project key. - ProjectKey string `json:"projectKey"` -} - -// GetApiUrl returns the value of ApiUrl. -func (s *ConfigPropertiesJira) GetApiUrl() string { - return s.ApiUrl -} - -// GetProjectKey returns the value of ProjectKey. -func (s *ConfigPropertiesJira) GetProjectKey() string { - return s.ProjectKey -} - -// SetApiUrl sets the value of ApiUrl. -func (s *ConfigPropertiesJira) SetApiUrl(val string) { - s.ApiUrl = val -} - -// SetProjectKey sets the value of ProjectKey. -func (s *ConfigPropertiesJira) SetProjectKey(val string) { - s.ProjectKey = val -} - -// Defines properties for connectors when type is `.opsgenie`. -// Ref: #/components/schemas/config_properties_opsgenie -type ConfigPropertiesOpsgenie struct { - // The Opsgenie URL. For example, `https://api.opsgenie.com` or `https://api.eu.opsgenie.com`. If you - // are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. - ApiUrl string `json:"apiUrl"` -} - -// GetApiUrl returns the value of ApiUrl. -func (s *ConfigPropertiesOpsgenie) GetApiUrl() string { - return s.ApiUrl -} - -// SetApiUrl sets the value of ApiUrl. -func (s *ConfigPropertiesOpsgenie) SetApiUrl(val string) { - s.ApiUrl = val -} - -// Defines properties for connectors when type is `.pagerduty`. -// Ref: #/components/schemas/config_properties_pagerduty -type ConfigPropertiesPagerduty map[string]jx.Raw - -func (s *ConfigPropertiesPagerduty) init() ConfigPropertiesPagerduty { - m := *s - if m == nil { - m = map[string]jx.Raw{} - *s = m - } - return m -} - -// Defines properties for connectors when type is `.resilient`. -// Ref: #/components/schemas/config_properties_resilient -type ConfigPropertiesResilient struct { - // The IBM Resilient instance URL. - ApiUrl string `json:"apiUrl"` - // The IBM Resilient organization ID. - OrgId string `json:"orgId"` -} - -// GetApiUrl returns the value of ApiUrl. -func (s *ConfigPropertiesResilient) GetApiUrl() string { - return s.ApiUrl -} - -// GetOrgId returns the value of OrgId. -func (s *ConfigPropertiesResilient) GetOrgId() string { - return s.OrgId -} - -// SetApiUrl sets the value of ApiUrl. -func (s *ConfigPropertiesResilient) SetApiUrl(val string) { - s.ApiUrl = val -} - -// SetOrgId sets the value of OrgId. -func (s *ConfigPropertiesResilient) SetOrgId(val string) { - s.OrgId = val -} - -// Defines properties for connectors when type is `.servicenow`. -// Ref: #/components/schemas/config_properties_servicenow -type ConfigPropertiesServicenow struct { - // The ServiceNow instance URL. - ApiUrl string `json:"apiUrl"` - // The client ID assigned to your OAuth application. This property is required when `isOAuth` is - // `true`. - ClientId OptString `json:"clientId"` - // The type of authentication to use. The default value is false, which means basic authentication is - // used instead of open authorization (OAuth). - IsOAuth OptBool `json:"isOAuth"` - // The key identifier assigned to the JWT verifier map of your OAuth application. This property is - // required when `isOAuth` is `true`. - JwtKeyId OptString `json:"jwtKeyId"` - // The identifier to use for OAuth authentication. This identifier should be the user field you - // selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow - // instance. For example, if the selected user field is `Email`, the user identifier should be the - // user's email address. This property is required when `isOAuth` is `true`. - UserIdentifierValue OptString `json:"userIdentifierValue"` - // Determines whether the connector uses the Table API or the Import Set API. This property is - // supported only for ServiceNow ITSM and ServiceNow SecOps connectors. NOTE: If this property is - // set to `false`, the Elastic application should be installed in ServiceNow. - UsesTableApi OptBool `json:"usesTableApi"` -} - -// GetApiUrl returns the value of ApiUrl. -func (s *ConfigPropertiesServicenow) GetApiUrl() string { - return s.ApiUrl -} - -// GetClientId returns the value of ClientId. -func (s *ConfigPropertiesServicenow) GetClientId() OptString { - return s.ClientId -} - -// GetIsOAuth returns the value of IsOAuth. -func (s *ConfigPropertiesServicenow) GetIsOAuth() OptBool { - return s.IsOAuth -} - -// GetJwtKeyId returns the value of JwtKeyId. -func (s *ConfigPropertiesServicenow) GetJwtKeyId() OptString { - return s.JwtKeyId -} - -// GetUserIdentifierValue returns the value of UserIdentifierValue. -func (s *ConfigPropertiesServicenow) GetUserIdentifierValue() OptString { - return s.UserIdentifierValue -} - -// GetUsesTableApi returns the value of UsesTableApi. -func (s *ConfigPropertiesServicenow) GetUsesTableApi() OptBool { - return s.UsesTableApi -} - -// SetApiUrl sets the value of ApiUrl. -func (s *ConfigPropertiesServicenow) SetApiUrl(val string) { - s.ApiUrl = val -} - -// SetClientId sets the value of ClientId. -func (s *ConfigPropertiesServicenow) SetClientId(val OptString) { - s.ClientId = val -} - -// SetIsOAuth sets the value of IsOAuth. -func (s *ConfigPropertiesServicenow) SetIsOAuth(val OptBool) { - s.IsOAuth = val -} - -// SetJwtKeyId sets the value of JwtKeyId. -func (s *ConfigPropertiesServicenow) SetJwtKeyId(val OptString) { - s.JwtKeyId = val -} - -// SetUserIdentifierValue sets the value of UserIdentifierValue. -func (s *ConfigPropertiesServicenow) SetUserIdentifierValue(val OptString) { - s.UserIdentifierValue = val -} - -// SetUsesTableApi sets the value of UsesTableApi. -func (s *ConfigPropertiesServicenow) SetUsesTableApi(val OptBool) { - s.UsesTableApi = val -} - -// Defines properties for connectors when type is `.servicenow`. -// Ref: #/components/schemas/config_properties_servicenow_itom -type ConfigPropertiesServicenowItom struct { - // The ServiceNow instance URL. - ApiUrl string `json:"apiUrl"` - // The client ID assigned to your OAuth application. This property is required when `isOAuth` is - // `true`. - ClientId OptString `json:"clientId"` - // The type of authentication to use. The default value is false, which means basic authentication is - // used instead of open authorization (OAuth). - IsOAuth OptBool `json:"isOAuth"` - // The key identifier assigned to the JWT verifier map of your OAuth application. This property is - // required when `isOAuth` is `true`. - JwtKeyId OptString `json:"jwtKeyId"` - // The identifier to use for OAuth authentication. This identifier should be the user field you - // selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow - // instance. For example, if the selected user field is `Email`, the user identifier should be the - // user's email address. This property is required when `isOAuth` is `true`. - UserIdentifierValue OptString `json:"userIdentifierValue"` -} - -// GetApiUrl returns the value of ApiUrl. -func (s *ConfigPropertiesServicenowItom) GetApiUrl() string { - return s.ApiUrl -} - -// GetClientId returns the value of ClientId. -func (s *ConfigPropertiesServicenowItom) GetClientId() OptString { - return s.ClientId -} - -// GetIsOAuth returns the value of IsOAuth. -func (s *ConfigPropertiesServicenowItom) GetIsOAuth() OptBool { - return s.IsOAuth -} - -// GetJwtKeyId returns the value of JwtKeyId. -func (s *ConfigPropertiesServicenowItom) GetJwtKeyId() OptString { - return s.JwtKeyId -} - -// GetUserIdentifierValue returns the value of UserIdentifierValue. -func (s *ConfigPropertiesServicenowItom) GetUserIdentifierValue() OptString { - return s.UserIdentifierValue -} - -// SetApiUrl sets the value of ApiUrl. -func (s *ConfigPropertiesServicenowItom) SetApiUrl(val string) { - s.ApiUrl = val -} - -// SetClientId sets the value of ClientId. -func (s *ConfigPropertiesServicenowItom) SetClientId(val OptString) { - s.ClientId = val -} - -// SetIsOAuth sets the value of IsOAuth. -func (s *ConfigPropertiesServicenowItom) SetIsOAuth(val OptBool) { - s.IsOAuth = val -} - -// SetJwtKeyId sets the value of JwtKeyId. -func (s *ConfigPropertiesServicenowItom) SetJwtKeyId(val OptString) { - s.JwtKeyId = val -} - -// SetUserIdentifierValue sets the value of UserIdentifierValue. -func (s *ConfigPropertiesServicenowItom) SetUserIdentifierValue(val OptString) { - s.UserIdentifierValue = val -} - -// Defines properties for connectors when type is `.swimlane`. -// Ref: #/components/schemas/config_properties_swimlane -type ConfigPropertiesSwimlane struct { - // The Swimlane instance URL. - ApiUrl string `json:"apiUrl"` - // The Swimlane application ID. - AppId string `json:"appId"` - // The type of connector. Valid values are `all`, `alerts`, and `cases`. - ConnectorType ConfigPropertiesSwimlaneConnectorType `json:"connectorType"` - // The field mapping. - Mappings OptConfigPropertiesSwimlaneMappings `json:"mappings"` -} - -// GetApiUrl returns the value of ApiUrl. -func (s *ConfigPropertiesSwimlane) GetApiUrl() string { - return s.ApiUrl -} - -// GetAppId returns the value of AppId. -func (s *ConfigPropertiesSwimlane) GetAppId() string { - return s.AppId -} - -// GetConnectorType returns the value of ConnectorType. -func (s *ConfigPropertiesSwimlane) GetConnectorType() ConfigPropertiesSwimlaneConnectorType { - return s.ConnectorType -} - -// GetMappings returns the value of Mappings. -func (s *ConfigPropertiesSwimlane) GetMappings() OptConfigPropertiesSwimlaneMappings { - return s.Mappings -} - -// SetApiUrl sets the value of ApiUrl. -func (s *ConfigPropertiesSwimlane) SetApiUrl(val string) { - s.ApiUrl = val -} - -// SetAppId sets the value of AppId. -func (s *ConfigPropertiesSwimlane) SetAppId(val string) { - s.AppId = val -} - -// SetConnectorType sets the value of ConnectorType. -func (s *ConfigPropertiesSwimlane) SetConnectorType(val ConfigPropertiesSwimlaneConnectorType) { - s.ConnectorType = val -} - -// SetMappings sets the value of Mappings. -func (s *ConfigPropertiesSwimlane) SetMappings(val OptConfigPropertiesSwimlaneMappings) { - s.Mappings = val -} - -// The type of connector. Valid values are `all`, `alerts`, and `cases`. -type ConfigPropertiesSwimlaneConnectorType string - -const ( - ConfigPropertiesSwimlaneConnectorTypeAll ConfigPropertiesSwimlaneConnectorType = "all" - ConfigPropertiesSwimlaneConnectorTypeAlerts ConfigPropertiesSwimlaneConnectorType = "alerts" - ConfigPropertiesSwimlaneConnectorTypeCases ConfigPropertiesSwimlaneConnectorType = "cases" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConfigPropertiesSwimlaneConnectorType) MarshalText() ([]byte, error) { - switch s { - case ConfigPropertiesSwimlaneConnectorTypeAll: - return []byte(s), nil - case ConfigPropertiesSwimlaneConnectorTypeAlerts: - return []byte(s), nil - case ConfigPropertiesSwimlaneConnectorTypeCases: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConfigPropertiesSwimlaneConnectorType) UnmarshalText(data []byte) error { - switch ConfigPropertiesSwimlaneConnectorType(data) { - case ConfigPropertiesSwimlaneConnectorTypeAll: - *s = ConfigPropertiesSwimlaneConnectorTypeAll - return nil - case ConfigPropertiesSwimlaneConnectorTypeAlerts: - *s = ConfigPropertiesSwimlaneConnectorTypeAlerts - return nil - case ConfigPropertiesSwimlaneConnectorTypeCases: - *s = ConfigPropertiesSwimlaneConnectorTypeCases - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The field mapping. -type ConfigPropertiesSwimlaneMappings struct { - // Mapping for the alert ID. - AlertIdConfig OptConfigPropertiesSwimlaneMappingsAlertIdConfig `json:"alertIdConfig"` - // Mapping for the case ID. - CaseIdConfig OptConfigPropertiesSwimlaneMappingsCaseIdConfig `json:"caseIdConfig"` - // Mapping for the case name. - CaseNameConfig OptConfigPropertiesSwimlaneMappingsCaseNameConfig `json:"caseNameConfig"` - // Mapping for the case comments. - CommentsConfig OptConfigPropertiesSwimlaneMappingsCommentsConfig `json:"commentsConfig"` - // Mapping for the case description. - DescriptionConfig OptConfigPropertiesSwimlaneMappingsDescriptionConfig `json:"descriptionConfig"` - // Mapping for the name of the alert's rule. - RuleNameConfig OptConfigPropertiesSwimlaneMappingsRuleNameConfig `json:"ruleNameConfig"` - // Mapping for the severity. - SeverityConfig OptConfigPropertiesSwimlaneMappingsSeverityConfig `json:"severityConfig"` -} - -// GetAlertIdConfig returns the value of AlertIdConfig. -func (s *ConfigPropertiesSwimlaneMappings) GetAlertIdConfig() OptConfigPropertiesSwimlaneMappingsAlertIdConfig { - return s.AlertIdConfig -} - -// GetCaseIdConfig returns the value of CaseIdConfig. -func (s *ConfigPropertiesSwimlaneMappings) GetCaseIdConfig() OptConfigPropertiesSwimlaneMappingsCaseIdConfig { - return s.CaseIdConfig -} - -// GetCaseNameConfig returns the value of CaseNameConfig. -func (s *ConfigPropertiesSwimlaneMappings) GetCaseNameConfig() OptConfigPropertiesSwimlaneMappingsCaseNameConfig { - return s.CaseNameConfig -} - -// GetCommentsConfig returns the value of CommentsConfig. -func (s *ConfigPropertiesSwimlaneMappings) GetCommentsConfig() OptConfigPropertiesSwimlaneMappingsCommentsConfig { - return s.CommentsConfig -} - -// GetDescriptionConfig returns the value of DescriptionConfig. -func (s *ConfigPropertiesSwimlaneMappings) GetDescriptionConfig() OptConfigPropertiesSwimlaneMappingsDescriptionConfig { - return s.DescriptionConfig -} - -// GetRuleNameConfig returns the value of RuleNameConfig. -func (s *ConfigPropertiesSwimlaneMappings) GetRuleNameConfig() OptConfigPropertiesSwimlaneMappingsRuleNameConfig { - return s.RuleNameConfig -} - -// GetSeverityConfig returns the value of SeverityConfig. -func (s *ConfigPropertiesSwimlaneMappings) GetSeverityConfig() OptConfigPropertiesSwimlaneMappingsSeverityConfig { - return s.SeverityConfig -} - -// SetAlertIdConfig sets the value of AlertIdConfig. -func (s *ConfigPropertiesSwimlaneMappings) SetAlertIdConfig(val OptConfigPropertiesSwimlaneMappingsAlertIdConfig) { - s.AlertIdConfig = val -} - -// SetCaseIdConfig sets the value of CaseIdConfig. -func (s *ConfigPropertiesSwimlaneMappings) SetCaseIdConfig(val OptConfigPropertiesSwimlaneMappingsCaseIdConfig) { - s.CaseIdConfig = val -} - -// SetCaseNameConfig sets the value of CaseNameConfig. -func (s *ConfigPropertiesSwimlaneMappings) SetCaseNameConfig(val OptConfigPropertiesSwimlaneMappingsCaseNameConfig) { - s.CaseNameConfig = val -} - -// SetCommentsConfig sets the value of CommentsConfig. -func (s *ConfigPropertiesSwimlaneMappings) SetCommentsConfig(val OptConfigPropertiesSwimlaneMappingsCommentsConfig) { - s.CommentsConfig = val -} - -// SetDescriptionConfig sets the value of DescriptionConfig. -func (s *ConfigPropertiesSwimlaneMappings) SetDescriptionConfig(val OptConfigPropertiesSwimlaneMappingsDescriptionConfig) { - s.DescriptionConfig = val -} - -// SetRuleNameConfig sets the value of RuleNameConfig. -func (s *ConfigPropertiesSwimlaneMappings) SetRuleNameConfig(val OptConfigPropertiesSwimlaneMappingsRuleNameConfig) { - s.RuleNameConfig = val -} - -// SetSeverityConfig sets the value of SeverityConfig. -func (s *ConfigPropertiesSwimlaneMappings) SetSeverityConfig(val OptConfigPropertiesSwimlaneMappingsSeverityConfig) { - s.SeverityConfig = val -} - -// Mapping for the alert ID. -type ConfigPropertiesSwimlaneMappingsAlertIdConfig struct { - // The type of field in Swimlane. - FieldType string `json:"fieldType"` - // The identifier for the field in Swimlane. - ID string `json:"id"` - // The key for the field in Swimlane. - Key string `json:"key"` - // The name of the field in Swimlane. - Name string `json:"name"` -} - -// GetFieldType returns the value of FieldType. -func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) GetFieldType() string { - return s.FieldType -} - -// GetID returns the value of ID. -func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) GetID() string { - return s.ID -} - -// GetKey returns the value of Key. -func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) GetKey() string { - return s.Key -} - -// GetName returns the value of Name. -func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) GetName() string { - return s.Name -} - -// SetFieldType sets the value of FieldType. -func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) SetFieldType(val string) { - s.FieldType = val -} - -// SetID sets the value of ID. -func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) SetID(val string) { - s.ID = val -} - -// SetKey sets the value of Key. -func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) SetKey(val string) { - s.Key = val -} - -// SetName sets the value of Name. -func (s *ConfigPropertiesSwimlaneMappingsAlertIdConfig) SetName(val string) { - s.Name = val -} - -// Mapping for the case ID. -type ConfigPropertiesSwimlaneMappingsCaseIdConfig struct { - // The type of field in Swimlane. - FieldType string `json:"fieldType"` - // The identifier for the field in Swimlane. - ID string `json:"id"` - // The key for the field in Swimlane. - Key string `json:"key"` - // The name of the field in Swimlane. - Name string `json:"name"` -} - -// GetFieldType returns the value of FieldType. -func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) GetFieldType() string { - return s.FieldType -} - -// GetID returns the value of ID. -func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) GetID() string { - return s.ID -} - -// GetKey returns the value of Key. -func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) GetKey() string { - return s.Key -} - -// GetName returns the value of Name. -func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) GetName() string { - return s.Name -} - -// SetFieldType sets the value of FieldType. -func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) SetFieldType(val string) { - s.FieldType = val -} - -// SetID sets the value of ID. -func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) SetID(val string) { - s.ID = val -} - -// SetKey sets the value of Key. -func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) SetKey(val string) { - s.Key = val -} - -// SetName sets the value of Name. -func (s *ConfigPropertiesSwimlaneMappingsCaseIdConfig) SetName(val string) { - s.Name = val -} - -// Mapping for the case name. -type ConfigPropertiesSwimlaneMappingsCaseNameConfig struct { - // The type of field in Swimlane. - FieldType string `json:"fieldType"` - // The identifier for the field in Swimlane. - ID string `json:"id"` - // The key for the field in Swimlane. - Key string `json:"key"` - // The name of the field in Swimlane. - Name string `json:"name"` -} - -// GetFieldType returns the value of FieldType. -func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) GetFieldType() string { - return s.FieldType -} - -// GetID returns the value of ID. -func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) GetID() string { - return s.ID -} - -// GetKey returns the value of Key. -func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) GetKey() string { - return s.Key -} - -// GetName returns the value of Name. -func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) GetName() string { - return s.Name -} - -// SetFieldType sets the value of FieldType. -func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) SetFieldType(val string) { - s.FieldType = val -} - -// SetID sets the value of ID. -func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) SetID(val string) { - s.ID = val -} - -// SetKey sets the value of Key. -func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) SetKey(val string) { - s.Key = val -} - -// SetName sets the value of Name. -func (s *ConfigPropertiesSwimlaneMappingsCaseNameConfig) SetName(val string) { - s.Name = val -} - -// Mapping for the case comments. -type ConfigPropertiesSwimlaneMappingsCommentsConfig struct { - // The type of field in Swimlane. - FieldType string `json:"fieldType"` - // The identifier for the field in Swimlane. - ID string `json:"id"` - // The key for the field in Swimlane. - Key string `json:"key"` - // The name of the field in Swimlane. - Name string `json:"name"` -} - -// GetFieldType returns the value of FieldType. -func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) GetFieldType() string { - return s.FieldType -} - -// GetID returns the value of ID. -func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) GetID() string { - return s.ID -} - -// GetKey returns the value of Key. -func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) GetKey() string { - return s.Key -} - -// GetName returns the value of Name. -func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) GetName() string { - return s.Name -} - -// SetFieldType sets the value of FieldType. -func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) SetFieldType(val string) { - s.FieldType = val -} - -// SetID sets the value of ID. -func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) SetID(val string) { - s.ID = val -} - -// SetKey sets the value of Key. -func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) SetKey(val string) { - s.Key = val -} - -// SetName sets the value of Name. -func (s *ConfigPropertiesSwimlaneMappingsCommentsConfig) SetName(val string) { - s.Name = val -} - -// Mapping for the case description. -type ConfigPropertiesSwimlaneMappingsDescriptionConfig struct { - // The type of field in Swimlane. - FieldType string `json:"fieldType"` - // The identifier for the field in Swimlane. - ID string `json:"id"` - // The key for the field in Swimlane. - Key string `json:"key"` - // The name of the field in Swimlane. - Name string `json:"name"` -} - -// GetFieldType returns the value of FieldType. -func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) GetFieldType() string { - return s.FieldType -} - -// GetID returns the value of ID. -func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) GetID() string { - return s.ID -} - -// GetKey returns the value of Key. -func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) GetKey() string { - return s.Key -} - -// GetName returns the value of Name. -func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) GetName() string { - return s.Name -} - -// SetFieldType sets the value of FieldType. -func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) SetFieldType(val string) { - s.FieldType = val -} - -// SetID sets the value of ID. -func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) SetID(val string) { - s.ID = val -} - -// SetKey sets the value of Key. -func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) SetKey(val string) { - s.Key = val -} - -// SetName sets the value of Name. -func (s *ConfigPropertiesSwimlaneMappingsDescriptionConfig) SetName(val string) { - s.Name = val -} - -// Mapping for the name of the alert's rule. -type ConfigPropertiesSwimlaneMappingsRuleNameConfig struct { - // The type of field in Swimlane. - FieldType string `json:"fieldType"` - // The identifier for the field in Swimlane. - ID string `json:"id"` - // The key for the field in Swimlane. - Key string `json:"key"` - // The name of the field in Swimlane. - Name string `json:"name"` -} - -// GetFieldType returns the value of FieldType. -func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) GetFieldType() string { - return s.FieldType -} - -// GetID returns the value of ID. -func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) GetID() string { - return s.ID -} - -// GetKey returns the value of Key. -func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) GetKey() string { - return s.Key -} - -// GetName returns the value of Name. -func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) GetName() string { - return s.Name -} - -// SetFieldType sets the value of FieldType. -func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) SetFieldType(val string) { - s.FieldType = val -} - -// SetID sets the value of ID. -func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) SetID(val string) { - s.ID = val -} - -// SetKey sets the value of Key. -func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) SetKey(val string) { - s.Key = val -} - -// SetName sets the value of Name. -func (s *ConfigPropertiesSwimlaneMappingsRuleNameConfig) SetName(val string) { - s.Name = val -} - -// Mapping for the severity. -type ConfigPropertiesSwimlaneMappingsSeverityConfig struct { - // The type of field in Swimlane. - FieldType string `json:"fieldType"` - // The identifier for the field in Swimlane. - ID string `json:"id"` - // The key for the field in Swimlane. - Key string `json:"key"` - // The name of the field in Swimlane. - Name string `json:"name"` -} - -// GetFieldType returns the value of FieldType. -func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) GetFieldType() string { - return s.FieldType -} - -// GetID returns the value of ID. -func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) GetID() string { - return s.ID -} - -// GetKey returns the value of Key. -func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) GetKey() string { - return s.Key -} - -// GetName returns the value of Name. -func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) GetName() string { - return s.Name -} - -// SetFieldType sets the value of FieldType. -func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) SetFieldType(val string) { - s.FieldType = val -} - -// SetID sets the value of ID. -func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) SetID(val string) { - s.ID = val -} - -// SetKey sets the value of Key. -func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) SetKey(val string) { - s.Key = val -} - -// SetName sets the value of Name. -func (s *ConfigPropertiesSwimlaneMappingsSeverityConfig) SetName(val string) { - s.Name = val -} - -// Defines properties for connectors when type is `.tines`. -// Ref: #/components/schemas/config_properties_tines -type ConfigPropertiesTines map[string]jx.Raw - -func (s *ConfigPropertiesTines) init() ConfigPropertiesTines { - m := *s - if m == nil { - m = map[string]jx.Raw{} - *s = m - } - return m -} - -// Defines properties for connectors when type is `.webhook`. -// Ref: #/components/schemas/config_properties_webhook -type ConfigPropertiesWebhook map[string]jx.Raw - -func (s *ConfigPropertiesWebhook) init() ConfigPropertiesWebhook { - m := *s - if m == nil { - m = map[string]jx.Raw{} - *s = m - } - return m -} - -// Defines properties for connectors when type is `.xmatters`. -// Ref: #/components/schemas/config_properties_xmatters -type ConfigPropertiesXmatters map[string]jx.Raw - -func (s *ConfigPropertiesXmatters) init() ConfigPropertiesXmatters { - m := *s - if m == nil { - m = map[string]jx.Raw{} - *s = m - } - return m -} - -// The properties vary depending on the connector type. -// Ref: #/components/schemas/connector_response_properties -// ConnectorResponseProperties represents sum type. -type ConnectorResponseProperties struct { - Type ConnectorResponsePropertiesType // switch on this field - ConnectorResponsePropertiesCasesWebhook ConnectorResponsePropertiesCasesWebhook - ConnectorResponsePropertiesEmail ConnectorResponsePropertiesEmail - ConnectorResponsePropertiesIndex ConnectorResponsePropertiesIndex - ConnectorResponsePropertiesJira ConnectorResponsePropertiesJira - ConnectorResponsePropertiesOpsgenie ConnectorResponsePropertiesOpsgenie - ConnectorResponsePropertiesPagerduty ConnectorResponsePropertiesPagerduty - ConnectorResponsePropertiesResilient ConnectorResponsePropertiesResilient - ConnectorResponsePropertiesServerlog ConnectorResponsePropertiesServerlog - ConnectorResponsePropertiesServicenow ConnectorResponsePropertiesServicenow - ConnectorResponsePropertiesServicenowItom ConnectorResponsePropertiesServicenowItom - ConnectorResponsePropertiesServicenowSir ConnectorResponsePropertiesServicenowSir - ConnectorResponsePropertiesSlack ConnectorResponsePropertiesSlack - ConnectorResponsePropertiesSwimlane ConnectorResponsePropertiesSwimlane - ConnectorResponsePropertiesTeams ConnectorResponsePropertiesTeams - ConnectorResponsePropertiesTines ConnectorResponsePropertiesTines - ConnectorResponsePropertiesWebhook ConnectorResponsePropertiesWebhook - ConnectorResponsePropertiesXmatters ConnectorResponsePropertiesXmatters -} - -// ConnectorResponsePropertiesType is oneOf type of ConnectorResponseProperties. -type ConnectorResponsePropertiesType string - -// Possible values for ConnectorResponsePropertiesType. -const ( - ConnectorResponsePropertiesCasesWebhookConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesCasesWebhook" - ConnectorResponsePropertiesEmailConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesEmail" - ConnectorResponsePropertiesIndexConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesIndex" - ConnectorResponsePropertiesJiraConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesJira" - ConnectorResponsePropertiesOpsgenieConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesOpsgenie" - ConnectorResponsePropertiesPagerdutyConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesPagerduty" - ConnectorResponsePropertiesResilientConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesResilient" - ConnectorResponsePropertiesServerlogConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesServerlog" - ConnectorResponsePropertiesServicenowConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesServicenow" - ConnectorResponsePropertiesServicenowItomConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesServicenowItom" - ConnectorResponsePropertiesServicenowSirConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesServicenowSir" - ConnectorResponsePropertiesSlackConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesSlack" - ConnectorResponsePropertiesSwimlaneConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesSwimlane" - ConnectorResponsePropertiesTeamsConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesTeams" - ConnectorResponsePropertiesTinesConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesTines" - ConnectorResponsePropertiesWebhookConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesWebhook" - ConnectorResponsePropertiesXmattersConnectorResponseProperties ConnectorResponsePropertiesType = "ConnectorResponsePropertiesXmatters" -) - -// IsConnectorResponsePropertiesCasesWebhook reports whether ConnectorResponseProperties is ConnectorResponsePropertiesCasesWebhook. -func (s ConnectorResponseProperties) IsConnectorResponsePropertiesCasesWebhook() bool { - return s.Type == ConnectorResponsePropertiesCasesWebhookConnectorResponseProperties -} - -// IsConnectorResponsePropertiesEmail reports whether ConnectorResponseProperties is ConnectorResponsePropertiesEmail. -func (s ConnectorResponseProperties) IsConnectorResponsePropertiesEmail() bool { - return s.Type == ConnectorResponsePropertiesEmailConnectorResponseProperties -} - -// IsConnectorResponsePropertiesIndex reports whether ConnectorResponseProperties is ConnectorResponsePropertiesIndex. -func (s ConnectorResponseProperties) IsConnectorResponsePropertiesIndex() bool { - return s.Type == ConnectorResponsePropertiesIndexConnectorResponseProperties -} - -// IsConnectorResponsePropertiesJira reports whether ConnectorResponseProperties is ConnectorResponsePropertiesJira. -func (s ConnectorResponseProperties) IsConnectorResponsePropertiesJira() bool { - return s.Type == ConnectorResponsePropertiesJiraConnectorResponseProperties -} - -// IsConnectorResponsePropertiesOpsgenie reports whether ConnectorResponseProperties is ConnectorResponsePropertiesOpsgenie. -func (s ConnectorResponseProperties) IsConnectorResponsePropertiesOpsgenie() bool { - return s.Type == ConnectorResponsePropertiesOpsgenieConnectorResponseProperties -} - -// IsConnectorResponsePropertiesPagerduty reports whether ConnectorResponseProperties is ConnectorResponsePropertiesPagerduty. -func (s ConnectorResponseProperties) IsConnectorResponsePropertiesPagerduty() bool { - return s.Type == ConnectorResponsePropertiesPagerdutyConnectorResponseProperties -} - -// IsConnectorResponsePropertiesResilient reports whether ConnectorResponseProperties is ConnectorResponsePropertiesResilient. -func (s ConnectorResponseProperties) IsConnectorResponsePropertiesResilient() bool { - return s.Type == ConnectorResponsePropertiesResilientConnectorResponseProperties -} - -// IsConnectorResponsePropertiesServerlog reports whether ConnectorResponseProperties is ConnectorResponsePropertiesServerlog. -func (s ConnectorResponseProperties) IsConnectorResponsePropertiesServerlog() bool { - return s.Type == ConnectorResponsePropertiesServerlogConnectorResponseProperties -} - -// IsConnectorResponsePropertiesServicenow reports whether ConnectorResponseProperties is ConnectorResponsePropertiesServicenow. -func (s ConnectorResponseProperties) IsConnectorResponsePropertiesServicenow() bool { - return s.Type == ConnectorResponsePropertiesServicenowConnectorResponseProperties -} - -// IsConnectorResponsePropertiesServicenowItom reports whether ConnectorResponseProperties is ConnectorResponsePropertiesServicenowItom. -func (s ConnectorResponseProperties) IsConnectorResponsePropertiesServicenowItom() bool { - return s.Type == ConnectorResponsePropertiesServicenowItomConnectorResponseProperties -} - -// IsConnectorResponsePropertiesServicenowSir reports whether ConnectorResponseProperties is ConnectorResponsePropertiesServicenowSir. -func (s ConnectorResponseProperties) IsConnectorResponsePropertiesServicenowSir() bool { - return s.Type == ConnectorResponsePropertiesServicenowSirConnectorResponseProperties -} - -// IsConnectorResponsePropertiesSlack reports whether ConnectorResponseProperties is ConnectorResponsePropertiesSlack. -func (s ConnectorResponseProperties) IsConnectorResponsePropertiesSlack() bool { - return s.Type == ConnectorResponsePropertiesSlackConnectorResponseProperties -} - -// IsConnectorResponsePropertiesSwimlane reports whether ConnectorResponseProperties is ConnectorResponsePropertiesSwimlane. -func (s ConnectorResponseProperties) IsConnectorResponsePropertiesSwimlane() bool { - return s.Type == ConnectorResponsePropertiesSwimlaneConnectorResponseProperties -} - -// IsConnectorResponsePropertiesTeams reports whether ConnectorResponseProperties is ConnectorResponsePropertiesTeams. -func (s ConnectorResponseProperties) IsConnectorResponsePropertiesTeams() bool { - return s.Type == ConnectorResponsePropertiesTeamsConnectorResponseProperties -} - -// IsConnectorResponsePropertiesTines reports whether ConnectorResponseProperties is ConnectorResponsePropertiesTines. -func (s ConnectorResponseProperties) IsConnectorResponsePropertiesTines() bool { - return s.Type == ConnectorResponsePropertiesTinesConnectorResponseProperties -} - -// IsConnectorResponsePropertiesWebhook reports whether ConnectorResponseProperties is ConnectorResponsePropertiesWebhook. -func (s ConnectorResponseProperties) IsConnectorResponsePropertiesWebhook() bool { - return s.Type == ConnectorResponsePropertiesWebhookConnectorResponseProperties -} - -// IsConnectorResponsePropertiesXmatters reports whether ConnectorResponseProperties is ConnectorResponsePropertiesXmatters. -func (s ConnectorResponseProperties) IsConnectorResponsePropertiesXmatters() bool { - return s.Type == ConnectorResponsePropertiesXmattersConnectorResponseProperties -} - -// SetConnectorResponsePropertiesCasesWebhook sets ConnectorResponseProperties to ConnectorResponsePropertiesCasesWebhook. -func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesCasesWebhook(v ConnectorResponsePropertiesCasesWebhook) { - s.Type = ConnectorResponsePropertiesCasesWebhookConnectorResponseProperties - s.ConnectorResponsePropertiesCasesWebhook = v -} - -// GetConnectorResponsePropertiesCasesWebhook returns ConnectorResponsePropertiesCasesWebhook and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesCasesWebhook. -func (s ConnectorResponseProperties) GetConnectorResponsePropertiesCasesWebhook() (v ConnectorResponsePropertiesCasesWebhook, ok bool) { - if !s.IsConnectorResponsePropertiesCasesWebhook() { - return v, false - } - return s.ConnectorResponsePropertiesCasesWebhook, true -} - -// NewConnectorResponsePropertiesCasesWebhookConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesCasesWebhook. -func NewConnectorResponsePropertiesCasesWebhookConnectorResponseProperties(v ConnectorResponsePropertiesCasesWebhook) ConnectorResponseProperties { - var s ConnectorResponseProperties - s.SetConnectorResponsePropertiesCasesWebhook(v) - return s -} - -// SetConnectorResponsePropertiesEmail sets ConnectorResponseProperties to ConnectorResponsePropertiesEmail. -func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesEmail(v ConnectorResponsePropertiesEmail) { - s.Type = ConnectorResponsePropertiesEmailConnectorResponseProperties - s.ConnectorResponsePropertiesEmail = v -} - -// GetConnectorResponsePropertiesEmail returns ConnectorResponsePropertiesEmail and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesEmail. -func (s ConnectorResponseProperties) GetConnectorResponsePropertiesEmail() (v ConnectorResponsePropertiesEmail, ok bool) { - if !s.IsConnectorResponsePropertiesEmail() { - return v, false - } - return s.ConnectorResponsePropertiesEmail, true -} - -// NewConnectorResponsePropertiesEmailConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesEmail. -func NewConnectorResponsePropertiesEmailConnectorResponseProperties(v ConnectorResponsePropertiesEmail) ConnectorResponseProperties { - var s ConnectorResponseProperties - s.SetConnectorResponsePropertiesEmail(v) - return s -} - -// SetConnectorResponsePropertiesIndex sets ConnectorResponseProperties to ConnectorResponsePropertiesIndex. -func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesIndex(v ConnectorResponsePropertiesIndex) { - s.Type = ConnectorResponsePropertiesIndexConnectorResponseProperties - s.ConnectorResponsePropertiesIndex = v -} - -// GetConnectorResponsePropertiesIndex returns ConnectorResponsePropertiesIndex and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesIndex. -func (s ConnectorResponseProperties) GetConnectorResponsePropertiesIndex() (v ConnectorResponsePropertiesIndex, ok bool) { - if !s.IsConnectorResponsePropertiesIndex() { - return v, false - } - return s.ConnectorResponsePropertiesIndex, true -} - -// NewConnectorResponsePropertiesIndexConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesIndex. -func NewConnectorResponsePropertiesIndexConnectorResponseProperties(v ConnectorResponsePropertiesIndex) ConnectorResponseProperties { - var s ConnectorResponseProperties - s.SetConnectorResponsePropertiesIndex(v) - return s -} - -// SetConnectorResponsePropertiesJira sets ConnectorResponseProperties to ConnectorResponsePropertiesJira. -func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesJira(v ConnectorResponsePropertiesJira) { - s.Type = ConnectorResponsePropertiesJiraConnectorResponseProperties - s.ConnectorResponsePropertiesJira = v -} - -// GetConnectorResponsePropertiesJira returns ConnectorResponsePropertiesJira and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesJira. -func (s ConnectorResponseProperties) GetConnectorResponsePropertiesJira() (v ConnectorResponsePropertiesJira, ok bool) { - if !s.IsConnectorResponsePropertiesJira() { - return v, false - } - return s.ConnectorResponsePropertiesJira, true -} - -// NewConnectorResponsePropertiesJiraConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesJira. -func NewConnectorResponsePropertiesJiraConnectorResponseProperties(v ConnectorResponsePropertiesJira) ConnectorResponseProperties { - var s ConnectorResponseProperties - s.SetConnectorResponsePropertiesJira(v) - return s -} - -// SetConnectorResponsePropertiesOpsgenie sets ConnectorResponseProperties to ConnectorResponsePropertiesOpsgenie. -func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesOpsgenie(v ConnectorResponsePropertiesOpsgenie) { - s.Type = ConnectorResponsePropertiesOpsgenieConnectorResponseProperties - s.ConnectorResponsePropertiesOpsgenie = v -} - -// GetConnectorResponsePropertiesOpsgenie returns ConnectorResponsePropertiesOpsgenie and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesOpsgenie. -func (s ConnectorResponseProperties) GetConnectorResponsePropertiesOpsgenie() (v ConnectorResponsePropertiesOpsgenie, ok bool) { - if !s.IsConnectorResponsePropertiesOpsgenie() { - return v, false - } - return s.ConnectorResponsePropertiesOpsgenie, true -} - -// NewConnectorResponsePropertiesOpsgenieConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesOpsgenie. -func NewConnectorResponsePropertiesOpsgenieConnectorResponseProperties(v ConnectorResponsePropertiesOpsgenie) ConnectorResponseProperties { - var s ConnectorResponseProperties - s.SetConnectorResponsePropertiesOpsgenie(v) - return s -} - -// SetConnectorResponsePropertiesPagerduty sets ConnectorResponseProperties to ConnectorResponsePropertiesPagerduty. -func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesPagerduty(v ConnectorResponsePropertiesPagerduty) { - s.Type = ConnectorResponsePropertiesPagerdutyConnectorResponseProperties - s.ConnectorResponsePropertiesPagerduty = v -} - -// GetConnectorResponsePropertiesPagerduty returns ConnectorResponsePropertiesPagerduty and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesPagerduty. -func (s ConnectorResponseProperties) GetConnectorResponsePropertiesPagerduty() (v ConnectorResponsePropertiesPagerduty, ok bool) { - if !s.IsConnectorResponsePropertiesPagerduty() { - return v, false - } - return s.ConnectorResponsePropertiesPagerduty, true -} - -// NewConnectorResponsePropertiesPagerdutyConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesPagerduty. -func NewConnectorResponsePropertiesPagerdutyConnectorResponseProperties(v ConnectorResponsePropertiesPagerduty) ConnectorResponseProperties { - var s ConnectorResponseProperties - s.SetConnectorResponsePropertiesPagerduty(v) - return s -} - -// SetConnectorResponsePropertiesResilient sets ConnectorResponseProperties to ConnectorResponsePropertiesResilient. -func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesResilient(v ConnectorResponsePropertiesResilient) { - s.Type = ConnectorResponsePropertiesResilientConnectorResponseProperties - s.ConnectorResponsePropertiesResilient = v -} - -// GetConnectorResponsePropertiesResilient returns ConnectorResponsePropertiesResilient and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesResilient. -func (s ConnectorResponseProperties) GetConnectorResponsePropertiesResilient() (v ConnectorResponsePropertiesResilient, ok bool) { - if !s.IsConnectorResponsePropertiesResilient() { - return v, false - } - return s.ConnectorResponsePropertiesResilient, true -} - -// NewConnectorResponsePropertiesResilientConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesResilient. -func NewConnectorResponsePropertiesResilientConnectorResponseProperties(v ConnectorResponsePropertiesResilient) ConnectorResponseProperties { - var s ConnectorResponseProperties - s.SetConnectorResponsePropertiesResilient(v) - return s -} - -// SetConnectorResponsePropertiesServerlog sets ConnectorResponseProperties to ConnectorResponsePropertiesServerlog. -func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesServerlog(v ConnectorResponsePropertiesServerlog) { - s.Type = ConnectorResponsePropertiesServerlogConnectorResponseProperties - s.ConnectorResponsePropertiesServerlog = v -} - -// GetConnectorResponsePropertiesServerlog returns ConnectorResponsePropertiesServerlog and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesServerlog. -func (s ConnectorResponseProperties) GetConnectorResponsePropertiesServerlog() (v ConnectorResponsePropertiesServerlog, ok bool) { - if !s.IsConnectorResponsePropertiesServerlog() { - return v, false - } - return s.ConnectorResponsePropertiesServerlog, true -} - -// NewConnectorResponsePropertiesServerlogConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesServerlog. -func NewConnectorResponsePropertiesServerlogConnectorResponseProperties(v ConnectorResponsePropertiesServerlog) ConnectorResponseProperties { - var s ConnectorResponseProperties - s.SetConnectorResponsePropertiesServerlog(v) - return s -} - -// SetConnectorResponsePropertiesServicenow sets ConnectorResponseProperties to ConnectorResponsePropertiesServicenow. -func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesServicenow(v ConnectorResponsePropertiesServicenow) { - s.Type = ConnectorResponsePropertiesServicenowConnectorResponseProperties - s.ConnectorResponsePropertiesServicenow = v -} - -// GetConnectorResponsePropertiesServicenow returns ConnectorResponsePropertiesServicenow and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesServicenow. -func (s ConnectorResponseProperties) GetConnectorResponsePropertiesServicenow() (v ConnectorResponsePropertiesServicenow, ok bool) { - if !s.IsConnectorResponsePropertiesServicenow() { - return v, false - } - return s.ConnectorResponsePropertiesServicenow, true -} - -// NewConnectorResponsePropertiesServicenowConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesServicenow. -func NewConnectorResponsePropertiesServicenowConnectorResponseProperties(v ConnectorResponsePropertiesServicenow) ConnectorResponseProperties { - var s ConnectorResponseProperties - s.SetConnectorResponsePropertiesServicenow(v) - return s -} - -// SetConnectorResponsePropertiesServicenowItom sets ConnectorResponseProperties to ConnectorResponsePropertiesServicenowItom. -func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesServicenowItom(v ConnectorResponsePropertiesServicenowItom) { - s.Type = ConnectorResponsePropertiesServicenowItomConnectorResponseProperties - s.ConnectorResponsePropertiesServicenowItom = v -} - -// GetConnectorResponsePropertiesServicenowItom returns ConnectorResponsePropertiesServicenowItom and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesServicenowItom. -func (s ConnectorResponseProperties) GetConnectorResponsePropertiesServicenowItom() (v ConnectorResponsePropertiesServicenowItom, ok bool) { - if !s.IsConnectorResponsePropertiesServicenowItom() { - return v, false - } - return s.ConnectorResponsePropertiesServicenowItom, true -} - -// NewConnectorResponsePropertiesServicenowItomConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesServicenowItom. -func NewConnectorResponsePropertiesServicenowItomConnectorResponseProperties(v ConnectorResponsePropertiesServicenowItom) ConnectorResponseProperties { - var s ConnectorResponseProperties - s.SetConnectorResponsePropertiesServicenowItom(v) - return s -} - -// SetConnectorResponsePropertiesServicenowSir sets ConnectorResponseProperties to ConnectorResponsePropertiesServicenowSir. -func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesServicenowSir(v ConnectorResponsePropertiesServicenowSir) { - s.Type = ConnectorResponsePropertiesServicenowSirConnectorResponseProperties - s.ConnectorResponsePropertiesServicenowSir = v -} - -// GetConnectorResponsePropertiesServicenowSir returns ConnectorResponsePropertiesServicenowSir and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesServicenowSir. -func (s ConnectorResponseProperties) GetConnectorResponsePropertiesServicenowSir() (v ConnectorResponsePropertiesServicenowSir, ok bool) { - if !s.IsConnectorResponsePropertiesServicenowSir() { - return v, false - } - return s.ConnectorResponsePropertiesServicenowSir, true -} - -// NewConnectorResponsePropertiesServicenowSirConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesServicenowSir. -func NewConnectorResponsePropertiesServicenowSirConnectorResponseProperties(v ConnectorResponsePropertiesServicenowSir) ConnectorResponseProperties { - var s ConnectorResponseProperties - s.SetConnectorResponsePropertiesServicenowSir(v) - return s -} - -// SetConnectorResponsePropertiesSlack sets ConnectorResponseProperties to ConnectorResponsePropertiesSlack. -func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesSlack(v ConnectorResponsePropertiesSlack) { - s.Type = ConnectorResponsePropertiesSlackConnectorResponseProperties - s.ConnectorResponsePropertiesSlack = v -} - -// GetConnectorResponsePropertiesSlack returns ConnectorResponsePropertiesSlack and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesSlack. -func (s ConnectorResponseProperties) GetConnectorResponsePropertiesSlack() (v ConnectorResponsePropertiesSlack, ok bool) { - if !s.IsConnectorResponsePropertiesSlack() { - return v, false - } - return s.ConnectorResponsePropertiesSlack, true -} - -// NewConnectorResponsePropertiesSlackConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesSlack. -func NewConnectorResponsePropertiesSlackConnectorResponseProperties(v ConnectorResponsePropertiesSlack) ConnectorResponseProperties { - var s ConnectorResponseProperties - s.SetConnectorResponsePropertiesSlack(v) - return s -} - -// SetConnectorResponsePropertiesSwimlane sets ConnectorResponseProperties to ConnectorResponsePropertiesSwimlane. -func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesSwimlane(v ConnectorResponsePropertiesSwimlane) { - s.Type = ConnectorResponsePropertiesSwimlaneConnectorResponseProperties - s.ConnectorResponsePropertiesSwimlane = v -} - -// GetConnectorResponsePropertiesSwimlane returns ConnectorResponsePropertiesSwimlane and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesSwimlane. -func (s ConnectorResponseProperties) GetConnectorResponsePropertiesSwimlane() (v ConnectorResponsePropertiesSwimlane, ok bool) { - if !s.IsConnectorResponsePropertiesSwimlane() { - return v, false - } - return s.ConnectorResponsePropertiesSwimlane, true -} - -// NewConnectorResponsePropertiesSwimlaneConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesSwimlane. -func NewConnectorResponsePropertiesSwimlaneConnectorResponseProperties(v ConnectorResponsePropertiesSwimlane) ConnectorResponseProperties { - var s ConnectorResponseProperties - s.SetConnectorResponsePropertiesSwimlane(v) - return s -} - -// SetConnectorResponsePropertiesTeams sets ConnectorResponseProperties to ConnectorResponsePropertiesTeams. -func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesTeams(v ConnectorResponsePropertiesTeams) { - s.Type = ConnectorResponsePropertiesTeamsConnectorResponseProperties - s.ConnectorResponsePropertiesTeams = v -} - -// GetConnectorResponsePropertiesTeams returns ConnectorResponsePropertiesTeams and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesTeams. -func (s ConnectorResponseProperties) GetConnectorResponsePropertiesTeams() (v ConnectorResponsePropertiesTeams, ok bool) { - if !s.IsConnectorResponsePropertiesTeams() { - return v, false - } - return s.ConnectorResponsePropertiesTeams, true -} - -// NewConnectorResponsePropertiesTeamsConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesTeams. -func NewConnectorResponsePropertiesTeamsConnectorResponseProperties(v ConnectorResponsePropertiesTeams) ConnectorResponseProperties { - var s ConnectorResponseProperties - s.SetConnectorResponsePropertiesTeams(v) - return s -} - -// SetConnectorResponsePropertiesTines sets ConnectorResponseProperties to ConnectorResponsePropertiesTines. -func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesTines(v ConnectorResponsePropertiesTines) { - s.Type = ConnectorResponsePropertiesTinesConnectorResponseProperties - s.ConnectorResponsePropertiesTines = v -} - -// GetConnectorResponsePropertiesTines returns ConnectorResponsePropertiesTines and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesTines. -func (s ConnectorResponseProperties) GetConnectorResponsePropertiesTines() (v ConnectorResponsePropertiesTines, ok bool) { - if !s.IsConnectorResponsePropertiesTines() { - return v, false - } - return s.ConnectorResponsePropertiesTines, true -} - -// NewConnectorResponsePropertiesTinesConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesTines. -func NewConnectorResponsePropertiesTinesConnectorResponseProperties(v ConnectorResponsePropertiesTines) ConnectorResponseProperties { - var s ConnectorResponseProperties - s.SetConnectorResponsePropertiesTines(v) - return s -} - -// SetConnectorResponsePropertiesWebhook sets ConnectorResponseProperties to ConnectorResponsePropertiesWebhook. -func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesWebhook(v ConnectorResponsePropertiesWebhook) { - s.Type = ConnectorResponsePropertiesWebhookConnectorResponseProperties - s.ConnectorResponsePropertiesWebhook = v -} - -// GetConnectorResponsePropertiesWebhook returns ConnectorResponsePropertiesWebhook and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesWebhook. -func (s ConnectorResponseProperties) GetConnectorResponsePropertiesWebhook() (v ConnectorResponsePropertiesWebhook, ok bool) { - if !s.IsConnectorResponsePropertiesWebhook() { - return v, false - } - return s.ConnectorResponsePropertiesWebhook, true -} - -// NewConnectorResponsePropertiesWebhookConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesWebhook. -func NewConnectorResponsePropertiesWebhookConnectorResponseProperties(v ConnectorResponsePropertiesWebhook) ConnectorResponseProperties { - var s ConnectorResponseProperties - s.SetConnectorResponsePropertiesWebhook(v) - return s -} - -// SetConnectorResponsePropertiesXmatters sets ConnectorResponseProperties to ConnectorResponsePropertiesXmatters. -func (s *ConnectorResponseProperties) SetConnectorResponsePropertiesXmatters(v ConnectorResponsePropertiesXmatters) { - s.Type = ConnectorResponsePropertiesXmattersConnectorResponseProperties - s.ConnectorResponsePropertiesXmatters = v -} - -// GetConnectorResponsePropertiesXmatters returns ConnectorResponsePropertiesXmatters and true boolean if ConnectorResponseProperties is ConnectorResponsePropertiesXmatters. -func (s ConnectorResponseProperties) GetConnectorResponsePropertiesXmatters() (v ConnectorResponsePropertiesXmatters, ok bool) { - if !s.IsConnectorResponsePropertiesXmatters() { - return v, false - } - return s.ConnectorResponsePropertiesXmatters, true -} - -// NewConnectorResponsePropertiesXmattersConnectorResponseProperties returns new ConnectorResponseProperties from ConnectorResponsePropertiesXmatters. -func NewConnectorResponsePropertiesXmattersConnectorResponseProperties(v ConnectorResponsePropertiesXmatters) ConnectorResponseProperties { - var s ConnectorResponseProperties - s.SetConnectorResponsePropertiesXmatters(v) - return s -} - -func (*ConnectorResponseProperties) createConnectorRes() {} -func (*ConnectorResponseProperties) getConnectorRes() {} -func (*ConnectorResponseProperties) updateConnectorRes() {} - -// Ref: #/components/schemas/connector_response_properties_cases_webhook -type ConnectorResponsePropertiesCasesWebhook struct { - Config ConfigPropertiesCasesWebhook `json:"config"` - // The identifier for the connector. - ID string `json:"id"` - IsDeprecated OptIsDeprecated `json:"is_deprecated"` - IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` - IsPreconfigured IsPreconfigured `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetConfig returns the value of Config. -func (s *ConnectorResponsePropertiesCasesWebhook) GetConfig() ConfigPropertiesCasesWebhook { - return s.Config -} - -// GetID returns the value of ID. -func (s *ConnectorResponsePropertiesCasesWebhook) GetID() string { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *ConnectorResponsePropertiesCasesWebhook) GetIsDeprecated() OptIsDeprecated { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesCasesWebhook) GetIsMissingSecrets() OptIsMissingSecrets { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesCasesWebhook) GetIsPreconfigured() IsPreconfigured { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *ConnectorResponsePropertiesCasesWebhook) GetName() string { - return s.Name -} - -// SetConfig sets the value of Config. -func (s *ConnectorResponsePropertiesCasesWebhook) SetConfig(val ConfigPropertiesCasesWebhook) { - s.Config = val -} - -// SetID sets the value of ID. -func (s *ConnectorResponsePropertiesCasesWebhook) SetID(val string) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *ConnectorResponsePropertiesCasesWebhook) SetIsDeprecated(val OptIsDeprecated) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesCasesWebhook) SetIsMissingSecrets(val OptIsMissingSecrets) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesCasesWebhook) SetIsPreconfigured(val IsPreconfigured) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *ConnectorResponsePropertiesCasesWebhook) SetName(val string) { - s.Name = val -} - -// The type of connector. -type ConnectorResponsePropertiesCasesWebhookConnectorTypeID string - -const ( - ConnectorResponsePropertiesCasesWebhookConnectorTypeIDDotCasesMinusWebhook ConnectorResponsePropertiesCasesWebhookConnectorTypeID = ".cases-webhook" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConnectorResponsePropertiesCasesWebhookConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case ConnectorResponsePropertiesCasesWebhookConnectorTypeIDDotCasesMinusWebhook: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConnectorResponsePropertiesCasesWebhookConnectorTypeID) UnmarshalText(data []byte) error { - switch ConnectorResponsePropertiesCasesWebhookConnectorTypeID(data) { - case ConnectorResponsePropertiesCasesWebhookConnectorTypeIDDotCasesMinusWebhook: - *s = ConnectorResponsePropertiesCasesWebhookConnectorTypeIDDotCasesMinusWebhook - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// Ref: #/components/schemas/connector_response_properties_email -type ConnectorResponsePropertiesEmail struct { - Config ConfigPropertiesEmail `json:"config"` - // The identifier for the connector. - ID string `json:"id"` - IsDeprecated OptIsDeprecated `json:"is_deprecated"` - IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` - IsPreconfigured IsPreconfigured `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetConfig returns the value of Config. -func (s *ConnectorResponsePropertiesEmail) GetConfig() ConfigPropertiesEmail { - return s.Config -} - -// GetID returns the value of ID. -func (s *ConnectorResponsePropertiesEmail) GetID() string { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *ConnectorResponsePropertiesEmail) GetIsDeprecated() OptIsDeprecated { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesEmail) GetIsMissingSecrets() OptIsMissingSecrets { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesEmail) GetIsPreconfigured() IsPreconfigured { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *ConnectorResponsePropertiesEmail) GetName() string { - return s.Name -} - -// SetConfig sets the value of Config. -func (s *ConnectorResponsePropertiesEmail) SetConfig(val ConfigPropertiesEmail) { - s.Config = val -} - -// SetID sets the value of ID. -func (s *ConnectorResponsePropertiesEmail) SetID(val string) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *ConnectorResponsePropertiesEmail) SetIsDeprecated(val OptIsDeprecated) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesEmail) SetIsMissingSecrets(val OptIsMissingSecrets) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesEmail) SetIsPreconfigured(val IsPreconfigured) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *ConnectorResponsePropertiesEmail) SetName(val string) { - s.Name = val -} - -// The type of connector. -type ConnectorResponsePropertiesEmailConnectorTypeID string - -const ( - ConnectorResponsePropertiesEmailConnectorTypeIDDotEmail ConnectorResponsePropertiesEmailConnectorTypeID = ".email" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConnectorResponsePropertiesEmailConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case ConnectorResponsePropertiesEmailConnectorTypeIDDotEmail: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConnectorResponsePropertiesEmailConnectorTypeID) UnmarshalText(data []byte) error { - switch ConnectorResponsePropertiesEmailConnectorTypeID(data) { - case ConnectorResponsePropertiesEmailConnectorTypeIDDotEmail: - *s = ConnectorResponsePropertiesEmailConnectorTypeIDDotEmail - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// Ref: #/components/schemas/connector_response_properties_index -type ConnectorResponsePropertiesIndex struct { - Config ConfigPropertiesIndex `json:"config"` - // The identifier for the connector. - ID string `json:"id"` - IsDeprecated OptIsDeprecated `json:"is_deprecated"` - IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` - IsPreconfigured IsPreconfigured `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetConfig returns the value of Config. -func (s *ConnectorResponsePropertiesIndex) GetConfig() ConfigPropertiesIndex { - return s.Config -} - -// GetID returns the value of ID. -func (s *ConnectorResponsePropertiesIndex) GetID() string { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *ConnectorResponsePropertiesIndex) GetIsDeprecated() OptIsDeprecated { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesIndex) GetIsMissingSecrets() OptIsMissingSecrets { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesIndex) GetIsPreconfigured() IsPreconfigured { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *ConnectorResponsePropertiesIndex) GetName() string { - return s.Name -} - -// SetConfig sets the value of Config. -func (s *ConnectorResponsePropertiesIndex) SetConfig(val ConfigPropertiesIndex) { - s.Config = val -} - -// SetID sets the value of ID. -func (s *ConnectorResponsePropertiesIndex) SetID(val string) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *ConnectorResponsePropertiesIndex) SetIsDeprecated(val OptIsDeprecated) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesIndex) SetIsMissingSecrets(val OptIsMissingSecrets) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesIndex) SetIsPreconfigured(val IsPreconfigured) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *ConnectorResponsePropertiesIndex) SetName(val string) { - s.Name = val -} - -// The type of connector. -type ConnectorResponsePropertiesIndexConnectorTypeID string - -const ( - ConnectorResponsePropertiesIndexConnectorTypeIDDotIndex ConnectorResponsePropertiesIndexConnectorTypeID = ".index" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConnectorResponsePropertiesIndexConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case ConnectorResponsePropertiesIndexConnectorTypeIDDotIndex: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConnectorResponsePropertiesIndexConnectorTypeID) UnmarshalText(data []byte) error { - switch ConnectorResponsePropertiesIndexConnectorTypeID(data) { - case ConnectorResponsePropertiesIndexConnectorTypeIDDotIndex: - *s = ConnectorResponsePropertiesIndexConnectorTypeIDDotIndex - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// Ref: #/components/schemas/connector_response_properties_jira -type ConnectorResponsePropertiesJira struct { - Config ConfigPropertiesJira `json:"config"` - // The identifier for the connector. - ID string `json:"id"` - IsDeprecated OptIsDeprecated `json:"is_deprecated"` - IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` - IsPreconfigured IsPreconfigured `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetConfig returns the value of Config. -func (s *ConnectorResponsePropertiesJira) GetConfig() ConfigPropertiesJira { - return s.Config -} - -// GetID returns the value of ID. -func (s *ConnectorResponsePropertiesJira) GetID() string { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *ConnectorResponsePropertiesJira) GetIsDeprecated() OptIsDeprecated { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesJira) GetIsMissingSecrets() OptIsMissingSecrets { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesJira) GetIsPreconfigured() IsPreconfigured { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *ConnectorResponsePropertiesJira) GetName() string { - return s.Name -} - -// SetConfig sets the value of Config. -func (s *ConnectorResponsePropertiesJira) SetConfig(val ConfigPropertiesJira) { - s.Config = val -} - -// SetID sets the value of ID. -func (s *ConnectorResponsePropertiesJira) SetID(val string) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *ConnectorResponsePropertiesJira) SetIsDeprecated(val OptIsDeprecated) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesJira) SetIsMissingSecrets(val OptIsMissingSecrets) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesJira) SetIsPreconfigured(val IsPreconfigured) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *ConnectorResponsePropertiesJira) SetName(val string) { - s.Name = val -} - -// The type of connector. -type ConnectorResponsePropertiesJiraConnectorTypeID string - -const ( - ConnectorResponsePropertiesJiraConnectorTypeIDDotJira ConnectorResponsePropertiesJiraConnectorTypeID = ".jira" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConnectorResponsePropertiesJiraConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case ConnectorResponsePropertiesJiraConnectorTypeIDDotJira: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConnectorResponsePropertiesJiraConnectorTypeID) UnmarshalText(data []byte) error { - switch ConnectorResponsePropertiesJiraConnectorTypeID(data) { - case ConnectorResponsePropertiesJiraConnectorTypeIDDotJira: - *s = ConnectorResponsePropertiesJiraConnectorTypeIDDotJira - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// Ref: #/components/schemas/connector_response_properties_opsgenie -type ConnectorResponsePropertiesOpsgenie struct { - Config ConfigPropertiesOpsgenie `json:"config"` - // The identifier for the connector. - ID string `json:"id"` - IsDeprecated OptIsDeprecated `json:"is_deprecated"` - IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` - IsPreconfigured IsPreconfigured `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetConfig returns the value of Config. -func (s *ConnectorResponsePropertiesOpsgenie) GetConfig() ConfigPropertiesOpsgenie { - return s.Config -} - -// GetID returns the value of ID. -func (s *ConnectorResponsePropertiesOpsgenie) GetID() string { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *ConnectorResponsePropertiesOpsgenie) GetIsDeprecated() OptIsDeprecated { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesOpsgenie) GetIsMissingSecrets() OptIsMissingSecrets { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesOpsgenie) GetIsPreconfigured() IsPreconfigured { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *ConnectorResponsePropertiesOpsgenie) GetName() string { - return s.Name -} - -// SetConfig sets the value of Config. -func (s *ConnectorResponsePropertiesOpsgenie) SetConfig(val ConfigPropertiesOpsgenie) { - s.Config = val -} - -// SetID sets the value of ID. -func (s *ConnectorResponsePropertiesOpsgenie) SetID(val string) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *ConnectorResponsePropertiesOpsgenie) SetIsDeprecated(val OptIsDeprecated) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesOpsgenie) SetIsMissingSecrets(val OptIsMissingSecrets) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesOpsgenie) SetIsPreconfigured(val IsPreconfigured) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *ConnectorResponsePropertiesOpsgenie) SetName(val string) { - s.Name = val -} - -// The type of connector. -type ConnectorResponsePropertiesOpsgenieConnectorTypeID string - -const ( - ConnectorResponsePropertiesOpsgenieConnectorTypeIDDotOpsgenie ConnectorResponsePropertiesOpsgenieConnectorTypeID = ".opsgenie" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConnectorResponsePropertiesOpsgenieConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case ConnectorResponsePropertiesOpsgenieConnectorTypeIDDotOpsgenie: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConnectorResponsePropertiesOpsgenieConnectorTypeID) UnmarshalText(data []byte) error { - switch ConnectorResponsePropertiesOpsgenieConnectorTypeID(data) { - case ConnectorResponsePropertiesOpsgenieConnectorTypeIDDotOpsgenie: - *s = ConnectorResponsePropertiesOpsgenieConnectorTypeIDDotOpsgenie - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// Ref: #/components/schemas/connector_response_properties_pagerduty -type ConnectorResponsePropertiesPagerduty struct { - Config ConfigPropertiesPagerduty `json:"config"` - // The identifier for the connector. - ID string `json:"id"` - IsDeprecated OptIsDeprecated `json:"is_deprecated"` - IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` - IsPreconfigured IsPreconfigured `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetConfig returns the value of Config. -func (s *ConnectorResponsePropertiesPagerduty) GetConfig() ConfigPropertiesPagerduty { - return s.Config -} - -// GetID returns the value of ID. -func (s *ConnectorResponsePropertiesPagerduty) GetID() string { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *ConnectorResponsePropertiesPagerduty) GetIsDeprecated() OptIsDeprecated { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesPagerduty) GetIsMissingSecrets() OptIsMissingSecrets { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesPagerduty) GetIsPreconfigured() IsPreconfigured { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *ConnectorResponsePropertiesPagerduty) GetName() string { - return s.Name -} - -// SetConfig sets the value of Config. -func (s *ConnectorResponsePropertiesPagerduty) SetConfig(val ConfigPropertiesPagerduty) { - s.Config = val -} - -// SetID sets the value of ID. -func (s *ConnectorResponsePropertiesPagerduty) SetID(val string) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *ConnectorResponsePropertiesPagerduty) SetIsDeprecated(val OptIsDeprecated) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesPagerduty) SetIsMissingSecrets(val OptIsMissingSecrets) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesPagerduty) SetIsPreconfigured(val IsPreconfigured) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *ConnectorResponsePropertiesPagerduty) SetName(val string) { - s.Name = val -} - -// The type of connector. -type ConnectorResponsePropertiesPagerdutyConnectorTypeID string - -const ( - ConnectorResponsePropertiesPagerdutyConnectorTypeIDDotPagerduty ConnectorResponsePropertiesPagerdutyConnectorTypeID = ".pagerduty" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConnectorResponsePropertiesPagerdutyConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case ConnectorResponsePropertiesPagerdutyConnectorTypeIDDotPagerduty: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConnectorResponsePropertiesPagerdutyConnectorTypeID) UnmarshalText(data []byte) error { - switch ConnectorResponsePropertiesPagerdutyConnectorTypeID(data) { - case ConnectorResponsePropertiesPagerdutyConnectorTypeIDDotPagerduty: - *s = ConnectorResponsePropertiesPagerdutyConnectorTypeIDDotPagerduty - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// Ref: #/components/schemas/connector_response_properties_resilient -type ConnectorResponsePropertiesResilient struct { - Config ConfigPropertiesResilient `json:"config"` - // The identifier for the connector. - ID string `json:"id"` - IsDeprecated OptIsDeprecated `json:"is_deprecated"` - IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` - IsPreconfigured IsPreconfigured `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetConfig returns the value of Config. -func (s *ConnectorResponsePropertiesResilient) GetConfig() ConfigPropertiesResilient { - return s.Config -} - -// GetID returns the value of ID. -func (s *ConnectorResponsePropertiesResilient) GetID() string { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *ConnectorResponsePropertiesResilient) GetIsDeprecated() OptIsDeprecated { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesResilient) GetIsMissingSecrets() OptIsMissingSecrets { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesResilient) GetIsPreconfigured() IsPreconfigured { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *ConnectorResponsePropertiesResilient) GetName() string { - return s.Name -} - -// SetConfig sets the value of Config. -func (s *ConnectorResponsePropertiesResilient) SetConfig(val ConfigPropertiesResilient) { - s.Config = val -} - -// SetID sets the value of ID. -func (s *ConnectorResponsePropertiesResilient) SetID(val string) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *ConnectorResponsePropertiesResilient) SetIsDeprecated(val OptIsDeprecated) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesResilient) SetIsMissingSecrets(val OptIsMissingSecrets) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesResilient) SetIsPreconfigured(val IsPreconfigured) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *ConnectorResponsePropertiesResilient) SetName(val string) { - s.Name = val -} - -// The type of connector. -type ConnectorResponsePropertiesResilientConnectorTypeID string - -const ( - ConnectorResponsePropertiesResilientConnectorTypeIDDotResilient ConnectorResponsePropertiesResilientConnectorTypeID = ".resilient" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConnectorResponsePropertiesResilientConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case ConnectorResponsePropertiesResilientConnectorTypeIDDotResilient: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConnectorResponsePropertiesResilientConnectorTypeID) UnmarshalText(data []byte) error { - switch ConnectorResponsePropertiesResilientConnectorTypeID(data) { - case ConnectorResponsePropertiesResilientConnectorTypeIDDotResilient: - *s = ConnectorResponsePropertiesResilientConnectorTypeIDDotResilient - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// Ref: #/components/schemas/connector_response_properties_serverlog -type ConnectorResponsePropertiesServerlog struct { - Config *ConnectorResponsePropertiesServerlogConfig `json:"config"` - // The identifier for the connector. - ID string `json:"id"` - IsDeprecated OptIsDeprecated `json:"is_deprecated"` - IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` - IsPreconfigured IsPreconfigured `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetConfig returns the value of Config. -func (s *ConnectorResponsePropertiesServerlog) GetConfig() *ConnectorResponsePropertiesServerlogConfig { - return s.Config -} - -// GetID returns the value of ID. -func (s *ConnectorResponsePropertiesServerlog) GetID() string { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *ConnectorResponsePropertiesServerlog) GetIsDeprecated() OptIsDeprecated { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesServerlog) GetIsMissingSecrets() OptIsMissingSecrets { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesServerlog) GetIsPreconfigured() IsPreconfigured { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *ConnectorResponsePropertiesServerlog) GetName() string { - return s.Name -} - -// SetConfig sets the value of Config. -func (s *ConnectorResponsePropertiesServerlog) SetConfig(val *ConnectorResponsePropertiesServerlogConfig) { - s.Config = val -} - -// SetID sets the value of ID. -func (s *ConnectorResponsePropertiesServerlog) SetID(val string) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *ConnectorResponsePropertiesServerlog) SetIsDeprecated(val OptIsDeprecated) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesServerlog) SetIsMissingSecrets(val OptIsMissingSecrets) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesServerlog) SetIsPreconfigured(val IsPreconfigured) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *ConnectorResponsePropertiesServerlog) SetName(val string) { - s.Name = val -} - -type ConnectorResponsePropertiesServerlogConfig struct{} - -// The type of connector. -type ConnectorResponsePropertiesServerlogConnectorTypeID string - -const ( - ConnectorResponsePropertiesServerlogConnectorTypeIDDotServerMinusLog ConnectorResponsePropertiesServerlogConnectorTypeID = ".server-log" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConnectorResponsePropertiesServerlogConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case ConnectorResponsePropertiesServerlogConnectorTypeIDDotServerMinusLog: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConnectorResponsePropertiesServerlogConnectorTypeID) UnmarshalText(data []byte) error { - switch ConnectorResponsePropertiesServerlogConnectorTypeID(data) { - case ConnectorResponsePropertiesServerlogConnectorTypeIDDotServerMinusLog: - *s = ConnectorResponsePropertiesServerlogConnectorTypeIDDotServerMinusLog - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// Ref: #/components/schemas/connector_response_properties_servicenow -type ConnectorResponsePropertiesServicenow struct { - Config ConfigPropertiesServicenow `json:"config"` - // The identifier for the connector. - ID string `json:"id"` - IsDeprecated OptIsDeprecated `json:"is_deprecated"` - IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` - IsPreconfigured IsPreconfigured `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetConfig returns the value of Config. -func (s *ConnectorResponsePropertiesServicenow) GetConfig() ConfigPropertiesServicenow { - return s.Config -} - -// GetID returns the value of ID. -func (s *ConnectorResponsePropertiesServicenow) GetID() string { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *ConnectorResponsePropertiesServicenow) GetIsDeprecated() OptIsDeprecated { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesServicenow) GetIsMissingSecrets() OptIsMissingSecrets { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesServicenow) GetIsPreconfigured() IsPreconfigured { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *ConnectorResponsePropertiesServicenow) GetName() string { - return s.Name -} - -// SetConfig sets the value of Config. -func (s *ConnectorResponsePropertiesServicenow) SetConfig(val ConfigPropertiesServicenow) { - s.Config = val -} - -// SetID sets the value of ID. -func (s *ConnectorResponsePropertiesServicenow) SetID(val string) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *ConnectorResponsePropertiesServicenow) SetIsDeprecated(val OptIsDeprecated) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesServicenow) SetIsMissingSecrets(val OptIsMissingSecrets) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesServicenow) SetIsPreconfigured(val IsPreconfigured) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *ConnectorResponsePropertiesServicenow) SetName(val string) { - s.Name = val -} - -// The type of connector. -type ConnectorResponsePropertiesServicenowConnectorTypeID string - -const ( - ConnectorResponsePropertiesServicenowConnectorTypeIDDotServicenow ConnectorResponsePropertiesServicenowConnectorTypeID = ".servicenow" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConnectorResponsePropertiesServicenowConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case ConnectorResponsePropertiesServicenowConnectorTypeIDDotServicenow: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConnectorResponsePropertiesServicenowConnectorTypeID) UnmarshalText(data []byte) error { - switch ConnectorResponsePropertiesServicenowConnectorTypeID(data) { - case ConnectorResponsePropertiesServicenowConnectorTypeIDDotServicenow: - *s = ConnectorResponsePropertiesServicenowConnectorTypeIDDotServicenow - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// Ref: #/components/schemas/connector_response_properties_servicenow_itom -type ConnectorResponsePropertiesServicenowItom struct { - Config ConfigPropertiesServicenowItom `json:"config"` - // The identifier for the connector. - ID string `json:"id"` - IsDeprecated OptIsDeprecated `json:"is_deprecated"` - IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` - IsPreconfigured IsPreconfigured `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetConfig returns the value of Config. -func (s *ConnectorResponsePropertiesServicenowItom) GetConfig() ConfigPropertiesServicenowItom { - return s.Config -} - -// GetID returns the value of ID. -func (s *ConnectorResponsePropertiesServicenowItom) GetID() string { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *ConnectorResponsePropertiesServicenowItom) GetIsDeprecated() OptIsDeprecated { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesServicenowItom) GetIsMissingSecrets() OptIsMissingSecrets { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesServicenowItom) GetIsPreconfigured() IsPreconfigured { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *ConnectorResponsePropertiesServicenowItom) GetName() string { - return s.Name -} - -// SetConfig sets the value of Config. -func (s *ConnectorResponsePropertiesServicenowItom) SetConfig(val ConfigPropertiesServicenowItom) { - s.Config = val -} - -// SetID sets the value of ID. -func (s *ConnectorResponsePropertiesServicenowItom) SetID(val string) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *ConnectorResponsePropertiesServicenowItom) SetIsDeprecated(val OptIsDeprecated) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesServicenowItom) SetIsMissingSecrets(val OptIsMissingSecrets) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesServicenowItom) SetIsPreconfigured(val IsPreconfigured) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *ConnectorResponsePropertiesServicenowItom) SetName(val string) { - s.Name = val -} - -// The type of connector. -type ConnectorResponsePropertiesServicenowItomConnectorTypeID string - -const ( - ConnectorResponsePropertiesServicenowItomConnectorTypeIDDotServicenowMinusItom ConnectorResponsePropertiesServicenowItomConnectorTypeID = ".servicenow-itom" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConnectorResponsePropertiesServicenowItomConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case ConnectorResponsePropertiesServicenowItomConnectorTypeIDDotServicenowMinusItom: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConnectorResponsePropertiesServicenowItomConnectorTypeID) UnmarshalText(data []byte) error { - switch ConnectorResponsePropertiesServicenowItomConnectorTypeID(data) { - case ConnectorResponsePropertiesServicenowItomConnectorTypeIDDotServicenowMinusItom: - *s = ConnectorResponsePropertiesServicenowItomConnectorTypeIDDotServicenowMinusItom - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// Ref: #/components/schemas/connector_response_properties_servicenow_sir -type ConnectorResponsePropertiesServicenowSir struct { - Config ConfigPropertiesServicenow `json:"config"` - // The identifier for the connector. - ID string `json:"id"` - IsDeprecated OptIsDeprecated `json:"is_deprecated"` - IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` - IsPreconfigured IsPreconfigured `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetConfig returns the value of Config. -func (s *ConnectorResponsePropertiesServicenowSir) GetConfig() ConfigPropertiesServicenow { - return s.Config -} - -// GetID returns the value of ID. -func (s *ConnectorResponsePropertiesServicenowSir) GetID() string { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *ConnectorResponsePropertiesServicenowSir) GetIsDeprecated() OptIsDeprecated { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesServicenowSir) GetIsMissingSecrets() OptIsMissingSecrets { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesServicenowSir) GetIsPreconfigured() IsPreconfigured { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *ConnectorResponsePropertiesServicenowSir) GetName() string { - return s.Name -} - -// SetConfig sets the value of Config. -func (s *ConnectorResponsePropertiesServicenowSir) SetConfig(val ConfigPropertiesServicenow) { - s.Config = val -} - -// SetID sets the value of ID. -func (s *ConnectorResponsePropertiesServicenowSir) SetID(val string) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *ConnectorResponsePropertiesServicenowSir) SetIsDeprecated(val OptIsDeprecated) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesServicenowSir) SetIsMissingSecrets(val OptIsMissingSecrets) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesServicenowSir) SetIsPreconfigured(val IsPreconfigured) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *ConnectorResponsePropertiesServicenowSir) SetName(val string) { - s.Name = val -} - -// The type of connector. -type ConnectorResponsePropertiesServicenowSirConnectorTypeID string - -const ( - ConnectorResponsePropertiesServicenowSirConnectorTypeIDDotServicenowMinusSir ConnectorResponsePropertiesServicenowSirConnectorTypeID = ".servicenow-sir" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConnectorResponsePropertiesServicenowSirConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case ConnectorResponsePropertiesServicenowSirConnectorTypeIDDotServicenowMinusSir: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConnectorResponsePropertiesServicenowSirConnectorTypeID) UnmarshalText(data []byte) error { - switch ConnectorResponsePropertiesServicenowSirConnectorTypeID(data) { - case ConnectorResponsePropertiesServicenowSirConnectorTypeIDDotServicenowMinusSir: - *s = ConnectorResponsePropertiesServicenowSirConnectorTypeIDDotServicenowMinusSir - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// Ref: #/components/schemas/connector_response_properties_slack -type ConnectorResponsePropertiesSlack struct { - // The identifier for the connector. - ID string `json:"id"` - IsDeprecated OptIsDeprecated `json:"is_deprecated"` - IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` - IsPreconfigured IsPreconfigured `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetID returns the value of ID. -func (s *ConnectorResponsePropertiesSlack) GetID() string { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *ConnectorResponsePropertiesSlack) GetIsDeprecated() OptIsDeprecated { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesSlack) GetIsMissingSecrets() OptIsMissingSecrets { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesSlack) GetIsPreconfigured() IsPreconfigured { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *ConnectorResponsePropertiesSlack) GetName() string { - return s.Name -} - -// SetID sets the value of ID. -func (s *ConnectorResponsePropertiesSlack) SetID(val string) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *ConnectorResponsePropertiesSlack) SetIsDeprecated(val OptIsDeprecated) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesSlack) SetIsMissingSecrets(val OptIsMissingSecrets) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesSlack) SetIsPreconfigured(val IsPreconfigured) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *ConnectorResponsePropertiesSlack) SetName(val string) { - s.Name = val -} - -// The type of connector. -type ConnectorResponsePropertiesSlackConnectorTypeID string - -const ( - ConnectorResponsePropertiesSlackConnectorTypeIDDotSlack ConnectorResponsePropertiesSlackConnectorTypeID = ".slack" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConnectorResponsePropertiesSlackConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case ConnectorResponsePropertiesSlackConnectorTypeIDDotSlack: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConnectorResponsePropertiesSlackConnectorTypeID) UnmarshalText(data []byte) error { - switch ConnectorResponsePropertiesSlackConnectorTypeID(data) { - case ConnectorResponsePropertiesSlackConnectorTypeIDDotSlack: - *s = ConnectorResponsePropertiesSlackConnectorTypeIDDotSlack - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// Ref: #/components/schemas/connector_response_properties_swimlane -type ConnectorResponsePropertiesSwimlane struct { - Config ConfigPropertiesSwimlane `json:"config"` - // The identifier for the connector. - ID string `json:"id"` - IsDeprecated OptIsDeprecated `json:"is_deprecated"` - IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` - IsPreconfigured IsPreconfigured `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetConfig returns the value of Config. -func (s *ConnectorResponsePropertiesSwimlane) GetConfig() ConfigPropertiesSwimlane { - return s.Config -} - -// GetID returns the value of ID. -func (s *ConnectorResponsePropertiesSwimlane) GetID() string { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *ConnectorResponsePropertiesSwimlane) GetIsDeprecated() OptIsDeprecated { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesSwimlane) GetIsMissingSecrets() OptIsMissingSecrets { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesSwimlane) GetIsPreconfigured() IsPreconfigured { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *ConnectorResponsePropertiesSwimlane) GetName() string { - return s.Name -} - -// SetConfig sets the value of Config. -func (s *ConnectorResponsePropertiesSwimlane) SetConfig(val ConfigPropertiesSwimlane) { - s.Config = val -} - -// SetID sets the value of ID. -func (s *ConnectorResponsePropertiesSwimlane) SetID(val string) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *ConnectorResponsePropertiesSwimlane) SetIsDeprecated(val OptIsDeprecated) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesSwimlane) SetIsMissingSecrets(val OptIsMissingSecrets) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesSwimlane) SetIsPreconfigured(val IsPreconfigured) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *ConnectorResponsePropertiesSwimlane) SetName(val string) { - s.Name = val -} - -// The type of connector. -type ConnectorResponsePropertiesSwimlaneConnectorTypeID string - -const ( - ConnectorResponsePropertiesSwimlaneConnectorTypeIDDotSwimlane ConnectorResponsePropertiesSwimlaneConnectorTypeID = ".swimlane" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConnectorResponsePropertiesSwimlaneConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case ConnectorResponsePropertiesSwimlaneConnectorTypeIDDotSwimlane: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConnectorResponsePropertiesSwimlaneConnectorTypeID) UnmarshalText(data []byte) error { - switch ConnectorResponsePropertiesSwimlaneConnectorTypeID(data) { - case ConnectorResponsePropertiesSwimlaneConnectorTypeIDDotSwimlane: - *s = ConnectorResponsePropertiesSwimlaneConnectorTypeIDDotSwimlane - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// Ref: #/components/schemas/connector_response_properties_teams -type ConnectorResponsePropertiesTeams struct { - // The identifier for the connector. - ID string `json:"id"` - IsDeprecated OptIsDeprecated `json:"is_deprecated"` - IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` - IsPreconfigured IsPreconfigured `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetID returns the value of ID. -func (s *ConnectorResponsePropertiesTeams) GetID() string { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *ConnectorResponsePropertiesTeams) GetIsDeprecated() OptIsDeprecated { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesTeams) GetIsMissingSecrets() OptIsMissingSecrets { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesTeams) GetIsPreconfigured() IsPreconfigured { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *ConnectorResponsePropertiesTeams) GetName() string { - return s.Name -} - -// SetID sets the value of ID. -func (s *ConnectorResponsePropertiesTeams) SetID(val string) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *ConnectorResponsePropertiesTeams) SetIsDeprecated(val OptIsDeprecated) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesTeams) SetIsMissingSecrets(val OptIsMissingSecrets) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesTeams) SetIsPreconfigured(val IsPreconfigured) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *ConnectorResponsePropertiesTeams) SetName(val string) { - s.Name = val -} - -// The type of connector. -type ConnectorResponsePropertiesTeamsConnectorTypeID string - -const ( - ConnectorResponsePropertiesTeamsConnectorTypeIDDotTeams ConnectorResponsePropertiesTeamsConnectorTypeID = ".teams" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConnectorResponsePropertiesTeamsConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case ConnectorResponsePropertiesTeamsConnectorTypeIDDotTeams: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConnectorResponsePropertiesTeamsConnectorTypeID) UnmarshalText(data []byte) error { - switch ConnectorResponsePropertiesTeamsConnectorTypeID(data) { - case ConnectorResponsePropertiesTeamsConnectorTypeIDDotTeams: - *s = ConnectorResponsePropertiesTeamsConnectorTypeIDDotTeams - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// Ref: #/components/schemas/connector_response_properties_tines -type ConnectorResponsePropertiesTines struct { - Config ConfigPropertiesTines `json:"config"` - // The identifier for the connector. - ID string `json:"id"` - IsDeprecated OptIsDeprecated `json:"is_deprecated"` - IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` - IsPreconfigured IsPreconfigured `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetConfig returns the value of Config. -func (s *ConnectorResponsePropertiesTines) GetConfig() ConfigPropertiesTines { - return s.Config -} - -// GetID returns the value of ID. -func (s *ConnectorResponsePropertiesTines) GetID() string { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *ConnectorResponsePropertiesTines) GetIsDeprecated() OptIsDeprecated { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesTines) GetIsMissingSecrets() OptIsMissingSecrets { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesTines) GetIsPreconfigured() IsPreconfigured { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *ConnectorResponsePropertiesTines) GetName() string { - return s.Name -} - -// SetConfig sets the value of Config. -func (s *ConnectorResponsePropertiesTines) SetConfig(val ConfigPropertiesTines) { - s.Config = val -} - -// SetID sets the value of ID. -func (s *ConnectorResponsePropertiesTines) SetID(val string) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *ConnectorResponsePropertiesTines) SetIsDeprecated(val OptIsDeprecated) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesTines) SetIsMissingSecrets(val OptIsMissingSecrets) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesTines) SetIsPreconfigured(val IsPreconfigured) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *ConnectorResponsePropertiesTines) SetName(val string) { - s.Name = val -} - -// The type of connector. -type ConnectorResponsePropertiesTinesConnectorTypeID string - -const ( - ConnectorResponsePropertiesTinesConnectorTypeIDDotTines ConnectorResponsePropertiesTinesConnectorTypeID = ".tines" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConnectorResponsePropertiesTinesConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case ConnectorResponsePropertiesTinesConnectorTypeIDDotTines: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConnectorResponsePropertiesTinesConnectorTypeID) UnmarshalText(data []byte) error { - switch ConnectorResponsePropertiesTinesConnectorTypeID(data) { - case ConnectorResponsePropertiesTinesConnectorTypeIDDotTines: - *s = ConnectorResponsePropertiesTinesConnectorTypeIDDotTines - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// Ref: #/components/schemas/connector_response_properties_webhook -type ConnectorResponsePropertiesWebhook struct { - Config ConfigPropertiesWebhook `json:"config"` - // The identifier for the connector. - ID string `json:"id"` - IsDeprecated OptIsDeprecated `json:"is_deprecated"` - IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` - IsPreconfigured IsPreconfigured `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetConfig returns the value of Config. -func (s *ConnectorResponsePropertiesWebhook) GetConfig() ConfigPropertiesWebhook { - return s.Config -} - -// GetID returns the value of ID. -func (s *ConnectorResponsePropertiesWebhook) GetID() string { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *ConnectorResponsePropertiesWebhook) GetIsDeprecated() OptIsDeprecated { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesWebhook) GetIsMissingSecrets() OptIsMissingSecrets { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesWebhook) GetIsPreconfigured() IsPreconfigured { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *ConnectorResponsePropertiesWebhook) GetName() string { - return s.Name -} - -// SetConfig sets the value of Config. -func (s *ConnectorResponsePropertiesWebhook) SetConfig(val ConfigPropertiesWebhook) { - s.Config = val -} - -// SetID sets the value of ID. -func (s *ConnectorResponsePropertiesWebhook) SetID(val string) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *ConnectorResponsePropertiesWebhook) SetIsDeprecated(val OptIsDeprecated) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesWebhook) SetIsMissingSecrets(val OptIsMissingSecrets) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesWebhook) SetIsPreconfigured(val IsPreconfigured) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *ConnectorResponsePropertiesWebhook) SetName(val string) { - s.Name = val -} - -// The type of connector. -type ConnectorResponsePropertiesWebhookConnectorTypeID string - -const ( - ConnectorResponsePropertiesWebhookConnectorTypeIDDotWebhook ConnectorResponsePropertiesWebhookConnectorTypeID = ".webhook" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConnectorResponsePropertiesWebhookConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case ConnectorResponsePropertiesWebhookConnectorTypeIDDotWebhook: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConnectorResponsePropertiesWebhookConnectorTypeID) UnmarshalText(data []byte) error { - switch ConnectorResponsePropertiesWebhookConnectorTypeID(data) { - case ConnectorResponsePropertiesWebhookConnectorTypeIDDotWebhook: - *s = ConnectorResponsePropertiesWebhookConnectorTypeIDDotWebhook - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// Ref: #/components/schemas/connector_response_properties_xmatters -type ConnectorResponsePropertiesXmatters struct { - Config ConfigPropertiesXmatters `json:"config"` - // The identifier for the connector. - ID string `json:"id"` - IsDeprecated OptIsDeprecated `json:"is_deprecated"` - IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` - IsPreconfigured IsPreconfigured `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetConfig returns the value of Config. -func (s *ConnectorResponsePropertiesXmatters) GetConfig() ConfigPropertiesXmatters { - return s.Config -} - -// GetID returns the value of ID. -func (s *ConnectorResponsePropertiesXmatters) GetID() string { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *ConnectorResponsePropertiesXmatters) GetIsDeprecated() OptIsDeprecated { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesXmatters) GetIsMissingSecrets() OptIsMissingSecrets { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesXmatters) GetIsPreconfigured() IsPreconfigured { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *ConnectorResponsePropertiesXmatters) GetName() string { - return s.Name -} - -// SetConfig sets the value of Config. -func (s *ConnectorResponsePropertiesXmatters) SetConfig(val ConfigPropertiesXmatters) { - s.Config = val -} - -// SetID sets the value of ID. -func (s *ConnectorResponsePropertiesXmatters) SetID(val string) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *ConnectorResponsePropertiesXmatters) SetIsDeprecated(val OptIsDeprecated) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *ConnectorResponsePropertiesXmatters) SetIsMissingSecrets(val OptIsMissingSecrets) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *ConnectorResponsePropertiesXmatters) SetIsPreconfigured(val IsPreconfigured) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *ConnectorResponsePropertiesXmatters) SetName(val string) { - s.Name = val -} - -// The type of connector. -type ConnectorResponsePropertiesXmattersConnectorTypeID string - -const ( - ConnectorResponsePropertiesXmattersConnectorTypeIDDotXmatters ConnectorResponsePropertiesXmattersConnectorTypeID = ".xmatters" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConnectorResponsePropertiesXmattersConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case ConnectorResponsePropertiesXmattersConnectorTypeIDDotXmatters: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConnectorResponsePropertiesXmattersConnectorTypeID) UnmarshalText(data []byte) error { - switch ConnectorResponsePropertiesXmattersConnectorTypeID(data) { - case ConnectorResponsePropertiesXmattersConnectorTypeIDDotXmatters: - *s = ConnectorResponsePropertiesXmattersConnectorTypeIDDotXmatters - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`. -// Ref: #/components/schemas/connector_types -type ConnectorTypes string - -const ( - ConnectorTypesDotCasesMinusWebhook ConnectorTypes = ".cases-webhook" - ConnectorTypesDotEmail ConnectorTypes = ".email" - ConnectorTypesDotIndex ConnectorTypes = ".index" - ConnectorTypesDotJira ConnectorTypes = ".jira" - ConnectorTypesDotOpsgenie ConnectorTypes = ".opsgenie" - ConnectorTypesDotPagerduty ConnectorTypes = ".pagerduty" - ConnectorTypesDotResilient ConnectorTypes = ".resilient" - ConnectorTypesDotServicenow ConnectorTypes = ".servicenow" - ConnectorTypesDotServicenowMinusItom ConnectorTypes = ".servicenow-itom" - ConnectorTypesDotServicenowMinusSir ConnectorTypes = ".servicenow-sir" - ConnectorTypesDotServerMinusLog ConnectorTypes = ".server-log" - ConnectorTypesDotSlack ConnectorTypes = ".slack" - ConnectorTypesDotSwimlane ConnectorTypes = ".swimlane" - ConnectorTypesDotTeams ConnectorTypes = ".teams" - ConnectorTypesDotTines ConnectorTypes = ".tines" - ConnectorTypesDotWebhook ConnectorTypes = ".webhook" - ConnectorTypesDotXmatters ConnectorTypes = ".xmatters" -) - -// MarshalText implements encoding.TextMarshaler. -func (s ConnectorTypes) MarshalText() ([]byte, error) { - switch s { - case ConnectorTypesDotCasesMinusWebhook: - return []byte(s), nil - case ConnectorTypesDotEmail: - return []byte(s), nil - case ConnectorTypesDotIndex: - return []byte(s), nil - case ConnectorTypesDotJira: - return []byte(s), nil - case ConnectorTypesDotOpsgenie: - return []byte(s), nil - case ConnectorTypesDotPagerduty: - return []byte(s), nil - case ConnectorTypesDotResilient: - return []byte(s), nil - case ConnectorTypesDotServicenow: - return []byte(s), nil - case ConnectorTypesDotServicenowMinusItom: - return []byte(s), nil - case ConnectorTypesDotServicenowMinusSir: - return []byte(s), nil - case ConnectorTypesDotServerMinusLog: - return []byte(s), nil - case ConnectorTypesDotSlack: - return []byte(s), nil - case ConnectorTypesDotSwimlane: - return []byte(s), nil - case ConnectorTypesDotTeams: - return []byte(s), nil - case ConnectorTypesDotTines: - return []byte(s), nil - case ConnectorTypesDotWebhook: - return []byte(s), nil - case ConnectorTypesDotXmatters: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *ConnectorTypes) UnmarshalText(data []byte) error { - switch ConnectorTypes(data) { - case ConnectorTypesDotCasesMinusWebhook: - *s = ConnectorTypesDotCasesMinusWebhook - return nil - case ConnectorTypesDotEmail: - *s = ConnectorTypesDotEmail - return nil - case ConnectorTypesDotIndex: - *s = ConnectorTypesDotIndex - return nil - case ConnectorTypesDotJira: - *s = ConnectorTypesDotJira - return nil - case ConnectorTypesDotOpsgenie: - *s = ConnectorTypesDotOpsgenie - return nil - case ConnectorTypesDotPagerduty: - *s = ConnectorTypesDotPagerduty - return nil - case ConnectorTypesDotResilient: - *s = ConnectorTypesDotResilient - return nil - case ConnectorTypesDotServicenow: - *s = ConnectorTypesDotServicenow - return nil - case ConnectorTypesDotServicenowMinusItom: - *s = ConnectorTypesDotServicenowMinusItom - return nil - case ConnectorTypesDotServicenowMinusSir: - *s = ConnectorTypesDotServicenowMinusSir - return nil - case ConnectorTypesDotServerMinusLog: - *s = ConnectorTypesDotServerMinusLog - return nil - case ConnectorTypesDotSlack: - *s = ConnectorTypesDotSlack - return nil - case ConnectorTypesDotSwimlane: - *s = ConnectorTypesDotSwimlane - return nil - case ConnectorTypesDotTeams: - *s = ConnectorTypesDotTeams - return nil - case ConnectorTypesDotTines: - *s = ConnectorTypesDotTines - return nil - case ConnectorTypesDotWebhook: - *s = ConnectorTypesDotWebhook - return nil - case ConnectorTypesDotXmatters: - *s = ConnectorTypesDotXmatters - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The properties vary depending on the connector type. -// CreateConnectorReq represents sum type. -type CreateConnectorReq struct { - Type CreateConnectorReqType // switch on this field - CreateConnectorRequestCasesWebhook CreateConnectorRequestCasesWebhook - CreateConnectorRequestEmail CreateConnectorRequestEmail - CreateConnectorRequestIndex CreateConnectorRequestIndex - CreateConnectorRequestJira CreateConnectorRequestJira - CreateConnectorRequestOpsgenie CreateConnectorRequestOpsgenie - CreateConnectorRequestPagerduty CreateConnectorRequestPagerduty - CreateConnectorRequestResilient CreateConnectorRequestResilient - CreateConnectorRequestServerlog CreateConnectorRequestServerlog - CreateConnectorRequestServicenow CreateConnectorRequestServicenow - CreateConnectorRequestServicenowItom CreateConnectorRequestServicenowItom - CreateConnectorRequestServicenowSir CreateConnectorRequestServicenowSir - CreateConnectorRequestSlack CreateConnectorRequestSlack - CreateConnectorRequestSwimlane CreateConnectorRequestSwimlane - CreateConnectorRequestTeams CreateConnectorRequestTeams - CreateConnectorRequestTines CreateConnectorRequestTines - CreateConnectorRequestWebhook CreateConnectorRequestWebhook - CreateConnectorRequestXmatters CreateConnectorRequestXmatters -} - -// CreateConnectorReqType is oneOf type of CreateConnectorReq. -type CreateConnectorReqType string - -// Possible values for CreateConnectorReqType. -const ( - CreateConnectorRequestCasesWebhookCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestCasesWebhook" - CreateConnectorRequestEmailCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestEmail" - CreateConnectorRequestIndexCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestIndex" - CreateConnectorRequestJiraCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestJira" - CreateConnectorRequestOpsgenieCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestOpsgenie" - CreateConnectorRequestPagerdutyCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestPagerduty" - CreateConnectorRequestResilientCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestResilient" - CreateConnectorRequestServerlogCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestServerlog" - CreateConnectorRequestServicenowCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestServicenow" - CreateConnectorRequestServicenowItomCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestServicenowItom" - CreateConnectorRequestServicenowSirCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestServicenowSir" - CreateConnectorRequestSlackCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestSlack" - CreateConnectorRequestSwimlaneCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestSwimlane" - CreateConnectorRequestTeamsCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestTeams" - CreateConnectorRequestTinesCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestTines" - CreateConnectorRequestWebhookCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestWebhook" - CreateConnectorRequestXmattersCreateConnectorReq CreateConnectorReqType = "CreateConnectorRequestXmatters" -) - -// IsCreateConnectorRequestCasesWebhook reports whether CreateConnectorReq is CreateConnectorRequestCasesWebhook. -func (s CreateConnectorReq) IsCreateConnectorRequestCasesWebhook() bool { - return s.Type == CreateConnectorRequestCasesWebhookCreateConnectorReq -} - -// IsCreateConnectorRequestEmail reports whether CreateConnectorReq is CreateConnectorRequestEmail. -func (s CreateConnectorReq) IsCreateConnectorRequestEmail() bool { - return s.Type == CreateConnectorRequestEmailCreateConnectorReq -} - -// IsCreateConnectorRequestIndex reports whether CreateConnectorReq is CreateConnectorRequestIndex. -func (s CreateConnectorReq) IsCreateConnectorRequestIndex() bool { - return s.Type == CreateConnectorRequestIndexCreateConnectorReq -} - -// IsCreateConnectorRequestJira reports whether CreateConnectorReq is CreateConnectorRequestJira. -func (s CreateConnectorReq) IsCreateConnectorRequestJira() bool { - return s.Type == CreateConnectorRequestJiraCreateConnectorReq -} - -// IsCreateConnectorRequestOpsgenie reports whether CreateConnectorReq is CreateConnectorRequestOpsgenie. -func (s CreateConnectorReq) IsCreateConnectorRequestOpsgenie() bool { - return s.Type == CreateConnectorRequestOpsgenieCreateConnectorReq -} - -// IsCreateConnectorRequestPagerduty reports whether CreateConnectorReq is CreateConnectorRequestPagerduty. -func (s CreateConnectorReq) IsCreateConnectorRequestPagerduty() bool { - return s.Type == CreateConnectorRequestPagerdutyCreateConnectorReq -} - -// IsCreateConnectorRequestResilient reports whether CreateConnectorReq is CreateConnectorRequestResilient. -func (s CreateConnectorReq) IsCreateConnectorRequestResilient() bool { - return s.Type == CreateConnectorRequestResilientCreateConnectorReq -} - -// IsCreateConnectorRequestServerlog reports whether CreateConnectorReq is CreateConnectorRequestServerlog. -func (s CreateConnectorReq) IsCreateConnectorRequestServerlog() bool { - return s.Type == CreateConnectorRequestServerlogCreateConnectorReq -} - -// IsCreateConnectorRequestServicenow reports whether CreateConnectorReq is CreateConnectorRequestServicenow. -func (s CreateConnectorReq) IsCreateConnectorRequestServicenow() bool { - return s.Type == CreateConnectorRequestServicenowCreateConnectorReq -} - -// IsCreateConnectorRequestServicenowItom reports whether CreateConnectorReq is CreateConnectorRequestServicenowItom. -func (s CreateConnectorReq) IsCreateConnectorRequestServicenowItom() bool { - return s.Type == CreateConnectorRequestServicenowItomCreateConnectorReq -} - -// IsCreateConnectorRequestServicenowSir reports whether CreateConnectorReq is CreateConnectorRequestServicenowSir. -func (s CreateConnectorReq) IsCreateConnectorRequestServicenowSir() bool { - return s.Type == CreateConnectorRequestServicenowSirCreateConnectorReq -} - -// IsCreateConnectorRequestSlack reports whether CreateConnectorReq is CreateConnectorRequestSlack. -func (s CreateConnectorReq) IsCreateConnectorRequestSlack() bool { - return s.Type == CreateConnectorRequestSlackCreateConnectorReq -} - -// IsCreateConnectorRequestSwimlane reports whether CreateConnectorReq is CreateConnectorRequestSwimlane. -func (s CreateConnectorReq) IsCreateConnectorRequestSwimlane() bool { - return s.Type == CreateConnectorRequestSwimlaneCreateConnectorReq -} - -// IsCreateConnectorRequestTeams reports whether CreateConnectorReq is CreateConnectorRequestTeams. -func (s CreateConnectorReq) IsCreateConnectorRequestTeams() bool { - return s.Type == CreateConnectorRequestTeamsCreateConnectorReq -} - -// IsCreateConnectorRequestTines reports whether CreateConnectorReq is CreateConnectorRequestTines. -func (s CreateConnectorReq) IsCreateConnectorRequestTines() bool { - return s.Type == CreateConnectorRequestTinesCreateConnectorReq -} - -// IsCreateConnectorRequestWebhook reports whether CreateConnectorReq is CreateConnectorRequestWebhook. -func (s CreateConnectorReq) IsCreateConnectorRequestWebhook() bool { - return s.Type == CreateConnectorRequestWebhookCreateConnectorReq -} - -// IsCreateConnectorRequestXmatters reports whether CreateConnectorReq is CreateConnectorRequestXmatters. -func (s CreateConnectorReq) IsCreateConnectorRequestXmatters() bool { - return s.Type == CreateConnectorRequestXmattersCreateConnectorReq -} - -// SetCreateConnectorRequestCasesWebhook sets CreateConnectorReq to CreateConnectorRequestCasesWebhook. -func (s *CreateConnectorReq) SetCreateConnectorRequestCasesWebhook(v CreateConnectorRequestCasesWebhook) { - s.Type = CreateConnectorRequestCasesWebhookCreateConnectorReq - s.CreateConnectorRequestCasesWebhook = v -} - -// GetCreateConnectorRequestCasesWebhook returns CreateConnectorRequestCasesWebhook and true boolean if CreateConnectorReq is CreateConnectorRequestCasesWebhook. -func (s CreateConnectorReq) GetCreateConnectorRequestCasesWebhook() (v CreateConnectorRequestCasesWebhook, ok bool) { - if !s.IsCreateConnectorRequestCasesWebhook() { - return v, false - } - return s.CreateConnectorRequestCasesWebhook, true -} - -// NewCreateConnectorRequestCasesWebhookCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestCasesWebhook. -func NewCreateConnectorRequestCasesWebhookCreateConnectorReq(v CreateConnectorRequestCasesWebhook) CreateConnectorReq { - var s CreateConnectorReq - s.SetCreateConnectorRequestCasesWebhook(v) - return s -} - -// SetCreateConnectorRequestEmail sets CreateConnectorReq to CreateConnectorRequestEmail. -func (s *CreateConnectorReq) SetCreateConnectorRequestEmail(v CreateConnectorRequestEmail) { - s.Type = CreateConnectorRequestEmailCreateConnectorReq - s.CreateConnectorRequestEmail = v -} - -// GetCreateConnectorRequestEmail returns CreateConnectorRequestEmail and true boolean if CreateConnectorReq is CreateConnectorRequestEmail. -func (s CreateConnectorReq) GetCreateConnectorRequestEmail() (v CreateConnectorRequestEmail, ok bool) { - if !s.IsCreateConnectorRequestEmail() { - return v, false - } - return s.CreateConnectorRequestEmail, true -} - -// NewCreateConnectorRequestEmailCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestEmail. -func NewCreateConnectorRequestEmailCreateConnectorReq(v CreateConnectorRequestEmail) CreateConnectorReq { - var s CreateConnectorReq - s.SetCreateConnectorRequestEmail(v) - return s -} - -// SetCreateConnectorRequestIndex sets CreateConnectorReq to CreateConnectorRequestIndex. -func (s *CreateConnectorReq) SetCreateConnectorRequestIndex(v CreateConnectorRequestIndex) { - s.Type = CreateConnectorRequestIndexCreateConnectorReq - s.CreateConnectorRequestIndex = v -} - -// GetCreateConnectorRequestIndex returns CreateConnectorRequestIndex and true boolean if CreateConnectorReq is CreateConnectorRequestIndex. -func (s CreateConnectorReq) GetCreateConnectorRequestIndex() (v CreateConnectorRequestIndex, ok bool) { - if !s.IsCreateConnectorRequestIndex() { - return v, false - } - return s.CreateConnectorRequestIndex, true -} - -// NewCreateConnectorRequestIndexCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestIndex. -func NewCreateConnectorRequestIndexCreateConnectorReq(v CreateConnectorRequestIndex) CreateConnectorReq { - var s CreateConnectorReq - s.SetCreateConnectorRequestIndex(v) - return s -} - -// SetCreateConnectorRequestJira sets CreateConnectorReq to CreateConnectorRequestJira. -func (s *CreateConnectorReq) SetCreateConnectorRequestJira(v CreateConnectorRequestJira) { - s.Type = CreateConnectorRequestJiraCreateConnectorReq - s.CreateConnectorRequestJira = v -} - -// GetCreateConnectorRequestJira returns CreateConnectorRequestJira and true boolean if CreateConnectorReq is CreateConnectorRequestJira. -func (s CreateConnectorReq) GetCreateConnectorRequestJira() (v CreateConnectorRequestJira, ok bool) { - if !s.IsCreateConnectorRequestJira() { - return v, false - } - return s.CreateConnectorRequestJira, true -} - -// NewCreateConnectorRequestJiraCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestJira. -func NewCreateConnectorRequestJiraCreateConnectorReq(v CreateConnectorRequestJira) CreateConnectorReq { - var s CreateConnectorReq - s.SetCreateConnectorRequestJira(v) - return s -} - -// SetCreateConnectorRequestOpsgenie sets CreateConnectorReq to CreateConnectorRequestOpsgenie. -func (s *CreateConnectorReq) SetCreateConnectorRequestOpsgenie(v CreateConnectorRequestOpsgenie) { - s.Type = CreateConnectorRequestOpsgenieCreateConnectorReq - s.CreateConnectorRequestOpsgenie = v -} - -// GetCreateConnectorRequestOpsgenie returns CreateConnectorRequestOpsgenie and true boolean if CreateConnectorReq is CreateConnectorRequestOpsgenie. -func (s CreateConnectorReq) GetCreateConnectorRequestOpsgenie() (v CreateConnectorRequestOpsgenie, ok bool) { - if !s.IsCreateConnectorRequestOpsgenie() { - return v, false - } - return s.CreateConnectorRequestOpsgenie, true -} - -// NewCreateConnectorRequestOpsgenieCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestOpsgenie. -func NewCreateConnectorRequestOpsgenieCreateConnectorReq(v CreateConnectorRequestOpsgenie) CreateConnectorReq { - var s CreateConnectorReq - s.SetCreateConnectorRequestOpsgenie(v) - return s -} - -// SetCreateConnectorRequestPagerduty sets CreateConnectorReq to CreateConnectorRequestPagerduty. -func (s *CreateConnectorReq) SetCreateConnectorRequestPagerduty(v CreateConnectorRequestPagerduty) { - s.Type = CreateConnectorRequestPagerdutyCreateConnectorReq - s.CreateConnectorRequestPagerduty = v -} - -// GetCreateConnectorRequestPagerduty returns CreateConnectorRequestPagerduty and true boolean if CreateConnectorReq is CreateConnectorRequestPagerduty. -func (s CreateConnectorReq) GetCreateConnectorRequestPagerduty() (v CreateConnectorRequestPagerduty, ok bool) { - if !s.IsCreateConnectorRequestPagerduty() { - return v, false - } - return s.CreateConnectorRequestPagerduty, true -} - -// NewCreateConnectorRequestPagerdutyCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestPagerduty. -func NewCreateConnectorRequestPagerdutyCreateConnectorReq(v CreateConnectorRequestPagerduty) CreateConnectorReq { - var s CreateConnectorReq - s.SetCreateConnectorRequestPagerduty(v) - return s -} - -// SetCreateConnectorRequestResilient sets CreateConnectorReq to CreateConnectorRequestResilient. -func (s *CreateConnectorReq) SetCreateConnectorRequestResilient(v CreateConnectorRequestResilient) { - s.Type = CreateConnectorRequestResilientCreateConnectorReq - s.CreateConnectorRequestResilient = v -} - -// GetCreateConnectorRequestResilient returns CreateConnectorRequestResilient and true boolean if CreateConnectorReq is CreateConnectorRequestResilient. -func (s CreateConnectorReq) GetCreateConnectorRequestResilient() (v CreateConnectorRequestResilient, ok bool) { - if !s.IsCreateConnectorRequestResilient() { - return v, false - } - return s.CreateConnectorRequestResilient, true -} - -// NewCreateConnectorRequestResilientCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestResilient. -func NewCreateConnectorRequestResilientCreateConnectorReq(v CreateConnectorRequestResilient) CreateConnectorReq { - var s CreateConnectorReq - s.SetCreateConnectorRequestResilient(v) - return s -} - -// SetCreateConnectorRequestServerlog sets CreateConnectorReq to CreateConnectorRequestServerlog. -func (s *CreateConnectorReq) SetCreateConnectorRequestServerlog(v CreateConnectorRequestServerlog) { - s.Type = CreateConnectorRequestServerlogCreateConnectorReq - s.CreateConnectorRequestServerlog = v -} - -// GetCreateConnectorRequestServerlog returns CreateConnectorRequestServerlog and true boolean if CreateConnectorReq is CreateConnectorRequestServerlog. -func (s CreateConnectorReq) GetCreateConnectorRequestServerlog() (v CreateConnectorRequestServerlog, ok bool) { - if !s.IsCreateConnectorRequestServerlog() { - return v, false - } - return s.CreateConnectorRequestServerlog, true -} - -// NewCreateConnectorRequestServerlogCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestServerlog. -func NewCreateConnectorRequestServerlogCreateConnectorReq(v CreateConnectorRequestServerlog) CreateConnectorReq { - var s CreateConnectorReq - s.SetCreateConnectorRequestServerlog(v) - return s -} - -// SetCreateConnectorRequestServicenow sets CreateConnectorReq to CreateConnectorRequestServicenow. -func (s *CreateConnectorReq) SetCreateConnectorRequestServicenow(v CreateConnectorRequestServicenow) { - s.Type = CreateConnectorRequestServicenowCreateConnectorReq - s.CreateConnectorRequestServicenow = v -} - -// GetCreateConnectorRequestServicenow returns CreateConnectorRequestServicenow and true boolean if CreateConnectorReq is CreateConnectorRequestServicenow. -func (s CreateConnectorReq) GetCreateConnectorRequestServicenow() (v CreateConnectorRequestServicenow, ok bool) { - if !s.IsCreateConnectorRequestServicenow() { - return v, false - } - return s.CreateConnectorRequestServicenow, true -} - -// NewCreateConnectorRequestServicenowCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestServicenow. -func NewCreateConnectorRequestServicenowCreateConnectorReq(v CreateConnectorRequestServicenow) CreateConnectorReq { - var s CreateConnectorReq - s.SetCreateConnectorRequestServicenow(v) - return s -} - -// SetCreateConnectorRequestServicenowItom sets CreateConnectorReq to CreateConnectorRequestServicenowItom. -func (s *CreateConnectorReq) SetCreateConnectorRequestServicenowItom(v CreateConnectorRequestServicenowItom) { - s.Type = CreateConnectorRequestServicenowItomCreateConnectorReq - s.CreateConnectorRequestServicenowItom = v -} - -// GetCreateConnectorRequestServicenowItom returns CreateConnectorRequestServicenowItom and true boolean if CreateConnectorReq is CreateConnectorRequestServicenowItom. -func (s CreateConnectorReq) GetCreateConnectorRequestServicenowItom() (v CreateConnectorRequestServicenowItom, ok bool) { - if !s.IsCreateConnectorRequestServicenowItom() { - return v, false - } - return s.CreateConnectorRequestServicenowItom, true -} - -// NewCreateConnectorRequestServicenowItomCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestServicenowItom. -func NewCreateConnectorRequestServicenowItomCreateConnectorReq(v CreateConnectorRequestServicenowItom) CreateConnectorReq { - var s CreateConnectorReq - s.SetCreateConnectorRequestServicenowItom(v) - return s -} - -// SetCreateConnectorRequestServicenowSir sets CreateConnectorReq to CreateConnectorRequestServicenowSir. -func (s *CreateConnectorReq) SetCreateConnectorRequestServicenowSir(v CreateConnectorRequestServicenowSir) { - s.Type = CreateConnectorRequestServicenowSirCreateConnectorReq - s.CreateConnectorRequestServicenowSir = v -} - -// GetCreateConnectorRequestServicenowSir returns CreateConnectorRequestServicenowSir and true boolean if CreateConnectorReq is CreateConnectorRequestServicenowSir. -func (s CreateConnectorReq) GetCreateConnectorRequestServicenowSir() (v CreateConnectorRequestServicenowSir, ok bool) { - if !s.IsCreateConnectorRequestServicenowSir() { - return v, false - } - return s.CreateConnectorRequestServicenowSir, true -} - -// NewCreateConnectorRequestServicenowSirCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestServicenowSir. -func NewCreateConnectorRequestServicenowSirCreateConnectorReq(v CreateConnectorRequestServicenowSir) CreateConnectorReq { - var s CreateConnectorReq - s.SetCreateConnectorRequestServicenowSir(v) - return s -} - -// SetCreateConnectorRequestSlack sets CreateConnectorReq to CreateConnectorRequestSlack. -func (s *CreateConnectorReq) SetCreateConnectorRequestSlack(v CreateConnectorRequestSlack) { - s.Type = CreateConnectorRequestSlackCreateConnectorReq - s.CreateConnectorRequestSlack = v -} - -// GetCreateConnectorRequestSlack returns CreateConnectorRequestSlack and true boolean if CreateConnectorReq is CreateConnectorRequestSlack. -func (s CreateConnectorReq) GetCreateConnectorRequestSlack() (v CreateConnectorRequestSlack, ok bool) { - if !s.IsCreateConnectorRequestSlack() { - return v, false - } - return s.CreateConnectorRequestSlack, true -} - -// NewCreateConnectorRequestSlackCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestSlack. -func NewCreateConnectorRequestSlackCreateConnectorReq(v CreateConnectorRequestSlack) CreateConnectorReq { - var s CreateConnectorReq - s.SetCreateConnectorRequestSlack(v) - return s -} - -// SetCreateConnectorRequestSwimlane sets CreateConnectorReq to CreateConnectorRequestSwimlane. -func (s *CreateConnectorReq) SetCreateConnectorRequestSwimlane(v CreateConnectorRequestSwimlane) { - s.Type = CreateConnectorRequestSwimlaneCreateConnectorReq - s.CreateConnectorRequestSwimlane = v -} - -// GetCreateConnectorRequestSwimlane returns CreateConnectorRequestSwimlane and true boolean if CreateConnectorReq is CreateConnectorRequestSwimlane. -func (s CreateConnectorReq) GetCreateConnectorRequestSwimlane() (v CreateConnectorRequestSwimlane, ok bool) { - if !s.IsCreateConnectorRequestSwimlane() { - return v, false - } - return s.CreateConnectorRequestSwimlane, true -} - -// NewCreateConnectorRequestSwimlaneCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestSwimlane. -func NewCreateConnectorRequestSwimlaneCreateConnectorReq(v CreateConnectorRequestSwimlane) CreateConnectorReq { - var s CreateConnectorReq - s.SetCreateConnectorRequestSwimlane(v) - return s -} - -// SetCreateConnectorRequestTeams sets CreateConnectorReq to CreateConnectorRequestTeams. -func (s *CreateConnectorReq) SetCreateConnectorRequestTeams(v CreateConnectorRequestTeams) { - s.Type = CreateConnectorRequestTeamsCreateConnectorReq - s.CreateConnectorRequestTeams = v -} - -// GetCreateConnectorRequestTeams returns CreateConnectorRequestTeams and true boolean if CreateConnectorReq is CreateConnectorRequestTeams. -func (s CreateConnectorReq) GetCreateConnectorRequestTeams() (v CreateConnectorRequestTeams, ok bool) { - if !s.IsCreateConnectorRequestTeams() { - return v, false - } - return s.CreateConnectorRequestTeams, true -} - -// NewCreateConnectorRequestTeamsCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestTeams. -func NewCreateConnectorRequestTeamsCreateConnectorReq(v CreateConnectorRequestTeams) CreateConnectorReq { - var s CreateConnectorReq - s.SetCreateConnectorRequestTeams(v) - return s -} - -// SetCreateConnectorRequestTines sets CreateConnectorReq to CreateConnectorRequestTines. -func (s *CreateConnectorReq) SetCreateConnectorRequestTines(v CreateConnectorRequestTines) { - s.Type = CreateConnectorRequestTinesCreateConnectorReq - s.CreateConnectorRequestTines = v -} - -// GetCreateConnectorRequestTines returns CreateConnectorRequestTines and true boolean if CreateConnectorReq is CreateConnectorRequestTines. -func (s CreateConnectorReq) GetCreateConnectorRequestTines() (v CreateConnectorRequestTines, ok bool) { - if !s.IsCreateConnectorRequestTines() { - return v, false - } - return s.CreateConnectorRequestTines, true -} - -// NewCreateConnectorRequestTinesCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestTines. -func NewCreateConnectorRequestTinesCreateConnectorReq(v CreateConnectorRequestTines) CreateConnectorReq { - var s CreateConnectorReq - s.SetCreateConnectorRequestTines(v) - return s -} - -// SetCreateConnectorRequestWebhook sets CreateConnectorReq to CreateConnectorRequestWebhook. -func (s *CreateConnectorReq) SetCreateConnectorRequestWebhook(v CreateConnectorRequestWebhook) { - s.Type = CreateConnectorRequestWebhookCreateConnectorReq - s.CreateConnectorRequestWebhook = v -} - -// GetCreateConnectorRequestWebhook returns CreateConnectorRequestWebhook and true boolean if CreateConnectorReq is CreateConnectorRequestWebhook. -func (s CreateConnectorReq) GetCreateConnectorRequestWebhook() (v CreateConnectorRequestWebhook, ok bool) { - if !s.IsCreateConnectorRequestWebhook() { - return v, false - } - return s.CreateConnectorRequestWebhook, true -} - -// NewCreateConnectorRequestWebhookCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestWebhook. -func NewCreateConnectorRequestWebhookCreateConnectorReq(v CreateConnectorRequestWebhook) CreateConnectorReq { - var s CreateConnectorReq - s.SetCreateConnectorRequestWebhook(v) - return s -} - -// SetCreateConnectorRequestXmatters sets CreateConnectorReq to CreateConnectorRequestXmatters. -func (s *CreateConnectorReq) SetCreateConnectorRequestXmatters(v CreateConnectorRequestXmatters) { - s.Type = CreateConnectorRequestXmattersCreateConnectorReq - s.CreateConnectorRequestXmatters = v -} - -// GetCreateConnectorRequestXmatters returns CreateConnectorRequestXmatters and true boolean if CreateConnectorReq is CreateConnectorRequestXmatters. -func (s CreateConnectorReq) GetCreateConnectorRequestXmatters() (v CreateConnectorRequestXmatters, ok bool) { - if !s.IsCreateConnectorRequestXmatters() { - return v, false - } - return s.CreateConnectorRequestXmatters, true -} - -// NewCreateConnectorRequestXmattersCreateConnectorReq returns new CreateConnectorReq from CreateConnectorRequestXmatters. -func NewCreateConnectorRequestXmattersCreateConnectorReq(v CreateConnectorRequestXmatters) CreateConnectorReq { - var s CreateConnectorReq - s.SetCreateConnectorRequestXmatters(v) - return s -} - -// The Webhook - Case Management connector uses axios to send POST, PUT, and GET requests to a case -// management RESTful API web service. -// Ref: #/components/schemas/create_connector_request_cases_webhook -type CreateConnectorRequestCasesWebhook struct { - Config ConfigPropertiesCasesWebhook `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets OptSecretsPropertiesCasesWebhook `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *CreateConnectorRequestCasesWebhook) GetConfig() ConfigPropertiesCasesWebhook { - return s.Config -} - -// GetName returns the value of Name. -func (s *CreateConnectorRequestCasesWebhook) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *CreateConnectorRequestCasesWebhook) GetSecrets() OptSecretsPropertiesCasesWebhook { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *CreateConnectorRequestCasesWebhook) SetConfig(val ConfigPropertiesCasesWebhook) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *CreateConnectorRequestCasesWebhook) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *CreateConnectorRequestCasesWebhook) SetSecrets(val OptSecretsPropertiesCasesWebhook) { - s.Secrets = val -} - -// The type of connector. -type CreateConnectorRequestCasesWebhookConnectorTypeID string - -const ( - CreateConnectorRequestCasesWebhookConnectorTypeIDDotCasesMinusWebhook CreateConnectorRequestCasesWebhookConnectorTypeID = ".cases-webhook" -) - -// MarshalText implements encoding.TextMarshaler. -func (s CreateConnectorRequestCasesWebhookConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case CreateConnectorRequestCasesWebhookConnectorTypeIDDotCasesMinusWebhook: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *CreateConnectorRequestCasesWebhookConnectorTypeID) UnmarshalText(data []byte) error { - switch CreateConnectorRequestCasesWebhookConnectorTypeID(data) { - case CreateConnectorRequestCasesWebhookConnectorTypeIDDotCasesMinusWebhook: - *s = CreateConnectorRequestCasesWebhookConnectorTypeIDDotCasesMinusWebhook - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The email connector uses the SMTP protocol to send mail messages, using an integration of -// Nodemailer. An exception is Microsoft Exchange, which uses HTTP protocol for sending emails, Send -// mail. Email message text is sent as both plain text and html text. -// Ref: #/components/schemas/create_connector_request_email -type CreateConnectorRequestEmail struct { - Config ConfigPropertiesEmail `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesEmail `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *CreateConnectorRequestEmail) GetConfig() ConfigPropertiesEmail { - return s.Config -} - -// GetName returns the value of Name. -func (s *CreateConnectorRequestEmail) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *CreateConnectorRequestEmail) GetSecrets() SecretsPropertiesEmail { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *CreateConnectorRequestEmail) SetConfig(val ConfigPropertiesEmail) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *CreateConnectorRequestEmail) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *CreateConnectorRequestEmail) SetSecrets(val SecretsPropertiesEmail) { - s.Secrets = val -} - -// The type of connector. -type CreateConnectorRequestEmailConnectorTypeID string - -const ( - CreateConnectorRequestEmailConnectorTypeIDDotEmail CreateConnectorRequestEmailConnectorTypeID = ".email" -) - -// MarshalText implements encoding.TextMarshaler. -func (s CreateConnectorRequestEmailConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case CreateConnectorRequestEmailConnectorTypeIDDotEmail: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *CreateConnectorRequestEmailConnectorTypeID) UnmarshalText(data []byte) error { - switch CreateConnectorRequestEmailConnectorTypeID(data) { - case CreateConnectorRequestEmailConnectorTypeIDDotEmail: - *s = CreateConnectorRequestEmailConnectorTypeIDDotEmail - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The index connector indexes a document into Elasticsearch. -// Ref: #/components/schemas/create_connector_request_index -type CreateConnectorRequestIndex struct { - Config ConfigPropertiesIndex `json:"config"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetConfig returns the value of Config. -func (s *CreateConnectorRequestIndex) GetConfig() ConfigPropertiesIndex { - return s.Config -} - -// GetName returns the value of Name. -func (s *CreateConnectorRequestIndex) GetName() string { - return s.Name -} - -// SetConfig sets the value of Config. -func (s *CreateConnectorRequestIndex) SetConfig(val ConfigPropertiesIndex) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *CreateConnectorRequestIndex) SetName(val string) { - s.Name = val -} - -// The type of connector. -type CreateConnectorRequestIndexConnectorTypeID string - -const ( - CreateConnectorRequestIndexConnectorTypeIDDotIndex CreateConnectorRequestIndexConnectorTypeID = ".index" -) - -// MarshalText implements encoding.TextMarshaler. -func (s CreateConnectorRequestIndexConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case CreateConnectorRequestIndexConnectorTypeIDDotIndex: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *CreateConnectorRequestIndexConnectorTypeID) UnmarshalText(data []byte) error { - switch CreateConnectorRequestIndexConnectorTypeID(data) { - case CreateConnectorRequestIndexConnectorTypeIDDotIndex: - *s = CreateConnectorRequestIndexConnectorTypeIDDotIndex - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The Jira connector uses the REST API v2 to create Jira issues. -// Ref: #/components/schemas/create_connector_request_jira -type CreateConnectorRequestJira struct { - Config ConfigPropertiesJira `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesJira `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *CreateConnectorRequestJira) GetConfig() ConfigPropertiesJira { - return s.Config -} - -// GetName returns the value of Name. -func (s *CreateConnectorRequestJira) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *CreateConnectorRequestJira) GetSecrets() SecretsPropertiesJira { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *CreateConnectorRequestJira) SetConfig(val ConfigPropertiesJira) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *CreateConnectorRequestJira) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *CreateConnectorRequestJira) SetSecrets(val SecretsPropertiesJira) { - s.Secrets = val -} - -// The type of connector. -type CreateConnectorRequestJiraConnectorTypeID string - -const ( - CreateConnectorRequestJiraConnectorTypeIDDotJira CreateConnectorRequestJiraConnectorTypeID = ".jira" -) - -// MarshalText implements encoding.TextMarshaler. -func (s CreateConnectorRequestJiraConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case CreateConnectorRequestJiraConnectorTypeIDDotJira: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *CreateConnectorRequestJiraConnectorTypeID) UnmarshalText(data []byte) error { - switch CreateConnectorRequestJiraConnectorTypeID(data) { - case CreateConnectorRequestJiraConnectorTypeIDDotJira: - *s = CreateConnectorRequestJiraConnectorTypeIDDotJira - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The Opsgenie connector uses the Opsgenie alert API. -// Ref: #/components/schemas/create_connector_request_opsgenie -type CreateConnectorRequestOpsgenie struct { - Config ConfigPropertiesOpsgenie `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesOpsgenie `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *CreateConnectorRequestOpsgenie) GetConfig() ConfigPropertiesOpsgenie { - return s.Config -} - -// GetName returns the value of Name. -func (s *CreateConnectorRequestOpsgenie) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *CreateConnectorRequestOpsgenie) GetSecrets() SecretsPropertiesOpsgenie { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *CreateConnectorRequestOpsgenie) SetConfig(val ConfigPropertiesOpsgenie) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *CreateConnectorRequestOpsgenie) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *CreateConnectorRequestOpsgenie) SetSecrets(val SecretsPropertiesOpsgenie) { - s.Secrets = val -} - -// The type of connector. -type CreateConnectorRequestOpsgenieConnectorTypeID string - -const ( - CreateConnectorRequestOpsgenieConnectorTypeIDDotOpsgenie CreateConnectorRequestOpsgenieConnectorTypeID = ".opsgenie" -) - -// MarshalText implements encoding.TextMarshaler. -func (s CreateConnectorRequestOpsgenieConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case CreateConnectorRequestOpsgenieConnectorTypeIDDotOpsgenie: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *CreateConnectorRequestOpsgenieConnectorTypeID) UnmarshalText(data []byte) error { - switch CreateConnectorRequestOpsgenieConnectorTypeID(data) { - case CreateConnectorRequestOpsgenieConnectorTypeIDDotOpsgenie: - *s = CreateConnectorRequestOpsgenieConnectorTypeIDDotOpsgenie - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The PagerDuty connector uses the v2 Events API to trigger, acknowledge, and resolve PagerDuty -// alerts. -// Ref: #/components/schemas/create_connector_request_pagerduty -type CreateConnectorRequestPagerduty struct { - Config ConfigPropertiesPagerduty `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesPagerduty `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *CreateConnectorRequestPagerduty) GetConfig() ConfigPropertiesPagerduty { - return s.Config -} - -// GetName returns the value of Name. -func (s *CreateConnectorRequestPagerduty) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *CreateConnectorRequestPagerduty) GetSecrets() SecretsPropertiesPagerduty { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *CreateConnectorRequestPagerduty) SetConfig(val ConfigPropertiesPagerduty) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *CreateConnectorRequestPagerduty) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *CreateConnectorRequestPagerduty) SetSecrets(val SecretsPropertiesPagerduty) { - s.Secrets = val -} - -// The type of connector. -type CreateConnectorRequestPagerdutyConnectorTypeID string - -const ( - CreateConnectorRequestPagerdutyConnectorTypeIDDotPagerduty CreateConnectorRequestPagerdutyConnectorTypeID = ".pagerduty" -) - -// MarshalText implements encoding.TextMarshaler. -func (s CreateConnectorRequestPagerdutyConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case CreateConnectorRequestPagerdutyConnectorTypeIDDotPagerduty: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *CreateConnectorRequestPagerdutyConnectorTypeID) UnmarshalText(data []byte) error { - switch CreateConnectorRequestPagerdutyConnectorTypeID(data) { - case CreateConnectorRequestPagerdutyConnectorTypeIDDotPagerduty: - *s = CreateConnectorRequestPagerdutyConnectorTypeIDDotPagerduty - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The IBM Resilient connector uses the RESILIENT REST v2 to create IBM Resilient incidents. -// Ref: #/components/schemas/create_connector_request_resilient -type CreateConnectorRequestResilient struct { - Config ConfigPropertiesResilient `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesResilient `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *CreateConnectorRequestResilient) GetConfig() ConfigPropertiesResilient { - return s.Config -} - -// GetName returns the value of Name. -func (s *CreateConnectorRequestResilient) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *CreateConnectorRequestResilient) GetSecrets() SecretsPropertiesResilient { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *CreateConnectorRequestResilient) SetConfig(val ConfigPropertiesResilient) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *CreateConnectorRequestResilient) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *CreateConnectorRequestResilient) SetSecrets(val SecretsPropertiesResilient) { - s.Secrets = val -} - -// The type of connector. -type CreateConnectorRequestResilientConnectorTypeID string - -const ( - CreateConnectorRequestResilientConnectorTypeIDDotResilient CreateConnectorRequestResilientConnectorTypeID = ".resilient" -) - -// MarshalText implements encoding.TextMarshaler. -func (s CreateConnectorRequestResilientConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case CreateConnectorRequestResilientConnectorTypeIDDotResilient: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *CreateConnectorRequestResilientConnectorTypeID) UnmarshalText(data []byte) error { - switch CreateConnectorRequestResilientConnectorTypeID(data) { - case CreateConnectorRequestResilientConnectorTypeIDDotResilient: - *s = CreateConnectorRequestResilientConnectorTypeIDDotResilient - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// This connector writes an entry to the Kibana server log. -// Ref: #/components/schemas/create_connector_request_serverlog -type CreateConnectorRequestServerlog struct { - // The display name for the connector. - Name string `json:"name"` -} - -// GetName returns the value of Name. -func (s *CreateConnectorRequestServerlog) GetName() string { - return s.Name -} - -// SetName sets the value of Name. -func (s *CreateConnectorRequestServerlog) SetName(val string) { - s.Name = val -} - -// The type of connector. -type CreateConnectorRequestServerlogConnectorTypeID string - -const ( - CreateConnectorRequestServerlogConnectorTypeIDDotServerMinusLog CreateConnectorRequestServerlogConnectorTypeID = ".server-log" -) - -// MarshalText implements encoding.TextMarshaler. -func (s CreateConnectorRequestServerlogConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case CreateConnectorRequestServerlogConnectorTypeIDDotServerMinusLog: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *CreateConnectorRequestServerlogConnectorTypeID) UnmarshalText(data []byte) error { - switch CreateConnectorRequestServerlogConnectorTypeID(data) { - case CreateConnectorRequestServerlogConnectorTypeIDDotServerMinusLog: - *s = CreateConnectorRequestServerlogConnectorTypeIDDotServerMinusLog - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The ServiceNow ITSM connector uses the import set API to create ServiceNow incidents. You can use -// the connector for rule actions and cases. -// Ref: #/components/schemas/create_connector_request_servicenow -type CreateConnectorRequestServicenow struct { - Config ConfigPropertiesServicenow `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesServicenow `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *CreateConnectorRequestServicenow) GetConfig() ConfigPropertiesServicenow { - return s.Config -} - -// GetName returns the value of Name. -func (s *CreateConnectorRequestServicenow) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *CreateConnectorRequestServicenow) GetSecrets() SecretsPropertiesServicenow { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *CreateConnectorRequestServicenow) SetConfig(val ConfigPropertiesServicenow) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *CreateConnectorRequestServicenow) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *CreateConnectorRequestServicenow) SetSecrets(val SecretsPropertiesServicenow) { - s.Secrets = val -} - -// The type of connector. -type CreateConnectorRequestServicenowConnectorTypeID string - -const ( - CreateConnectorRequestServicenowConnectorTypeIDDotServicenow CreateConnectorRequestServicenowConnectorTypeID = ".servicenow" -) - -// MarshalText implements encoding.TextMarshaler. -func (s CreateConnectorRequestServicenowConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case CreateConnectorRequestServicenowConnectorTypeIDDotServicenow: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *CreateConnectorRequestServicenowConnectorTypeID) UnmarshalText(data []byte) error { - switch CreateConnectorRequestServicenowConnectorTypeID(data) { - case CreateConnectorRequestServicenowConnectorTypeIDDotServicenow: - *s = CreateConnectorRequestServicenowConnectorTypeIDDotServicenow - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The ServiceNow ITOM connector uses the event API to create ServiceNow events. You can use the -// connector for rule actions. -// Ref: #/components/schemas/create_connector_request_servicenow_itom -type CreateConnectorRequestServicenowItom struct { - Config ConfigPropertiesServicenowItom `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesServicenow `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *CreateConnectorRequestServicenowItom) GetConfig() ConfigPropertiesServicenowItom { - return s.Config -} - -// GetName returns the value of Name. -func (s *CreateConnectorRequestServicenowItom) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *CreateConnectorRequestServicenowItom) GetSecrets() SecretsPropertiesServicenow { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *CreateConnectorRequestServicenowItom) SetConfig(val ConfigPropertiesServicenowItom) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *CreateConnectorRequestServicenowItom) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *CreateConnectorRequestServicenowItom) SetSecrets(val SecretsPropertiesServicenow) { - s.Secrets = val -} - -// The type of connector. -type CreateConnectorRequestServicenowItomConnectorTypeID string - -const ( - CreateConnectorRequestServicenowItomConnectorTypeIDDotServicenowMinusItom CreateConnectorRequestServicenowItomConnectorTypeID = ".servicenow-itom" -) - -// MarshalText implements encoding.TextMarshaler. -func (s CreateConnectorRequestServicenowItomConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case CreateConnectorRequestServicenowItomConnectorTypeIDDotServicenowMinusItom: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *CreateConnectorRequestServicenowItomConnectorTypeID) UnmarshalText(data []byte) error { - switch CreateConnectorRequestServicenowItomConnectorTypeID(data) { - case CreateConnectorRequestServicenowItomConnectorTypeIDDotServicenowMinusItom: - *s = CreateConnectorRequestServicenowItomConnectorTypeIDDotServicenowMinusItom - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The ServiceNow SecOps connector uses the import set API to create ServiceNow security incidents. -// You can use the connector for rule actions and cases. -// Ref: #/components/schemas/create_connector_request_servicenow_sir -type CreateConnectorRequestServicenowSir struct { - Config ConfigPropertiesServicenow `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesServicenow `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *CreateConnectorRequestServicenowSir) GetConfig() ConfigPropertiesServicenow { - return s.Config -} - -// GetName returns the value of Name. -func (s *CreateConnectorRequestServicenowSir) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *CreateConnectorRequestServicenowSir) GetSecrets() SecretsPropertiesServicenow { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *CreateConnectorRequestServicenowSir) SetConfig(val ConfigPropertiesServicenow) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *CreateConnectorRequestServicenowSir) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *CreateConnectorRequestServicenowSir) SetSecrets(val SecretsPropertiesServicenow) { - s.Secrets = val -} - -// The type of connector. -type CreateConnectorRequestServicenowSirConnectorTypeID string - -const ( - CreateConnectorRequestServicenowSirConnectorTypeIDDotServicenowMinusSir CreateConnectorRequestServicenowSirConnectorTypeID = ".servicenow-sir" -) - -// MarshalText implements encoding.TextMarshaler. -func (s CreateConnectorRequestServicenowSirConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case CreateConnectorRequestServicenowSirConnectorTypeIDDotServicenowMinusSir: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *CreateConnectorRequestServicenowSirConnectorTypeID) UnmarshalText(data []byte) error { - switch CreateConnectorRequestServicenowSirConnectorTypeID(data) { - case CreateConnectorRequestServicenowSirConnectorTypeIDDotServicenowMinusSir: - *s = CreateConnectorRequestServicenowSirConnectorTypeIDDotServicenowMinusSir - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The Slack connector uses Slack Incoming Webhooks. -// Ref: #/components/schemas/create_connector_request_slack -type CreateConnectorRequestSlack struct { - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesSlack `json:"secrets"` -} - -// GetName returns the value of Name. -func (s *CreateConnectorRequestSlack) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *CreateConnectorRequestSlack) GetSecrets() SecretsPropertiesSlack { - return s.Secrets -} - -// SetName sets the value of Name. -func (s *CreateConnectorRequestSlack) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *CreateConnectorRequestSlack) SetSecrets(val SecretsPropertiesSlack) { - s.Secrets = val -} - -// The type of connector. -type CreateConnectorRequestSlackConnectorTypeID string - -const ( - CreateConnectorRequestSlackConnectorTypeIDDotSlack CreateConnectorRequestSlackConnectorTypeID = ".slack" -) - -// MarshalText implements encoding.TextMarshaler. -func (s CreateConnectorRequestSlackConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case CreateConnectorRequestSlackConnectorTypeIDDotSlack: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *CreateConnectorRequestSlackConnectorTypeID) UnmarshalText(data []byte) error { - switch CreateConnectorRequestSlackConnectorTypeID(data) { - case CreateConnectorRequestSlackConnectorTypeIDDotSlack: - *s = CreateConnectorRequestSlackConnectorTypeIDDotSlack - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The Swimlane connector uses the Swimlane REST API to create Swimlane records. -// Ref: #/components/schemas/create_connector_request_swimlane -type CreateConnectorRequestSwimlane struct { - Config ConfigPropertiesSwimlane `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesSwimlane `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *CreateConnectorRequestSwimlane) GetConfig() ConfigPropertiesSwimlane { - return s.Config -} - -// GetName returns the value of Name. -func (s *CreateConnectorRequestSwimlane) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *CreateConnectorRequestSwimlane) GetSecrets() SecretsPropertiesSwimlane { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *CreateConnectorRequestSwimlane) SetConfig(val ConfigPropertiesSwimlane) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *CreateConnectorRequestSwimlane) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *CreateConnectorRequestSwimlane) SetSecrets(val SecretsPropertiesSwimlane) { - s.Secrets = val -} - -// The type of connector. -type CreateConnectorRequestSwimlaneConnectorTypeID string - -const ( - CreateConnectorRequestSwimlaneConnectorTypeIDDotSwimlane CreateConnectorRequestSwimlaneConnectorTypeID = ".swimlane" -) - -// MarshalText implements encoding.TextMarshaler. -func (s CreateConnectorRequestSwimlaneConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case CreateConnectorRequestSwimlaneConnectorTypeIDDotSwimlane: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *CreateConnectorRequestSwimlaneConnectorTypeID) UnmarshalText(data []byte) error { - switch CreateConnectorRequestSwimlaneConnectorTypeID(data) { - case CreateConnectorRequestSwimlaneConnectorTypeIDDotSwimlane: - *s = CreateConnectorRequestSwimlaneConnectorTypeIDDotSwimlane - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The Microsoft Teams connector uses Incoming Webhooks. -// Ref: #/components/schemas/create_connector_request_teams -type CreateConnectorRequestTeams struct { - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesTeams `json:"secrets"` -} - -// GetName returns the value of Name. -func (s *CreateConnectorRequestTeams) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *CreateConnectorRequestTeams) GetSecrets() SecretsPropertiesTeams { - return s.Secrets -} - -// SetName sets the value of Name. -func (s *CreateConnectorRequestTeams) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *CreateConnectorRequestTeams) SetSecrets(val SecretsPropertiesTeams) { - s.Secrets = val -} - -// The type of connector. -type CreateConnectorRequestTeamsConnectorTypeID string - -const ( - CreateConnectorRequestTeamsConnectorTypeIDDotTeams CreateConnectorRequestTeamsConnectorTypeID = ".teams" -) - -// MarshalText implements encoding.TextMarshaler. -func (s CreateConnectorRequestTeamsConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case CreateConnectorRequestTeamsConnectorTypeIDDotTeams: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *CreateConnectorRequestTeamsConnectorTypeID) UnmarshalText(data []byte) error { - switch CreateConnectorRequestTeamsConnectorTypeID(data) { - case CreateConnectorRequestTeamsConnectorTypeIDDotTeams: - *s = CreateConnectorRequestTeamsConnectorTypeIDDotTeams - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The Tines connector uses Tines Webhook actions to send events via POST request. -// Ref: #/components/schemas/create_connector_request_tines -type CreateConnectorRequestTines struct { - Config ConfigPropertiesTines `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesTines `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *CreateConnectorRequestTines) GetConfig() ConfigPropertiesTines { - return s.Config -} - -// GetName returns the value of Name. -func (s *CreateConnectorRequestTines) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *CreateConnectorRequestTines) GetSecrets() SecretsPropertiesTines { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *CreateConnectorRequestTines) SetConfig(val ConfigPropertiesTines) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *CreateConnectorRequestTines) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *CreateConnectorRequestTines) SetSecrets(val SecretsPropertiesTines) { - s.Secrets = val -} - -// The type of connector. -type CreateConnectorRequestTinesConnectorTypeID string - -const ( - CreateConnectorRequestTinesConnectorTypeIDDotTines CreateConnectorRequestTinesConnectorTypeID = ".tines" -) - -// MarshalText implements encoding.TextMarshaler. -func (s CreateConnectorRequestTinesConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case CreateConnectorRequestTinesConnectorTypeIDDotTines: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *CreateConnectorRequestTinesConnectorTypeID) UnmarshalText(data []byte) error { - switch CreateConnectorRequestTinesConnectorTypeID(data) { - case CreateConnectorRequestTinesConnectorTypeIDDotTines: - *s = CreateConnectorRequestTinesConnectorTypeIDDotTines - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The Webhook connector uses axios to send a POST or PUT request to a web service. -// Ref: #/components/schemas/create_connector_request_webhook -type CreateConnectorRequestWebhook struct { - Config ConfigPropertiesWebhook `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesWebhook `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *CreateConnectorRequestWebhook) GetConfig() ConfigPropertiesWebhook { - return s.Config -} - -// GetName returns the value of Name. -func (s *CreateConnectorRequestWebhook) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *CreateConnectorRequestWebhook) GetSecrets() SecretsPropertiesWebhook { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *CreateConnectorRequestWebhook) SetConfig(val ConfigPropertiesWebhook) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *CreateConnectorRequestWebhook) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *CreateConnectorRequestWebhook) SetSecrets(val SecretsPropertiesWebhook) { - s.Secrets = val -} - -// The type of connector. -type CreateConnectorRequestWebhookConnectorTypeID string - -const ( - CreateConnectorRequestWebhookConnectorTypeIDDotWebhook CreateConnectorRequestWebhookConnectorTypeID = ".webhook" -) - -// MarshalText implements encoding.TextMarshaler. -func (s CreateConnectorRequestWebhookConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case CreateConnectorRequestWebhookConnectorTypeIDDotWebhook: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *CreateConnectorRequestWebhookConnectorTypeID) UnmarshalText(data []byte) error { - switch CreateConnectorRequestWebhookConnectorTypeID(data) { - case CreateConnectorRequestWebhookConnectorTypeIDDotWebhook: - *s = CreateConnectorRequestWebhookConnectorTypeIDDotWebhook - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// The xMatters connector uses the xMatters Workflow for Elastic to send actionable alerts to on-call -// xMatters resources. -// Ref: #/components/schemas/create_connector_request_xmatters -type CreateConnectorRequestXmatters struct { - Config ConfigPropertiesXmatters `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesXmatters `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *CreateConnectorRequestXmatters) GetConfig() ConfigPropertiesXmatters { - return s.Config -} - -// GetName returns the value of Name. -func (s *CreateConnectorRequestXmatters) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *CreateConnectorRequestXmatters) GetSecrets() SecretsPropertiesXmatters { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *CreateConnectorRequestXmatters) SetConfig(val ConfigPropertiesXmatters) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *CreateConnectorRequestXmatters) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *CreateConnectorRequestXmatters) SetSecrets(val SecretsPropertiesXmatters) { - s.Secrets = val -} - -// The type of connector. -type CreateConnectorRequestXmattersConnectorTypeID string - -const ( - CreateConnectorRequestXmattersConnectorTypeIDDotXmatters CreateConnectorRequestXmattersConnectorTypeID = ".xmatters" -) - -// MarshalText implements encoding.TextMarshaler. -func (s CreateConnectorRequestXmattersConnectorTypeID) MarshalText() ([]byte, error) { - switch s { - case CreateConnectorRequestXmattersConnectorTypeIDDotXmatters: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *CreateConnectorRequestXmattersConnectorTypeID) UnmarshalText(data []byte) error { - switch CreateConnectorRequestXmattersConnectorTypeID(data) { - case CreateConnectorRequestXmattersConnectorTypeIDDotXmatters: - *s = CreateConnectorRequestXmattersConnectorTypeIDDotXmatters - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -// DeleteConnectorNoContent is response for DeleteConnector operation. -type DeleteConnectorNoContent struct{} - -func (*DeleteConnectorNoContent) deleteConnectorRes() {} - -type DeleteConnectorNotFound struct { - Error OptString `json:"error"` - Message OptString `json:"message"` - StatusCode OptInt `json:"statusCode"` -} - -// GetError returns the value of Error. -func (s *DeleteConnectorNotFound) GetError() OptString { - return s.Error -} - -// GetMessage returns the value of Message. -func (s *DeleteConnectorNotFound) GetMessage() OptString { - return s.Message -} - -// GetStatusCode returns the value of StatusCode. -func (s *DeleteConnectorNotFound) GetStatusCode() OptInt { - return s.StatusCode -} - -// SetError sets the value of Error. -func (s *DeleteConnectorNotFound) SetError(val OptString) { - s.Error = val -} - -// SetMessage sets the value of Message. -func (s *DeleteConnectorNotFound) SetMessage(val OptString) { - s.Message = val -} - -// SetStatusCode sets the value of StatusCode. -func (s *DeleteConnectorNotFound) SetStatusCode(val OptInt) { - s.StatusCode = val -} - -func (*DeleteConnectorNotFound) deleteConnectorRes() {} - -// The feature that uses the connector. Valid values are `alerting`, `cases`, `uptime`, and `siem`. -// Ref: #/components/schemas/features -type Features string - -const ( - FeaturesAlerting Features = "alerting" - FeaturesCases Features = "cases" - FeaturesUptime Features = "uptime" - FeaturesSiem Features = "siem" -) - -// MarshalText implements encoding.TextMarshaler. -func (s Features) MarshalText() ([]byte, error) { - switch s { - case FeaturesAlerting: - return []byte(s), nil - case FeaturesCases: - return []byte(s), nil - case FeaturesUptime: - return []byte(s), nil - case FeaturesSiem: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *Features) UnmarshalText(data []byte) error { - switch Features(data) { - case FeaturesAlerting: - *s = FeaturesAlerting - return nil - case FeaturesCases: - *s = FeaturesCases - return nil - case FeaturesUptime: - *s = FeaturesUptime - return nil - case FeaturesSiem: - *s = FeaturesSiem - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -type GetConnectorNotFound struct { - Error OptString `json:"error"` - Message OptString `json:"message"` - StatusCode OptInt `json:"statusCode"` -} - -// GetError returns the value of Error. -func (s *GetConnectorNotFound) GetError() OptString { - return s.Error -} - -// GetMessage returns the value of Message. -func (s *GetConnectorNotFound) GetMessage() OptString { - return s.Message -} - -// GetStatusCode returns the value of StatusCode. -func (s *GetConnectorNotFound) GetStatusCode() OptInt { - return s.StatusCode -} - -// SetError sets the value of Error. -func (s *GetConnectorNotFound) SetError(val OptString) { - s.Error = val -} - -// SetMessage sets the value of Message. -func (s *GetConnectorNotFound) SetMessage(val OptString) { - s.Message = val -} - -// SetStatusCode sets the value of StatusCode. -func (s *GetConnectorNotFound) SetStatusCode(val OptInt) { - s.StatusCode = val -} - -func (*GetConnectorNotFound) getConnectorRes() {} - -type GetConnectorTypesOKApplicationJSON []GetConnectorTypesOKItem - -func (*GetConnectorTypesOKApplicationJSON) getConnectorTypesRes() {} - -type GetConnectorTypesOKItem struct { - // Indicates whether the connector type is enabled in Kibana. - Enabled OptBool `json:"enabled"` - // Indicates whether the connector type is enabled in the Kibana `.yml` file. - EnabledInConfig OptBool `json:"enabled_in_config"` - // Indicates whether the connector is enabled in the license. - EnabledInLicense OptBool `json:"enabled_in_license"` - ID OptConnectorTypes `json:"id"` - // The license that is required to use the connector type. - MinimumLicenseRequired OptString `json:"minimum_license_required"` - // The name of the connector type. - Name OptString `json:"name"` - // The Kibana features that are supported by the connector type. - SupportedFeatureIds []Features `json:"supported_feature_ids"` -} - -// GetEnabled returns the value of Enabled. -func (s *GetConnectorTypesOKItem) GetEnabled() OptBool { - return s.Enabled -} - -// GetEnabledInConfig returns the value of EnabledInConfig. -func (s *GetConnectorTypesOKItem) GetEnabledInConfig() OptBool { - return s.EnabledInConfig -} - -// GetEnabledInLicense returns the value of EnabledInLicense. -func (s *GetConnectorTypesOKItem) GetEnabledInLicense() OptBool { - return s.EnabledInLicense -} - -// GetID returns the value of ID. -func (s *GetConnectorTypesOKItem) GetID() OptConnectorTypes { - return s.ID -} - -// GetMinimumLicenseRequired returns the value of MinimumLicenseRequired. -func (s *GetConnectorTypesOKItem) GetMinimumLicenseRequired() OptString { - return s.MinimumLicenseRequired -} - -// GetName returns the value of Name. -func (s *GetConnectorTypesOKItem) GetName() OptString { - return s.Name -} - -// GetSupportedFeatureIds returns the value of SupportedFeatureIds. -func (s *GetConnectorTypesOKItem) GetSupportedFeatureIds() []Features { - return s.SupportedFeatureIds -} - -// SetEnabled sets the value of Enabled. -func (s *GetConnectorTypesOKItem) SetEnabled(val OptBool) { - s.Enabled = val -} - -// SetEnabledInConfig sets the value of EnabledInConfig. -func (s *GetConnectorTypesOKItem) SetEnabledInConfig(val OptBool) { - s.EnabledInConfig = val -} - -// SetEnabledInLicense sets the value of EnabledInLicense. -func (s *GetConnectorTypesOKItem) SetEnabledInLicense(val OptBool) { - s.EnabledInLicense = val -} - -// SetID sets the value of ID. -func (s *GetConnectorTypesOKItem) SetID(val OptConnectorTypes) { - s.ID = val -} - -// SetMinimumLicenseRequired sets the value of MinimumLicenseRequired. -func (s *GetConnectorTypesOKItem) SetMinimumLicenseRequired(val OptString) { - s.MinimumLicenseRequired = val -} - -// SetName sets the value of Name. -func (s *GetConnectorTypesOKItem) SetName(val OptString) { - s.Name = val -} - -// SetSupportedFeatureIds sets the value of SupportedFeatureIds. -func (s *GetConnectorTypesOKItem) SetSupportedFeatureIds(val []Features) { - s.SupportedFeatureIds = val -} - -type GetConnectorsOKApplicationJSON []GetConnectorsOKItem - -func (*GetConnectorsOKApplicationJSON) getConnectorsRes() {} - -// The properties vary for each connector type. -type GetConnectorsOKItem struct { - ConnectorTypeID ConnectorTypes `json:"connector_type_id"` - // The configuration for the connector. Configuration properties vary depending on the connector type. - Config OptNilGetConnectorsOKItemConfig `json:"config"` - // The identifier for the connector. - ID string `json:"id"` - IsDeprecated OptIsDeprecated `json:"is_deprecated"` - IsMissingSecrets OptIsMissingSecrets `json:"is_missing_secrets"` - IsPreconfigured IsPreconfigured `json:"is_preconfigured"` - // The display name for the connector. - Name string `json:"name"` - // Indicates the number of saved objects that reference the connector. If `is_preconfigured` is true, - // this value is not calculated. - ReferencedByCount int `json:"referenced_by_count"` -} - -// GetConnectorTypeID returns the value of ConnectorTypeID. -func (s *GetConnectorsOKItem) GetConnectorTypeID() ConnectorTypes { - return s.ConnectorTypeID -} - -// GetConfig returns the value of Config. -func (s *GetConnectorsOKItem) GetConfig() OptNilGetConnectorsOKItemConfig { - return s.Config -} - -// GetID returns the value of ID. -func (s *GetConnectorsOKItem) GetID() string { - return s.ID -} - -// GetIsDeprecated returns the value of IsDeprecated. -func (s *GetConnectorsOKItem) GetIsDeprecated() OptIsDeprecated { - return s.IsDeprecated -} - -// GetIsMissingSecrets returns the value of IsMissingSecrets. -func (s *GetConnectorsOKItem) GetIsMissingSecrets() OptIsMissingSecrets { - return s.IsMissingSecrets -} - -// GetIsPreconfigured returns the value of IsPreconfigured. -func (s *GetConnectorsOKItem) GetIsPreconfigured() IsPreconfigured { - return s.IsPreconfigured -} - -// GetName returns the value of Name. -func (s *GetConnectorsOKItem) GetName() string { - return s.Name -} - -// GetReferencedByCount returns the value of ReferencedByCount. -func (s *GetConnectorsOKItem) GetReferencedByCount() int { - return s.ReferencedByCount -} - -// SetConnectorTypeID sets the value of ConnectorTypeID. -func (s *GetConnectorsOKItem) SetConnectorTypeID(val ConnectorTypes) { - s.ConnectorTypeID = val -} - -// SetConfig sets the value of Config. -func (s *GetConnectorsOKItem) SetConfig(val OptNilGetConnectorsOKItemConfig) { - s.Config = val -} - -// SetID sets the value of ID. -func (s *GetConnectorsOKItem) SetID(val string) { - s.ID = val -} - -// SetIsDeprecated sets the value of IsDeprecated. -func (s *GetConnectorsOKItem) SetIsDeprecated(val OptIsDeprecated) { - s.IsDeprecated = val -} - -// SetIsMissingSecrets sets the value of IsMissingSecrets. -func (s *GetConnectorsOKItem) SetIsMissingSecrets(val OptIsMissingSecrets) { - s.IsMissingSecrets = val -} - -// SetIsPreconfigured sets the value of IsPreconfigured. -func (s *GetConnectorsOKItem) SetIsPreconfigured(val IsPreconfigured) { - s.IsPreconfigured = val -} - -// SetName sets the value of Name. -func (s *GetConnectorsOKItem) SetName(val string) { - s.Name = val -} - -// SetReferencedByCount sets the value of ReferencedByCount. -func (s *GetConnectorsOKItem) SetReferencedByCount(val int) { - s.ReferencedByCount = val -} - -// The configuration for the connector. Configuration properties vary depending on the connector type. -type GetConnectorsOKItemConfig map[string]jx.Raw - -func (s *GetConnectorsOKItemConfig) init() GetConnectorsOKItemConfig { - m := *s - if m == nil { - m = map[string]jx.Raw{} - *s = m - } - return m -} - -type IsDeprecated bool - -type IsMissingSecrets bool - -type IsPreconfigured bool - -type LegacyCreateConnectorReq struct { - // The connector type identifier. - ActionTypeId OptString `json:"actionTypeId"` - // The configuration for the connector. Configuration properties vary depending on the connector type. - Config *LegacyCreateConnectorReqConfig `json:"config"` - // The display name for the connector. - Name OptString `json:"name"` - // The secrets configuration for the connector. Secrets configuration properties vary depending on - // the connector type. NOTE: Remember these values. You must provide them each time you update the - // connector. - Secrets *LegacyCreateConnectorReqSecrets `json:"secrets"` -} - -// GetActionTypeId returns the value of ActionTypeId. -func (s *LegacyCreateConnectorReq) GetActionTypeId() OptString { - return s.ActionTypeId -} - -// GetConfig returns the value of Config. -func (s *LegacyCreateConnectorReq) GetConfig() *LegacyCreateConnectorReqConfig { - return s.Config -} - -// GetName returns the value of Name. -func (s *LegacyCreateConnectorReq) GetName() OptString { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *LegacyCreateConnectorReq) GetSecrets() *LegacyCreateConnectorReqSecrets { - return s.Secrets -} - -// SetActionTypeId sets the value of ActionTypeId. -func (s *LegacyCreateConnectorReq) SetActionTypeId(val OptString) { - s.ActionTypeId = val -} - -// SetConfig sets the value of Config. -func (s *LegacyCreateConnectorReq) SetConfig(val *LegacyCreateConnectorReqConfig) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *LegacyCreateConnectorReq) SetName(val OptString) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *LegacyCreateConnectorReq) SetSecrets(val *LegacyCreateConnectorReqSecrets) { - s.Secrets = val -} - -// The configuration for the connector. Configuration properties vary depending on the connector type. -type LegacyCreateConnectorReqConfig struct{} - -// The secrets configuration for the connector. Secrets configuration properties vary depending on -// the connector type. NOTE: Remember these values. You must provide them each time you update the -// connector. -type LegacyCreateConnectorReqSecrets struct{} - -// LegacyDeleteConnectorNoContent is response for LegacyDeleteConnector operation. -type LegacyDeleteConnectorNoContent struct{} - -func (*LegacyDeleteConnectorNoContent) legacyDeleteConnectorRes() {} - -type LegacyGetConnectorTypesOKApplicationJSON []LegacyGetConnectorTypesOKItem - -func (*LegacyGetConnectorTypesOKApplicationJSON) legacyGetConnectorTypesRes() {} - -type LegacyGetConnectorTypesOKItem struct { - // Indicates whether the connector type is enabled in Kibana. - Enabled OptBool `json:"enabled"` - // Indicates whether the connector type is enabled in the Kibana `.yml` file. - EnabledInConfig OptBool `json:"enabledInConfig"` - // Indicates whether the connector is enabled in the license. - EnabledInLicense OptBool `json:"enabledInLicense"` - // The unique identifier for the connector type. - ID OptString `json:"id"` - // The license that is required to use the connector type. - MinimumLicenseRequired OptString `json:"minimumLicenseRequired"` - // The name of the connector type. - Name OptString `json:"name"` -} - -// GetEnabled returns the value of Enabled. -func (s *LegacyGetConnectorTypesOKItem) GetEnabled() OptBool { - return s.Enabled -} - -// GetEnabledInConfig returns the value of EnabledInConfig. -func (s *LegacyGetConnectorTypesOKItem) GetEnabledInConfig() OptBool { - return s.EnabledInConfig -} - -// GetEnabledInLicense returns the value of EnabledInLicense. -func (s *LegacyGetConnectorTypesOKItem) GetEnabledInLicense() OptBool { - return s.EnabledInLicense -} - -// GetID returns the value of ID. -func (s *LegacyGetConnectorTypesOKItem) GetID() OptString { - return s.ID -} - -// GetMinimumLicenseRequired returns the value of MinimumLicenseRequired. -func (s *LegacyGetConnectorTypesOKItem) GetMinimumLicenseRequired() OptString { - return s.MinimumLicenseRequired -} - -// GetName returns the value of Name. -func (s *LegacyGetConnectorTypesOKItem) GetName() OptString { - return s.Name -} - -// SetEnabled sets the value of Enabled. -func (s *LegacyGetConnectorTypesOKItem) SetEnabled(val OptBool) { - s.Enabled = val -} - -// SetEnabledInConfig sets the value of EnabledInConfig. -func (s *LegacyGetConnectorTypesOKItem) SetEnabledInConfig(val OptBool) { - s.EnabledInConfig = val -} - -// SetEnabledInLicense sets the value of EnabledInLicense. -func (s *LegacyGetConnectorTypesOKItem) SetEnabledInLicense(val OptBool) { - s.EnabledInLicense = val -} - -// SetID sets the value of ID. -func (s *LegacyGetConnectorTypesOKItem) SetID(val OptString) { - s.ID = val -} - -// SetMinimumLicenseRequired sets the value of MinimumLicenseRequired. -func (s *LegacyGetConnectorTypesOKItem) SetMinimumLicenseRequired(val OptString) { - s.MinimumLicenseRequired = val -} - -// SetName sets the value of Name. -func (s *LegacyGetConnectorTypesOKItem) SetName(val OptString) { - s.Name = val -} - -type LegacyGetConnectorsOKApplicationJSON []ActionResponseProperties - -func (*LegacyGetConnectorsOKApplicationJSON) legacyGetConnectorsRes() {} - -type LegacyRunConnectorOK struct { - ActionId OptString `json:"actionId"` - Data OptLegacyRunConnectorOKData `json:"data"` - // The status of the action. - Status OptString `json:"status"` -} - -// GetActionId returns the value of ActionId. -func (s *LegacyRunConnectorOK) GetActionId() OptString { - return s.ActionId -} - -// GetData returns the value of Data. -func (s *LegacyRunConnectorOK) GetData() OptLegacyRunConnectorOKData { - return s.Data -} - -// GetStatus returns the value of Status. -func (s *LegacyRunConnectorOK) GetStatus() OptString { - return s.Status -} - -// SetActionId sets the value of ActionId. -func (s *LegacyRunConnectorOK) SetActionId(val OptString) { - s.ActionId = val -} - -// SetData sets the value of Data. -func (s *LegacyRunConnectorOK) SetData(val OptLegacyRunConnectorOKData) { - s.Data = val -} - -// SetStatus sets the value of Status. -func (s *LegacyRunConnectorOK) SetStatus(val OptString) { - s.Status = val -} - -func (*LegacyRunConnectorOK) legacyRunConnectorRes() {} - -// LegacyRunConnectorOKData represents sum type. -type LegacyRunConnectorOKData struct { - Type LegacyRunConnectorOKDataType // switch on this field - LegacyRunConnectorOKData0 LegacyRunConnectorOKData0 - LegacyRunConnectorOKData1ItemArray []LegacyRunConnectorOKData1Item -} - -// LegacyRunConnectorOKDataType is oneOf type of LegacyRunConnectorOKData. -type LegacyRunConnectorOKDataType string - -// Possible values for LegacyRunConnectorOKDataType. -const ( - LegacyRunConnectorOKData0LegacyRunConnectorOKData LegacyRunConnectorOKDataType = "LegacyRunConnectorOKData0" - LegacyRunConnectorOKData1ItemArrayLegacyRunConnectorOKData LegacyRunConnectorOKDataType = "[]LegacyRunConnectorOKData1Item" -) - -// IsLegacyRunConnectorOKData0 reports whether LegacyRunConnectorOKData is LegacyRunConnectorOKData0. -func (s LegacyRunConnectorOKData) IsLegacyRunConnectorOKData0() bool { - return s.Type == LegacyRunConnectorOKData0LegacyRunConnectorOKData -} - -// IsLegacyRunConnectorOKData1ItemArray reports whether LegacyRunConnectorOKData is []LegacyRunConnectorOKData1Item. -func (s LegacyRunConnectorOKData) IsLegacyRunConnectorOKData1ItemArray() bool { - return s.Type == LegacyRunConnectorOKData1ItemArrayLegacyRunConnectorOKData -} - -// SetLegacyRunConnectorOKData0 sets LegacyRunConnectorOKData to LegacyRunConnectorOKData0. -func (s *LegacyRunConnectorOKData) SetLegacyRunConnectorOKData0(v LegacyRunConnectorOKData0) { - s.Type = LegacyRunConnectorOKData0LegacyRunConnectorOKData - s.LegacyRunConnectorOKData0 = v -} - -// GetLegacyRunConnectorOKData0 returns LegacyRunConnectorOKData0 and true boolean if LegacyRunConnectorOKData is LegacyRunConnectorOKData0. -func (s LegacyRunConnectorOKData) GetLegacyRunConnectorOKData0() (v LegacyRunConnectorOKData0, ok bool) { - if !s.IsLegacyRunConnectorOKData0() { - return v, false - } - return s.LegacyRunConnectorOKData0, true -} - -// NewLegacyRunConnectorOKData0LegacyRunConnectorOKData returns new LegacyRunConnectorOKData from LegacyRunConnectorOKData0. -func NewLegacyRunConnectorOKData0LegacyRunConnectorOKData(v LegacyRunConnectorOKData0) LegacyRunConnectorOKData { - var s LegacyRunConnectorOKData - s.SetLegacyRunConnectorOKData0(v) - return s -} - -// SetLegacyRunConnectorOKData1ItemArray sets LegacyRunConnectorOKData to []LegacyRunConnectorOKData1Item. -func (s *LegacyRunConnectorOKData) SetLegacyRunConnectorOKData1ItemArray(v []LegacyRunConnectorOKData1Item) { - s.Type = LegacyRunConnectorOKData1ItemArrayLegacyRunConnectorOKData - s.LegacyRunConnectorOKData1ItemArray = v -} - -// GetLegacyRunConnectorOKData1ItemArray returns []LegacyRunConnectorOKData1Item and true boolean if LegacyRunConnectorOKData is []LegacyRunConnectorOKData1Item. -func (s LegacyRunConnectorOKData) GetLegacyRunConnectorOKData1ItemArray() (v []LegacyRunConnectorOKData1Item, ok bool) { - if !s.IsLegacyRunConnectorOKData1ItemArray() { - return v, false - } - return s.LegacyRunConnectorOKData1ItemArray, true -} - -// NewLegacyRunConnectorOKData1ItemArrayLegacyRunConnectorOKData returns new LegacyRunConnectorOKData from []LegacyRunConnectorOKData1Item. -func NewLegacyRunConnectorOKData1ItemArrayLegacyRunConnectorOKData(v []LegacyRunConnectorOKData1Item) LegacyRunConnectorOKData { - var s LegacyRunConnectorOKData - s.SetLegacyRunConnectorOKData1ItemArray(v) - return s -} - -// Information returned from the action. -type LegacyRunConnectorOKData0 map[string]jx.Raw - -func (s *LegacyRunConnectorOKData0) init() LegacyRunConnectorOKData0 { - m := *s - if m == nil { - m = map[string]jx.Raw{} - *s = m - } - return m -} - -type LegacyRunConnectorOKData1Item struct{} - -// The properties vary depending on the connector type. -type LegacyRunConnectorReq struct { - // The parameters of the connector. Parameter properties vary depending on the connector type. - Params LegacyRunConnectorReqParams `json:"params"` -} - -// GetParams returns the value of Params. -func (s *LegacyRunConnectorReq) GetParams() LegacyRunConnectorReqParams { - return s.Params -} - -// SetParams sets the value of Params. -func (s *LegacyRunConnectorReq) SetParams(val LegacyRunConnectorReqParams) { - s.Params = val -} - -// The parameters of the connector. Parameter properties vary depending on the connector type. -type LegacyRunConnectorReqParams struct{} - -// The properties vary depending on the connector type. -type LegacyUpdateConnectorReq struct { - // The new connector configuration. Configuration properties vary depending on the connector type. - Config *LegacyUpdateConnectorReqConfig `json:"config"` - // The new name for the connector. - Name OptString `json:"name"` - // The updated secrets configuration for the connector. Secrets properties vary depending on the - // connector type. - Secrets *LegacyUpdateConnectorReqSecrets `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *LegacyUpdateConnectorReq) GetConfig() *LegacyUpdateConnectorReqConfig { - return s.Config -} - -// GetName returns the value of Name. -func (s *LegacyUpdateConnectorReq) GetName() OptString { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *LegacyUpdateConnectorReq) GetSecrets() *LegacyUpdateConnectorReqSecrets { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *LegacyUpdateConnectorReq) SetConfig(val *LegacyUpdateConnectorReqConfig) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *LegacyUpdateConnectorReq) SetName(val OptString) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *LegacyUpdateConnectorReq) SetSecrets(val *LegacyUpdateConnectorReqSecrets) { - s.Secrets = val -} - -// The new connector configuration. Configuration properties vary depending on the connector type. -type LegacyUpdateConnectorReqConfig struct{} - -// The updated secrets configuration for the connector. Secrets properties vary depending on the -// connector type. -type LegacyUpdateConnectorReqSecrets struct{} - -// NewOptBool returns new OptBool with value set to v. -func NewOptBool(v bool) OptBool { - return OptBool{ - Value: v, - Set: true, - } -} - -// OptBool is optional bool. -type OptBool struct { - Value bool - Set bool -} - -// IsSet returns true if OptBool was set. -func (o OptBool) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptBool) Reset() { - var v bool - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptBool) SetTo(v bool) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptBool) Get() (v bool, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptBool) Or(d bool) bool { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptConfigPropertiesCasesWebhookCreateCommentMethod returns new OptConfigPropertiesCasesWebhookCreateCommentMethod with value set to v. -func NewOptConfigPropertiesCasesWebhookCreateCommentMethod(v ConfigPropertiesCasesWebhookCreateCommentMethod) OptConfigPropertiesCasesWebhookCreateCommentMethod { - return OptConfigPropertiesCasesWebhookCreateCommentMethod{ - Value: v, - Set: true, - } -} - -// OptConfigPropertiesCasesWebhookCreateCommentMethod is optional ConfigPropertiesCasesWebhookCreateCommentMethod. -type OptConfigPropertiesCasesWebhookCreateCommentMethod struct { - Value ConfigPropertiesCasesWebhookCreateCommentMethod - Set bool -} - -// IsSet returns true if OptConfigPropertiesCasesWebhookCreateCommentMethod was set. -func (o OptConfigPropertiesCasesWebhookCreateCommentMethod) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptConfigPropertiesCasesWebhookCreateCommentMethod) Reset() { - var v ConfigPropertiesCasesWebhookCreateCommentMethod - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptConfigPropertiesCasesWebhookCreateCommentMethod) SetTo(v ConfigPropertiesCasesWebhookCreateCommentMethod) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptConfigPropertiesCasesWebhookCreateCommentMethod) Get() (v ConfigPropertiesCasesWebhookCreateCommentMethod, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptConfigPropertiesCasesWebhookCreateCommentMethod) Or(d ConfigPropertiesCasesWebhookCreateCommentMethod) ConfigPropertiesCasesWebhookCreateCommentMethod { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptConfigPropertiesCasesWebhookCreateIncidentMethod returns new OptConfigPropertiesCasesWebhookCreateIncidentMethod with value set to v. -func NewOptConfigPropertiesCasesWebhookCreateIncidentMethod(v ConfigPropertiesCasesWebhookCreateIncidentMethod) OptConfigPropertiesCasesWebhookCreateIncidentMethod { - return OptConfigPropertiesCasesWebhookCreateIncidentMethod{ - Value: v, - Set: true, - } -} - -// OptConfigPropertiesCasesWebhookCreateIncidentMethod is optional ConfigPropertiesCasesWebhookCreateIncidentMethod. -type OptConfigPropertiesCasesWebhookCreateIncidentMethod struct { - Value ConfigPropertiesCasesWebhookCreateIncidentMethod - Set bool -} - -// IsSet returns true if OptConfigPropertiesCasesWebhookCreateIncidentMethod was set. -func (o OptConfigPropertiesCasesWebhookCreateIncidentMethod) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptConfigPropertiesCasesWebhookCreateIncidentMethod) Reset() { - var v ConfigPropertiesCasesWebhookCreateIncidentMethod - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptConfigPropertiesCasesWebhookCreateIncidentMethod) SetTo(v ConfigPropertiesCasesWebhookCreateIncidentMethod) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptConfigPropertiesCasesWebhookCreateIncidentMethod) Get() (v ConfigPropertiesCasesWebhookCreateIncidentMethod, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptConfigPropertiesCasesWebhookCreateIncidentMethod) Or(d ConfigPropertiesCasesWebhookCreateIncidentMethod) ConfigPropertiesCasesWebhookCreateIncidentMethod { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptConfigPropertiesCasesWebhookUpdateIncidentMethod returns new OptConfigPropertiesCasesWebhookUpdateIncidentMethod with value set to v. -func NewOptConfigPropertiesCasesWebhookUpdateIncidentMethod(v ConfigPropertiesCasesWebhookUpdateIncidentMethod) OptConfigPropertiesCasesWebhookUpdateIncidentMethod { - return OptConfigPropertiesCasesWebhookUpdateIncidentMethod{ - Value: v, - Set: true, - } -} - -// OptConfigPropertiesCasesWebhookUpdateIncidentMethod is optional ConfigPropertiesCasesWebhookUpdateIncidentMethod. -type OptConfigPropertiesCasesWebhookUpdateIncidentMethod struct { - Value ConfigPropertiesCasesWebhookUpdateIncidentMethod - Set bool -} - -// IsSet returns true if OptConfigPropertiesCasesWebhookUpdateIncidentMethod was set. -func (o OptConfigPropertiesCasesWebhookUpdateIncidentMethod) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptConfigPropertiesCasesWebhookUpdateIncidentMethod) Reset() { - var v ConfigPropertiesCasesWebhookUpdateIncidentMethod - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptConfigPropertiesCasesWebhookUpdateIncidentMethod) SetTo(v ConfigPropertiesCasesWebhookUpdateIncidentMethod) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptConfigPropertiesCasesWebhookUpdateIncidentMethod) Get() (v ConfigPropertiesCasesWebhookUpdateIncidentMethod, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptConfigPropertiesCasesWebhookUpdateIncidentMethod) Or(d ConfigPropertiesCasesWebhookUpdateIncidentMethod) ConfigPropertiesCasesWebhookUpdateIncidentMethod { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptConfigPropertiesSwimlaneMappings returns new OptConfigPropertiesSwimlaneMappings with value set to v. -func NewOptConfigPropertiesSwimlaneMappings(v ConfigPropertiesSwimlaneMappings) OptConfigPropertiesSwimlaneMappings { - return OptConfigPropertiesSwimlaneMappings{ - Value: v, - Set: true, - } -} - -// OptConfigPropertiesSwimlaneMappings is optional ConfigPropertiesSwimlaneMappings. -type OptConfigPropertiesSwimlaneMappings struct { - Value ConfigPropertiesSwimlaneMappings - Set bool -} - -// IsSet returns true if OptConfigPropertiesSwimlaneMappings was set. -func (o OptConfigPropertiesSwimlaneMappings) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptConfigPropertiesSwimlaneMappings) Reset() { - var v ConfigPropertiesSwimlaneMappings - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptConfigPropertiesSwimlaneMappings) SetTo(v ConfigPropertiesSwimlaneMappings) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptConfigPropertiesSwimlaneMappings) Get() (v ConfigPropertiesSwimlaneMappings, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptConfigPropertiesSwimlaneMappings) Or(d ConfigPropertiesSwimlaneMappings) ConfigPropertiesSwimlaneMappings { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptConfigPropertiesSwimlaneMappingsAlertIdConfig returns new OptConfigPropertiesSwimlaneMappingsAlertIdConfig with value set to v. -func NewOptConfigPropertiesSwimlaneMappingsAlertIdConfig(v ConfigPropertiesSwimlaneMappingsAlertIdConfig) OptConfigPropertiesSwimlaneMappingsAlertIdConfig { - return OptConfigPropertiesSwimlaneMappingsAlertIdConfig{ - Value: v, - Set: true, - } -} - -// OptConfigPropertiesSwimlaneMappingsAlertIdConfig is optional ConfigPropertiesSwimlaneMappingsAlertIdConfig. -type OptConfigPropertiesSwimlaneMappingsAlertIdConfig struct { - Value ConfigPropertiesSwimlaneMappingsAlertIdConfig - Set bool -} - -// IsSet returns true if OptConfigPropertiesSwimlaneMappingsAlertIdConfig was set. -func (o OptConfigPropertiesSwimlaneMappingsAlertIdConfig) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptConfigPropertiesSwimlaneMappingsAlertIdConfig) Reset() { - var v ConfigPropertiesSwimlaneMappingsAlertIdConfig - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptConfigPropertiesSwimlaneMappingsAlertIdConfig) SetTo(v ConfigPropertiesSwimlaneMappingsAlertIdConfig) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptConfigPropertiesSwimlaneMappingsAlertIdConfig) Get() (v ConfigPropertiesSwimlaneMappingsAlertIdConfig, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptConfigPropertiesSwimlaneMappingsAlertIdConfig) Or(d ConfigPropertiesSwimlaneMappingsAlertIdConfig) ConfigPropertiesSwimlaneMappingsAlertIdConfig { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptConfigPropertiesSwimlaneMappingsCaseIdConfig returns new OptConfigPropertiesSwimlaneMappingsCaseIdConfig with value set to v. -func NewOptConfigPropertiesSwimlaneMappingsCaseIdConfig(v ConfigPropertiesSwimlaneMappingsCaseIdConfig) OptConfigPropertiesSwimlaneMappingsCaseIdConfig { - return OptConfigPropertiesSwimlaneMappingsCaseIdConfig{ - Value: v, - Set: true, - } -} - -// OptConfigPropertiesSwimlaneMappingsCaseIdConfig is optional ConfigPropertiesSwimlaneMappingsCaseIdConfig. -type OptConfigPropertiesSwimlaneMappingsCaseIdConfig struct { - Value ConfigPropertiesSwimlaneMappingsCaseIdConfig - Set bool -} - -// IsSet returns true if OptConfigPropertiesSwimlaneMappingsCaseIdConfig was set. -func (o OptConfigPropertiesSwimlaneMappingsCaseIdConfig) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptConfigPropertiesSwimlaneMappingsCaseIdConfig) Reset() { - var v ConfigPropertiesSwimlaneMappingsCaseIdConfig - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptConfigPropertiesSwimlaneMappingsCaseIdConfig) SetTo(v ConfigPropertiesSwimlaneMappingsCaseIdConfig) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptConfigPropertiesSwimlaneMappingsCaseIdConfig) Get() (v ConfigPropertiesSwimlaneMappingsCaseIdConfig, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptConfigPropertiesSwimlaneMappingsCaseIdConfig) Or(d ConfigPropertiesSwimlaneMappingsCaseIdConfig) ConfigPropertiesSwimlaneMappingsCaseIdConfig { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptConfigPropertiesSwimlaneMappingsCaseNameConfig returns new OptConfigPropertiesSwimlaneMappingsCaseNameConfig with value set to v. -func NewOptConfigPropertiesSwimlaneMappingsCaseNameConfig(v ConfigPropertiesSwimlaneMappingsCaseNameConfig) OptConfigPropertiesSwimlaneMappingsCaseNameConfig { - return OptConfigPropertiesSwimlaneMappingsCaseNameConfig{ - Value: v, - Set: true, - } -} - -// OptConfigPropertiesSwimlaneMappingsCaseNameConfig is optional ConfigPropertiesSwimlaneMappingsCaseNameConfig. -type OptConfigPropertiesSwimlaneMappingsCaseNameConfig struct { - Value ConfigPropertiesSwimlaneMappingsCaseNameConfig - Set bool -} - -// IsSet returns true if OptConfigPropertiesSwimlaneMappingsCaseNameConfig was set. -func (o OptConfigPropertiesSwimlaneMappingsCaseNameConfig) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptConfigPropertiesSwimlaneMappingsCaseNameConfig) Reset() { - var v ConfigPropertiesSwimlaneMappingsCaseNameConfig - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptConfigPropertiesSwimlaneMappingsCaseNameConfig) SetTo(v ConfigPropertiesSwimlaneMappingsCaseNameConfig) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptConfigPropertiesSwimlaneMappingsCaseNameConfig) Get() (v ConfigPropertiesSwimlaneMappingsCaseNameConfig, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptConfigPropertiesSwimlaneMappingsCaseNameConfig) Or(d ConfigPropertiesSwimlaneMappingsCaseNameConfig) ConfigPropertiesSwimlaneMappingsCaseNameConfig { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptConfigPropertiesSwimlaneMappingsCommentsConfig returns new OptConfigPropertiesSwimlaneMappingsCommentsConfig with value set to v. -func NewOptConfigPropertiesSwimlaneMappingsCommentsConfig(v ConfigPropertiesSwimlaneMappingsCommentsConfig) OptConfigPropertiesSwimlaneMappingsCommentsConfig { - return OptConfigPropertiesSwimlaneMappingsCommentsConfig{ - Value: v, - Set: true, - } -} - -// OptConfigPropertiesSwimlaneMappingsCommentsConfig is optional ConfigPropertiesSwimlaneMappingsCommentsConfig. -type OptConfigPropertiesSwimlaneMappingsCommentsConfig struct { - Value ConfigPropertiesSwimlaneMappingsCommentsConfig - Set bool -} - -// IsSet returns true if OptConfigPropertiesSwimlaneMappingsCommentsConfig was set. -func (o OptConfigPropertiesSwimlaneMappingsCommentsConfig) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptConfigPropertiesSwimlaneMappingsCommentsConfig) Reset() { - var v ConfigPropertiesSwimlaneMappingsCommentsConfig - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptConfigPropertiesSwimlaneMappingsCommentsConfig) SetTo(v ConfigPropertiesSwimlaneMappingsCommentsConfig) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptConfigPropertiesSwimlaneMappingsCommentsConfig) Get() (v ConfigPropertiesSwimlaneMappingsCommentsConfig, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptConfigPropertiesSwimlaneMappingsCommentsConfig) Or(d ConfigPropertiesSwimlaneMappingsCommentsConfig) ConfigPropertiesSwimlaneMappingsCommentsConfig { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptConfigPropertiesSwimlaneMappingsDescriptionConfig returns new OptConfigPropertiesSwimlaneMappingsDescriptionConfig with value set to v. -func NewOptConfigPropertiesSwimlaneMappingsDescriptionConfig(v ConfigPropertiesSwimlaneMappingsDescriptionConfig) OptConfigPropertiesSwimlaneMappingsDescriptionConfig { - return OptConfigPropertiesSwimlaneMappingsDescriptionConfig{ - Value: v, - Set: true, - } -} - -// OptConfigPropertiesSwimlaneMappingsDescriptionConfig is optional ConfigPropertiesSwimlaneMappingsDescriptionConfig. -type OptConfigPropertiesSwimlaneMappingsDescriptionConfig struct { - Value ConfigPropertiesSwimlaneMappingsDescriptionConfig - Set bool -} - -// IsSet returns true if OptConfigPropertiesSwimlaneMappingsDescriptionConfig was set. -func (o OptConfigPropertiesSwimlaneMappingsDescriptionConfig) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptConfigPropertiesSwimlaneMappingsDescriptionConfig) Reset() { - var v ConfigPropertiesSwimlaneMappingsDescriptionConfig - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptConfigPropertiesSwimlaneMappingsDescriptionConfig) SetTo(v ConfigPropertiesSwimlaneMappingsDescriptionConfig) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptConfigPropertiesSwimlaneMappingsDescriptionConfig) Get() (v ConfigPropertiesSwimlaneMappingsDescriptionConfig, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptConfigPropertiesSwimlaneMappingsDescriptionConfig) Or(d ConfigPropertiesSwimlaneMappingsDescriptionConfig) ConfigPropertiesSwimlaneMappingsDescriptionConfig { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptConfigPropertiesSwimlaneMappingsRuleNameConfig returns new OptConfigPropertiesSwimlaneMappingsRuleNameConfig with value set to v. -func NewOptConfigPropertiesSwimlaneMappingsRuleNameConfig(v ConfigPropertiesSwimlaneMappingsRuleNameConfig) OptConfigPropertiesSwimlaneMappingsRuleNameConfig { - return OptConfigPropertiesSwimlaneMappingsRuleNameConfig{ - Value: v, - Set: true, - } -} - -// OptConfigPropertiesSwimlaneMappingsRuleNameConfig is optional ConfigPropertiesSwimlaneMappingsRuleNameConfig. -type OptConfigPropertiesSwimlaneMappingsRuleNameConfig struct { - Value ConfigPropertiesSwimlaneMappingsRuleNameConfig - Set bool -} - -// IsSet returns true if OptConfigPropertiesSwimlaneMappingsRuleNameConfig was set. -func (o OptConfigPropertiesSwimlaneMappingsRuleNameConfig) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptConfigPropertiesSwimlaneMappingsRuleNameConfig) Reset() { - var v ConfigPropertiesSwimlaneMappingsRuleNameConfig - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptConfigPropertiesSwimlaneMappingsRuleNameConfig) SetTo(v ConfigPropertiesSwimlaneMappingsRuleNameConfig) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptConfigPropertiesSwimlaneMappingsRuleNameConfig) Get() (v ConfigPropertiesSwimlaneMappingsRuleNameConfig, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptConfigPropertiesSwimlaneMappingsRuleNameConfig) Or(d ConfigPropertiesSwimlaneMappingsRuleNameConfig) ConfigPropertiesSwimlaneMappingsRuleNameConfig { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptConfigPropertiesSwimlaneMappingsSeverityConfig returns new OptConfigPropertiesSwimlaneMappingsSeverityConfig with value set to v. -func NewOptConfigPropertiesSwimlaneMappingsSeverityConfig(v ConfigPropertiesSwimlaneMappingsSeverityConfig) OptConfigPropertiesSwimlaneMappingsSeverityConfig { - return OptConfigPropertiesSwimlaneMappingsSeverityConfig{ - Value: v, - Set: true, - } -} - -// OptConfigPropertiesSwimlaneMappingsSeverityConfig is optional ConfigPropertiesSwimlaneMappingsSeverityConfig. -type OptConfigPropertiesSwimlaneMappingsSeverityConfig struct { - Value ConfigPropertiesSwimlaneMappingsSeverityConfig - Set bool -} - -// IsSet returns true if OptConfigPropertiesSwimlaneMappingsSeverityConfig was set. -func (o OptConfigPropertiesSwimlaneMappingsSeverityConfig) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptConfigPropertiesSwimlaneMappingsSeverityConfig) Reset() { - var v ConfigPropertiesSwimlaneMappingsSeverityConfig - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptConfigPropertiesSwimlaneMappingsSeverityConfig) SetTo(v ConfigPropertiesSwimlaneMappingsSeverityConfig) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptConfigPropertiesSwimlaneMappingsSeverityConfig) Get() (v ConfigPropertiesSwimlaneMappingsSeverityConfig, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptConfigPropertiesSwimlaneMappingsSeverityConfig) Or(d ConfigPropertiesSwimlaneMappingsSeverityConfig) ConfigPropertiesSwimlaneMappingsSeverityConfig { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptConnectorTypes returns new OptConnectorTypes with value set to v. -func NewOptConnectorTypes(v ConnectorTypes) OptConnectorTypes { - return OptConnectorTypes{ - Value: v, - Set: true, - } -} - -// OptConnectorTypes is optional ConnectorTypes. -type OptConnectorTypes struct { - Value ConnectorTypes - Set bool -} - -// IsSet returns true if OptConnectorTypes was set. -func (o OptConnectorTypes) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptConnectorTypes) Reset() { - var v ConnectorTypes - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptConnectorTypes) SetTo(v ConnectorTypes) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptConnectorTypes) Get() (v ConnectorTypes, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptConnectorTypes) Or(d ConnectorTypes) ConnectorTypes { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptFeatures returns new OptFeatures with value set to v. -func NewOptFeatures(v Features) OptFeatures { - return OptFeatures{ - Value: v, - Set: true, - } -} - -// OptFeatures is optional Features. -type OptFeatures struct { - Value Features - Set bool -} - -// IsSet returns true if OptFeatures was set. -func (o OptFeatures) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptFeatures) Reset() { - var v Features - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptFeatures) SetTo(v Features) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptFeatures) Get() (v Features, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptFeatures) Or(d Features) Features { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptInt returns new OptInt with value set to v. -func NewOptInt(v int) OptInt { - return OptInt{ - Value: v, - Set: true, - } -} - -// OptInt is optional int. -type OptInt struct { - Value int - Set bool -} - -// IsSet returns true if OptInt was set. -func (o OptInt) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptInt) Reset() { - var v int - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptInt) SetTo(v int) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptInt) Get() (v int, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptInt) Or(d int) int { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptIsDeprecated returns new OptIsDeprecated with value set to v. -func NewOptIsDeprecated(v IsDeprecated) OptIsDeprecated { - return OptIsDeprecated{ - Value: v, - Set: true, - } -} - -// OptIsDeprecated is optional IsDeprecated. -type OptIsDeprecated struct { - Value IsDeprecated - Set bool -} - -// IsSet returns true if OptIsDeprecated was set. -func (o OptIsDeprecated) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptIsDeprecated) Reset() { - var v IsDeprecated - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptIsDeprecated) SetTo(v IsDeprecated) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptIsDeprecated) Get() (v IsDeprecated, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptIsDeprecated) Or(d IsDeprecated) IsDeprecated { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptIsMissingSecrets returns new OptIsMissingSecrets with value set to v. -func NewOptIsMissingSecrets(v IsMissingSecrets) OptIsMissingSecrets { - return OptIsMissingSecrets{ - Value: v, - Set: true, - } -} - -// OptIsMissingSecrets is optional IsMissingSecrets. -type OptIsMissingSecrets struct { - Value IsMissingSecrets - Set bool -} - -// IsSet returns true if OptIsMissingSecrets was set. -func (o OptIsMissingSecrets) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptIsMissingSecrets) Reset() { - var v IsMissingSecrets - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptIsMissingSecrets) SetTo(v IsMissingSecrets) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptIsMissingSecrets) Get() (v IsMissingSecrets, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptIsMissingSecrets) Or(d IsMissingSecrets) IsMissingSecrets { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptLegacyRunConnectorOKData returns new OptLegacyRunConnectorOKData with value set to v. -func NewOptLegacyRunConnectorOKData(v LegacyRunConnectorOKData) OptLegacyRunConnectorOKData { - return OptLegacyRunConnectorOKData{ - Value: v, - Set: true, - } -} - -// OptLegacyRunConnectorOKData is optional LegacyRunConnectorOKData. -type OptLegacyRunConnectorOKData struct { - Value LegacyRunConnectorOKData - Set bool -} - -// IsSet returns true if OptLegacyRunConnectorOKData was set. -func (o OptLegacyRunConnectorOKData) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptLegacyRunConnectorOKData) Reset() { - var v LegacyRunConnectorOKData - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptLegacyRunConnectorOKData) SetTo(v LegacyRunConnectorOKData) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptLegacyRunConnectorOKData) Get() (v LegacyRunConnectorOKData, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptLegacyRunConnectorOKData) Or(d LegacyRunConnectorOKData) LegacyRunConnectorOKData { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptNilGetConnectorsOKItemConfig returns new OptNilGetConnectorsOKItemConfig with value set to v. -func NewOptNilGetConnectorsOKItemConfig(v GetConnectorsOKItemConfig) OptNilGetConnectorsOKItemConfig { - return OptNilGetConnectorsOKItemConfig{ - Value: v, - Set: true, - } -} - -// OptNilGetConnectorsOKItemConfig is optional nullable GetConnectorsOKItemConfig. -type OptNilGetConnectorsOKItemConfig struct { - Value GetConnectorsOKItemConfig - Set bool - Null bool -} - -// IsSet returns true if OptNilGetConnectorsOKItemConfig was set. -func (o OptNilGetConnectorsOKItemConfig) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptNilGetConnectorsOKItemConfig) Reset() { - var v GetConnectorsOKItemConfig - o.Value = v - o.Set = false - o.Null = false -} - -// SetTo sets value to v. -func (o *OptNilGetConnectorsOKItemConfig) SetTo(v GetConnectorsOKItemConfig) { - o.Set = true - o.Null = false - o.Value = v -} - -// IsSet returns true if value is Null. -func (o OptNilGetConnectorsOKItemConfig) IsNull() bool { return o.Null } - -// SetNull sets value to null. -func (o *OptNilGetConnectorsOKItemConfig) SetToNull() { - o.Set = true - o.Null = true - var v GetConnectorsOKItemConfig - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptNilGetConnectorsOKItemConfig) Get() (v GetConnectorsOKItemConfig, ok bool) { - if o.Null { - return v, false - } - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptNilGetConnectorsOKItemConfig) Or(d GetConnectorsOKItemConfig) GetConnectorsOKItemConfig { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptNilString returns new OptNilString with value set to v. -func NewOptNilString(v string) OptNilString { - return OptNilString{ - Value: v, - Set: true, - } -} - -// OptNilString is optional nullable string. -type OptNilString struct { - Value string - Set bool - Null bool -} - -// IsSet returns true if OptNilString was set. -func (o OptNilString) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptNilString) Reset() { - var v string - o.Value = v - o.Set = false - o.Null = false -} - -// SetTo sets value to v. -func (o *OptNilString) SetTo(v string) { - o.Set = true - o.Null = false - o.Value = v -} - -// IsSet returns true if value is Null. -func (o OptNilString) IsNull() bool { return o.Null } - -// SetNull sets value to null. -func (o *OptNilString) SetToNull() { - o.Set = true - o.Null = true - var v string - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptNilString) Get() (v string, ok bool) { - if o.Null { - return v, false - } - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptNilString) Or(d string) string { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptR400Error returns new OptR400Error with value set to v. -func NewOptR400Error(v R400Error) OptR400Error { - return OptR400Error{ - Value: v, - Set: true, - } -} - -// OptR400Error is optional R400Error. -type OptR400Error struct { - Value R400Error - Set bool -} - -// IsSet returns true if OptR400Error was set. -func (o OptR400Error) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptR400Error) Reset() { - var v R400Error - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptR400Error) SetTo(v R400Error) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptR400Error) Get() (v R400Error, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptR400Error) Or(d R400Error) R400Error { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptR400StatusCode returns new OptR400StatusCode with value set to v. -func NewOptR400StatusCode(v R400StatusCode) OptR400StatusCode { - return OptR400StatusCode{ - Value: v, - Set: true, - } -} - -// OptR400StatusCode is optional R400StatusCode. -type OptR400StatusCode struct { - Value R400StatusCode - Set bool -} - -// IsSet returns true if OptR400StatusCode was set. -func (o OptR400StatusCode) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptR400StatusCode) Reset() { - var v R400StatusCode - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptR400StatusCode) SetTo(v R400StatusCode) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptR400StatusCode) Get() (v R400StatusCode, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptR400StatusCode) Or(d R400StatusCode) R400StatusCode { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptR401Error returns new OptR401Error with value set to v. -func NewOptR401Error(v R401Error) OptR401Error { - return OptR401Error{ - Value: v, - Set: true, - } -} - -// OptR401Error is optional R401Error. -type OptR401Error struct { - Value R401Error - Set bool -} - -// IsSet returns true if OptR401Error was set. -func (o OptR401Error) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptR401Error) Reset() { - var v R401Error - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptR401Error) SetTo(v R401Error) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptR401Error) Get() (v R401Error, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptR401Error) Or(d R401Error) R401Error { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptR401StatusCode returns new OptR401StatusCode with value set to v. -func NewOptR401StatusCode(v R401StatusCode) OptR401StatusCode { - return OptR401StatusCode{ - Value: v, - Set: true, - } -} - -// OptR401StatusCode is optional R401StatusCode. -type OptR401StatusCode struct { - Value R401StatusCode - Set bool -} - -// IsSet returns true if OptR401StatusCode was set. -func (o OptR401StatusCode) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptR401StatusCode) Reset() { - var v R401StatusCode - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptR401StatusCode) SetTo(v R401StatusCode) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptR401StatusCode) Get() (v R401StatusCode, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptR401StatusCode) Or(d R401StatusCode) R401StatusCode { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptR404Error returns new OptR404Error with value set to v. -func NewOptR404Error(v R404Error) OptR404Error { - return OptR404Error{ - Value: v, - Set: true, - } -} - -// OptR404Error is optional R404Error. -type OptR404Error struct { - Value R404Error - Set bool -} - -// IsSet returns true if OptR404Error was set. -func (o OptR404Error) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptR404Error) Reset() { - var v R404Error - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptR404Error) SetTo(v R404Error) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptR404Error) Get() (v R404Error, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptR404Error) Or(d R404Error) R404Error { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptR404StatusCode returns new OptR404StatusCode with value set to v. -func NewOptR404StatusCode(v R404StatusCode) OptR404StatusCode { - return OptR404StatusCode{ - Value: v, - Set: true, - } -} - -// OptR404StatusCode is optional R404StatusCode. -type OptR404StatusCode struct { - Value R404StatusCode - Set bool -} - -// IsSet returns true if OptR404StatusCode was set. -func (o OptR404StatusCode) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptR404StatusCode) Reset() { - var v R404StatusCode - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptR404StatusCode) SetTo(v R404StatusCode) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptR404StatusCode) Get() (v R404StatusCode, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptR404StatusCode) Or(d R404StatusCode) R404StatusCode { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptSecretsPropertiesCasesWebhook returns new OptSecretsPropertiesCasesWebhook with value set to v. -func NewOptSecretsPropertiesCasesWebhook(v SecretsPropertiesCasesWebhook) OptSecretsPropertiesCasesWebhook { - return OptSecretsPropertiesCasesWebhook{ - Value: v, - Set: true, - } -} - -// OptSecretsPropertiesCasesWebhook is optional SecretsPropertiesCasesWebhook. -type OptSecretsPropertiesCasesWebhook struct { - Value SecretsPropertiesCasesWebhook - Set bool -} - -// IsSet returns true if OptSecretsPropertiesCasesWebhook was set. -func (o OptSecretsPropertiesCasesWebhook) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptSecretsPropertiesCasesWebhook) Reset() { - var v SecretsPropertiesCasesWebhook - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptSecretsPropertiesCasesWebhook) SetTo(v SecretsPropertiesCasesWebhook) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptSecretsPropertiesCasesWebhook) Get() (v SecretsPropertiesCasesWebhook, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptSecretsPropertiesCasesWebhook) Or(d SecretsPropertiesCasesWebhook) SecretsPropertiesCasesWebhook { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptString returns new OptString with value set to v. -func NewOptString(v string) OptString { - return OptString{ - Value: v, - Set: true, - } -} - -// OptString is optional string. -type OptString struct { - Value string - Set bool -} - -// IsSet returns true if OptString was set. -func (o OptString) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptString) Reset() { - var v string - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptString) SetTo(v string) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptString) Get() (v string, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptString) Or(d string) string { - if v, ok := o.Get(); ok { - return v - } - return d -} - -type R400 struct { - Error OptR400Error `json:"error"` - Message OptString `json:"message"` - StatusCode OptR400StatusCode `json:"statusCode"` -} - -// GetError returns the value of Error. -func (s *R400) GetError() OptR400Error { - return s.Error -} - -// GetMessage returns the value of Message. -func (s *R400) GetMessage() OptString { - return s.Message -} - -// GetStatusCode returns the value of StatusCode. -func (s *R400) GetStatusCode() OptR400StatusCode { - return s.StatusCode -} - -// SetError sets the value of Error. -func (s *R400) SetError(val OptR400Error) { - s.Error = val -} - -// SetMessage sets the value of Message. -func (s *R400) SetMessage(val OptString) { - s.Message = val -} - -// SetStatusCode sets the value of StatusCode. -func (s *R400) SetStatusCode(val OptR400StatusCode) { - s.StatusCode = val -} - -func (*R400) createConnectorRes() {} -func (*R400) updateConnectorRes() {} - -type R400Error string - -const ( - R400ErrorBadRequest R400Error = "Bad Request" -) - -// MarshalText implements encoding.TextMarshaler. -func (s R400Error) MarshalText() ([]byte, error) { - switch s { - case R400ErrorBadRequest: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *R400Error) UnmarshalText(data []byte) error { - switch R400Error(data) { - case R400ErrorBadRequest: - *s = R400ErrorBadRequest - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -type R400StatusCode int - -const ( - R400StatusCode400 R400StatusCode = 400 -) - -type R401 struct { - Error OptR401Error `json:"error"` - Message OptString `json:"message"` - StatusCode OptR401StatusCode `json:"statusCode"` -} - -// GetError returns the value of Error. -func (s *R401) GetError() OptR401Error { - return s.Error -} - -// GetMessage returns the value of Message. -func (s *R401) GetMessage() OptString { - return s.Message -} - -// GetStatusCode returns the value of StatusCode. -func (s *R401) GetStatusCode() OptR401StatusCode { - return s.StatusCode -} - -// SetError sets the value of Error. -func (s *R401) SetError(val OptR401Error) { - s.Error = val -} - -// SetMessage sets the value of Message. -func (s *R401) SetMessage(val OptString) { - s.Message = val -} - -// SetStatusCode sets the value of StatusCode. -func (s *R401) SetStatusCode(val OptR401StatusCode) { - s.StatusCode = val -} - -func (*R401) createConnectorRes() {} -func (*R401) deleteConnectorRes() {} -func (*R401) getConnectorRes() {} -func (*R401) getConnectorTypesRes() {} -func (*R401) getConnectorsRes() {} -func (*R401) legacyCreateConnectorRes() {} -func (*R401) legacyDeleteConnectorRes() {} -func (*R401) legacyGetConnectorRes() {} -func (*R401) legacyGetConnectorTypesRes() {} -func (*R401) legacyGetConnectorsRes() {} -func (*R401) legacyRunConnectorRes() {} -func (*R401) updateConnectorRes() {} - -type R401Error string - -const ( - R401ErrorUnauthorized R401Error = "Unauthorized" -) - -// MarshalText implements encoding.TextMarshaler. -func (s R401Error) MarshalText() ([]byte, error) { - switch s { - case R401ErrorUnauthorized: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *R401Error) UnmarshalText(data []byte) error { - switch R401Error(data) { - case R401ErrorUnauthorized: - *s = R401ErrorUnauthorized - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -type R401StatusCode int - -const ( - R401StatusCode401 R401StatusCode = 401 -) - -type R404 struct { - Error OptR404Error `json:"error"` - Message OptString `json:"message"` - StatusCode OptR404StatusCode `json:"statusCode"` -} - -// GetError returns the value of Error. -func (s *R404) GetError() OptR404Error { - return s.Error -} - -// GetMessage returns the value of Message. -func (s *R404) GetMessage() OptString { - return s.Message -} - -// GetStatusCode returns the value of StatusCode. -func (s *R404) GetStatusCode() OptR404StatusCode { - return s.StatusCode -} - -// SetError sets the value of Error. -func (s *R404) SetError(val OptR404Error) { - s.Error = val -} - -// SetMessage sets the value of Message. -func (s *R404) SetMessage(val OptString) { - s.Message = val -} - -// SetStatusCode sets the value of StatusCode. -func (s *R404) SetStatusCode(val OptR404StatusCode) { - s.StatusCode = val -} - -func (*R404) legacyUpdateConnectorRes() {} -func (*R404) updateConnectorRes() {} - -type R404Error string - -const ( - R404ErrorNotFound R404Error = "Not Found" -) - -// MarshalText implements encoding.TextMarshaler. -func (s R404Error) MarshalText() ([]byte, error) { - switch s { - case R404ErrorNotFound: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *R404Error) UnmarshalText(data []byte) error { - switch R404Error(data) { - case R404ErrorNotFound: - *s = R404ErrorNotFound - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} - -type R404StatusCode int - -const ( - R404StatusCode404 R404StatusCode = 404 -) - -// Ref: #/components/schemas/secrets_properties_cases_webhook -type SecretsPropertiesCasesWebhook struct { - // The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is - // required. - Password OptString `json:"password"` - // The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is - // required. - User OptString `json:"user"` -} - -// GetPassword returns the value of Password. -func (s *SecretsPropertiesCasesWebhook) GetPassword() OptString { - return s.Password -} - -// GetUser returns the value of User. -func (s *SecretsPropertiesCasesWebhook) GetUser() OptString { - return s.User -} - -// SetPassword sets the value of Password. -func (s *SecretsPropertiesCasesWebhook) SetPassword(val OptString) { - s.Password = val -} - -// SetUser sets the value of User. -func (s *SecretsPropertiesCasesWebhook) SetUser(val OptString) { - s.User = val -} - -// Defines secrets for connectors when type is `.email`. -// Ref: #/components/schemas/secrets_properties_email -type SecretsPropertiesEmail map[string]jx.Raw - -func (s *SecretsPropertiesEmail) init() SecretsPropertiesEmail { - m := *s - if m == nil { - m = map[string]jx.Raw{} - *s = m - } - return m -} - -// Defines secrets for connectors when type is `.jira`. -// Ref: #/components/schemas/secrets_properties_jira -type SecretsPropertiesJira struct { - // The Jira API authentication token for HTTP basic authentication. - ApiToken string `json:"apiToken"` - // The account email for HTTP Basic authentication. - Email string `json:"email"` -} - -// GetApiToken returns the value of ApiToken. -func (s *SecretsPropertiesJira) GetApiToken() string { - return s.ApiToken -} - -// GetEmail returns the value of Email. -func (s *SecretsPropertiesJira) GetEmail() string { - return s.Email -} - -// SetApiToken sets the value of ApiToken. -func (s *SecretsPropertiesJira) SetApiToken(val string) { - s.ApiToken = val -} - -// SetEmail sets the value of Email. -func (s *SecretsPropertiesJira) SetEmail(val string) { - s.Email = val -} - -// Defines secrets for connectors when type is `.opsgenie`. -// Ref: #/components/schemas/secrets_properties_opsgenie -type SecretsPropertiesOpsgenie struct { - // The Opsgenie API authentication key for HTTP Basic authentication. - ApiKey string `json:"apiKey"` -} - -// GetApiKey returns the value of ApiKey. -func (s *SecretsPropertiesOpsgenie) GetApiKey() string { - return s.ApiKey -} - -// SetApiKey sets the value of ApiKey. -func (s *SecretsPropertiesOpsgenie) SetApiKey(val string) { - s.ApiKey = val -} - -// Defines secrets for connectors when type is `.pagerduty`. -// Ref: #/components/schemas/secrets_properties_pagerduty -type SecretsPropertiesPagerduty map[string]jx.Raw - -func (s *SecretsPropertiesPagerduty) init() SecretsPropertiesPagerduty { - m := *s - if m == nil { - m = map[string]jx.Raw{} - *s = m - } - return m -} - -// Defines secrets for connectors when type is `.resilient`. -// Ref: #/components/schemas/secrets_properties_resilient -type SecretsPropertiesResilient struct { - // The authentication key ID for HTTP Basic authentication. - ApiKeyId string `json:"apiKeyId"` - // The authentication key secret for HTTP Basic authentication. - ApiKeySecret string `json:"apiKeySecret"` -} - -// GetApiKeyId returns the value of ApiKeyId. -func (s *SecretsPropertiesResilient) GetApiKeyId() string { - return s.ApiKeyId -} - -// GetApiKeySecret returns the value of ApiKeySecret. -func (s *SecretsPropertiesResilient) GetApiKeySecret() string { - return s.ApiKeySecret -} - -// SetApiKeyId sets the value of ApiKeyId. -func (s *SecretsPropertiesResilient) SetApiKeyId(val string) { - s.ApiKeyId = val -} - -// SetApiKeySecret sets the value of ApiKeySecret. -func (s *SecretsPropertiesResilient) SetApiKeySecret(val string) { - s.ApiKeySecret = val -} - -// Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `. -// servicenow-itom`. -// Ref: #/components/schemas/secrets_properties_servicenow -type SecretsPropertiesServicenow struct { - // The client secret assigned to your OAuth application. This property is required when `isOAuth` is - // `true`. - ClientSecret OptString `json:"clientSecret"` - // The password for HTTP basic authentication. This property is required when `isOAuth` is `false`. - Password OptString `json:"password"` - // The RSA private key that you created for use in ServiceNow. This property is required when - // `isOAuth` is `true`. - PrivateKey OptString `json:"privateKey"` - // The password for the RSA private key. This property is required when `isOAuth` is `true` and you - // set a password on your private key. - PrivateKeyPassword OptString `json:"privateKeyPassword"` - // The username for HTTP basic authentication. This property is required when `isOAuth` is `false`. - Username OptString `json:"username"` -} - -// GetClientSecret returns the value of ClientSecret. -func (s *SecretsPropertiesServicenow) GetClientSecret() OptString { - return s.ClientSecret -} - -// GetPassword returns the value of Password. -func (s *SecretsPropertiesServicenow) GetPassword() OptString { - return s.Password -} - -// GetPrivateKey returns the value of PrivateKey. -func (s *SecretsPropertiesServicenow) GetPrivateKey() OptString { - return s.PrivateKey -} - -// GetPrivateKeyPassword returns the value of PrivateKeyPassword. -func (s *SecretsPropertiesServicenow) GetPrivateKeyPassword() OptString { - return s.PrivateKeyPassword -} - -// GetUsername returns the value of Username. -func (s *SecretsPropertiesServicenow) GetUsername() OptString { - return s.Username -} - -// SetClientSecret sets the value of ClientSecret. -func (s *SecretsPropertiesServicenow) SetClientSecret(val OptString) { - s.ClientSecret = val -} - -// SetPassword sets the value of Password. -func (s *SecretsPropertiesServicenow) SetPassword(val OptString) { - s.Password = val -} - -// SetPrivateKey sets the value of PrivateKey. -func (s *SecretsPropertiesServicenow) SetPrivateKey(val OptString) { - s.PrivateKey = val -} - -// SetPrivateKeyPassword sets the value of PrivateKeyPassword. -func (s *SecretsPropertiesServicenow) SetPrivateKeyPassword(val OptString) { - s.PrivateKeyPassword = val -} - -// SetUsername sets the value of Username. -func (s *SecretsPropertiesServicenow) SetUsername(val OptString) { - s.Username = val -} - -// Defines secrets for connectors when type is `.slack`. -// Ref: #/components/schemas/secrets_properties_slack -type SecretsPropertiesSlack map[string]jx.Raw - -func (s *SecretsPropertiesSlack) init() SecretsPropertiesSlack { - m := *s - if m == nil { - m = map[string]jx.Raw{} - *s = m - } - return m -} - -// Defines secrets for connectors when type is `.swimlane`. -// Ref: #/components/schemas/secrets_properties_swimlane -type SecretsPropertiesSwimlane struct { - // Swimlane API authentication token. - ApiToken OptString `json:"apiToken"` -} - -// GetApiToken returns the value of ApiToken. -func (s *SecretsPropertiesSwimlane) GetApiToken() OptString { - return s.ApiToken -} - -// SetApiToken sets the value of ApiToken. -func (s *SecretsPropertiesSwimlane) SetApiToken(val OptString) { - s.ApiToken = val -} - -// Defines secrets for connectors when type is `.teams`. -// Ref: #/components/schemas/secrets_properties_teams -type SecretsPropertiesTeams map[string]jx.Raw - -func (s *SecretsPropertiesTeams) init() SecretsPropertiesTeams { - m := *s - if m == nil { - m = map[string]jx.Raw{} - *s = m - } - return m -} - -// Defines secrets for connectors when type is `.tines`. -// Ref: #/components/schemas/secrets_properties_tines -type SecretsPropertiesTines map[string]jx.Raw - -func (s *SecretsPropertiesTines) init() SecretsPropertiesTines { - m := *s - if m == nil { - m = map[string]jx.Raw{} - *s = m - } - return m -} - -// Defines secrets for connectors when type is `.webhook`. -// Ref: #/components/schemas/secrets_properties_webhook -type SecretsPropertiesWebhook map[string]jx.Raw - -func (s *SecretsPropertiesWebhook) init() SecretsPropertiesWebhook { - m := *s - if m == nil { - m = map[string]jx.Raw{} - *s = m - } - return m -} - -// Defines secrets for connectors when type is `.xmatters`. -// Ref: #/components/schemas/secrets_properties_xmatters -type SecretsPropertiesXmatters map[string]jx.Raw - -func (s *SecretsPropertiesXmatters) init() SecretsPropertiesXmatters { - m := *s - if m == nil { - m = map[string]jx.Raw{} - *s = m - } - return m -} - -// The properties vary depending on the connector type. -// UpdateConnectorReq represents sum type. -type UpdateConnectorReq struct { - Type UpdateConnectorReqType // switch on this field - UpdateConnectorRequestCasesWebhook UpdateConnectorRequestCasesWebhook - UpdateConnectorRequestIndex UpdateConnectorRequestIndex - UpdateConnectorRequestJira UpdateConnectorRequestJira - UpdateConnectorRequestOpsgenie UpdateConnectorRequestOpsgenie - UpdateConnectorRequestResilient UpdateConnectorRequestResilient - UpdateConnectorRequestServerlog UpdateConnectorRequestServerlog - UpdateConnectorRequestServicenow UpdateConnectorRequestServicenow - UpdateConnectorRequestServicenowItom UpdateConnectorRequestServicenowItom - UpdateConnectorRequestSwimlane UpdateConnectorRequestSwimlane -} - -// UpdateConnectorReqType is oneOf type of UpdateConnectorReq. -type UpdateConnectorReqType string - -// Possible values for UpdateConnectorReqType. -const ( - UpdateConnectorRequestCasesWebhookUpdateConnectorReq UpdateConnectorReqType = "UpdateConnectorRequestCasesWebhook" - UpdateConnectorRequestIndexUpdateConnectorReq UpdateConnectorReqType = "UpdateConnectorRequestIndex" - UpdateConnectorRequestJiraUpdateConnectorReq UpdateConnectorReqType = "UpdateConnectorRequestJira" - UpdateConnectorRequestOpsgenieUpdateConnectorReq UpdateConnectorReqType = "UpdateConnectorRequestOpsgenie" - UpdateConnectorRequestResilientUpdateConnectorReq UpdateConnectorReqType = "UpdateConnectorRequestResilient" - UpdateConnectorRequestServerlogUpdateConnectorReq UpdateConnectorReqType = "UpdateConnectorRequestServerlog" - UpdateConnectorRequestServicenowUpdateConnectorReq UpdateConnectorReqType = "UpdateConnectorRequestServicenow" - UpdateConnectorRequestServicenowItomUpdateConnectorReq UpdateConnectorReqType = "UpdateConnectorRequestServicenowItom" - UpdateConnectorRequestSwimlaneUpdateConnectorReq UpdateConnectorReqType = "UpdateConnectorRequestSwimlane" -) - -// IsUpdateConnectorRequestCasesWebhook reports whether UpdateConnectorReq is UpdateConnectorRequestCasesWebhook. -func (s UpdateConnectorReq) IsUpdateConnectorRequestCasesWebhook() bool { - return s.Type == UpdateConnectorRequestCasesWebhookUpdateConnectorReq -} - -// IsUpdateConnectorRequestIndex reports whether UpdateConnectorReq is UpdateConnectorRequestIndex. -func (s UpdateConnectorReq) IsUpdateConnectorRequestIndex() bool { - return s.Type == UpdateConnectorRequestIndexUpdateConnectorReq -} - -// IsUpdateConnectorRequestJira reports whether UpdateConnectorReq is UpdateConnectorRequestJira. -func (s UpdateConnectorReq) IsUpdateConnectorRequestJira() bool { - return s.Type == UpdateConnectorRequestJiraUpdateConnectorReq -} - -// IsUpdateConnectorRequestOpsgenie reports whether UpdateConnectorReq is UpdateConnectorRequestOpsgenie. -func (s UpdateConnectorReq) IsUpdateConnectorRequestOpsgenie() bool { - return s.Type == UpdateConnectorRequestOpsgenieUpdateConnectorReq -} - -// IsUpdateConnectorRequestResilient reports whether UpdateConnectorReq is UpdateConnectorRequestResilient. -func (s UpdateConnectorReq) IsUpdateConnectorRequestResilient() bool { - return s.Type == UpdateConnectorRequestResilientUpdateConnectorReq -} - -// IsUpdateConnectorRequestServerlog reports whether UpdateConnectorReq is UpdateConnectorRequestServerlog. -func (s UpdateConnectorReq) IsUpdateConnectorRequestServerlog() bool { - return s.Type == UpdateConnectorRequestServerlogUpdateConnectorReq -} - -// IsUpdateConnectorRequestServicenow reports whether UpdateConnectorReq is UpdateConnectorRequestServicenow. -func (s UpdateConnectorReq) IsUpdateConnectorRequestServicenow() bool { - return s.Type == UpdateConnectorRequestServicenowUpdateConnectorReq -} - -// IsUpdateConnectorRequestServicenowItom reports whether UpdateConnectorReq is UpdateConnectorRequestServicenowItom. -func (s UpdateConnectorReq) IsUpdateConnectorRequestServicenowItom() bool { - return s.Type == UpdateConnectorRequestServicenowItomUpdateConnectorReq -} - -// IsUpdateConnectorRequestSwimlane reports whether UpdateConnectorReq is UpdateConnectorRequestSwimlane. -func (s UpdateConnectorReq) IsUpdateConnectorRequestSwimlane() bool { - return s.Type == UpdateConnectorRequestSwimlaneUpdateConnectorReq -} - -// SetUpdateConnectorRequestCasesWebhook sets UpdateConnectorReq to UpdateConnectorRequestCasesWebhook. -func (s *UpdateConnectorReq) SetUpdateConnectorRequestCasesWebhook(v UpdateConnectorRequestCasesWebhook) { - s.Type = UpdateConnectorRequestCasesWebhookUpdateConnectorReq - s.UpdateConnectorRequestCasesWebhook = v -} - -// GetUpdateConnectorRequestCasesWebhook returns UpdateConnectorRequestCasesWebhook and true boolean if UpdateConnectorReq is UpdateConnectorRequestCasesWebhook. -func (s UpdateConnectorReq) GetUpdateConnectorRequestCasesWebhook() (v UpdateConnectorRequestCasesWebhook, ok bool) { - if !s.IsUpdateConnectorRequestCasesWebhook() { - return v, false - } - return s.UpdateConnectorRequestCasesWebhook, true -} - -// NewUpdateConnectorRequestCasesWebhookUpdateConnectorReq returns new UpdateConnectorReq from UpdateConnectorRequestCasesWebhook. -func NewUpdateConnectorRequestCasesWebhookUpdateConnectorReq(v UpdateConnectorRequestCasesWebhook) UpdateConnectorReq { - var s UpdateConnectorReq - s.SetUpdateConnectorRequestCasesWebhook(v) - return s -} - -// SetUpdateConnectorRequestIndex sets UpdateConnectorReq to UpdateConnectorRequestIndex. -func (s *UpdateConnectorReq) SetUpdateConnectorRequestIndex(v UpdateConnectorRequestIndex) { - s.Type = UpdateConnectorRequestIndexUpdateConnectorReq - s.UpdateConnectorRequestIndex = v -} - -// GetUpdateConnectorRequestIndex returns UpdateConnectorRequestIndex and true boolean if UpdateConnectorReq is UpdateConnectorRequestIndex. -func (s UpdateConnectorReq) GetUpdateConnectorRequestIndex() (v UpdateConnectorRequestIndex, ok bool) { - if !s.IsUpdateConnectorRequestIndex() { - return v, false - } - return s.UpdateConnectorRequestIndex, true -} - -// NewUpdateConnectorRequestIndexUpdateConnectorReq returns new UpdateConnectorReq from UpdateConnectorRequestIndex. -func NewUpdateConnectorRequestIndexUpdateConnectorReq(v UpdateConnectorRequestIndex) UpdateConnectorReq { - var s UpdateConnectorReq - s.SetUpdateConnectorRequestIndex(v) - return s -} - -// SetUpdateConnectorRequestJira sets UpdateConnectorReq to UpdateConnectorRequestJira. -func (s *UpdateConnectorReq) SetUpdateConnectorRequestJira(v UpdateConnectorRequestJira) { - s.Type = UpdateConnectorRequestJiraUpdateConnectorReq - s.UpdateConnectorRequestJira = v -} - -// GetUpdateConnectorRequestJira returns UpdateConnectorRequestJira and true boolean if UpdateConnectorReq is UpdateConnectorRequestJira. -func (s UpdateConnectorReq) GetUpdateConnectorRequestJira() (v UpdateConnectorRequestJira, ok bool) { - if !s.IsUpdateConnectorRequestJira() { - return v, false - } - return s.UpdateConnectorRequestJira, true -} - -// NewUpdateConnectorRequestJiraUpdateConnectorReq returns new UpdateConnectorReq from UpdateConnectorRequestJira. -func NewUpdateConnectorRequestJiraUpdateConnectorReq(v UpdateConnectorRequestJira) UpdateConnectorReq { - var s UpdateConnectorReq - s.SetUpdateConnectorRequestJira(v) - return s -} - -// SetUpdateConnectorRequestOpsgenie sets UpdateConnectorReq to UpdateConnectorRequestOpsgenie. -func (s *UpdateConnectorReq) SetUpdateConnectorRequestOpsgenie(v UpdateConnectorRequestOpsgenie) { - s.Type = UpdateConnectorRequestOpsgenieUpdateConnectorReq - s.UpdateConnectorRequestOpsgenie = v -} - -// GetUpdateConnectorRequestOpsgenie returns UpdateConnectorRequestOpsgenie and true boolean if UpdateConnectorReq is UpdateConnectorRequestOpsgenie. -func (s UpdateConnectorReq) GetUpdateConnectorRequestOpsgenie() (v UpdateConnectorRequestOpsgenie, ok bool) { - if !s.IsUpdateConnectorRequestOpsgenie() { - return v, false - } - return s.UpdateConnectorRequestOpsgenie, true -} - -// NewUpdateConnectorRequestOpsgenieUpdateConnectorReq returns new UpdateConnectorReq from UpdateConnectorRequestOpsgenie. -func NewUpdateConnectorRequestOpsgenieUpdateConnectorReq(v UpdateConnectorRequestOpsgenie) UpdateConnectorReq { - var s UpdateConnectorReq - s.SetUpdateConnectorRequestOpsgenie(v) - return s -} - -// SetUpdateConnectorRequestResilient sets UpdateConnectorReq to UpdateConnectorRequestResilient. -func (s *UpdateConnectorReq) SetUpdateConnectorRequestResilient(v UpdateConnectorRequestResilient) { - s.Type = UpdateConnectorRequestResilientUpdateConnectorReq - s.UpdateConnectorRequestResilient = v -} - -// GetUpdateConnectorRequestResilient returns UpdateConnectorRequestResilient and true boolean if UpdateConnectorReq is UpdateConnectorRequestResilient. -func (s UpdateConnectorReq) GetUpdateConnectorRequestResilient() (v UpdateConnectorRequestResilient, ok bool) { - if !s.IsUpdateConnectorRequestResilient() { - return v, false - } - return s.UpdateConnectorRequestResilient, true -} - -// NewUpdateConnectorRequestResilientUpdateConnectorReq returns new UpdateConnectorReq from UpdateConnectorRequestResilient. -func NewUpdateConnectorRequestResilientUpdateConnectorReq(v UpdateConnectorRequestResilient) UpdateConnectorReq { - var s UpdateConnectorReq - s.SetUpdateConnectorRequestResilient(v) - return s -} - -// SetUpdateConnectorRequestServerlog sets UpdateConnectorReq to UpdateConnectorRequestServerlog. -func (s *UpdateConnectorReq) SetUpdateConnectorRequestServerlog(v UpdateConnectorRequestServerlog) { - s.Type = UpdateConnectorRequestServerlogUpdateConnectorReq - s.UpdateConnectorRequestServerlog = v -} - -// GetUpdateConnectorRequestServerlog returns UpdateConnectorRequestServerlog and true boolean if UpdateConnectorReq is UpdateConnectorRequestServerlog. -func (s UpdateConnectorReq) GetUpdateConnectorRequestServerlog() (v UpdateConnectorRequestServerlog, ok bool) { - if !s.IsUpdateConnectorRequestServerlog() { - return v, false - } - return s.UpdateConnectorRequestServerlog, true -} - -// NewUpdateConnectorRequestServerlogUpdateConnectorReq returns new UpdateConnectorReq from UpdateConnectorRequestServerlog. -func NewUpdateConnectorRequestServerlogUpdateConnectorReq(v UpdateConnectorRequestServerlog) UpdateConnectorReq { - var s UpdateConnectorReq - s.SetUpdateConnectorRequestServerlog(v) - return s -} - -// SetUpdateConnectorRequestServicenow sets UpdateConnectorReq to UpdateConnectorRequestServicenow. -func (s *UpdateConnectorReq) SetUpdateConnectorRequestServicenow(v UpdateConnectorRequestServicenow) { - s.Type = UpdateConnectorRequestServicenowUpdateConnectorReq - s.UpdateConnectorRequestServicenow = v -} - -// GetUpdateConnectorRequestServicenow returns UpdateConnectorRequestServicenow and true boolean if UpdateConnectorReq is UpdateConnectorRequestServicenow. -func (s UpdateConnectorReq) GetUpdateConnectorRequestServicenow() (v UpdateConnectorRequestServicenow, ok bool) { - if !s.IsUpdateConnectorRequestServicenow() { - return v, false - } - return s.UpdateConnectorRequestServicenow, true -} - -// NewUpdateConnectorRequestServicenowUpdateConnectorReq returns new UpdateConnectorReq from UpdateConnectorRequestServicenow. -func NewUpdateConnectorRequestServicenowUpdateConnectorReq(v UpdateConnectorRequestServicenow) UpdateConnectorReq { - var s UpdateConnectorReq - s.SetUpdateConnectorRequestServicenow(v) - return s -} - -// SetUpdateConnectorRequestServicenowItom sets UpdateConnectorReq to UpdateConnectorRequestServicenowItom. -func (s *UpdateConnectorReq) SetUpdateConnectorRequestServicenowItom(v UpdateConnectorRequestServicenowItom) { - s.Type = UpdateConnectorRequestServicenowItomUpdateConnectorReq - s.UpdateConnectorRequestServicenowItom = v -} - -// GetUpdateConnectorRequestServicenowItom returns UpdateConnectorRequestServicenowItom and true boolean if UpdateConnectorReq is UpdateConnectorRequestServicenowItom. -func (s UpdateConnectorReq) GetUpdateConnectorRequestServicenowItom() (v UpdateConnectorRequestServicenowItom, ok bool) { - if !s.IsUpdateConnectorRequestServicenowItom() { - return v, false - } - return s.UpdateConnectorRequestServicenowItom, true -} - -// NewUpdateConnectorRequestServicenowItomUpdateConnectorReq returns new UpdateConnectorReq from UpdateConnectorRequestServicenowItom. -func NewUpdateConnectorRequestServicenowItomUpdateConnectorReq(v UpdateConnectorRequestServicenowItom) UpdateConnectorReq { - var s UpdateConnectorReq - s.SetUpdateConnectorRequestServicenowItom(v) - return s -} - -// SetUpdateConnectorRequestSwimlane sets UpdateConnectorReq to UpdateConnectorRequestSwimlane. -func (s *UpdateConnectorReq) SetUpdateConnectorRequestSwimlane(v UpdateConnectorRequestSwimlane) { - s.Type = UpdateConnectorRequestSwimlaneUpdateConnectorReq - s.UpdateConnectorRequestSwimlane = v -} - -// GetUpdateConnectorRequestSwimlane returns UpdateConnectorRequestSwimlane and true boolean if UpdateConnectorReq is UpdateConnectorRequestSwimlane. -func (s UpdateConnectorReq) GetUpdateConnectorRequestSwimlane() (v UpdateConnectorRequestSwimlane, ok bool) { - if !s.IsUpdateConnectorRequestSwimlane() { - return v, false - } - return s.UpdateConnectorRequestSwimlane, true -} - -// NewUpdateConnectorRequestSwimlaneUpdateConnectorReq returns new UpdateConnectorReq from UpdateConnectorRequestSwimlane. -func NewUpdateConnectorRequestSwimlaneUpdateConnectorReq(v UpdateConnectorRequestSwimlane) UpdateConnectorReq { - var s UpdateConnectorReq - s.SetUpdateConnectorRequestSwimlane(v) - return s -} - -// Ref: #/components/schemas/update_connector_request_cases_webhook -type UpdateConnectorRequestCasesWebhook struct { - Config ConfigPropertiesCasesWebhook `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets OptSecretsPropertiesCasesWebhook `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *UpdateConnectorRequestCasesWebhook) GetConfig() ConfigPropertiesCasesWebhook { - return s.Config -} - -// GetName returns the value of Name. -func (s *UpdateConnectorRequestCasesWebhook) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *UpdateConnectorRequestCasesWebhook) GetSecrets() OptSecretsPropertiesCasesWebhook { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *UpdateConnectorRequestCasesWebhook) SetConfig(val ConfigPropertiesCasesWebhook) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *UpdateConnectorRequestCasesWebhook) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *UpdateConnectorRequestCasesWebhook) SetSecrets(val OptSecretsPropertiesCasesWebhook) { - s.Secrets = val -} - -// Ref: #/components/schemas/update_connector_request_index -type UpdateConnectorRequestIndex struct { - Config ConfigPropertiesIndex `json:"config"` - // The display name for the connector. - Name string `json:"name"` -} - -// GetConfig returns the value of Config. -func (s *UpdateConnectorRequestIndex) GetConfig() ConfigPropertiesIndex { - return s.Config -} - -// GetName returns the value of Name. -func (s *UpdateConnectorRequestIndex) GetName() string { - return s.Name -} - -// SetConfig sets the value of Config. -func (s *UpdateConnectorRequestIndex) SetConfig(val ConfigPropertiesIndex) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *UpdateConnectorRequestIndex) SetName(val string) { - s.Name = val -} - -// Ref: #/components/schemas/update_connector_request_jira -type UpdateConnectorRequestJira struct { - Config ConfigPropertiesJira `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesJira `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *UpdateConnectorRequestJira) GetConfig() ConfigPropertiesJira { - return s.Config -} - -// GetName returns the value of Name. -func (s *UpdateConnectorRequestJira) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *UpdateConnectorRequestJira) GetSecrets() SecretsPropertiesJira { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *UpdateConnectorRequestJira) SetConfig(val ConfigPropertiesJira) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *UpdateConnectorRequestJira) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *UpdateConnectorRequestJira) SetSecrets(val SecretsPropertiesJira) { - s.Secrets = val -} - -// Ref: #/components/schemas/update_connector_request_opsgenie -type UpdateConnectorRequestOpsgenie struct { - Config ConfigPropertiesOpsgenie `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesOpsgenie `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *UpdateConnectorRequestOpsgenie) GetConfig() ConfigPropertiesOpsgenie { - return s.Config -} - -// GetName returns the value of Name. -func (s *UpdateConnectorRequestOpsgenie) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *UpdateConnectorRequestOpsgenie) GetSecrets() SecretsPropertiesOpsgenie { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *UpdateConnectorRequestOpsgenie) SetConfig(val ConfigPropertiesOpsgenie) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *UpdateConnectorRequestOpsgenie) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *UpdateConnectorRequestOpsgenie) SetSecrets(val SecretsPropertiesOpsgenie) { - s.Secrets = val -} - -// Ref: #/components/schemas/update_connector_request_resilient -type UpdateConnectorRequestResilient struct { - Config ConfigPropertiesResilient `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesResilient `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *UpdateConnectorRequestResilient) GetConfig() ConfigPropertiesResilient { - return s.Config -} - -// GetName returns the value of Name. -func (s *UpdateConnectorRequestResilient) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *UpdateConnectorRequestResilient) GetSecrets() SecretsPropertiesResilient { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *UpdateConnectorRequestResilient) SetConfig(val ConfigPropertiesResilient) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *UpdateConnectorRequestResilient) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *UpdateConnectorRequestResilient) SetSecrets(val SecretsPropertiesResilient) { - s.Secrets = val -} - -// Ref: #/components/schemas/update_connector_request_serverlog -type UpdateConnectorRequestServerlog struct { - // The display name for the connector. - Name string `json:"name"` -} - -// GetName returns the value of Name. -func (s *UpdateConnectorRequestServerlog) GetName() string { - return s.Name -} - -// SetName sets the value of Name. -func (s *UpdateConnectorRequestServerlog) SetName(val string) { - s.Name = val -} - -// Ref: #/components/schemas/update_connector_request_servicenow -type UpdateConnectorRequestServicenow struct { - Config ConfigPropertiesServicenow `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesServicenow `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *UpdateConnectorRequestServicenow) GetConfig() ConfigPropertiesServicenow { - return s.Config -} - -// GetName returns the value of Name. -func (s *UpdateConnectorRequestServicenow) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *UpdateConnectorRequestServicenow) GetSecrets() SecretsPropertiesServicenow { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *UpdateConnectorRequestServicenow) SetConfig(val ConfigPropertiesServicenow) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *UpdateConnectorRequestServicenow) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *UpdateConnectorRequestServicenow) SetSecrets(val SecretsPropertiesServicenow) { - s.Secrets = val -} - -// Ref: #/components/schemas/update_connector_request_servicenow_itom -type UpdateConnectorRequestServicenowItom struct { - Config ConfigPropertiesServicenowItom `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesServicenow `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *UpdateConnectorRequestServicenowItom) GetConfig() ConfigPropertiesServicenowItom { - return s.Config -} - -// GetName returns the value of Name. -func (s *UpdateConnectorRequestServicenowItom) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *UpdateConnectorRequestServicenowItom) GetSecrets() SecretsPropertiesServicenow { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *UpdateConnectorRequestServicenowItom) SetConfig(val ConfigPropertiesServicenowItom) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *UpdateConnectorRequestServicenowItom) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *UpdateConnectorRequestServicenowItom) SetSecrets(val SecretsPropertiesServicenow) { - s.Secrets = val -} - -// Ref: #/components/schemas/update_connector_request_swimlane -type UpdateConnectorRequestSwimlane struct { - Config ConfigPropertiesSwimlane `json:"config"` - // The display name for the connector. - Name string `json:"name"` - Secrets SecretsPropertiesSwimlane `json:"secrets"` -} - -// GetConfig returns the value of Config. -func (s *UpdateConnectorRequestSwimlane) GetConfig() ConfigPropertiesSwimlane { - return s.Config -} - -// GetName returns the value of Name. -func (s *UpdateConnectorRequestSwimlane) GetName() string { - return s.Name -} - -// GetSecrets returns the value of Secrets. -func (s *UpdateConnectorRequestSwimlane) GetSecrets() SecretsPropertiesSwimlane { - return s.Secrets -} - -// SetConfig sets the value of Config. -func (s *UpdateConnectorRequestSwimlane) SetConfig(val ConfigPropertiesSwimlane) { - s.Config = val -} - -// SetName sets the value of Name. -func (s *UpdateConnectorRequestSwimlane) SetName(val string) { - s.Name = val -} - -// SetSecrets sets the value of Secrets. -func (s *UpdateConnectorRequestSwimlane) SetSecrets(val SecretsPropertiesSwimlane) { - s.Secrets = val -} diff --git a/generated/connectors/oas_security_gen.go b/generated/connectors/oas_security_gen.go deleted file mode 100644 index 1bbb09de2..000000000 --- a/generated/connectors/oas_security_gen.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package connectors - -import ( - "context" - "net/http" - - "github.com/go-faster/errors" - - "github.com/ogen-go/ogen/ogenerrors" -) - -// SecuritySource is provider of security values (tokens, passwords, etc.). -type SecuritySource interface { - // ApiKeyAuth provides apiKeyAuth security value. - ApiKeyAuth(ctx context.Context, operationName string) (ApiKeyAuth, error) - // BasicAuth provides basicAuth security value. - BasicAuth(ctx context.Context, operationName string) (BasicAuth, error) -} - -func (s *Client) securityApiKeyAuth(ctx context.Context, operationName string, req *http.Request) error { - t, err := s.sec.ApiKeyAuth(ctx, operationName) - if err != nil { - if errors.Is(err, ogenerrors.ErrSkipClientSecurity) { - return ogenerrors.ErrSkipClientSecurity - } - return errors.Wrap(err, "security source \"ApiKeyAuth\"") - } - req.Header.Set("ApiKey", t.APIKey) - return nil -} -func (s *Client) securityBasicAuth(ctx context.Context, operationName string, req *http.Request) error { - t, err := s.sec.BasicAuth(ctx, operationName) - if err != nil { - if errors.Is(err, ogenerrors.ErrSkipClientSecurity) { - return ogenerrors.ErrSkipClientSecurity - } - return errors.Wrap(err, "security source \"BasicAuth\"") - } - req.SetBasicAuth(t.Username, t.Password) - return nil -} diff --git a/generated/connectors/oas_validators_gen.go b/generated/connectors/oas_validators_gen.go deleted file mode 100644 index 434ae1e5a..000000000 --- a/generated/connectors/oas_validators_gen.go +++ /dev/null @@ -1,1040 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package connectors - -import ( - "fmt" - - "github.com/go-faster/errors" - - "github.com/ogen-go/ogen/validate" -) - -func (s *ConfigPropertiesCasesWebhook) Validate() error { - var failures []validate.FieldError - if err := func() error { - if s.CreateCommentMethod.Set { - if err := func() error { - if err := s.CreateCommentMethod.Value.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "createCommentMethod", - Error: err, - }) - } - if err := func() error { - if s.CreateIncidentMethod.Set { - if err := func() error { - if err := s.CreateIncidentMethod.Value.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "createIncidentMethod", - Error: err, - }) - } - if err := func() error { - if s.UpdateIncidentMethod.Set { - if err := func() error { - if err := s.UpdateIncidentMethod.Value.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "updateIncidentMethod", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s ConfigPropertiesCasesWebhookCreateCommentMethod) Validate() error { - switch s { - case "patch": - return nil - case "post": - return nil - case "put": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConfigPropertiesCasesWebhookCreateIncidentMethod) Validate() error { - switch s { - case "patch": - return nil - case "post": - return nil - case "put": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConfigPropertiesCasesWebhookUpdateIncidentMethod) Validate() error { - switch s { - case "patch": - return nil - case "post": - return nil - case "put": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s *ConfigPropertiesSwimlane) Validate() error { - var failures []validate.FieldError - if err := func() error { - if err := s.ConnectorType.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "connectorType", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s ConfigPropertiesSwimlaneConnectorType) Validate() error { - switch s { - case "all": - return nil - case "alerts": - return nil - case "cases": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConnectorResponseProperties) Validate() error { - switch s.Type { - case ConnectorResponsePropertiesCasesWebhookConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesCasesWebhook.Validate(); err != nil { - return err - } - return nil - case ConnectorResponsePropertiesEmailConnectorResponseProperties: - return nil // no validation needed - case ConnectorResponsePropertiesIndexConnectorResponseProperties: - return nil // no validation needed - case ConnectorResponsePropertiesJiraConnectorResponseProperties: - return nil // no validation needed - case ConnectorResponsePropertiesOpsgenieConnectorResponseProperties: - return nil // no validation needed - case ConnectorResponsePropertiesPagerdutyConnectorResponseProperties: - return nil // no validation needed - case ConnectorResponsePropertiesResilientConnectorResponseProperties: - return nil // no validation needed - case ConnectorResponsePropertiesServerlogConnectorResponseProperties: - return nil // no validation needed - case ConnectorResponsePropertiesServicenowConnectorResponseProperties: - return nil // no validation needed - case ConnectorResponsePropertiesServicenowItomConnectorResponseProperties: - return nil // no validation needed - case ConnectorResponsePropertiesServicenowSirConnectorResponseProperties: - return nil // no validation needed - case ConnectorResponsePropertiesSlackConnectorResponseProperties: - return nil // no validation needed - case ConnectorResponsePropertiesSwimlaneConnectorResponseProperties: - if err := s.ConnectorResponsePropertiesSwimlane.Validate(); err != nil { - return err - } - return nil - case ConnectorResponsePropertiesTeamsConnectorResponseProperties: - return nil // no validation needed - case ConnectorResponsePropertiesTinesConnectorResponseProperties: - return nil // no validation needed - case ConnectorResponsePropertiesWebhookConnectorResponseProperties: - return nil // no validation needed - case ConnectorResponsePropertiesXmattersConnectorResponseProperties: - return nil // no validation needed - default: - return errors.Errorf("invalid type %q", s.Type) - } -} - -func (s *ConnectorResponsePropertiesCasesWebhook) Validate() error { - var failures []validate.FieldError - if err := func() error { - if err := s.Config.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "config", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s ConnectorResponsePropertiesCasesWebhookConnectorTypeID) Validate() error { - switch s { - case ".cases-webhook": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConnectorResponsePropertiesEmailConnectorTypeID) Validate() error { - switch s { - case ".email": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConnectorResponsePropertiesIndexConnectorTypeID) Validate() error { - switch s { - case ".index": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConnectorResponsePropertiesJiraConnectorTypeID) Validate() error { - switch s { - case ".jira": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConnectorResponsePropertiesOpsgenieConnectorTypeID) Validate() error { - switch s { - case ".opsgenie": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConnectorResponsePropertiesPagerdutyConnectorTypeID) Validate() error { - switch s { - case ".pagerduty": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConnectorResponsePropertiesResilientConnectorTypeID) Validate() error { - switch s { - case ".resilient": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConnectorResponsePropertiesServerlogConnectorTypeID) Validate() error { - switch s { - case ".server-log": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConnectorResponsePropertiesServicenowConnectorTypeID) Validate() error { - switch s { - case ".servicenow": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConnectorResponsePropertiesServicenowItomConnectorTypeID) Validate() error { - switch s { - case ".servicenow-itom": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConnectorResponsePropertiesServicenowSirConnectorTypeID) Validate() error { - switch s { - case ".servicenow-sir": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConnectorResponsePropertiesSlackConnectorTypeID) Validate() error { - switch s { - case ".slack": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s *ConnectorResponsePropertiesSwimlane) Validate() error { - var failures []validate.FieldError - if err := func() error { - if err := s.Config.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "config", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s ConnectorResponsePropertiesSwimlaneConnectorTypeID) Validate() error { - switch s { - case ".swimlane": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConnectorResponsePropertiesTeamsConnectorTypeID) Validate() error { - switch s { - case ".teams": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConnectorResponsePropertiesTinesConnectorTypeID) Validate() error { - switch s { - case ".tines": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConnectorResponsePropertiesWebhookConnectorTypeID) Validate() error { - switch s { - case ".webhook": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConnectorResponsePropertiesXmattersConnectorTypeID) Validate() error { - switch s { - case ".xmatters": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s ConnectorTypes) Validate() error { - switch s { - case ".cases-webhook": - return nil - case ".email": - return nil - case ".index": - return nil - case ".jira": - return nil - case ".opsgenie": - return nil - case ".pagerduty": - return nil - case ".resilient": - return nil - case ".servicenow": - return nil - case ".servicenow-itom": - return nil - case ".servicenow-sir": - return nil - case ".server-log": - return nil - case ".slack": - return nil - case ".swimlane": - return nil - case ".teams": - return nil - case ".tines": - return nil - case ".webhook": - return nil - case ".xmatters": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s CreateConnectorReq) Validate() error { - switch s.Type { - case CreateConnectorRequestCasesWebhookCreateConnectorReq: - if err := s.CreateConnectorRequestCasesWebhook.Validate(); err != nil { - return err - } - return nil - case CreateConnectorRequestEmailCreateConnectorReq: - return nil // no validation needed - case CreateConnectorRequestIndexCreateConnectorReq: - return nil // no validation needed - case CreateConnectorRequestJiraCreateConnectorReq: - return nil // no validation needed - case CreateConnectorRequestOpsgenieCreateConnectorReq: - return nil // no validation needed - case CreateConnectorRequestPagerdutyCreateConnectorReq: - return nil // no validation needed - case CreateConnectorRequestResilientCreateConnectorReq: - return nil // no validation needed - case CreateConnectorRequestServerlogCreateConnectorReq: - return nil // no validation needed - case CreateConnectorRequestServicenowCreateConnectorReq: - return nil // no validation needed - case CreateConnectorRequestServicenowItomCreateConnectorReq: - return nil // no validation needed - case CreateConnectorRequestServicenowSirCreateConnectorReq: - return nil // no validation needed - case CreateConnectorRequestSlackCreateConnectorReq: - return nil // no validation needed - case CreateConnectorRequestSwimlaneCreateConnectorReq: - if err := s.CreateConnectorRequestSwimlane.Validate(); err != nil { - return err - } - return nil - case CreateConnectorRequestTeamsCreateConnectorReq: - return nil // no validation needed - case CreateConnectorRequestTinesCreateConnectorReq: - return nil // no validation needed - case CreateConnectorRequestWebhookCreateConnectorReq: - return nil // no validation needed - case CreateConnectorRequestXmattersCreateConnectorReq: - return nil // no validation needed - default: - return errors.Errorf("invalid type %q", s.Type) - } -} - -func (s *CreateConnectorRequestCasesWebhook) Validate() error { - var failures []validate.FieldError - if err := func() error { - if err := s.Config.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "config", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s CreateConnectorRequestCasesWebhookConnectorTypeID) Validate() error { - switch s { - case ".cases-webhook": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s CreateConnectorRequestEmailConnectorTypeID) Validate() error { - switch s { - case ".email": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s CreateConnectorRequestIndexConnectorTypeID) Validate() error { - switch s { - case ".index": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s CreateConnectorRequestJiraConnectorTypeID) Validate() error { - switch s { - case ".jira": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s CreateConnectorRequestOpsgenieConnectorTypeID) Validate() error { - switch s { - case ".opsgenie": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s CreateConnectorRequestPagerdutyConnectorTypeID) Validate() error { - switch s { - case ".pagerduty": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s CreateConnectorRequestResilientConnectorTypeID) Validate() error { - switch s { - case ".resilient": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s CreateConnectorRequestServerlogConnectorTypeID) Validate() error { - switch s { - case ".server-log": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s CreateConnectorRequestServicenowConnectorTypeID) Validate() error { - switch s { - case ".servicenow": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s CreateConnectorRequestServicenowItomConnectorTypeID) Validate() error { - switch s { - case ".servicenow-itom": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s CreateConnectorRequestServicenowSirConnectorTypeID) Validate() error { - switch s { - case ".servicenow-sir": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s CreateConnectorRequestSlackConnectorTypeID) Validate() error { - switch s { - case ".slack": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s *CreateConnectorRequestSwimlane) Validate() error { - var failures []validate.FieldError - if err := func() error { - if err := s.Config.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "config", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s CreateConnectorRequestSwimlaneConnectorTypeID) Validate() error { - switch s { - case ".swimlane": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s CreateConnectorRequestTeamsConnectorTypeID) Validate() error { - switch s { - case ".teams": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s CreateConnectorRequestTinesConnectorTypeID) Validate() error { - switch s { - case ".tines": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s CreateConnectorRequestWebhookConnectorTypeID) Validate() error { - switch s { - case ".webhook": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s CreateConnectorRequestXmattersConnectorTypeID) Validate() error { - switch s { - case ".xmatters": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s Features) Validate() error { - switch s { - case "alerting": - return nil - case "cases": - return nil - case "uptime": - return nil - case "siem": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s GetConnectorTypesOKApplicationJSON) Validate() error { - if s == nil { - return errors.New("nil is invalid value") - } - var failures []validate.FieldError - for i, elem := range s { - if err := func() error { - if err := elem.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: fmt.Sprintf("[%d]", i), - Error: err, - }) - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s *GetConnectorTypesOKItem) Validate() error { - var failures []validate.FieldError - if err := func() error { - if s.ID.Set { - if err := func() error { - if err := s.ID.Value.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "id", - Error: err, - }) - } - if err := func() error { - var failures []validate.FieldError - for i, elem := range s.SupportedFeatureIds { - if err := func() error { - if err := elem.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: fmt.Sprintf("[%d]", i), - Error: err, - }) - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "supported_feature_ids", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s GetConnectorsOKApplicationJSON) Validate() error { - if s == nil { - return errors.New("nil is invalid value") - } - var failures []validate.FieldError - for i, elem := range s { - if err := func() error { - if err := elem.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: fmt.Sprintf("[%d]", i), - Error: err, - }) - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s *GetConnectorsOKItem) Validate() error { - var failures []validate.FieldError - if err := func() error { - if err := s.ConnectorTypeID.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "connector_type_id", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s LegacyGetConnectorTypesOKApplicationJSON) Validate() error { - if s == nil { - return errors.New("nil is invalid value") - } - return nil -} -func (s LegacyGetConnectorsOKApplicationJSON) Validate() error { - if s == nil { - return errors.New("nil is invalid value") - } - return nil -} -func (s *LegacyRunConnectorOK) Validate() error { - var failures []validate.FieldError - if err := func() error { - if s.Data.Set { - if err := func() error { - if err := s.Data.Value.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "data", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s LegacyRunConnectorOKData) Validate() error { - switch s.Type { - case LegacyRunConnectorOKData0LegacyRunConnectorOKData: - return nil // no validation needed - case LegacyRunConnectorOKData1ItemArrayLegacyRunConnectorOKData: - if s.LegacyRunConnectorOKData1ItemArray == nil { - return errors.New("nil is invalid value") - } - return nil - default: - return errors.Errorf("invalid type %q", s.Type) - } -} - -func (s *R400) Validate() error { - var failures []validate.FieldError - if err := func() error { - if s.Error.Set { - if err := func() error { - if err := s.Error.Value.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "error", - Error: err, - }) - } - if err := func() error { - if s.StatusCode.Set { - if err := func() error { - if err := s.StatusCode.Value.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "statusCode", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s R400Error) Validate() error { - switch s { - case "Bad Request": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s R400StatusCode) Validate() error { - switch s { - case 400: - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s *R401) Validate() error { - var failures []validate.FieldError - if err := func() error { - if s.Error.Set { - if err := func() error { - if err := s.Error.Value.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "error", - Error: err, - }) - } - if err := func() error { - if s.StatusCode.Set { - if err := func() error { - if err := s.StatusCode.Value.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "statusCode", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s R401Error) Validate() error { - switch s { - case "Unauthorized": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s R401StatusCode) Validate() error { - switch s { - case 401: - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s *R404) Validate() error { - var failures []validate.FieldError - if err := func() error { - if s.Error.Set { - if err := func() error { - if err := s.Error.Value.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "error", - Error: err, - }) - } - if err := func() error { - if s.StatusCode.Set { - if err := func() error { - if err := s.StatusCode.Value.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "statusCode", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s R404Error) Validate() error { - switch s { - case "Not Found": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s R404StatusCode) Validate() error { - switch s { - case 404: - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s UpdateConnectorReq) Validate() error { - switch s.Type { - case UpdateConnectorRequestCasesWebhookUpdateConnectorReq: - if err := s.UpdateConnectorRequestCasesWebhook.Validate(); err != nil { - return err - } - return nil - case UpdateConnectorRequestIndexUpdateConnectorReq: - return nil // no validation needed - case UpdateConnectorRequestJiraUpdateConnectorReq: - return nil // no validation needed - case UpdateConnectorRequestOpsgenieUpdateConnectorReq: - return nil // no validation needed - case UpdateConnectorRequestResilientUpdateConnectorReq: - return nil // no validation needed - case UpdateConnectorRequestServerlogUpdateConnectorReq: - return nil // no validation needed - case UpdateConnectorRequestServicenowUpdateConnectorReq: - return nil // no validation needed - case UpdateConnectorRequestServicenowItomUpdateConnectorReq: - return nil // no validation needed - case UpdateConnectorRequestSwimlaneUpdateConnectorReq: - if err := s.UpdateConnectorRequestSwimlane.Validate(); err != nil { - return err - } - return nil - default: - return errors.Errorf("invalid type %q", s.Type) - } -} - -func (s *UpdateConnectorRequestCasesWebhook) Validate() error { - var failures []validate.FieldError - if err := func() error { - if err := s.Config.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "config", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s *UpdateConnectorRequestSwimlane) Validate() error { - var failures []validate.FieldError - if err := func() error { - if err := s.Config.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "config", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} diff --git a/go.mod b/go.mod index 5a5ba7267..ff14bf605 100644 --- a/go.mod +++ b/go.mod @@ -3,34 +3,24 @@ module github.com/elastic/terraform-provider-elasticstack go 1.19 require ( + github.com/deepmap/oapi-codegen v1.12.4 github.com/disaster37/go-kibana-rest/v8 v8.5.0 github.com/elastic/go-elasticsearch/v7 v7.17.7 - github.com/go-faster/errors v0.6.1 - github.com/go-faster/jx v1.0.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/terraform-plugin-go v0.15.0 github.com/hashicorp/terraform-plugin-log v0.8.0 github.com/hashicorp/terraform-plugin-mux v0.9.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 - github.com/ogen-go/ogen v0.63.0 github.com/stretchr/testify v1.8.2 - go.opentelemetry.io/otel v1.14.0 - go.opentelemetry.io/otel/metric v0.37.0 - go.opentelemetry.io/otel/trace v1.14.0 - go.uber.org/multierr v1.11.0 ) require ( github.com/agext/levenshtein v1.2.3 // indirect + github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/dlclark/regexp2 v1.9.0 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-faster/yaml v0.4.5 // indirect - github.com/go-logr/logr v1.2.4 // indirect - github.com/go-logr/stdr v1.2.2 // indirect github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/go-cmp v0.5.9 // indirect @@ -50,6 +40,7 @@ require ( github.com/hashicorp/terraform-registry-address v0.2.0 // indirect github.com/hashicorp/terraform-svchost v0.0.1 // indirect github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect + github.com/kr/pretty v0.3.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.18 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect @@ -59,26 +50,20 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/oklog/run v1.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/segmentio/asm v1.2.0 // indirect + github.com/rogpeppe/go-internal v1.8.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/zclconf/go-cty v1.13.1 // indirect - go.uber.org/atomic v1.10.0 // indirect - go.uber.org/zap v1.24.0 // indirect golang.org/x/crypto v0.7.0 // indirect - golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect golang.org/x/mod v0.10.0 // indirect golang.org/x/net v0.9.0 // indirect - golang.org/x/sync v0.1.0 // indirect golang.org/x/sys v0.7.0 // indirect golang.org/x/text v0.9.0 // indirect - golang.org/x/tools v0.8.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect google.golang.org/grpc v1.54.0 // indirect google.golang.org/protobuf v1.30.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 41a087618..e3bacdb43 100644 --- a/go.sum +++ b/go.sum @@ -6,26 +6,29 @@ github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/ github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= +github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= +github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deepmap/oapi-codegen v1.12.4 h1:pPmn6qI9MuOtCz82WY2Xaw46EQjgvxednXXrP7g5Q2s= +github.com/deepmap/oapi-codegen v1.12.4/go.mod h1:3lgHGMu6myQ2vqbbTXH2H1o4eXFTGnFiDaOaKKl5yas= github.com/disaster37/go-kibana-rest/v8 v8.5.0 h1:Wr2CMopHj0wAh7kq3p355jXctISL1LdAZ9kYN/v6abw= github.com/disaster37/go-kibana-rest/v8 v8.5.0/go.mod h1:wVGm1b93CSmsHYoxzqhDszv347xr+fELdigS8XLO+bg= -github.com/dlclark/regexp2 v1.9.0 h1:pTK/l/3qYIKaRXuHnEnIf7Y5NxfRPfpb7dis6/gdlVI= -github.com/dlclark/regexp2 v1.9.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/elastic/go-elasticsearch/v7 v7.17.7 h1:pcYNfITNPusl+cLwLN6OLmVT+F73Els0nbaWOmYachs= github.com/elastic/go-elasticsearch/v7 v7.17.7/go.mod h1:OJ4wdbtDNk5g503kvlHLyErCgQwwzmDtaFC4XyOxXA4= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= @@ -35,15 +38,7 @@ github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYF github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-faster/errors v0.6.1 h1:nNIPOBkprlKzkThvS/0YaX8Zs9KewLCOSFQS5BU06FI= -github.com/go-faster/errors v0.6.1/go.mod h1:5MGV2/2T9yvlrbhe9pD9LO5Z/2zCSq2T8j+Jpi2LAyY= -github.com/go-faster/jx v1.0.0 h1:HE+ms2e6ZGkZ6u13t8u+onBinrPvIPI+0hWXGELm74g= -github.com/go-faster/jx v1.0.0/go.mod h1:zm8SlkwK+H0TYNKYtVJ/7cWFS7soJBQWhcPctKyYL/4= -github.com/go-faster/yaml v0.4.5 h1:RIY6f3VoN/p8odzh/n2D4hQBbz2yupplunwoau8s6fE= -github.com/go-faster/yaml v0.4.5/go.mod h1:390dRIvV4zbnO7qC9FGo6YYutc+wyyUSHBgbXL52eXk= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= @@ -52,11 +47,6 @@ github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= @@ -129,12 +119,14 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= +github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -169,18 +161,17 @@ github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/ogen-go/ogen v0.63.0 h1:ZUaB2YtZkXN+Z5sr4MUZZcX+YdqVE7dVEozYbd8+pNA= -github.com/ogen-go/ogen v0.63.0/go.mod h1:8cZvkJSu85xWMKKgVACenk+bdItsiId46NgA/C+Tp2E= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= -github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= +github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= @@ -188,11 +179,13 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -215,19 +208,6 @@ github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6e github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zclconf/go-cty v1.13.1 h1:0a6bRwuiSHtAmqCqNOE+c2oHgepv0ctoxU4FUe43kwc= github.com/zclconf/go-cty v1.13.1/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= -go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= -go.opentelemetry.io/otel/metric v0.37.0 h1:pHDQuLQOZwYD+Km0eb657A25NaRzy0a+eLyKfDXedEs= -go.opentelemetry.io/otel/metric v0.37.0/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= -go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= -go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= -go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -238,8 +218,6 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= @@ -257,8 +235,6 @@ golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -299,8 +275,6 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= -golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -320,13 +294,12 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/internal/clients/api_client.go b/internal/clients/api_client.go index e06c6f44a..af21562fc 100644 --- a/internal/clients/api_client.go +++ b/internal/clients/api_client.go @@ -10,6 +10,7 @@ import ( "os" "strings" + "github.com/deepmap/oapi-codegen/pkg/securityprovider" "github.com/disaster37/go-kibana-rest/v8" "github.com/elastic/go-elasticsearch/v7" "github.com/elastic/terraform-provider-elasticstack/generated/alerting" @@ -21,7 +22,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/ogen-go/ogen/ogenerrors" ) type CompositeId struct { @@ -198,12 +198,12 @@ func (a *ApiClient) GetAlertingClient() (alerting.AlertingApi, error) { return a.alerting, nil } -func (a *ApiClient) GetKibanaActionConnectorClient(ctx context.Context) (*connectors.Client, context.Context, error) { +func (a *ApiClient) GetKibanaConnectorsClient(ctx context.Context) (*connectors.Client, error) { if a.connectors == nil { - return nil, nil, errors.New("kibana action connector client not found") + return nil, errors.New("kibana action connector client not found") } - return a.connectors, ctx, nil + return a.connectors, nil } func (a *ApiClient) SetAlertingAuthContext(ctx context.Context) context.Context { @@ -520,26 +520,14 @@ func buildAlertingClient(baseConfig BaseConfig, config kibana.Config) *alerting. return alerting.NewAPIClient(&alertingConfig) } -type SecuritySource struct { - username string - password string -} - -func (sec SecuritySource) ApiKeyAuth(ctx context.Context, operationName string) (connectors.ApiKeyAuth, error) { - return connectors.ApiKeyAuth{}, ogenerrors.ErrSkipClientSecurity -} - -func (sec SecuritySource) BasicAuth(ctx context.Context, operationName string) (connectors.BasicAuth, error) { - return connectors.BasicAuth{ - Username: sec.username, - Password: sec.password, - }, nil -} - func buildConnectorsClient(baseConfig BaseConfig, config kibana.Config) (*connectors.Client, error) { + basicAuthProvider, err := securityprovider.NewSecurityProviderBasicAuth(config.Username, config.Password) + if err != nil { + return nil, fmt.Errorf("unable to create basic auth provider: %w", err) + } return connectors.NewClient( config.Address, - SecuritySource{username: config.Username, password: config.Password}, + connectors.WithRequestEditorFn(basicAuthProvider.Intercept), ) } @@ -566,7 +554,7 @@ func newApiClient(d *schema.ResourceData, version string) (*ApiClient, diag.Diag connectorsClient, err := buildConnectorsClient(baseConfig, kibanaConfig) if err != nil { - return nil, diag.FromErr(fmt.Errorf("cannot create Kibana actions client: [%w]", err)) + return nil, diag.FromErr(fmt.Errorf("cannot create Kibana connectors client: [%w]", err)) } return &ApiClient{ diff --git a/internal/clients/kibana/alerting.go b/internal/clients/kibana/alerting.go index a4a262d20..8f03306fe 100644 --- a/internal/clients/kibana/alerting.go +++ b/internal/clients/kibana/alerting.go @@ -130,7 +130,7 @@ func UpdateAlertingRule(ctx context.Context, apiClient *clients.ApiClient, rule defer res.Body.Close() if diags := utils.CheckHttpError(res, "Unable to update alerting rule"); diags.HasError() { - return nil, diag.FromErr(err) + return nil, diags } shouldBeEnabled := rule.Enabled != nil && *rule.Enabled diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index e30ce1821..fe57c1d92 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -1,8 +1,11 @@ package kibana import ( + "bytes" "context" + "encoding/json" "fmt" + "io" "github.com/elastic/terraform-provider-elasticstack/generated/connectors" "github.com/elastic/terraform-provider-elasticstack/internal/clients" @@ -11,27 +14,42 @@ import ( ) func CreateConnector(ctx context.Context, apiClient *clients.ApiClient, connectorOld models.KibanaActionConnector) (string, diag.Diagnostics) { - client, ctxWithAuth, err := apiClient.GetKibanaActionConnectorClient(ctx) + client, err := apiClient.GetKibanaConnectorsClient(ctx) if err != nil { return "", diag.FromErr(err) } - createProperties, err := createConnectorRequestBodyProperties(connectorOld) + body, err := createConnectorRequestBody(connectorOld) if err != nil { return "", diag.FromErr(err) } - response, err := client.CreateConnector(ctxWithAuth, createProperties, connectors.CreateConnectorParams{KbnXSRF: "true", SpaceId: connectorOld.SpaceID}) + httpResp, err := client.CreateConnectorWithBody(ctx, connectorOld.SpaceID, &connectors.CreateConnectorParams{KbnXsrf: connectors.KbnXsrf("true")}, "application/json", body) + if err != nil { - return "", diag.FromErr(fmt.Errorf("create connector failed: [%w]", err)) + return "", diag.Errorf("unable to create connector: [%w]", err) + } + + defer httpResp.Body.Close() + + resp, err := connectors.ParseCreateConnectorResponse(httpResp) + if err != nil { + return "", diag.Errorf("unable to parse connector create response: [%w]", err) + } + + if resp.JSON400 != nil { + return "", diag.Errorf("%s: %s", *resp.JSON400.Error, *resp.JSON400.Message) } - properties, ok := response.(*connectors.ConnectorResponseProperties) - if !ok { - return "", diag.FromErr(fmt.Errorf("failed to parse create response [%+v]", response)) + if resp.JSON401 != nil { + return "", diag.Errorf("%s: %s", *resp.JSON401.Error, *resp.JSON401.Message) } - connectorNew, err := actionConnectorToModel(connectorOld.SpaceID, *properties) + if resp.JSON200 == nil { + return "", diag.Errorf("%s: %s", resp.Status(), string(resp.Body)) + } + + connectorNew, err := connectorResponseToModel(connectorOld.SpaceID, *resp.JSON200) if err != nil { return "", diag.FromErr(err) } @@ -40,46 +58,42 @@ func CreateConnector(ctx context.Context, apiClient *clients.ApiClient, connecto } func UpdateConnector(ctx context.Context, apiClient *clients.ApiClient, connectorOld models.KibanaActionConnector) (string, diag.Diagnostics) { - client, ctxWithAuth, err := apiClient.GetKibanaActionConnectorClient(ctx) + client, err := apiClient.GetKibanaConnectorsClient(ctx) if err != nil { return "", diag.FromErr(err) } - updateProperties, err := updateConnectorRequestBodyProperties(connectorOld) + body, err := updateConnectorRequestBody(connectorOld) if err != nil { return "", diag.FromErr(err) } - response, err := client.UpdateConnector( - ctxWithAuth, - updateProperties, - connectors.UpdateConnectorParams{ - KbnXSRF: "true", - ConnectorId: connectorOld.ConnectorID, - SpaceId: connectorOld.SpaceID, - }, - ) + httpResp, err := client.UpdateConnectorWithBody(ctx, connectorOld.SpaceID, connectorOld.ConnectorID, &connectors.UpdateConnectorParams{KbnXsrf: connectors.KbnXsrf("true")}, "application/json", body) if err != nil { - return "", diag.FromErr(err) + return "", diag.Errorf("unable to update connector: [%w]", err) + } + + defer httpResp.Body.Close() + + resp, err := connectors.ParseCreateConnectorResponse(httpResp) + if err != nil { + return "", diag.Errorf("unable to parse connector update response: [%w]", err) } - var properties *connectors.ConnectorResponseProperties - - switch resp := response.(type) { - case *connectors.ConnectorResponseProperties: - properties, _ = response.(*connectors.ConnectorResponseProperties) - case *connectors.R400: - return "", diag.Errorf("update failed with error [%s]: %s", resp.GetError().Value, resp.GetMessage().Value) - case *connectors.R401: - return "", diag.Errorf("update failed with error [%s]: %s", resp.GetError().Value, resp.GetMessage().Value) - case *connectors.R404: - return "", diag.Errorf("update failed with error [%s]: %s", resp.GetError().Value, resp.GetMessage().Value) - default: - return "", diag.Errorf("failed to parse update response %+v", response) + if resp.JSON400 != nil { + return "", diag.Errorf("%s: %s", *resp.JSON400.Error, *resp.JSON400.Message) } - connectorNew, err := actionConnectorToModel(connectorOld.SpaceID, *properties) + if resp.JSON401 != nil { + return "", diag.Errorf("%s: %s", *resp.JSON401.Error, *resp.JSON401.Message) + } + + if resp.JSON200 == nil { + return "", diag.Errorf("%s: %s", resp.Status(), string(resp.Body)) + } + + connectorNew, err := connectorResponseToModel(connectorOld.SpaceID, *resp.JSON200) if err != nil { return "", diag.FromErr(err) } @@ -88,23 +102,37 @@ func UpdateConnector(ctx context.Context, apiClient *clients.ApiClient, connecto } func GetConnector(ctx context.Context, apiClient *clients.ApiClient, connectorID, spaceID string, connectorTypeID string) (*models.KibanaActionConnector, diag.Diagnostics) { - client, ctxWithAuth, err := apiClient.GetKibanaActionConnectorClient(ctx) + client, err := apiClient.GetKibanaConnectorsClient(ctx) if err != nil { return nil, diag.FromErr(err) } - response, err := client.GetConnector(ctxWithAuth, connectors.GetConnectorParams{ConnectorId: connectorID, SpaceId: spaceID}) + httpResp, err := client.GetConnector(ctx, spaceID, connectorID) if err != nil { - return nil, diag.FromErr(err) + return nil, diag.Errorf("unable to create connector: [%w]", err) + } + + defer httpResp.Body.Close() + + resp, err := connectors.ParseGetConnectorResponse(httpResp) + if err != nil { + return nil, diag.Errorf("unable to parse connector get response: [%w]", err) + } + + if resp.JSON404 != nil { + return nil, diag.Errorf("%s: %s", *resp.JSON404.Error, *resp.JSON404.Message) } - properties, ok := response.(*connectors.ConnectorResponseProperties) - if !ok { - return nil, diag.FromErr(fmt.Errorf("failed to parse get response [%+v]", response)) + if resp.JSON401 != nil { + return nil, diag.Errorf("%s: %s", *resp.JSON401.Error, *resp.JSON401.Message) } - connector, err := actionConnectorToModel(spaceID, *properties) + if resp.JSON200 == nil { + return nil, diag.Errorf("%s: %s", resp.Status(), string(resp.Body)) + } + + connector, err := connectorResponseToModel(spaceID, *resp.JSON200) if err != nil { return nil, diag.FromErr(err) } @@ -113,21 +141,40 @@ func GetConnector(ctx context.Context, apiClient *clients.ApiClient, connectorID } func DeleteConnector(ctx context.Context, apiClient *clients.ApiClient, connectorID string, spaceID string) diag.Diagnostics { - client, ctxWithAuth, err := apiClient.GetKibanaActionConnectorClient(ctx) + client, err := apiClient.GetKibanaConnectorsClient(ctx) if err != nil { return diag.FromErr(err) } - _, err = client.DeleteConnector(ctxWithAuth, connectors.DeleteConnectorParams{KbnXSRF: "true", ConnectorId: connectorID, SpaceId: spaceID}) + httpResp, err := client.DeleteConnector(ctx, spaceID, connectorID, &connectors.DeleteConnectorParams{KbnXsrf: "true"}) if err != nil { - return diag.FromErr(err) + return diag.Errorf("unable to delete connector: [%w]", err) + } + + defer httpResp.Body.Close() + + resp, err := connectors.ParseDeleteConnectorResponse(httpResp) + if err != nil { + return diag.Errorf("unable to parse connector get response: [%w]", err) + } + + if resp.JSON404 != nil { + return diag.Errorf("%s: %s", *resp.JSON404.Error, *resp.JSON404.Message) + } + + if resp.JSON401 != nil { + return diag.Errorf("%s: %s", *resp.JSON401.Error, *resp.JSON401.Message) + } + + if resp.StatusCode() != 200 && resp.StatusCode() != 204 { + return diag.Errorf("failed to delete connector: got status [%v] [%s]", resp.StatusCode(), resp.Status()) } return nil } -func createConnectorRequestBodyProperties(connector models.KibanaActionConnector) (connectors.CreateConnectorReq, error) { +func createConnectorRequestBody(connector models.KibanaActionConnector) (io.Reader, error) { switch connectors.ConnectorTypes(connector.ConnectorTypeID) { // case connectors.CASES_WEBHOOK_ConnectorTypes: // return createConnectorRequestCasesWebhook(connector) @@ -165,10 +212,10 @@ func createConnectorRequestBodyProperties(connector models.KibanaActionConnector // return createConnectorRequestXmatters(connector) } - return connectors.CreateConnectorReq{}, fmt.Errorf("unknown connector type [%s]", connector.ConnectorTypeID) + return nil, fmt.Errorf("unknown connector type [%s]", connector.ConnectorTypeID) } -func updateConnectorRequestBodyProperties(connector models.KibanaActionConnector) (connectors.UpdateConnectorReq, error) { +func updateConnectorRequestBody(connector models.KibanaActionConnector) (io.Reader, error) { switch connectors.ConnectorTypes(connector.ConnectorTypeID) { // case connectors.CASES_WEBHOOK: // return updateConnectorRequestCasesWebhook(connector) @@ -206,7 +253,7 @@ func updateConnectorRequestBodyProperties(connector models.KibanaActionConnector // return updateConnectorRequestXmatters(connector) } - return connectors.UpdateConnectorReq{}, fmt.Errorf("unknown connector type [%s]", connector.ConnectorTypeID) + return nil, fmt.Errorf("unknown connector type [%s]", connector.ConnectorTypeID) } // func createConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { @@ -255,25 +302,24 @@ func updateConnectorRequestBodyProperties(connector models.KibanaActionConnector // return connectors.CreateConnectorRequestEmailAsCreateConnectorRequestBodyProperties(&c), nil // } -func createConnectorRequestIndex(connector models.KibanaActionConnector) (connectors.CreateConnectorReq, error) { - prefixError := "failed to compose create connector request for Index" - - config := &connectors.ConfigPropertiesIndex{} +func createConnectorRequestIndex(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create connector request for Index" - if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { - return connectors.CreateConnectorReq{}, fmt.Errorf("%s: failed to unmarshal [config]: %w", prefixError, err) + request := connectors.CreateConnectorRequestIndex{ + ConnectorTypeId: connectors.CreateConnectorRequestIndexConnectorTypeIdDotIndex, + Name: connector.Name, } - res := connectors.CreateConnectorReq{} + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [CreateConnectorRequestIndex.Config]: %w", prefixError, err) + } - res.SetCreateConnectorRequestIndex( - connectors.CreateConnectorRequestIndex{ - Name: connector.Name, - Config: *config, - }, - ) + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal [CreateConnectorRequestIndex]: %w", prefixError, err) + } - return res, nil + return bytes.NewReader(bt), nil } // func createConnectorRequestJira(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { @@ -595,25 +641,23 @@ func createConnectorRequestIndex(connector models.KibanaActionConnector) (connec // return connectors.UpdateConnectorRequestCasesWebhookAsUpdateConnectorRequestBodyProperties(&c), nil // } -func updateConnectorRequestIndex(connector models.KibanaActionConnector) (connectors.UpdateConnectorReq, error) { - prefixError := "failed to compose update connector request for Index" +func updateConnectorRequestIndex(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create connector request for Index" - config := &connectors.ConfigPropertiesIndex{} - - if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { - return connectors.UpdateConnectorReq{}, fmt.Errorf("%s: failed to unmarshal [config]: %w", prefixError, err) + request := connectors.UpdateConnectorRequestIndex{ + Name: connector.Name, } - res := connectors.UpdateConnectorReq{} + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [CreateConnectorRequestIndex.Config]: %w", prefixError, err) + } - res.SetUpdateConnectorRequestIndex( - connectors.UpdateConnectorRequestIndex{ - Name: connector.Name, - Config: *config, - }, - ) + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal [CreateConnectorRequestIndex]: %w", prefixError, err) + } - return res, nil + return bytes.NewReader(bt), nil } // func updateConnectorRequestJira(connector models.KibanaActionConnector) (connectors.UpdateConnectorRequestBodyProperties, error) { @@ -756,8 +800,12 @@ func updateConnectorRequestIndex(connector models.KibanaActionConnector) (connec // return connectors.UpdateConnectorRequestSwimlaneAsUpdateConnectorRequestBodyProperties(&c), nil // } -func actionConnectorToModel(spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { - switch properties.Type { +func connectorResponseToModel(spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + discriminator, err := properties.Discriminator() + if err != nil { + return nil, err + } + switch discriminator { // case connectors.CASES_WEBHOOK_ConnectorTypes: // config, err := response.GetConfig().MarshalJSON() @@ -796,24 +844,39 @@ func actionConnectorToModel(spaceID string, properties connectors.ConnectorRespo // } // return &connector, nil - case connectors.ConnectorResponsePropertiesIndexConnectorResponseProperties: - resp, _ := properties.GetConnectorResponsePropertiesIndex() + case string(connectors.ConnectorTypesDotIndex): + resp, err := properties.AsConnectorResponsePropertiesIndex() + if err != nil { + return nil, err + } - config, err := resp.Config.MarshalJSON() + config, err := json.Marshal(resp.Config) if err != nil { - return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) + return nil, fmt.Errorf("unable to marshal config: %w", err) + } + + isDeprecated := false + isMissingSecrets := false + + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets } connector := models.KibanaActionConnector{ - ConnectorID: resp.ID, + ConnectorID: resp.Id, SpaceID: spaceID, Name: resp.Name, ConnectorTypeID: string(connectors.ConnectorTypesDotIndex), - IsDeprecated: bool(resp.IsDeprecated.Or(connectors.IsDeprecated(false))), - IsMissingSecrets: bool(resp.IsMissingSecrets.Or(connectors.IsMissingSecrets(false))), + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, IsPreconfigured: bool(resp.IsPreconfigured), ConfigJSON: string(config), } + return &connector, nil // case *connectors.ConnectorResponsePropertiesJira: diff --git a/internal/kibana/connector.go b/internal/kibana/connector.go index 78d30fbd9..14d13898b 100644 --- a/internal/kibana/connector.go +++ b/internal/kibana/connector.go @@ -43,7 +43,7 @@ func ResourceActionConnector() *schema.Resource { Description: "The configuration for the connector. Configuration properties vary depending on the connector type.", Type: schema.TypeString, Required: true, - DiffSuppressFunc: utils.DiffJsonSuppress, + DiffSuppressFunc: utils.DiffNullMapEntriesSuppress, ValidateFunc: validation.StringIsJSON, }, "secrets": { diff --git a/internal/utils/diffs.go b/internal/utils/diffs.go index 58493c9df..06340f219 100644 --- a/internal/utils/diffs.go +++ b/internal/utils/diffs.go @@ -35,3 +35,21 @@ func NormalizeIndexSettings(m map[string]interface{}) map[string]interface{} { } return out } + +func DiffNullMapEntriesSuppress(key, old, new string, d *schema.ResourceData) bool { + var oldMap, newMap map[string]interface{} + if err := json.Unmarshal([]byte(old), &oldMap); err != nil { + return false + } + if err := json.Unmarshal([]byte(new), &newMap); err != nil { + return false + } + for _, m := range [...]map[string]interface{}{oldMap, newMap} { + for k, v := range m { + if v == nil { + delete(m, k) + } + } + } + return MapsEqual(oldMap, newMap) +} From 5b947dfd8ff9e921a6948955cb464f052d7eb343 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 4 May 2023 17:25:39 +0200 Subject: [PATCH 13/59] fix lint errors --- internal/clients/kibana/connector.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index fe57c1d92..8d74fcd30 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -27,14 +27,14 @@ func CreateConnector(ctx context.Context, apiClient *clients.ApiClient, connecto httpResp, err := client.CreateConnectorWithBody(ctx, connectorOld.SpaceID, &connectors.CreateConnectorParams{KbnXsrf: connectors.KbnXsrf("true")}, "application/json", body) if err != nil { - return "", diag.Errorf("unable to create connector: [%w]", err) + return "", diag.Errorf("unable to create connector: [%v]", err) } defer httpResp.Body.Close() resp, err := connectors.ParseCreateConnectorResponse(httpResp) if err != nil { - return "", diag.Errorf("unable to parse connector create response: [%w]", err) + return "", diag.Errorf("unable to parse connector create response: [%v]", err) } if resp.JSON400 != nil { @@ -71,14 +71,14 @@ func UpdateConnector(ctx context.Context, apiClient *clients.ApiClient, connecto httpResp, err := client.UpdateConnectorWithBody(ctx, connectorOld.SpaceID, connectorOld.ConnectorID, &connectors.UpdateConnectorParams{KbnXsrf: connectors.KbnXsrf("true")}, "application/json", body) if err != nil { - return "", diag.Errorf("unable to update connector: [%w]", err) + return "", diag.Errorf("unable to update connector: [%v]", err) } defer httpResp.Body.Close() resp, err := connectors.ParseCreateConnectorResponse(httpResp) if err != nil { - return "", diag.Errorf("unable to parse connector update response: [%w]", err) + return "", diag.Errorf("unable to parse connector update response: [%v]", err) } if resp.JSON400 != nil { @@ -110,14 +110,14 @@ func GetConnector(ctx context.Context, apiClient *clients.ApiClient, connectorID httpResp, err := client.GetConnector(ctx, spaceID, connectorID) if err != nil { - return nil, diag.Errorf("unable to create connector: [%w]", err) + return nil, diag.Errorf("unable to create connector: [%v]", err) } defer httpResp.Body.Close() resp, err := connectors.ParseGetConnectorResponse(httpResp) if err != nil { - return nil, diag.Errorf("unable to parse connector get response: [%w]", err) + return nil, diag.Errorf("unable to parse connector get response: [%v]", err) } if resp.JSON404 != nil { @@ -149,14 +149,14 @@ func DeleteConnector(ctx context.Context, apiClient *clients.ApiClient, connecto httpResp, err := client.DeleteConnector(ctx, spaceID, connectorID, &connectors.DeleteConnectorParams{KbnXsrf: "true"}) if err != nil { - return diag.Errorf("unable to delete connector: [%w]", err) + return diag.Errorf("unable to delete connector: [%v]", err) } defer httpResp.Body.Close() resp, err := connectors.ParseDeleteConnectorResponse(httpResp) if err != nil { - return diag.Errorf("unable to parse connector get response: [%w]", err) + return diag.Errorf("unable to parse connector get response: [%v]", err) } if resp.JSON404 != nil { From 8ee513423950470056d15af9327c320f7ffd4e6d Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Fri, 5 May 2023 13:21:20 +0200 Subject: [PATCH 14/59] suppress diff for configs when the only diff is default values --- go.mod | 2 +- internal/kibana/connector.go | 37 +++++++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index ff14bf605..6ed0b2f8e 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( github.com/deepmap/oapi-codegen v1.12.4 github.com/disaster37/go-kibana-rest/v8 v8.5.0 github.com/elastic/go-elasticsearch/v7 v7.17.7 + github.com/google/go-cmp v0.5.9 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/terraform-plugin-go v0.15.0 @@ -23,7 +24,6 @@ require ( github.com/fatih/color v1.15.0 // indirect github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect github.com/google/uuid v1.3.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-checkpoint v0.5.0 // indirect diff --git a/internal/kibana/connector.go b/internal/kibana/connector.go index 14d13898b..ad48dd0d2 100644 --- a/internal/kibana/connector.go +++ b/internal/kibana/connector.go @@ -2,11 +2,14 @@ package kibana import ( "context" + "encoding/json" + "github.com/elastic/terraform-provider-elasticstack/generated/connectors" "github.com/elastic/terraform-provider-elasticstack/internal/clients" "github.com/elastic/terraform-provider-elasticstack/internal/clients/kibana" "github.com/elastic/terraform-provider-elasticstack/internal/models" "github.com/elastic/terraform-provider-elasticstack/internal/utils" + "github.com/google/go-cmp/cmp" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" @@ -43,7 +46,7 @@ func ResourceActionConnector() *schema.Resource { Description: "The configuration for the connector. Configuration properties vary depending on the connector type.", Type: schema.TypeString, Required: true, - DiffSuppressFunc: utils.DiffNullMapEntriesSuppress, + DiffSuppressFunc: diffDefaultFieldsSuppress, ValidateFunc: validation.StringIsJSON, }, "secrets": { @@ -86,6 +89,38 @@ func ResourceActionConnector() *schema.Resource { } } +func diffDefaultFieldsSuppress(k, old, new string, d *schema.ResourceData) bool { + con, err := expandActionConnector(d) + if err != nil { + return false + } + return isConnectorConfigsEquals(con.ConnectorTypeID, old, new) +} + +// compare configs taking into account default values +// `new` represents new desired resource state from TF configuration +// `old` represents resource state from backend +// the desired state (`new`) can omit default values that are always returned by backend +func isConnectorConfigsEquals(connectorTypeID, cfgJSold, cfgJSnew string) bool { + switch connectorTypeID { + case string(connectors.ConnectorTypesDotIndex): + var cfgNew connectors.ConfigPropertiesIndex + if err := json.Unmarshal([]byte(cfgJSnew), &cfgNew); err != nil { + return false + } + var cfgOld connectors.ConfigPropertiesIndex + if err := json.Unmarshal([]byte(cfgJSold), &cfgOld); err != nil { + return false + } + if cfgNew.Refresh == nil { + cfgNew.Refresh = new(bool) + *cfgNew.Refresh = false + } + return cmp.Equal(cfgOld, cfgNew) + } + return false +} + func resourceConnectorCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { client, diags := clients.NewApiClient(d, meta) if diags.HasError() { From c05c7af007ea068ebb6cb3256e0dc033b2812b15 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Fri, 5 May 2023 13:46:48 +0200 Subject: [PATCH 15/59] fix acc test --- internal/clients/api_client.go | 2 +- internal/clients/kibana/connector.go | 12 ++++++------ internal/kibana/connector_test.go | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/clients/api_client.go b/internal/clients/api_client.go index af21562fc..7094f149f 100644 --- a/internal/clients/api_client.go +++ b/internal/clients/api_client.go @@ -125,7 +125,7 @@ func NewAcceptanceTestingClient() (*ApiClient, error) { actionConnectors, err := buildConnectorsClient(baseConfig, kibanaConfig) if err != nil { - return nil, fmt.Errorf("cannot create Kibana actions client: [%w]", err) + return nil, fmt.Errorf("cannot create Kibana action connectors client: [%w]", err) } return &ApiClient{ diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index 8d74fcd30..771258c07 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -110,7 +110,7 @@ func GetConnector(ctx context.Context, apiClient *clients.ApiClient, connectorID httpResp, err := client.GetConnector(ctx, spaceID, connectorID) if err != nil { - return nil, diag.Errorf("unable to create connector: [%v]", err) + return nil, diag.Errorf("unable to get connector: [%v]", err) } defer httpResp.Body.Close() @@ -120,10 +120,6 @@ func GetConnector(ctx context.Context, apiClient *clients.ApiClient, connectorID return nil, diag.Errorf("unable to parse connector get response: [%v]", err) } - if resp.JSON404 != nil { - return nil, diag.Errorf("%s: %s", *resp.JSON404.Error, *resp.JSON404.Message) - } - if resp.JSON401 != nil { return nil, diag.Errorf("%s: %s", *resp.JSON401.Error, *resp.JSON401.Message) } @@ -132,9 +128,13 @@ func GetConnector(ctx context.Context, apiClient *clients.ApiClient, connectorID return nil, diag.Errorf("%s: %s", resp.Status(), string(resp.Body)) } + if resp.JSON404 != nil { + return nil, nil + } + connector, err := connectorResponseToModel(spaceID, *resp.JSON200) if err != nil { - return nil, diag.FromErr(err) + return nil, diag.Errorf("unable to convert response to model: %v", err) } return connector, nil diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index 79ffc3fbc..e98cec7ef 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -96,12 +96,12 @@ func checkResourceActionConnectorDestroy(s *terraform.State) error { } compId, _ := clients.CompositeIdFromStr(rs.Primary.ID) - rule, diags := kibana.GetConnector(context.Background(), client, compId.ResourceId, compId.ClusterId, ".index") + connector, diags := kibana.GetConnector(context.Background(), client, compId.ResourceId, compId.ClusterId, ".index") if diags.HasError() { - return fmt.Errorf("Failed to get action connector: %v", diags) + return fmt.Errorf("Failed to get connector: %v", diags) } - if rule != nil { + if connector != nil { return fmt.Errorf("Action connector (%s) still exists", compId.ResourceId) } } From 4e011c181b2f3e6cc8127c7f957251fb9515a2e9 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Fri, 5 May 2023 14:44:27 +0200 Subject: [PATCH 16/59] fix test --- internal/clients/kibana/connector.go | 8 ++++---- internal/kibana/connector.go | 9 --------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index 771258c07..47bab0537 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -124,14 +124,14 @@ func GetConnector(ctx context.Context, apiClient *clients.ApiClient, connectorID return nil, diag.Errorf("%s: %s", *resp.JSON401.Error, *resp.JSON401.Message) } - if resp.JSON200 == nil { - return nil, diag.Errorf("%s: %s", resp.Status(), string(resp.Body)) - } - if resp.JSON404 != nil { return nil, nil } + if resp.JSON200 == nil { + return nil, diag.Errorf("%s: %s", resp.Status(), string(resp.Body)) + } + connector, err := connectorResponseToModel(spaceID, *resp.JSON200) if err != nil { return nil, diag.Errorf("unable to convert response to model: %v", err) diff --git a/internal/kibana/connector.go b/internal/kibana/connector.go index ad48dd0d2..745b88143 100644 --- a/internal/kibana/connector.go +++ b/internal/kibana/connector.go @@ -222,15 +222,6 @@ func resourceConnectorDelete(ctx context.Context, d *schema.ResourceData, meta i return nil } -// func jsonStrToMap(d *schema.ResourceData, fieldName string, diags *diag.Diagnostics) map[string]interface{} { -// jsonStr := d.Get(fieldName) -// res := map[string]interface{}{} -// if err := json.NewDecoder(strings.NewReader(jsonStr.(string))).Decode(&res); err != nil { -// *diags = append(*diags, diag.FromErr(err)...) -// } -// return res -// } - func expandActionConnector(d *schema.ResourceData) (models.KibanaActionConnector, diag.Diagnostics) { var diags diag.Diagnostics From 880c57fb34ed9d797a143b60ccd3d1c473f17366 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Fri, 5 May 2023 15:58:37 +0200 Subject: [PATCH 17/59] support all types of connectors in create --- internal/clients/kibana/connector.go | 628 ++++++++++++++------------- 1 file changed, 327 insertions(+), 301 deletions(-) diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index 47bab0537..3f1a3479b 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -176,40 +176,40 @@ func DeleteConnector(ctx context.Context, apiClient *clients.ApiClient, connecto func createConnectorRequestBody(connector models.KibanaActionConnector) (io.Reader, error) { switch connectors.ConnectorTypes(connector.ConnectorTypeID) { - // case connectors.CASES_WEBHOOK_ConnectorTypes: - // return createConnectorRequestCasesWebhook(connector) - // case connectors.EMAIL_ConnectorTypes: - // return createConnectorRequestEmail(connector) + case connectors.ConnectorTypesDotCasesWebhook: + return createConnectorRequestCasesWebhook(connector) + case connectors.ConnectorTypesDotEmail: + return createConnectorRequestEmail(connector) case connectors.ConnectorTypesDotIndex: return createConnectorRequestIndex(connector) - // case connectors.JIRA_ConnectorTypes: - // return createConnectorRequestJira(connector) - // case connectors.OPSGENIE_ConnectorTypes: - // return createConnectorRequestOpsgenie(connector) - // case connectors.PAGERDUTY: - // return createConnectorRequestPagerduty(connector) - // case connectors.RESILIENT_ConnectorTypes: - // return createConnectorRequestResilient(connector) - // case connectors.SERVICENOW_ConnectorTypes: - // return createConnectorRequestServicenow(connector) - // case connectors.SERVICENOW_ITOM_ConnectorTypes: - // return createConnectorRequestServicenowItom(connector) - // case connectors.SERVICENOW_SIR: - // return createConnectorRequestServicenowSir(connector) - // case connectors.SERVER_LOG_ConnectorTypes: - // return createConnectorRequestServerLog(connector) - // case connectors.SLACK: - // return createConnectorRequestSlack(connector) - // case connectors.SWIMLANE_ConnectorTypes: - // return createConnectorRequestSwimlane(connector) - // case connectors.TEAMS: - // return createConnectorRequestTeams(connector) - // case connectors.TINES: - // return createConnectorRequestTines(connector) - // case connectors.WEBHOOK: - // return createConnectorRequestWebhook(connector) - // case connectors.XMATTERS: - // return createConnectorRequestXmatters(connector) + case connectors.ConnectorTypesDotJira: + return createConnectorRequestJira(connector) + case connectors.ConnectorTypesDotOpsgenie: + return createConnectorRequestOpsgenie(connector) + case connectors.ConnectorTypesDotPagerduty: + return createConnectorRequestPagerduty(connector) + case connectors.ConnectorTypesDotResilient: + return createConnectorRequestResilient(connector) + case connectors.ConnectorTypesDotServicenow: + return createConnectorRequestServicenow(connector) + case connectors.ConnectorTypesDotServicenowItom: + return createConnectorRequestServicenowItom(connector) + case connectors.ConnectorTypesDotServicenowSir: + return createConnectorRequestServicenowSir(connector) + case connectors.ConnectorTypesDotServerLog: + return createConnectorRequestServerLog(connector) + case connectors.ConnectorTypesDotSlack: + return createConnectorRequestSlack(connector) + case connectors.ConnectorTypesDotSwimlane: + return createConnectorRequestSwimlane(connector) + case connectors.ConnectorTypesDotTeams: + return createConnectorRequestTeams(connector) + case connectors.ConnectorTypesDotTines: + return createConnectorRequestTines(connector) + case connectors.ConnectorTypesDotWebhook: + return createConnectorRequestWebhook(connector) + case connectors.ConnectorTypesDotXmatters: + return createConnectorRequestXmatters(connector) } return nil, fmt.Errorf("unknown connector type [%s]", connector.ConnectorTypeID) @@ -256,51 +256,53 @@ func updateConnectorRequestBody(connector models.KibanaActionConnector) (io.Read return nil, fmt.Errorf("unknown connector type [%s]", connector.ConnectorTypeID) } -// func createConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose create connector request for CasesWebhook" +func createConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create connector request for CasesWebhook" -// config := connectors.NullableConfigPropertiesCasesWebhook{} -// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } + request := connectors.CreateConnectorRequestCasesWebhook{ + ConnectorTypeId: connectors.DotCasesWebhook, + Name: connector.Name, + } -// secrets := connectors.NullableSecretsPropertiesCasesWebhook{} -// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } -// c := connectors.CreateConnectorRequestCasesWebhook{ -// ConnectorTypeId: connector.ConnectorTypeID, -// Name: connector.Name, -// Config: *config.Get(), -// Secrets: secrets.Get(), -// } + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } -// return connectors.CreateConnectorRequestCasesWebhookAsCreateConnectorRequestBodyProperties(&c), nil -// } + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } -// func createConnectorRequestEmail(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose create connector request for Email" + return bytes.NewReader(bt), nil +} -// var config map[string]interface{} -// if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } +func createConnectorRequestEmail(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create connector request for Email" -// var secrets map[string]interface{} -// if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } + request := connectors.CreateConnectorRequestEmail{ + ConnectorTypeId: connectors.CreateConnectorRequestEmailConnectorTypeIdDotEmail, + Name: connector.Name, + } -// c := connectors.CreateConnectorRequestEmail{ -// ConnectorTypeId: connector.ConnectorTypeID, -// Name: connector.Name, -// Config: config, -// Secrets: secrets, -// } + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } -// return connectors.CreateConnectorRequestEmailAsCreateConnectorRequestBodyProperties(&c), nil -// } + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } + + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } + + return bytes.NewReader(bt), nil +} func createConnectorRequestIndex(connector models.KibanaActionConnector) (io.Reader, error) { prefixError := "failed to create connector request for Index" @@ -311,312 +313,336 @@ func createConnectorRequestIndex(connector models.KibanaActionConnector) (io.Rea } if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [CreateConnectorRequestIndex.Config]: %w", prefixError, err) + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) } bt, err := json.Marshal(request) if err != nil { - return nil, fmt.Errorf("%s: failed to marshal [CreateConnectorRequestIndex]: %w", prefixError, err) + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) } return bytes.NewReader(bt), nil } -// func createConnectorRequestJira(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose create connector request for Jira" +func createConnectorRequestJira(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create connector request for Jira" -// config := connectors.NullableConfigPropertiesJira{} -// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } + request := connectors.CreateConnectorRequestJira{ + ConnectorTypeId: connectors.CreateConnectorRequestJiraConnectorTypeIdDotJira, + Name: connector.Name, + } -// secrets := connectors.NullableSecretsPropertiesJira{} -// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } -// c := connectors.CreateConnectorRequestJira{ -// ConnectorTypeId: connector.ConnectorTypeID, -// Name: connector.Name, -// Config: *config.Get(), -// Secrets: *secrets.Get(), -// } + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } -// return connectors.CreateConnectorRequestJiraAsCreateConnectorRequestBodyProperties(&c), nil -// } + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } -// func createConnectorRequestOpsgenie(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose create connector request for Opsgenie" + return bytes.NewReader(bt), nil +} -// config := connectors.NullableConfigPropertiesOpsgenie{} -// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } +func createConnectorRequestOpsgenie(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create connector request for Opsgenie" -// secrets := connectors.NullableSecretsPropertiesOpsgenie{} -// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } + request := connectors.CreateConnectorRequestOpsgenie{ + ConnectorTypeId: connectors.CreateConnectorRequestOpsgenieConnectorTypeIdDotOpsgenie, + Name: connector.Name, + } -// c := connectors.CreateConnectorRequestOpsgenie{ -// ConnectorTypeId: connector.ConnectorTypeID, -// Name: connector.Name, -// Config: *config.Get(), -// Secrets: *secrets.Get(), -// } + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } -// return connectors.CreateConnectorRequestOpsgenieAsCreateConnectorRequestBodyProperties(&c), nil -// } + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } -// func createConnectorRequestPagerduty(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose create connector request for PagerDuty" + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } -// var config map[string]interface{} -// if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } + return bytes.NewReader(bt), nil +} -// var secrets map[string]interface{} -// if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } +func createConnectorRequestPagerduty(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create connector request for Pagerduty" -// c := connectors.CreateConnectorRequestPagerduty{ -// ConnectorTypeId: connector.ConnectorTypeID, -// Name: connector.Name, -// Config: config, -// Secrets: secrets, -// } + request := connectors.CreateConnectorRequestPagerduty{ + ConnectorTypeId: connectors.CreateConnectorRequestPagerdutyConnectorTypeIdDotPagerduty, + Name: connector.Name, + } -// return connectors.CreateConnectorRequestPagerdutyAsCreateConnectorRequestBodyProperties(&c), nil -// } + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } -// func createConnectorRequestResilient(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose create connector request for Resilient" + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } -// config := connectors.NullableConfigPropertiesResilient{} -// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } -// secrets := connectors.NullableSecretsPropertiesResilient{} -// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } + return bytes.NewReader(bt), nil +} -// c := connectors.CreateConnectorRequestResilient{ -// ConnectorTypeId: connector.ConnectorTypeID, -// Name: connector.Name, -// Config: *config.Get(), -// Secrets: *secrets.Get(), -// } +func createConnectorRequestResilient(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create connector request for Resilient" -// return connectors.CreateConnectorRequestResilientAsCreateConnectorRequestBodyProperties(&c), nil -// } + request := connectors.CreateConnectorRequestResilient{ + ConnectorTypeId: connectors.CreateConnectorRequestResilientConnectorTypeIdDotResilient, + Name: connector.Name, + } -// func createConnectorRequestServicenow(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose create connector request for Servicenow" + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } -// config := connectors.NullableConfigPropertiesServicenow{} -// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } -// secrets := connectors.NullableSecretsPropertiesServicenow{} -// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } -// c := connectors.CreateConnectorRequestServicenow{ -// ConnectorTypeId: connector.ConnectorTypeID, -// Name: connector.Name, -// Config: *config.Get(), -// Secrets: *secrets.Get(), -// } + return bytes.NewReader(bt), nil +} -// return connectors.CreateConnectorRequestServicenowAsCreateConnectorRequestBodyProperties(&c), nil -// } +func createConnectorRequestServicenow(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create connector request for Servicenow" -// func createConnectorRequestServicenowItom(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose create connector request for ServicenowItom" + request := connectors.CreateConnectorRequestServicenow{ + ConnectorTypeId: connectors.CreateConnectorRequestServicenowConnectorTypeIdDotServicenow, + Name: connector.Name, + } -// config := connectors.NullableConfigPropertiesServicenowItom{} -// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } -// secrets := connectors.NullableSecretsPropertiesServicenow{} -// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } -// c := connectors.CreateConnectorRequestServicenowItom{ -// ConnectorTypeId: connector.ConnectorTypeID, -// Name: connector.Name, -// Config: *config.Get(), -// Secrets: *secrets.Get(), -// } + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } -// return connectors.CreateConnectorRequestServicenowItomAsCreateConnectorRequestBodyProperties(&c), nil -// } + return bytes.NewReader(bt), nil +} -// func createConnectorRequestServicenowSir(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose create connector request for ServicenowSir" +func createConnectorRequestServicenowItom(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create connector request for ServicenowItom" -// config := connectors.NullableConfigPropertiesServicenow{} -// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } + request := connectors.CreateConnectorRequestServicenowItom{ + ConnectorTypeId: connectors.CreateConnectorRequestServicenowItomConnectorTypeIdDotServicenowItom, + Name: connector.Name, + } -// secrets := connectors.NullableSecretsPropertiesServicenow{} -// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } -// c := connectors.CreateConnectorRequestServicenowSir{ -// ConnectorTypeId: connector.ConnectorTypeID, -// Name: connector.Name, -// Config: *config.Get(), -// Secrets: *secrets.Get(), -// } + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } -// return connectors.CreateConnectorRequestServicenowSirAsCreateConnectorRequestBodyProperties(&c), nil -// } + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } -// func createConnectorRequestServerLog(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { -// c := connectors.CreateConnectorRequestServerlog{ -// ConnectorTypeId: connector.ConnectorTypeID, -// Name: connector.Name, -// } + return bytes.NewReader(bt), nil +} -// return connectors.CreateConnectorRequestServerlogAsCreateConnectorRequestBodyProperties(&c), nil -// } +func createConnectorRequestServicenowSir(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create connector request for ServicenowSir" -// func createConnectorRequestSlack(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose create connector request for Slack" + request := connectors.CreateConnectorRequestServicenowSir{ + ConnectorTypeId: connectors.CreateConnectorRequestServicenowSirConnectorTypeIdDotServicenowSir, + Name: connector.Name, + } -// var secrets map[string]interface{} -// if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } -// c := connectors.CreateConnectorRequestSlack{ -// ConnectorTypeId: connector.ConnectorTypeID, -// Name: connector.Name, -// Secrets: secrets, -// } + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } -// return connectors.CreateConnectorRequestSlackAsCreateConnectorRequestBodyProperties(&c), nil -// } + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } -// func createConnectorRequestSwimlane(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose create connector request for Swimlane" + return bytes.NewReader(bt), nil +} -// config := connectors.NullableConfigPropertiesSwimlane{} -// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } +func createConnectorRequestServerLog(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create connector request for Serverlog" -// secrets := connectors.NullableSecretsPropertiesSwimlane{} -// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } + request := connectors.CreateConnectorRequestServerlog{ + ConnectorTypeId: connectors.CreateConnectorRequestServerlogConnectorTypeIdDotServerLog, + Name: connector.Name, + } -// c := connectors.CreateConnectorRequestSwimlane{ -// ConnectorTypeId: connector.ConnectorTypeID, -// Name: connector.Name, -// Config: *config.Get(), -// Secrets: *secrets.Get(), -// } + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } -// return connectors.CreateConnectorRequestSwimlaneAsCreateConnectorRequestBodyProperties(&c), nil -// } + return bytes.NewReader(bt), nil +} -// func createConnectorRequestTeams(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose create connector request for Teams" +func createConnectorRequestSlack(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create connector request for Slack" -// var secrets map[string]interface{} -// if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } + request := connectors.CreateConnectorRequestSlack{ + ConnectorTypeId: connectors.CreateConnectorRequestSlackConnectorTypeIdDotSlack, + Name: connector.Name, + } -// c := connectors.CreateConnectorRequestTeams{ -// ConnectorTypeId: connector.ConnectorTypeID, -// Name: connector.Name, -// Secrets: secrets, -// } + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } -// return connectors.CreateConnectorRequestTeamsAsCreateConnectorRequestBodyProperties(&c), nil -// } + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } -// func createConnectorRequestTines(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose create connector request for Tines" + return bytes.NewReader(bt), nil +} -// var config map[string]interface{} -// if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } +func createConnectorRequestSwimlane(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create connector request for Swimlane" -// var secrets map[string]interface{} -// if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } + request := connectors.CreateConnectorRequestSwimlane{ + ConnectorTypeId: connectors.CreateConnectorRequestSwimlaneConnectorTypeIdDotSwimlane, + Name: connector.Name, + } -// c := connectors.CreateConnectorRequestTines{ -// ConnectorTypeId: connector.ConnectorTypeID, -// Name: connector.Name, -// Config: config, -// Secrets: secrets, -// } + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } -// return connectors.CreateConnectorRequestTinesAsCreateConnectorRequestBodyProperties(&c), nil -// } + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } -// func createConnectorRequestWebhook(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose create connector request for Webhook" + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } -// var config map[string]interface{} -// if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } + return bytes.NewReader(bt), nil +} -// var secrets map[string]interface{} -// if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } +func createConnectorRequestTeams(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create connector request for Teams" -// c := connectors.CreateConnectorRequestWebhook{ -// ConnectorTypeId: connector.ConnectorTypeID, -// Name: connector.Name, -// Config: config, -// Secrets: secrets, -// } + request := connectors.CreateConnectorRequestTeams{ + ConnectorTypeId: connectors.CreateConnectorRequestTeamsConnectorTypeIdDotTeams, + Name: connector.Name, + } -// return connectors.CreateConnectorRequestWebhookAsCreateConnectorRequestBodyProperties(&c), nil -// } + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } -// func createConnectorRequestXmatters(connector models.KibanaActionConnector) (connectors.CreateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose create connector request for Xmatters" + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } -// var config map[string]interface{} -// if err := json.Unmarshal([]byte(connector.ConfigJSON), &config); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } + return bytes.NewReader(bt), nil +} -// var secrets map[string]interface{} -// if err := json.Unmarshal([]byte(connector.SecretsJSON), &secrets); err != nil { -// return connectors.CreateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } +func createConnectorRequestTines(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create connector request for Tines" -// c := connectors.CreateConnectorRequestXmatters{ -// ConnectorTypeId: connector.ConnectorTypeID, -// Name: connector.Name, -// Config: config, -// Secrets: secrets, -// } + request := connectors.CreateConnectorRequestTines{ + ConnectorTypeId: connectors.CreateConnectorRequestTinesConnectorTypeIdDotTines, + Name: connector.Name, + } -// return connectors.CreateConnectorRequestXmattersAsCreateConnectorRequestBodyProperties(&c), nil -// } + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } + + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } + + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } + + return bytes.NewReader(bt), nil +} + +func createConnectorRequestWebhook(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create connector request for Webhook" + + request := connectors.CreateConnectorRequestWebhook{ + ConnectorTypeId: connectors.CreateConnectorRequestWebhookConnectorTypeIdDotWebhook, + Name: connector.Name, + } + + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } + + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } + + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } + + return bytes.NewReader(bt), nil +} + +func createConnectorRequestXmatters(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create connector request for Xmatters" + + request := connectors.CreateConnectorRequestXmatters{ + ConnectorTypeId: connectors.CreateConnectorRequestXmattersConnectorTypeIdDotXmatters, + Name: connector.Name, + } + + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } + + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } + + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } + + return bytes.NewReader(bt), nil +} // func updateConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (connectors.UpdateConnectorRequestBodyProperties, error) { // prefixError := "failed to compose update connector request for CasesWebhook" From b793928522f2934cdcb8014e1e225420a0032ce2 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Fri, 5 May 2023 17:05:17 +0200 Subject: [PATCH 18/59] customizeDiff for connector config --- docs/resources/kibana_action_connector.md | 2 +- internal/clients/kibana/connector.go | 33 ++++++++++++ internal/kibana/connector.go | 61 ++++++++++------------- 3 files changed, 59 insertions(+), 37 deletions(-) diff --git a/docs/resources/kibana_action_connector.md b/docs/resources/kibana_action_connector.md index 716ab8d5c..46e152041 100644 --- a/docs/resources/kibana_action_connector.md +++ b/docs/resources/kibana_action_connector.md @@ -32,12 +32,12 @@ resource "elasticstack_kibana_action_connector" "example" { ### Required -- `config` (String) The configuration for the connector. Configuration properties vary depending on the connector type. - `connector_type_id` (String) The ID of the connector type, e.g. `.index`. - `name` (String) The name of the connector. While this name does not have to be unique, a distinctive name can help you identify a connector. ### Optional +- `config` (String) The configuration for the connector. Configuration properties vary depending on the connector type. - `connector_id` (String) A UUID v1 or v4 to use instead of a randomly generated ID. - `secrets` (String) The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type. - `space_id` (String) An identifier for the space. If space_id is not provided, the default space is used. diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index 3f1a3479b..754db7a33 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -174,6 +174,39 @@ func DeleteConnector(ctx context.Context, apiClient *clients.ApiClient, connecto return nil } +// njs - connector config's JSON from TF configuration +// ojs - connector config's JSON that returned by backend +// backend returns a config that explicitly specifies all default values +// function returns config where default values are copied from backend response, +// if they are omitted in TF configuration +func ConnectorConfigWithDefaults(connectorTypeID, njs, ojs string) (string, error) { + switch connectorTypeID { + case string(connectors.ConnectorTypesDotIndex): + return connectorIndexConfigWithDefaults(njs, ojs) + } + return njs, nil +} + +func connectorIndexConfigWithDefaults(njs, ojs string) (string, error) { + var cfgNew connectors.ConfigPropertiesIndex + if err := json.Unmarshal([]byte(njs), &cfgNew); err != nil { + return "", err + } + var cfgOld connectors.ConfigPropertiesIndex + if err := json.Unmarshal([]byte(ojs), &cfgOld); err != nil { + return "", err + } + if cfgNew.Refresh == nil && cfgOld.Refresh != nil { + cfgNew.Refresh = new(bool) + *cfgNew.Refresh = *cfgOld.Refresh + } + njs2, err := json.Marshal(cfgNew) + if err != nil { + return "", err + } + return string(njs2), nil +} + func createConnectorRequestBody(connector models.KibanaActionConnector) (io.Reader, error) { switch connectors.ConnectorTypes(connector.ConnectorTypeID) { case connectors.ConnectorTypesDotCasesWebhook: diff --git a/internal/kibana/connector.go b/internal/kibana/connector.go index 745b88143..0169799b3 100644 --- a/internal/kibana/connector.go +++ b/internal/kibana/connector.go @@ -2,14 +2,11 @@ package kibana import ( "context" - "encoding/json" - "github.com/elastic/terraform-provider-elasticstack/generated/connectors" "github.com/elastic/terraform-provider-elasticstack/internal/clients" "github.com/elastic/terraform-provider-elasticstack/internal/clients/kibana" "github.com/elastic/terraform-provider-elasticstack/internal/models" "github.com/elastic/terraform-provider-elasticstack/internal/utils" - "github.com/google/go-cmp/cmp" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" @@ -43,11 +40,11 @@ func ResourceActionConnector() *schema.Resource { ForceNew: true, }, "config": { - Description: "The configuration for the connector. Configuration properties vary depending on the connector type.", - Type: schema.TypeString, - Required: true, - DiffSuppressFunc: diffDefaultFieldsSuppress, - ValidateFunc: validation.StringIsJSON, + Description: "The configuration for the connector. Configuration properties vary depending on the connector type.", + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringIsJSON, }, "secrets": { Description: "The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type.", @@ -80,6 +77,7 @@ func ResourceActionConnector() *schema.Resource { UpdateContext: resourceConnectorUpdate, ReadContext: resourceConnectorRead, DeleteContext: resourceConnectorDelete, + CustomizeDiff: connectorCustomizeDiff, Importer: &schema.ResourceImporter{ StateContext: schema.ImportStatePassthroughContext, @@ -89,36 +87,27 @@ func ResourceActionConnector() *schema.Resource { } } -func diffDefaultFieldsSuppress(k, old, new string, d *schema.ResourceData) bool { - con, err := expandActionConnector(d) - if err != nil { - return false +func connectorCustomizeDiff(ctx context.Context, rd *schema.ResourceDiff, in interface{}) error { + if !rd.HasChange("config") { + return nil } - return isConnectorConfigsEquals(con.ConnectorTypeID, old, new) -} - -// compare configs taking into account default values -// `new` represents new desired resource state from TF configuration -// `old` represents resource state from backend -// the desired state (`new`) can omit default values that are always returned by backend -func isConnectorConfigsEquals(connectorTypeID, cfgJSold, cfgJSnew string) bool { - switch connectorTypeID { - case string(connectors.ConnectorTypesDotIndex): - var cfgNew connectors.ConfigPropertiesIndex - if err := json.Unmarshal([]byte(cfgJSnew), &cfgNew); err != nil { - return false - } - var cfgOld connectors.ConfigPropertiesIndex - if err := json.Unmarshal([]byte(cfgJSold), &cfgOld); err != nil { - return false - } - if cfgNew.Refresh == nil { - cfgNew.Refresh = new(bool) - *cfgNew.Refresh = false - } - return cmp.Equal(cfgOld, cfgNew) + o, n := rd.GetChange("config") + ojs := o.(string) + njs := n.(string) + if ojs == njs { + return nil + } + o, n = rd.GetChange("connector_type_id") + otid := o.(string) + ntid := n.(string) + if otid != ntid { + return nil + } + njs2, err := kibana.ConnectorConfigWithDefaults(otid, njs, ojs) + if err != nil { + return err } - return false + return rd.SetNew("config", string(njs2)) } func resourceConnectorCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { From 886efe6d6deed54a732c7f9fa6adf32d3b80f887 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Fri, 5 May 2023 18:10:31 +0200 Subject: [PATCH 19/59] WIP: email connector --- generated/connectors/bundled.yaml | 37 +++---- generated/connectors/connectors.gen.go | 12 +++ go.mod | 13 +++ go.sum | 36 +++++++ internal/clients/kibana/connector.go | 144 +++++++++++++++++-------- 5 files changed, 179 insertions(+), 63 deletions(-) diff --git a/generated/connectors/bundled.yaml b/generated/connectors/bundled.yaml index 6ba58a4cb..0a3294cec 100644 --- a/generated/connectors/bundled.yaml +++ b/generated/connectors/bundled.yaml @@ -203,6 +203,7 @@ paths: description: The properties vary depending on the connector type. oneOf: - $ref: '#/components/schemas/update_connector_request_cases_webhook' + - $ref: '#/components/schemas/update_connector_request_email' - $ref: '#/components/schemas/update_connector_request_index' - $ref: '#/components/schemas/update_connector_request_jira' - $ref: '#/components/schemas/update_connector_request_opsgenie' @@ -211,26 +212,6 @@ paths: - $ref: '#/components/schemas/update_connector_request_servicenow' - $ref: '#/components/schemas/update_connector_request_servicenow_itom' - $ref: '#/components/schemas/update_connector_request_swimlane' -# discriminator: -# propertyName: connector_type_id -# mapping: -# .cases-webhook: '#/components/schemas/update_connector_request_cases_webhook' -# # .email: '#/components/schemas/update_connector_request_email' -# .index: '#/components/schemas/update_connector_request_index' -# .jira: '#/components/schemas/update_connector_request_jira' -# .opsgenie: '#/components/schemas/update_connector_request_opsgenie' -# # .pagerduty: '#/components/schemas/update_connector_request_pagerduty' -# .resilient: '#/components/schemas/update_connector_request_resilient' -# .server-log: '#/components/schemas/update_connector_request_serverlog' -# .servicenow: '#/components/schemas/update_connector_request_servicenow' -# .servicenow-itom: '#/components/schemas/update_connector_request_servicenow_itom' -# # .servicenow-sir: '#/components/schemas/create_connector_request_servicenow_sir' -# # .slack: '#/components/schemas/create_connector_request_slack' -# .swimlane: '#/components/schemas/update_connector_request_swimlane' -# # .teams: '#/components/schemas/create_connector_request_teams' -# # .tines: '#/components/schemas/create_connector_request_tines' -# # .webhook: '#/components/schemas/create_connector_request_webhook' -# # .xmatters: '#/components/schemas/create_connector_request_xmatters' examples: updateIndexConnectorRequest: $ref: '#/components/examples/update_index_connector_request' @@ -2297,6 +2278,22 @@ components: example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_cases_webhook' + update_connector_request_email: + title: Update email connector request + type: object + required: + - config + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_email' + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_email' update_connector_request_index: title: Update index connector request type: object diff --git a/generated/connectors/connectors.gen.go b/generated/connectors/connectors.gen.go index 260a83582..178f81f0c 100644 --- a/generated/connectors/connectors.gen.go +++ b/generated/connectors/connectors.gen.go @@ -1973,6 +1973,18 @@ type UpdateConnectorRequestCasesWebhook struct { Secrets *SecretsPropertiesCasesWebhook `json:"secrets,omitempty"` } +// UpdateConnectorRequestEmail defines model for update_connector_request_email. +type UpdateConnectorRequestEmail struct { + // Config Defines properties for connectors when type is `.email`. + Config ConfigPropertiesEmail `json:"config"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.email`. + Secrets SecretsPropertiesEmail `json:"secrets"` +} + // UpdateConnectorRequestIndex defines model for update_connector_request_index. type UpdateConnectorRequestIndex struct { // Config Defines properties for connectors when type is `.index`. diff --git a/go.mod b/go.mod index 6ed0b2f8e..564dc9a82 100644 --- a/go.mod +++ b/go.mod @@ -22,6 +22,9 @@ require ( github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/color v1.15.0 // indirect + github.com/getkin/kin-openapi v0.107.0 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/swag v0.21.1 // indirect github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/uuid v1.3.0 // indirect @@ -40,7 +43,12 @@ require ( github.com/hashicorp/terraform-registry-address v0.2.0 // indirect github.com/hashicorp/terraform-svchost v0.0.1 // indirect github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect + github.com/invopop/yaml v0.1.0 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/kr/pretty v0.3.0 // indirect + github.com/labstack/echo/v4 v4.9.1 // indirect + github.com/labstack/gommon v0.4.0 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.18 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect @@ -48,10 +56,13 @@ require ( github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/oklog/run v1.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect + github.com/valyala/bytebufferpool v1.0.0 // indirect + github.com/valyala/fasttemplate v1.2.2 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect @@ -61,9 +72,11 @@ require ( golang.org/x/net v0.9.0 // indirect golang.org/x/sys v0.7.0 // indirect golang.org/x/text v0.9.0 // indirect + golang.org/x/tools v0.6.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect google.golang.org/grpc v1.54.0 // indirect google.golang.org/protobuf v1.30.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index e3bacdb43..d6831983d 100644 --- a/go.sum +++ b/go.sum @@ -38,6 +38,8 @@ github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYF github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/getkin/kin-openapi v0.107.0 h1:bxhL6QArW7BXQj8NjXfIJQy680NsMKd25nwhvpCXchg= +github.com/getkin/kin-openapi v0.107.0/go.mod h1:9Dhr+FasATJZjS4iOLvB0hkaxgYdulrNYm2e9epLWOo= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= @@ -47,6 +49,11 @@ github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= +github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= @@ -64,6 +71,7 @@ github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -115,10 +123,14 @@ github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/invopop/yaml v0.1.0 h1:YW3WGUoJEXYfzWBjn00zIlrw7brGVD0fUKRYDPAPhrc= +github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= @@ -132,9 +144,19 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/labstack/echo/v4 v4.9.1 h1:GliPYSpzGKlyOhqIbG8nmHBo3i1saKWFOgh41AN3b+Y= +github.com/labstack/echo/v4 v4.9.1/go.mod h1:Pop5HLc+xoc4qhTZ1ip6C0RtP7Z+4VzRLWZZFKqbbjo= +github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= +github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= @@ -160,6 +182,8 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= @@ -195,6 +219,11 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= +github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -251,6 +280,7 @@ golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -275,6 +305,8 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -300,7 +332,11 @@ gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index 754db7a33..f1e3f5190 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -180,13 +180,31 @@ func DeleteConnector(ctx context.Context, apiClient *clients.ApiClient, connecto // function returns config where default values are copied from backend response, // if they are omitted in TF configuration func ConnectorConfigWithDefaults(connectorTypeID, njs, ojs string) (string, error) { - switch connectorTypeID { - case string(connectors.ConnectorTypesDotIndex): + switch connectors.ConnectorTypes(connectorTypeID) { + case connectors.ConnectorTypesDotEmail: + return connectorEmailConfigWithDefaults(njs, ojs) + case connectors.ConnectorTypesDotIndex: return connectorIndexConfigWithDefaults(njs, ojs) } return njs, nil } +func connectorEmailConfigWithDefaults(njs, ojs string) (string, error) { + var cfgNew connectors.ConfigPropertiesIndex + if err := json.Unmarshal([]byte(njs), &cfgNew); err != nil { + return "", err + } + var cfgOld connectors.ConfigPropertiesIndex + if err := json.Unmarshal([]byte(ojs), &cfgOld); err != nil { + return "", err + } + njs2, err := json.Marshal(cfgNew) + if err != nil { + return "", err + } + return string(njs2), nil +} + func connectorIndexConfigWithDefaults(njs, ojs string) (string, error) { var cfgNew connectors.ConfigPropertiesIndex if err := json.Unmarshal([]byte(njs), &cfgNew); err != nil { @@ -252,8 +270,8 @@ func updateConnectorRequestBody(connector models.KibanaActionConnector) (io.Read switch connectors.ConnectorTypes(connector.ConnectorTypeID) { // case connectors.CASES_WEBHOOK: // return updateConnectorRequestCasesWebhook(connector) - // case connectors.EMAIL: - // return updateConnectorRequestEmail(connector) + case connectors.ConnectorTypesDotEmail: + return updateConnectorRequestEmail(connector) case connectors.ConnectorTypesDotIndex: return updateConnectorRequestIndex(connector) // case connectors.JIRA: @@ -290,7 +308,7 @@ func updateConnectorRequestBody(connector models.KibanaActionConnector) (io.Read } func createConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create connector request for CasesWebhook" + prefixError := "failed to create CasesWebhook connector request" request := connectors.CreateConnectorRequestCasesWebhook{ ConnectorTypeId: connectors.DotCasesWebhook, @@ -314,7 +332,7 @@ func createConnectorRequestCasesWebhook(connector models.KibanaActionConnector) } func createConnectorRequestEmail(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create connector request for Email" + prefixError := "failed to create Email connector request" request := connectors.CreateConnectorRequestEmail{ ConnectorTypeId: connectors.CreateConnectorRequestEmailConnectorTypeIdDotEmail, @@ -338,7 +356,7 @@ func createConnectorRequestEmail(connector models.KibanaActionConnector) (io.Rea } func createConnectorRequestIndex(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create connector request for Index" + prefixError := "failed to create Index connector request" request := connectors.CreateConnectorRequestIndex{ ConnectorTypeId: connectors.CreateConnectorRequestIndexConnectorTypeIdDotIndex, @@ -358,7 +376,7 @@ func createConnectorRequestIndex(connector models.KibanaActionConnector) (io.Rea } func createConnectorRequestJira(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create connector request for Jira" + prefixError := "failed to create Jira connector request" request := connectors.CreateConnectorRequestJira{ ConnectorTypeId: connectors.CreateConnectorRequestJiraConnectorTypeIdDotJira, @@ -382,7 +400,7 @@ func createConnectorRequestJira(connector models.KibanaActionConnector) (io.Read } func createConnectorRequestOpsgenie(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create connector request for Opsgenie" + prefixError := "failed to create Opsgenie connector request" request := connectors.CreateConnectorRequestOpsgenie{ ConnectorTypeId: connectors.CreateConnectorRequestOpsgenieConnectorTypeIdDotOpsgenie, @@ -406,7 +424,7 @@ func createConnectorRequestOpsgenie(connector models.KibanaActionConnector) (io. } func createConnectorRequestPagerduty(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create connector request for Pagerduty" + prefixError := "failed to create Pagerduty connector request" request := connectors.CreateConnectorRequestPagerduty{ ConnectorTypeId: connectors.CreateConnectorRequestPagerdutyConnectorTypeIdDotPagerduty, @@ -430,7 +448,7 @@ func createConnectorRequestPagerduty(connector models.KibanaActionConnector) (io } func createConnectorRequestResilient(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create connector request for Resilient" + prefixError := "failed to create Resilient connector request" request := connectors.CreateConnectorRequestResilient{ ConnectorTypeId: connectors.CreateConnectorRequestResilientConnectorTypeIdDotResilient, @@ -454,7 +472,7 @@ func createConnectorRequestResilient(connector models.KibanaActionConnector) (io } func createConnectorRequestServicenow(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create connector request for Servicenow" + prefixError := "failed to create Servicenow connector request" request := connectors.CreateConnectorRequestServicenow{ ConnectorTypeId: connectors.CreateConnectorRequestServicenowConnectorTypeIdDotServicenow, @@ -478,7 +496,7 @@ func createConnectorRequestServicenow(connector models.KibanaActionConnector) (i } func createConnectorRequestServicenowItom(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create connector request for ServicenowItom" + prefixError := "failed to create ServicenowItom connector request" request := connectors.CreateConnectorRequestServicenowItom{ ConnectorTypeId: connectors.CreateConnectorRequestServicenowItomConnectorTypeIdDotServicenowItom, @@ -502,7 +520,7 @@ func createConnectorRequestServicenowItom(connector models.KibanaActionConnector } func createConnectorRequestServicenowSir(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create connector request for ServicenowSir" + prefixError := "failed to create ServicenowSir connector request" request := connectors.CreateConnectorRequestServicenowSir{ ConnectorTypeId: connectors.CreateConnectorRequestServicenowSirConnectorTypeIdDotServicenowSir, @@ -526,7 +544,7 @@ func createConnectorRequestServicenowSir(connector models.KibanaActionConnector) } func createConnectorRequestServerLog(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create connector request for Serverlog" + prefixError := "failed to create Serverlog connector request" request := connectors.CreateConnectorRequestServerlog{ ConnectorTypeId: connectors.CreateConnectorRequestServerlogConnectorTypeIdDotServerLog, @@ -542,7 +560,7 @@ func createConnectorRequestServerLog(connector models.KibanaActionConnector) (io } func createConnectorRequestSlack(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create connector request for Slack" + prefixError := "failed to create Slack connector request" request := connectors.CreateConnectorRequestSlack{ ConnectorTypeId: connectors.CreateConnectorRequestSlackConnectorTypeIdDotSlack, @@ -562,7 +580,7 @@ func createConnectorRequestSlack(connector models.KibanaActionConnector) (io.Rea } func createConnectorRequestSwimlane(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create connector request for Swimlane" + prefixError := "failed to create Swimlane connector request" request := connectors.CreateConnectorRequestSwimlane{ ConnectorTypeId: connectors.CreateConnectorRequestSwimlaneConnectorTypeIdDotSwimlane, @@ -586,7 +604,7 @@ func createConnectorRequestSwimlane(connector models.KibanaActionConnector) (io. } func createConnectorRequestTeams(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create connector request for Teams" + prefixError := "failed to create Teams connector request" request := connectors.CreateConnectorRequestTeams{ ConnectorTypeId: connectors.CreateConnectorRequestTeamsConnectorTypeIdDotTeams, @@ -606,7 +624,7 @@ func createConnectorRequestTeams(connector models.KibanaActionConnector) (io.Rea } func createConnectorRequestTines(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create connector request for Tines" + prefixError := "failed to create Tines connector request" request := connectors.CreateConnectorRequestTines{ ConnectorTypeId: connectors.CreateConnectorRequestTinesConnectorTypeIdDotTines, @@ -630,7 +648,7 @@ func createConnectorRequestTines(connector models.KibanaActionConnector) (io.Rea } func createConnectorRequestWebhook(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create connector request for Webhook" + prefixError := "failed to create Webhook connector request" request := connectors.CreateConnectorRequestWebhook{ ConnectorTypeId: connectors.CreateConnectorRequestWebhookConnectorTypeIdDotWebhook, @@ -654,7 +672,7 @@ func createConnectorRequestWebhook(connector models.KibanaActionConnector) (io.R } func createConnectorRequestXmatters(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create connector request for Xmatters" + prefixError := "failed to create Xmatters connector request" request := connectors.CreateConnectorRequestXmatters{ ConnectorTypeId: connectors.CreateConnectorRequestXmattersConnectorTypeIdDotXmatters, @@ -700,8 +718,31 @@ func createConnectorRequestXmatters(connector models.KibanaActionConnector) (io. // return connectors.UpdateConnectorRequestCasesWebhookAsUpdateConnectorRequestBodyProperties(&c), nil // } +func updateConnectorRequestEmail(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create Email connector request" + + request := connectors.UpdateConnectorRequestEmail{ + Name: connector.Name, + } + + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } + + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } + + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } + + return bytes.NewReader(bt), nil +} + func updateConnectorRequestIndex(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create connector request for Index" + prefixError := "failed to create Index connector request" request := connectors.UpdateConnectorRequestIndex{ Name: connector.Name, @@ -864,7 +905,7 @@ func connectorResponseToModel(spaceID string, properties connectors.ConnectorRes if err != nil { return nil, err } - switch discriminator { + switch connectors.ConnectorTypes(discriminator) { // case connectors.CASES_WEBHOOK_ConnectorTypes: // config, err := response.GetConfig().MarshalJSON() @@ -885,25 +926,42 @@ func connectorResponseToModel(spaceID string, properties connectors.ConnectorRes // } // return &connector, nil - // case *connectors.ConnectorResponsePropertiesEmail: - // config, err := json.Marshal(response.GetConfig()) - // if err != nil { - // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesEmail - [%w]", err) - // } - // // return responseToConnector(response, config, spaceID), nil - // connector := models.KibanaActionConnector{ - // ConnectorID: response.GetId(), - // SpaceID: spaceID, - // Name: response.GetName(), - // ConnectorTypeID: response.GetConnectorTypeId(), - // IsDeprecated: response.GetIsDeprecated(), - // IsMissingSecrets: response.GetIsMissingSecrets(), - // IsPreconfigured: response.GetIsPreconfigured(), - // ConfigJSON: string(config), - // } - // return &connector, nil + case connectors.ConnectorTypesDotEmail: + resp, err := properties.AsConnectorResponsePropertiesEmail() + if err != nil { + return nil, err + } + + config, err := json.Marshal(resp.Config) + if err != nil { + return nil, fmt.Errorf("unable to marshal config: %w", err) + } + + isDeprecated := false + isMissingSecrets := false - case string(connectors.ConnectorTypesDotIndex): + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets + } + + connector := models.KibanaActionConnector{ + ConnectorID: resp.Id, + SpaceID: spaceID, + Name: resp.Name, + ConnectorTypeID: discriminator, + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, + IsPreconfigured: bool(resp.IsPreconfigured), + ConfigJSON: string(config), + } + + return &connector, nil + + case connectors.ConnectorTypesDotIndex: resp, err := properties.AsConnectorResponsePropertiesIndex() if err != nil { return nil, err @@ -929,7 +987,7 @@ func connectorResponseToModel(spaceID string, properties connectors.ConnectorRes ConnectorID: resp.Id, SpaceID: spaceID, Name: resp.Name, - ConnectorTypeID: string(connectors.ConnectorTypesDotIndex), + ConnectorTypeID: discriminator, IsDeprecated: isDeprecated, IsMissingSecrets: isMissingSecrets, IsPreconfigured: bool(resp.IsPreconfigured), @@ -1181,7 +1239,7 @@ func connectorResponseToModel(spaceID string, properties connectors.ConnectorRes // return &connector, nil } - return nil, fmt.Errorf("unknown connector type [%+v]", properties) + return nil, fmt.Errorf("unknown connector type [%s]", discriminator) } // func responseToConnector[T responseType](response T, config []byte, spaceID string) *models.KibanaActionConnector { From 5c80f4c6f1d57206d06c9845ab8c434084e81d51 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Mon, 8 May 2023 12:39:30 +0200 Subject: [PATCH 20/59] remove commented out code from bundled.yaml --- generated/connectors/bundled.yaml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/generated/connectors/bundled.yaml b/generated/connectors/bundled.yaml index 0a3294cec..4a6a2ef5a 100644 --- a/generated/connectors/bundled.yaml +++ b/generated/connectors/bundled.yaml @@ -268,7 +268,6 @@ paths: required: - connector_type_id - id - # - is_deprecated - is_preconfigured - name - referenced_by_count @@ -1724,7 +1723,6 @@ components: - config - connector_type_id - id - # - is_deprecated - is_preconfigured - name properties: @@ -1754,7 +1752,6 @@ components: - config - connector_type_id - id - # - is_deprecated - is_preconfigured - name properties: @@ -1784,7 +1781,6 @@ components: - config - connector_type_id - id - # - is_deprecated - is_preconfigured - name properties: @@ -1814,7 +1810,6 @@ components: - config - connector_type_id - id - # - is_deprecated - is_preconfigured - name properties: @@ -1844,7 +1839,6 @@ components: - config - connector_type_id - id - # - is_deprecated - is_preconfigured - name properties: @@ -1874,7 +1868,6 @@ components: - config - connector_type_id - id - # - is_deprecated - is_preconfigured - name properties: @@ -1904,7 +1897,6 @@ components: - config - connector_type_id - id - # - is_deprecated - is_preconfigured - name properties: @@ -1934,7 +1926,6 @@ components: - config - connector_type_id - id - # - is_deprecated - is_preconfigured - name properties: @@ -1965,7 +1956,6 @@ components: - config - connector_type_id - id - # - is_deprecated - is_preconfigured - name properties: @@ -1995,7 +1985,6 @@ components: - config - connector_type_id - id - # - is_deprecated - is_preconfigured - name properties: @@ -2025,7 +2014,6 @@ components: - config - connector_type_id - id - # - is_deprecated - is_preconfigured - name properties: @@ -2054,7 +2042,6 @@ components: required: - connector_type_id - id - # - is_deprecated - is_preconfigured - name properties: @@ -2082,7 +2069,6 @@ components: - config - connector_type_id - id - # - is_deprecated - is_preconfigured - name properties: @@ -2111,7 +2097,6 @@ components: required: - connector_type_id - id - # - is_deprecated - is_preconfigured - name properties: @@ -2139,7 +2124,6 @@ components: - config - connector_type_id - id - # - is_deprecated - is_preconfigured - name properties: @@ -2169,7 +2153,6 @@ components: - config - connector_type_id - id - # - is_deprecated - is_preconfigured - name properties: @@ -2199,7 +2182,6 @@ components: - config - connector_type_id - id - # - is_deprecated - is_preconfigured - name properties: From 24b169079f743fb20b0e32287360dd25e3525839 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Mon, 8 May 2023 17:49:18 +0200 Subject: [PATCH 21/59] email connector --- generated/connectors/bundled.yaml | 30 +++++++++++++++- generated/connectors/connectors.gen.go | 12 ++++++- internal/clients/kibana/connector.go | 50 +++++++++++++------------- internal/kibana/connector.go | 33 +++++++++++------ 4 files changed, 89 insertions(+), 36 deletions(-) diff --git a/generated/connectors/bundled.yaml b/generated/connectors/bundled.yaml index 4a6a2ef5a..a2bb9334d 100644 --- a/generated/connectors/bundled.yaml +++ b/generated/connectors/bundled.yaml @@ -906,7 +906,35 @@ components: title: Connector request properties for an email connector description: Defines properties for connectors when type is `.email`. type: object - additionalProperties: true + properties: + from: + type: string + host: + type: string + port: + type: integer + clientId: + type: string + nullable: true + default: null + hasAuth: + type: boolean + default: true + oauthTokenUrl: + type: string + nullable: true + default: null + secure: + type: boolean + nullable: true + default: null + service: + type: string + default: other + tenantId: + type: string + nullable: true + default: null secrets_properties_email: title: Connector secrets properties for an email connector description: Defines secrets for connectors when type is `.email`. diff --git a/generated/connectors/connectors.gen.go b/generated/connectors/connectors.gen.go index 178f81f0c..81e4c4c8b 100644 --- a/generated/connectors/connectors.gen.go +++ b/generated/connectors/connectors.gen.go @@ -474,7 +474,17 @@ type ConfigPropertiesCasesWebhookCreateIncidentMethod string type ConfigPropertiesCasesWebhookUpdateIncidentMethod string // ConfigPropertiesEmail Defines properties for connectors when type is `.email`. -type ConfigPropertiesEmail map[string]interface{} +type ConfigPropertiesEmail struct { + ClientId *string `json:"clientId"` + From *string `json:"from,omitempty"` + HasAuth *bool `json:"hasAuth,omitempty"` + Host *string `json:"host,omitempty"` + OauthTokenUrl *string `json:"oauthTokenUrl"` + Port *int `json:"port,omitempty"` + Secure *bool `json:"secure"` + Service *string `json:"service,omitempty"` + TenantId *string `json:"tenantId"` +} // ConfigPropertiesIndex Defines properties for connectors when type is `.index`. type ConfigPropertiesIndex struct { diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index f1e3f5190..6680bf1ff 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -7,6 +7,8 @@ import ( "fmt" "io" + // "github.com/google/go-cmp/cmp" + "github.com/elastic/terraform-provider-elasticstack/generated/connectors" "github.com/elastic/terraform-provider-elasticstack/internal/clients" "github.com/elastic/terraform-provider-elasticstack/internal/models" @@ -179,50 +181,50 @@ func DeleteConnector(ctx context.Context, apiClient *clients.ApiClient, connecto // backend returns a config that explicitly specifies all default values // function returns config where default values are copied from backend response, // if they are omitted in TF configuration -func ConnectorConfigWithDefaults(connectorTypeID, njs, ojs string) (string, error) { +func ConnectorConfigWithDefaults(connectorTypeID, proposed, backend, local string) (string, error) { switch connectors.ConnectorTypes(connectorTypeID) { case connectors.ConnectorTypesDotEmail: - return connectorEmailConfigWithDefaults(njs, ojs) + return connectorEmailConfigWithDefaults(proposed) case connectors.ConnectorTypesDotIndex: - return connectorIndexConfigWithDefaults(njs, ojs) + return connectorIndexConfigWithDefaults(proposed) } - return njs, nil + return proposed, nil } -func connectorEmailConfigWithDefaults(njs, ojs string) (string, error) { - var cfgNew connectors.ConfigPropertiesIndex - if err := json.Unmarshal([]byte(njs), &cfgNew); err != nil { +func connectorEmailConfigWithDefaults(proposed string) (string, error) { + var custom connectors.ConfigPropertiesEmail + if err := json.Unmarshal([]byte(proposed), &custom); err != nil { return "", err } - var cfgOld connectors.ConfigPropertiesIndex - if err := json.Unmarshal([]byte(ojs), &cfgOld); err != nil { - return "", err + if custom.HasAuth == nil { + custom.HasAuth = new(bool) + *custom.HasAuth = true + } + if custom.Service == nil { + custom.Service = new(string) + *custom.Service = "other" } - njs2, err := json.Marshal(cfgNew) + customJSON, err := json.Marshal(custom) if err != nil { return "", err } - return string(njs2), nil + return string(customJSON), nil } -func connectorIndexConfigWithDefaults(njs, ojs string) (string, error) { - var cfgNew connectors.ConfigPropertiesIndex - if err := json.Unmarshal([]byte(njs), &cfgNew); err != nil { - return "", err - } - var cfgOld connectors.ConfigPropertiesIndex - if err := json.Unmarshal([]byte(ojs), &cfgOld); err != nil { +func connectorIndexConfigWithDefaults(proposed string) (string, error) { + var custom connectors.ConfigPropertiesIndex + if err := json.Unmarshal([]byte(proposed), &custom); err != nil { return "", err } - if cfgNew.Refresh == nil && cfgOld.Refresh != nil { - cfgNew.Refresh = new(bool) - *cfgNew.Refresh = *cfgOld.Refresh + if custom.Refresh == nil { + custom.Refresh = new(bool) + *custom.Refresh = false } - njs2, err := json.Marshal(cfgNew) + customJSON, err := json.Marshal(custom) if err != nil { return "", err } - return string(njs2), nil + return string(customJSON), nil } func createConnectorRequestBody(connector models.KibanaActionConnector) (io.Reader, error) { diff --git a/internal/kibana/connector.go b/internal/kibana/connector.go index 0169799b3..a151b461c 100644 --- a/internal/kibana/connector.go +++ b/internal/kibana/connector.go @@ -91,23 +91,36 @@ func connectorCustomizeDiff(ctx context.Context, rd *schema.ResourceDiff, in int if !rd.HasChange("config") { return nil } - o, n := rd.GetChange("config") - ojs := o.(string) - njs := n.(string) - if ojs == njs { + oldVal, newVal := rd.GetChange("config") + oldJSON := oldVal.(string) + newJSON := newVal.(string) + if oldJSON == newJSON { return nil } - o, n = rd.GetChange("connector_type_id") - otid := o.(string) - ntid := n.(string) - if otid != ntid { + oldVal, newVal = rd.GetChange("connector_type_id") + oldTypeID := oldVal.(string) + newTypeID := newVal.(string) + if oldTypeID != newTypeID { return nil } - njs2, err := kibana.ConnectorConfigWithDefaults(otid, njs, ojs) + + rawState := rd.GetRawState() + if !rawState.IsKnown() || rawState.IsNull() { + return nil + } + + state := rawState.GetAttr("config") + if !state.IsKnown() || state.IsNull() { + return nil + } + + stateJSON := state.AsString() + + customJSON, err := kibana.ConnectorConfigWithDefaults(oldTypeID, newJSON, oldJSON, stateJSON) if err != nil { return err } - return rd.SetNew("config", string(njs2)) + return rd.SetNew("config", string(customJSON)) } func resourceConnectorCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { From a58626f1dd747293587ebd463477d85dc1b08bff Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Mon, 8 May 2023 18:17:45 +0200 Subject: [PATCH 22/59] remove obsolete comment --- internal/clients/kibana/connector.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index 6680bf1ff..aebe94570 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -176,11 +176,6 @@ func DeleteConnector(ctx context.Context, apiClient *clients.ApiClient, connecto return nil } -// njs - connector config's JSON from TF configuration -// ojs - connector config's JSON that returned by backend -// backend returns a config that explicitly specifies all default values -// function returns config where default values are copied from backend response, -// if they are omitted in TF configuration func ConnectorConfigWithDefaults(connectorTypeID, proposed, backend, local string) (string, error) { switch connectors.ConnectorTypes(connectorTypeID) { case connectors.ConnectorTypesDotEmail: From 14377422e31cfd33777ac66769b8c6fbed8494b7 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Mon, 8 May 2023 19:01:22 +0200 Subject: [PATCH 23/59] update for the remaining connector types --- generated/connectors/bundled.yaml | 127 ++++++- generated/connectors/connectors.gen.go | 78 ++++ internal/clients/kibana/connector.go | 478 +++++++++++++++++-------- 3 files changed, 526 insertions(+), 157 deletions(-) diff --git a/generated/connectors/bundled.yaml b/generated/connectors/bundled.yaml index a2bb9334d..ba40300f9 100644 --- a/generated/connectors/bundled.yaml +++ b/generated/connectors/bundled.yaml @@ -207,11 +207,18 @@ paths: - $ref: '#/components/schemas/update_connector_request_index' - $ref: '#/components/schemas/update_connector_request_jira' - $ref: '#/components/schemas/update_connector_request_opsgenie' + - $ref: '#/components/schemas/update_connector_request_pagerduty' - $ref: '#/components/schemas/update_connector_request_resilient' - $ref: '#/components/schemas/update_connector_request_serverlog' - $ref: '#/components/schemas/update_connector_request_servicenow' - $ref: '#/components/schemas/update_connector_request_servicenow_itom' + - $ref: '#/components/schemas/update_connector_request_servicenow_sir' + - $ref: '#/components/schemas/update_connector_request_slack' - $ref: '#/components/schemas/update_connector_request_swimlane' + - $ref: '#/components/schemas/update_connector_request_teams' + - $ref: '#/components/schemas/update_connector_request_tines' + - $ref: '#/components/schemas/update_connector_request_webhook' + - $ref: '#/components/schemas/update_connector_request_xmatters' examples: updateIndexConnectorRequest: $ref: '#/components/examples/update_index_connector_request' @@ -2346,6 +2353,24 @@ components: description: The display name for the connector. secrets: $ref: '#/components/schemas/secrets_properties_opsgenie' + update_connector_request_pagerduty: + title: Update PagerDuty connector request + description: | + The PagerDuty connector uses the v2 Events API to trigger, acknowledge, and resolve PagerDuty alerts. + type: object + required: + - config + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_pagerduty' + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_pagerduty' update_connector_request_resilient: title: Update IBM Resilient connector request type: object @@ -2386,7 +2411,7 @@ components: secrets: $ref: '#/components/schemas/secrets_properties_servicenow' update_connector_request_servicenow_itom: - title: Create ServiceNow ITOM connector request + title: Update ServiceNow ITOM connector request type: object required: - config @@ -2400,6 +2425,38 @@ components: description: The display name for the connector. secrets: $ref: '#/components/schemas/secrets_properties_servicenow' + update_connector_request_servicenow_sir: + title: Update ServiceNow SecOps connector request + description: | + The ServiceNow SecOps connector uses the import set API to create ServiceNow security incidents. You can use the connector for rule actions and cases. + type: object + required: + - config + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_servicenow' + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_servicenow' + update_connector_request_slack: + title: Update Slack connector request + description: The Slack connector uses Slack Incoming Webhooks. + type: object + required: + - name + - secrets + properties: + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_slack' update_connector_request_swimlane: title: Update Swimlane connector request type: object @@ -2416,6 +2473,74 @@ components: example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_swimlane' + update_connector_request_teams: + title: Update Microsoft Teams connector request + description: The Microsoft Teams connector uses Incoming Webhooks. + type: object + required: + - name + - secrets + properties: + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_teams' + update_connector_request_tines: + title: Update Tines connector request + description: | + The Tines connector uses Tines Webhook actions to send events via POST request. + type: object + required: + - config + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_tines' + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_tines' + update_connector_request_webhook: + title: Update Webhook connector request + description: | + The Webhook connector uses axios to send a POST or PUT request to a web service. + type: object + required: + - config + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_webhook' + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_webhook' + update_connector_request_xmatters: + title: Update xMatters connector request + description: | + The xMatters connector uses the xMatters Workflow for Elastic to send actionable alerts to on-call xMatters resources. + type: object + required: + - config + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_xmatters' + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_xmatters' connector_types: title: Connector types type: string diff --git a/generated/connectors/connectors.gen.go b/generated/connectors/connectors.gen.go index 81e4c4c8b..938c7ef8c 100644 --- a/generated/connectors/connectors.gen.go +++ b/generated/connectors/connectors.gen.go @@ -2028,6 +2028,18 @@ type UpdateConnectorRequestOpsgenie struct { Secrets SecretsPropertiesOpsgenie `json:"secrets"` } +// UpdateConnectorRequestPagerduty The PagerDuty connector uses the v2 Events API to trigger, acknowledge, and resolve PagerDuty alerts. +type UpdateConnectorRequestPagerduty struct { + // Config Defines properties for connectors when type is `.pagerduty`. + Config ConfigPropertiesPagerduty `json:"config"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.pagerduty`. + Secrets SecretsPropertiesPagerduty `json:"secrets"` +} + // UpdateConnectorRequestResilient defines model for update_connector_request_resilient. type UpdateConnectorRequestResilient struct { // Config Defines properties for connectors when type is `.resilient`. @@ -2070,6 +2082,27 @@ type UpdateConnectorRequestServicenowItom struct { Secrets SecretsPropertiesServicenow `json:"secrets"` } +// UpdateConnectorRequestServicenowSir The ServiceNow SecOps connector uses the import set API to create ServiceNow security incidents. You can use the connector for rule actions and cases. +type UpdateConnectorRequestServicenowSir struct { + // Config Defines properties for connectors when type is `.servicenow`. + Config ConfigPropertiesServicenow `json:"config"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `.servicenow-itom`. + Secrets SecretsPropertiesServicenow `json:"secrets"` +} + +// UpdateConnectorRequestSlack The Slack connector uses Slack Incoming Webhooks. +type UpdateConnectorRequestSlack struct { + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.slack`. + Secrets SecretsPropertiesSlack `json:"secrets"` +} + // UpdateConnectorRequestSwimlane defines model for update_connector_request_swimlane. type UpdateConnectorRequestSwimlane struct { // Config Defines properties for connectors when type is `.swimlane`. @@ -2082,6 +2115,51 @@ type UpdateConnectorRequestSwimlane struct { Secrets SecretsPropertiesSwimlane `json:"secrets"` } +// UpdateConnectorRequestTeams The Microsoft Teams connector uses Incoming Webhooks. +type UpdateConnectorRequestTeams struct { + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.teams`. + Secrets SecretsPropertiesTeams `json:"secrets"` +} + +// UpdateConnectorRequestTines The Tines connector uses Tines Webhook actions to send events via POST request. +type UpdateConnectorRequestTines struct { + // Config Defines properties for connectors when type is `.tines`. + Config ConfigPropertiesTines `json:"config"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.tines`. + Secrets SecretsPropertiesTines `json:"secrets"` +} + +// UpdateConnectorRequestWebhook The Webhook connector uses axios to send a POST or PUT request to a web service. +type UpdateConnectorRequestWebhook struct { + // Config Defines properties for connectors when type is `.webhook`. + Config ConfigPropertiesWebhook `json:"config"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.webhook`. + Secrets SecretsPropertiesWebhook `json:"secrets"` +} + +// UpdateConnectorRequestXmatters The xMatters connector uses the xMatters Workflow for Elastic to send actionable alerts to on-call xMatters resources. +type UpdateConnectorRequestXmatters struct { + // Config Defines properties for connectors when type is `.xmatters`. + Config ConfigPropertiesXmatters `json:"config"` + + // Name The display name for the connector. + Name string `json:"name"` + + // Secrets Defines secrets for connectors when type is `.xmatters`. + Secrets SecretsPropertiesXmatters `json:"secrets"` +} + // ActionId defines model for action_id. type ActionId = string diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index aebe94570..6f4a299d0 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -265,40 +265,40 @@ func createConnectorRequestBody(connector models.KibanaActionConnector) (io.Read func updateConnectorRequestBody(connector models.KibanaActionConnector) (io.Reader, error) { switch connectors.ConnectorTypes(connector.ConnectorTypeID) { - // case connectors.CASES_WEBHOOK: - // return updateConnectorRequestCasesWebhook(connector) + case connectors.ConnectorTypesDotCasesWebhook: + return updateConnectorRequestCasesWebhook(connector) case connectors.ConnectorTypesDotEmail: return updateConnectorRequestEmail(connector) case connectors.ConnectorTypesDotIndex: return updateConnectorRequestIndex(connector) - // case connectors.JIRA: - // return updateConnectorRequestJira(connector) - // case connectors.OPSGENIE: - // return updateConnectorRequestOpsgenie(connector) - // case connectors.PAGERDUTY: - // return updateConnectorRequestPagerduty(connector) - // case connectors.RESILIENT: - // return updateConnectorRequestResilient(connector) - // case connectors.SERVICENOW: - // return updateConnectorRequestServicenow(connector) - // case connectors.SERVICENOW_ITOM: - // return updateConnectorRequestServicenowItom(connector) - // case connectors.SERVICENOW_SIR: - // return updateConnectorRequestServicenowSir(connector) - // case connectors.SERVER_LOG: - // return updateConnectorRequestServerLog(connector) - // case connectors.SLACK: - // return updateConnectorRequestSlack(connector) - // case connectors.SWIMLANE: - // return updateConnectorRequestSwimlane(connector) - // case connectors.TEAMS: - // return updateConnectorRequestTeams(connector) - // case connectors.TINES: - // return updateConnectorRequestTines(connector) - // case connectors.WEBHOOK: - // return updateConnectorRequestWebhook(connector) - // case connectors.XMATTERS: - // return updateConnectorRequestXmatters(connector) + case connectors.ConnectorTypesDotJira: + return updateConnectorRequestJira(connector) + case connectors.ConnectorTypesDotOpsgenie: + return updateConnectorRequestOpsgenie(connector) + case connectors.ConnectorTypesDotPagerduty: + return updateConnectorRequestPagerduty(connector) + case connectors.ConnectorTypesDotResilient: + return updateConnectorRequestResilient(connector) + case connectors.ConnectorTypesDotServicenow: + return updateConnectorRequestServicenow(connector) + case connectors.ConnectorTypesDotServicenowItom: + return updateConnectorRequestServicenowItom(connector) + case connectors.ConnectorTypesDotServicenowSir: + return updateConnectorRequestServicenowSir(connector) + case connectors.ConnectorTypesDotServerLog: + return updateConnectorRequestServerlog(connector) + case connectors.ConnectorTypesDotSlack: + return updateConnectorRequestSlack(connector) + case connectors.ConnectorTypesDotSwimlane: + return updateConnectorRequestSwimlane(connector) + case connectors.ConnectorTypesDotTeams: + return updateConnectorRequestTeams(connector) + case connectors.ConnectorTypesDotTines: + return updateConnectorRequestTines(connector) + case connectors.ConnectorTypesDotWebhook: + return updateConnectorRequestWebhook(connector) + case connectors.ConnectorTypesDotXmatters: + return updateConnectorRequestXmatters(connector) } return nil, fmt.Errorf("unknown connector type [%s]", connector.ConnectorTypeID) @@ -692,28 +692,28 @@ func createConnectorRequestXmatters(connector models.KibanaActionConnector) (io. return bytes.NewReader(bt), nil } -// func updateConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (connectors.UpdateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose update connector request for CasesWebhook" +func updateConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create CasesWebhook connector request" -// nullableConfig := connectors.NullableConfigPropertiesCasesWebhook{} -// if err := nullableConfig.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } + request := connectors.UpdateConnectorRequestCasesWebhook{ + Name: connector.Name, + } -// nullableSecrets := connectors.NullableSecretsPropertiesCasesWebhook{} -// if err := nullableSecrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } -// return connectors.UpdateConnectorRequestBodyProperties { -// connectors.UpdateConnectorRequestCasesWebhook{ -// Name: connector.Name, -// Config: *nullableConfig.Get(), -// Secrets: nullableSecrets.Get(), -// } + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } -// return connectors.UpdateConnectorRequestCasesWebhookAsUpdateConnectorRequestBodyProperties(&c), nil -// } + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } + + return bytes.NewReader(bt), nil +} func updateConnectorRequestEmail(connector models.KibanaActionConnector) (io.Reader, error) { prefixError := "failed to create Email connector request" @@ -757,145 +757,311 @@ func updateConnectorRequestIndex(connector models.KibanaActionConnector) (io.Rea return bytes.NewReader(bt), nil } -// func updateConnectorRequestJira(connector models.KibanaActionConnector) (connectors.UpdateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose update connector request for Jira" +func updateConnectorRequestJira(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create Jira connector request" -// config := connectors.NullableConfigPropertiesJira{} -// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } + request := connectors.UpdateConnectorRequestJira{ + Name: connector.Name, + } -// secrets := connectors.NullableSecretsPropertiesJira{} -// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } -// c := connectors.UpdateConnectorRequestJira{ -// Name: connector.Name, -// Config: *config.Get(), -// Secrets: *secrets.Get(), -// } + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } -// return connectors.UpdateConnectorRequestJiraAsUpdateConnectorRequestBodyProperties(&c), nil -// } + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } -// func updateConnectorRequestOpsgenie(connector models.KibanaActionConnector) (connectors.UpdateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose update connector request for Opsgenie" + return bytes.NewReader(bt), nil +} -// config := connectors.NullableConfigPropertiesOpsgenie{} -// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } +func updateConnectorRequestOpsgenie(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create Opsgenie connector request" -// secrets := connectors.NullableSecretsPropertiesOpsgenie{} -// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } + request := connectors.UpdateConnectorRequestOpsgenie{ + Name: connector.Name, + } -// c := connectors.UpdateConnectorRequestOpsgenie{ -// Name: connector.Name, -// Config: *config.Get(), -// Secrets: *secrets.Get(), -// } + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } -// return connectors.UpdateConnectorRequestOpsgenieAsUpdateConnectorRequestBodyProperties(&c), nil -// } + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } -// func updateConnectorRequestResilient(connector models.KibanaActionConnector) (connectors.UpdateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose update connector request for Resilient" + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } -// config := connectors.NullableConfigPropertiesResilient{} -// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } + return bytes.NewReader(bt), nil +} -// secrets := connectors.NullableSecretsPropertiesResilient{} -// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } +func updateConnectorRequestPagerduty(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create Pagerduty connector request" -// c := connectors.UpdateConnectorRequestResilient{ -// Name: connector.Name, -// Config: *config.Get(), -// Secrets: *secrets.Get(), -// } + request := connectors.UpdateConnectorRequestPagerduty{ + Name: connector.Name, + } -// return connectors.UpdateConnectorRequestResilientAsUpdateConnectorRequestBodyProperties(&c), nil -// } + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } -// func updateConnectorRequestServicenow(connector models.KibanaActionConnector) (connectors.UpdateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose update connector request for Servicenow" + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } -// config := connectors.NullableConfigPropertiesServicenow{} -// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } -// secrets := connectors.NullableSecretsPropertiesServicenow{} -// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } + return bytes.NewReader(bt), nil +} -// c := connectors.UpdateConnectorRequestServicenow{ -// Name: connector.Name, -// Config: *config.Get(), -// Secrets: *secrets.Get(), -// } +func updateConnectorRequestResilient(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create Resilient connector request" -// return connectors.UpdateConnectorRequestServicenowAsUpdateConnectorRequestBodyProperties(&c), nil -// } + request := connectors.UpdateConnectorRequestResilient{ + Name: connector.Name, + } -// func updateConnectorRequestServicenowItom(connector models.KibanaActionConnector) (connectors.UpdateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose update connector request for ServicenowItom" + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } -// config := connectors.NullableConfigPropertiesServicenowItom{} -// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } -// secrets := connectors.NullableSecretsPropertiesServicenow{} -// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } -// c := connectors.UpdateConnectorRequestServicenowItom{ -// Name: connector.Name, -// Config: *config.Get(), -// Secrets: *secrets.Get(), -// } + return bytes.NewReader(bt), nil +} -// return connectors.UpdateConnectorRequestServicenowItomAsUpdateConnectorRequestBodyProperties(&c), nil -// } +func updateConnectorRequestServicenow(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create Servicenow connector request" -// func updateConnectorRequestServerLog(connector models.KibanaActionConnector) (connectors.UpdateConnectorRequestBodyProperties, error) { -// c := connectors.UpdateConnectorRequestServerlog{ -// Name: connector.Name, -// } + request := connectors.UpdateConnectorRequestServicenow{ + Name: connector.Name, + } -// return connectors.UpdateConnectorRequestServerlogAsUpdateConnectorRequestBodyProperties(&c), nil -// } + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } -// func updateConnectorRequestSwimlane(connector models.KibanaActionConnector) (connectors.UpdateConnectorRequestBodyProperties, error) { -// prefixError := "failed to compose update connector request for Swimlane" + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } -// config := connectors.NullableConfigPropertiesSwimlane{} -// if err := config.UnmarshalJSON([]byte(connector.ConfigJSON)); err != nil { -// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [config] - %w", prefixError, err) -// } + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } -// secrets := connectors.NullableSecretsPropertiesSwimlane{} -// if err := secrets.UnmarshalJSON([]byte(connector.SecretsJSON)); err != nil { -// return connectors.UpdateConnectorRequestBodyProperties{}, fmt.Errorf("%s - failed to unmarshal [secrets]: %w", prefixError, err) -// } + return bytes.NewReader(bt), nil +} -// c := connectors.UpdateConnectorRequestSwimlane{ -// Name: connector.Name, -// Config: *config.Get(), -// Secrets: *secrets.Get(), -// } +func updateConnectorRequestServicenowItom(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create ServicenowItom connector request" -// return connectors.UpdateConnectorRequestSwimlaneAsUpdateConnectorRequestBodyProperties(&c), nil -// } + request := connectors.UpdateConnectorRequestServicenowItom{ + Name: connector.Name, + } + + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } + + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } + + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } + + return bytes.NewReader(bt), nil +} + +func updateConnectorRequestServicenowSir(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create ServicenowSir connector request" + + request := connectors.UpdateConnectorRequestServicenowSir{ + Name: connector.Name, + } + + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } + + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } + + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } + + return bytes.NewReader(bt), nil +} + +func updateConnectorRequestServerlog(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create Serverlog connector request" + + request := connectors.UpdateConnectorRequestServerlog{ + Name: connector.Name, + } + + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } + + return bytes.NewReader(bt), nil +} + +func updateConnectorRequestSlack(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create Slack connector request" + + request := connectors.UpdateConnectorRequestSlack{ + Name: connector.Name, + } + + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } + + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } + + return bytes.NewReader(bt), nil +} + +func updateConnectorRequestSwimlane(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create Swimlane connector request" + + request := connectors.UpdateConnectorRequestSwimlane{ + Name: connector.Name, + } + + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } + + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } + + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } + + return bytes.NewReader(bt), nil +} + +func updateConnectorRequestTeams(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create Teams connector request" + + request := connectors.UpdateConnectorRequestTeams{ + Name: connector.Name, + } + + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } + + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } + + return bytes.NewReader(bt), nil +} + +func updateConnectorRequestTines(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create Tines connector request" + + request := connectors.UpdateConnectorRequestTines{ + Name: connector.Name, + } + + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } + + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } + + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } + + return bytes.NewReader(bt), nil +} + +func updateConnectorRequestWebhook(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create Webhook connector request" + + request := connectors.UpdateConnectorRequestWebhook{ + Name: connector.Name, + } + + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } + + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } + + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } + + return bytes.NewReader(bt), nil +} + +func updateConnectorRequestXmatters(connector models.KibanaActionConnector) (io.Reader, error) { + prefixError := "failed to create Xmatters connector request" + + request := connectors.UpdateConnectorRequestXmatters{ + Name: connector.Name, + } + + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } + + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } + + bt, err := json.Marshal(request) + if err != nil { + return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + } + + return bytes.NewReader(bt), nil +} func connectorResponseToModel(spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { discriminator, err := properties.Discriminator() From dae146e45a47b8b2a4535ec58295b78915128ac9 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Tue, 9 May 2023 14:45:37 +0200 Subject: [PATCH 24/59] response => model and config defaults (WIP) --- internal/clients/kibana/connector.go | 1214 ++++++++++++++++++-------- 1 file changed, 857 insertions(+), 357 deletions(-) diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index 6f4a299d0..939b88f1e 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -176,19 +176,94 @@ func DeleteConnector(ctx context.Context, apiClient *clients.ApiClient, connecto return nil } -func ConnectorConfigWithDefaults(connectorTypeID, proposed, backend, local string) (string, error) { +func ConnectorConfigWithDefaults(connectorTypeID, plan, backend, state string) (string, error) { switch connectors.ConnectorTypes(connectorTypeID) { + + case connectors.ConnectorTypesDotCasesWebhook: + return connectorConfigWithDefaultsCasesWebhook(plan) + case connectors.ConnectorTypesDotEmail: - return connectorEmailConfigWithDefaults(proposed) + return connectorConfigWithDefaultsEmail(plan) + case connectors.ConnectorTypesDotIndex: - return connectorIndexConfigWithDefaults(proposed) + return connectorConfigWithDefaultsIndex(plan) + + case connectors.ConnectorTypesDotJira: + return connectorConfigWithDefaultsJira(plan) + + case connectors.ConnectorTypesDotOpsgenie: + return connectorConfigWithDefaultsOpsgenie(plan) + + case connectors.ConnectorTypesDotPagerduty: + return connectorConfigWithDefaultsPagerduty(plan) + + case connectors.ConnectorTypesDotResilient: + return connectorConfigWithDefaultsResilient(plan) + + case connectors.ConnectorTypesDotServicenow: + return connectorConfigWithDefaultsServicenow(plan) + + case connectors.ConnectorTypesDotServicenowItom: + return connectorConfigWithDefaultsServicenowItom(plan) + + case connectors.ConnectorTypesDotServicenowSir: + return connectorConfigWithDefaultsServicenowSir(plan) + + case connectors.ConnectorTypesDotServerLog: + return connectorConfigWithDefaultsServerLog(plan) + + case connectors.ConnectorTypesDotSlack: + return connectorConfigWithDefaultsSlack(plan) + + case connectors.ConnectorTypesDotSwimlane: + return connectorConfigWithDefaultsSwimlane(plan) + + case connectors.ConnectorTypesDotTeams: + return connectorConfigWithDefaultsTeams(plan) + + case connectors.ConnectorTypesDotTines: + return connectorConfigWithDefaultsTines(plan) + + case connectors.ConnectorTypesDotWebhook: + return connectorConfigWithDefaultsWebhook(plan) + + case connectors.ConnectorTypesDotXmatters: + return connectorConfigWithDefaultsXmatters(plan) + } + return plan, nil +} + +func connectorConfigWithDefaultsCasesWebhook(plan string) (string, error) { + var custom connectors.ConfigPropertiesCasesWebhook + if err := json.Unmarshal([]byte(plan), &custom); err != nil { + return "", err + } + if custom.CreateCommentMethod == nil { + custom.CreateCommentMethod = new(connectors.ConfigPropertiesCasesWebhookCreateCommentMethod) + *custom.CreateCommentMethod = connectors.ConfigPropertiesCasesWebhookCreateCommentMethodPut + } + if custom.CreateIncidentMethod == nil { + custom.CreateIncidentMethod = new(connectors.ConfigPropertiesCasesWebhookCreateIncidentMethod) + *custom.CreateIncidentMethod = connectors.ConfigPropertiesCasesWebhookCreateIncidentMethodPost + } + if custom.HasAuth == nil { + custom.HasAuth = new(bool) + *custom.HasAuth = true + } + if custom.UpdateIncidentMethod == nil { + custom.UpdateIncidentMethod = new(connectors.ConfigPropertiesCasesWebhookUpdateIncidentMethod) + *custom.UpdateIncidentMethod = connectors.Put + } + customJSON, err := json.Marshal(custom) + if err != nil { + return "", err } - return proposed, nil + return string(customJSON), nil } -func connectorEmailConfigWithDefaults(proposed string) (string, error) { +func connectorConfigWithDefaultsEmail(plan string) (string, error) { var custom connectors.ConfigPropertiesEmail - if err := json.Unmarshal([]byte(proposed), &custom); err != nil { + if err := json.Unmarshal([]byte(plan), &custom); err != nil { return "", err } if custom.HasAuth == nil { @@ -206,9 +281,9 @@ func connectorEmailConfigWithDefaults(proposed string) (string, error) { return string(customJSON), nil } -func connectorIndexConfigWithDefaults(proposed string) (string, error) { +func connectorConfigWithDefaultsIndex(plan string) (string, error) { var custom connectors.ConfigPropertiesIndex - if err := json.Unmarshal([]byte(proposed), &custom); err != nil { + if err := json.Unmarshal([]byte(plan), &custom); err != nil { return "", err } if custom.Refresh == nil { @@ -222,40 +297,151 @@ func connectorIndexConfigWithDefaults(proposed string) (string, error) { return string(customJSON), nil } +func connectorConfigWithDefaultsJira(plan string) (string, error) { + return plan, nil +} + +func connectorConfigWithDefaultsOpsgenie(plan string) (string, error) { + return plan, nil +} + +// TODO: implement config properties - it's `aditionalProperties: true` now +func connectorConfigWithDefaultsPagerduty(plan string) (string, error) { + return plan, nil +} + +func connectorConfigWithDefaultsResilient(plan string) (string, error) { + return plan, nil +} + +func connectorConfigWithDefaultsServicenow(plan string) (string, error) { + var custom connectors.ConfigPropertiesServicenow + if err := json.Unmarshal([]byte(plan), &custom); err != nil { + return "", err + } + if custom.IsOAuth == nil { + custom.IsOAuth = new(bool) + *custom.IsOAuth = false + } + if custom.UsesTableApi == nil { + custom.UsesTableApi = new(bool) + *custom.UsesTableApi = true + } + customJSON, err := json.Marshal(custom) + if err != nil { + return "", err + } + return string(customJSON), nil +} + +func connectorConfigWithDefaultsServicenowItom(plan string) (string, error) { + var custom connectors.ConfigPropertiesServicenowItom + if err := json.Unmarshal([]byte(plan), &custom); err != nil { + return "", err + } + if custom.IsOAuth == nil { + custom.IsOAuth = new(bool) + *custom.IsOAuth = false + } + customJSON, err := json.Marshal(custom) + if err != nil { + return "", err + } + return string(customJSON), nil +} + +func connectorConfigWithDefaultsServicenowSir(plan string) (string, error) { + return connectorConfigWithDefaultsServicenow(plan) +} + +// TODO: check +// there is no config +func connectorConfigWithDefaultsServerLog(plan string) (string, error) { + return plan, nil +} + +// TODO: check +// there is no config +func connectorConfigWithDefaultsSlack(plan string) (string, error) { + return plan, nil +} + +func connectorConfigWithDefaultsSwimlane(plan string) (string, error) { + return plan, nil +} + +// TODO: check +// there is no config +func connectorConfigWithDefaultsTeams(plan string) (string, error) { + return plan, nil +} + +// TODO: implement config properties - it's `aditionalProperties: true` now +func connectorConfigWithDefaultsTines(plan string) (string, error) { + return plan, nil +} + +// TODO: implement config properties - it's `aditionalProperties: true` now +func connectorConfigWithDefaultsWebhook(plan string) (string, error) { + return plan, nil +} + +// TODO: implement config properties - it's `aditionalProperties: true` now +func connectorConfigWithDefaultsXmatters(plan string) (string, error) { + return plan, nil +} + func createConnectorRequestBody(connector models.KibanaActionConnector) (io.Reader, error) { switch connectors.ConnectorTypes(connector.ConnectorTypeID) { + case connectors.ConnectorTypesDotCasesWebhook: return createConnectorRequestCasesWebhook(connector) + case connectors.ConnectorTypesDotEmail: return createConnectorRequestEmail(connector) + case connectors.ConnectorTypesDotIndex: return createConnectorRequestIndex(connector) + case connectors.ConnectorTypesDotJira: return createConnectorRequestJira(connector) + case connectors.ConnectorTypesDotOpsgenie: return createConnectorRequestOpsgenie(connector) + case connectors.ConnectorTypesDotPagerduty: return createConnectorRequestPagerduty(connector) + case connectors.ConnectorTypesDotResilient: return createConnectorRequestResilient(connector) + case connectors.ConnectorTypesDotServicenow: return createConnectorRequestServicenow(connector) + case connectors.ConnectorTypesDotServicenowItom: return createConnectorRequestServicenowItom(connector) + case connectors.ConnectorTypesDotServicenowSir: return createConnectorRequestServicenowSir(connector) + case connectors.ConnectorTypesDotServerLog: return createConnectorRequestServerLog(connector) + case connectors.ConnectorTypesDotSlack: return createConnectorRequestSlack(connector) + case connectors.ConnectorTypesDotSwimlane: return createConnectorRequestSwimlane(connector) + case connectors.ConnectorTypesDotTeams: return createConnectorRequestTeams(connector) + case connectors.ConnectorTypesDotTines: return createConnectorRequestTines(connector) + case connectors.ConnectorTypesDotWebhook: return createConnectorRequestWebhook(connector) + case connectors.ConnectorTypesDotXmatters: return createConnectorRequestXmatters(connector) } @@ -265,38 +451,55 @@ func createConnectorRequestBody(connector models.KibanaActionConnector) (io.Read func updateConnectorRequestBody(connector models.KibanaActionConnector) (io.Reader, error) { switch connectors.ConnectorTypes(connector.ConnectorTypeID) { + case connectors.ConnectorTypesDotCasesWebhook: return updateConnectorRequestCasesWebhook(connector) + case connectors.ConnectorTypesDotEmail: return updateConnectorRequestEmail(connector) + case connectors.ConnectorTypesDotIndex: return updateConnectorRequestIndex(connector) + case connectors.ConnectorTypesDotJira: return updateConnectorRequestJira(connector) + case connectors.ConnectorTypesDotOpsgenie: return updateConnectorRequestOpsgenie(connector) + case connectors.ConnectorTypesDotPagerduty: return updateConnectorRequestPagerduty(connector) + case connectors.ConnectorTypesDotResilient: return updateConnectorRequestResilient(connector) + case connectors.ConnectorTypesDotServicenow: return updateConnectorRequestServicenow(connector) + case connectors.ConnectorTypesDotServicenowItom: return updateConnectorRequestServicenowItom(connector) + case connectors.ConnectorTypesDotServicenowSir: return updateConnectorRequestServicenowSir(connector) + case connectors.ConnectorTypesDotServerLog: return updateConnectorRequestServerlog(connector) + case connectors.ConnectorTypesDotSlack: return updateConnectorRequestSlack(connector) + case connectors.ConnectorTypesDotSwimlane: return updateConnectorRequestSwimlane(connector) + case connectors.ConnectorTypesDotTeams: return updateConnectorRequestTeams(connector) + case connectors.ConnectorTypesDotTines: return updateConnectorRequestTines(connector) + case connectors.ConnectorTypesDotWebhook: return updateConnectorRequestWebhook(connector) + case connectors.ConnectorTypesDotXmatters: return updateConnectorRequestXmatters(connector) } @@ -1068,363 +1271,660 @@ func connectorResponseToModel(spaceID string, properties connectors.ConnectorRes if err != nil { return nil, err } + switch connectors.ConnectorTypes(discriminator) { - // case connectors.CASES_WEBHOOK_ConnectorTypes: - // config, err := response.GetConfig().MarshalJSON() - // if err != nil { - // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - // } - // // return responseToConnector(response, config, spaceID), nil - - // connector := models.KibanaActionConnector{ - // ConnectorID: response.GetId(), - // SpaceID: spaceID, - // Name: response.GetName(), - // ConnectorTypeID: response.GetConnectorTypeId(), - // IsDeprecated: response.GetIsDeprecated(), - // IsMissingSecrets: response.GetIsMissingSecrets(), - // IsPreconfigured: response.GetIsPreconfigured(), - // ConfigJSON: string(config), - // } - // return &connector, nil + case connectors.ConnectorTypesDotCasesWebhook: + return connectorResponseToModelCasesWebhook(discriminator, spaceID, properties) case connectors.ConnectorTypesDotEmail: - resp, err := properties.AsConnectorResponsePropertiesEmail() - if err != nil { - return nil, err - } - - config, err := json.Marshal(resp.Config) - if err != nil { - return nil, fmt.Errorf("unable to marshal config: %w", err) - } - - isDeprecated := false - isMissingSecrets := false - - if resp.IsDeprecated != nil { - isDeprecated = *resp.IsDeprecated - } - - if resp.IsMissingSecrets != nil { - isMissingSecrets = *resp.IsMissingSecrets - } - - connector := models.KibanaActionConnector{ - ConnectorID: resp.Id, - SpaceID: spaceID, - Name: resp.Name, - ConnectorTypeID: discriminator, - IsDeprecated: isDeprecated, - IsMissingSecrets: isMissingSecrets, - IsPreconfigured: bool(resp.IsPreconfigured), - ConfigJSON: string(config), - } - - return &connector, nil + return connectorResponseToModelEmail(discriminator, spaceID, properties) case connectors.ConnectorTypesDotIndex: - resp, err := properties.AsConnectorResponsePropertiesIndex() - if err != nil { - return nil, err - } - - config, err := json.Marshal(resp.Config) - if err != nil { - return nil, fmt.Errorf("unable to marshal config: %w", err) - } - - isDeprecated := false - isMissingSecrets := false - - if resp.IsDeprecated != nil { - isDeprecated = *resp.IsDeprecated - } - - if resp.IsMissingSecrets != nil { - isMissingSecrets = *resp.IsMissingSecrets - } - - connector := models.KibanaActionConnector{ - ConnectorID: resp.Id, - SpaceID: spaceID, - Name: resp.Name, - ConnectorTypeID: discriminator, - IsDeprecated: isDeprecated, - IsMissingSecrets: isMissingSecrets, - IsPreconfigured: bool(resp.IsPreconfigured), - ConfigJSON: string(config), - } - - return &connector, nil - - // case *connectors.ConnectorResponsePropertiesJira: - // config, err := response.GetConfig().MarshalJSON() - // if err != nil { - // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - // } - // // return responseToConnector(response, config, spaceID), nil - // connector := models.KibanaActionConnector{ - // ConnectorID: response.GetId(), - // SpaceID: spaceID, - // Name: response.GetName(), - // ConnectorTypeID: response.GetConnectorTypeId(), - // IsDeprecated: response.GetIsDeprecated(), - // IsMissingSecrets: response.GetIsMissingSecrets(), - // IsPreconfigured: response.GetIsPreconfigured(), - // ConfigJSON: string(config), - // } - // return &connector, nil - - // case *connectors.ConnectorResponsePropertiesOpsgenie: - // config, err := response.GetConfig().MarshalJSON() - // if err != nil { - // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - // } - // // return responseToConnector(response, config, spaceID), nil - // connector := models.KibanaActionConnector{ - // ConnectorID: response.GetId(), - // SpaceID: spaceID, - // Name: response.GetName(), - // ConnectorTypeID: response.GetConnectorTypeId(), - // IsDeprecated: response.GetIsDeprecated(), - // IsMissingSecrets: response.GetIsMissingSecrets(), - // IsPreconfigured: response.GetIsPreconfigured(), - // ConfigJSON: string(config), - // } - // return &connector, nil - - // case *connectors.ConnectorResponsePropertiesPagerduty: - // config, err := json.Marshal(response.GetConfig()) - // if err != nil { - // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - // } - // // return responseToConnector(response, config, spaceID), nil - // connector := models.KibanaActionConnector{ - // ConnectorID: response.GetId(), - // SpaceID: spaceID, - // Name: response.GetName(), - // ConnectorTypeID: response.GetConnectorTypeId(), - // IsDeprecated: response.GetIsDeprecated(), - // IsMissingSecrets: response.GetIsMissingSecrets(), - // IsPreconfigured: response.GetIsPreconfigured(), - // ConfigJSON: string(config), - // } - // return &connector, nil - - // case *connectors.ConnectorResponsePropertiesResilient: - // config, err := response.GetConfig().MarshalJSON() - // if err != nil { - // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - // } - // // return responseToConnector(response, config, spaceID), nil - // connector := models.KibanaActionConnector{ - // ConnectorID: response.GetId(), - // SpaceID: spaceID, - // Name: response.GetName(), - // ConnectorTypeID: response.GetConnectorTypeId(), - // IsDeprecated: response.GetIsDeprecated(), - // IsMissingSecrets: response.GetIsMissingSecrets(), - // IsPreconfigured: response.GetIsPreconfigured(), - // ConfigJSON: string(config), - // } - // return &connector, nil - - // case *connectors.ConnectorResponsePropertiesServerlog: - // config, err := json.Marshal(response.GetConfig()) - // if err != nil { - // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - // } - // // return responseToConnector(response, config, spaceID), nil - // connector := models.KibanaActionConnector{ - // ConnectorID: response.GetId(), - // SpaceID: spaceID, - // Name: response.GetName(), - // ConnectorTypeID: response.GetConnectorTypeId(), - // IsDeprecated: response.GetIsDeprecated(), - // IsMissingSecrets: response.GetIsMissingSecrets(), - // IsPreconfigured: response.GetIsPreconfigured(), - // ConfigJSON: string(config), - // } - // return &connector, nil - - // case *connectors.ConnectorResponsePropertiesServicenow: - // config, err := response.GetConfig().MarshalJSON() - // if err != nil { - // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - // } - // // return responseToConnector(response, config, spaceID), nil - // connector := models.KibanaActionConnector{ - // ConnectorID: response.GetId(), - // SpaceID: spaceID, - // Name: response.GetName(), - // ConnectorTypeID: response.GetConnectorTypeId(), - // IsDeprecated: response.GetIsDeprecated(), - // IsMissingSecrets: response.GetIsMissingSecrets(), - // IsPreconfigured: response.GetIsPreconfigured(), - // ConfigJSON: string(config), - // } - // return &connector, nil - - // case *connectors.ConnectorResponsePropertiesServicenowItom: - // config, err := response.GetConfig().MarshalJSON() - // if err != nil { - // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - // } - // // return responseToConnector(response, config, spaceID), nil - // connector := models.KibanaActionConnector{ - // ConnectorID: response.GetId(), - // SpaceID: spaceID, - // Name: response.GetName(), - // ConnectorTypeID: response.GetConnectorTypeId(), - // IsDeprecated: response.GetIsDeprecated(), - // IsMissingSecrets: response.GetIsMissingSecrets(), - // IsPreconfigured: response.GetIsPreconfigured(), - // ConfigJSON: string(config), - // } - // return &connector, nil - - // case *connectors.ConnectorResponsePropertiesServicenowSir: - // config, err := response.GetConfig().MarshalJSON() - // if err != nil { - // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - // } - // // return responseToConnector(response, config, spaceID), nil - // connector := models.KibanaActionConnector{ - // ConnectorID: response.GetId(), - // SpaceID: spaceID, - // Name: response.GetName(), - // ConnectorTypeID: response.GetConnectorTypeId(), - // IsDeprecated: response.GetIsDeprecated(), - // IsMissingSecrets: response.GetIsMissingSecrets(), - // IsPreconfigured: response.GetIsPreconfigured(), - // ConfigJSON: string(config), - // } - // return &connector, nil - - // case *connectors.ConnectorResponsePropertiesSlack: - // // return responseToConnector(response, config, spaceID), nil - // connector := models.KibanaActionConnector{ - // ConnectorID: response.GetId(), - // SpaceID: spaceID, - // Name: response.GetName(), - // ConnectorTypeID: response.GetConnectorTypeId(), - // IsDeprecated: response.GetIsDeprecated(), - // IsMissingSecrets: response.GetIsMissingSecrets(), - // IsPreconfigured: response.GetIsPreconfigured(), - // } - // return &connector, nil - - // case *connectors.ConnectorResponsePropertiesSwimlane: - // config, err := response.GetConfig().MarshalJSON() - // if err != nil { - // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - // } - // // return responseToConnector(response, config, spaceID), nil - // connector := models.KibanaActionConnector{ - // ConnectorID: response.GetId(), - // SpaceID: spaceID, - // Name: response.GetName(), - // ConnectorTypeID: response.GetConnectorTypeId(), - // IsDeprecated: response.GetIsDeprecated(), - // IsMissingSecrets: response.GetIsMissingSecrets(), - // IsPreconfigured: response.GetIsPreconfigured(), - // ConfigJSON: string(config), - // } - // return &connector, nil - - // case *connectors.ConnectorResponsePropertiesTeams: - // // return responseToConnector(response, config, spaceID), nil - // connector := models.KibanaActionConnector{ - // ConnectorID: response.GetId(), - // SpaceID: spaceID, - // Name: response.GetName(), - // ConnectorTypeID: response.GetConnectorTypeId(), - // IsDeprecated: response.GetIsDeprecated(), - // IsMissingSecrets: response.GetIsMissingSecrets(), - // IsPreconfigured: response.GetIsPreconfigured(), - // } - // return &connector, nil - - // case *connectors.ConnectorResponsePropertiesTines: - // config, err := json.Marshal(response.GetConfig()) - // if err != nil { - // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - // } - // // return responseToConnector(response, config, spaceID), nil - // connector := models.KibanaActionConnector{ - // ConnectorID: response.GetId(), - // SpaceID: spaceID, - // Name: response.GetName(), - // ConnectorTypeID: response.GetConnectorTypeId(), - // IsDeprecated: response.GetIsDeprecated(), - // IsMissingSecrets: response.GetIsMissingSecrets(), - // IsPreconfigured: response.GetIsPreconfigured(), - // ConfigJSON: string(config), - // } - // return &connector, nil - - // case *connectors.ConnectorResponsePropertiesWebhook: - // config, err := json.Marshal(response.GetConfig()) - // if err != nil { - // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - // } - // // return responseToConnector(response, config, spaceID), nil - // connector := models.KibanaActionConnector{ - // ConnectorID: response.GetId(), - // SpaceID: spaceID, - // Name: response.GetName(), - // ConnectorTypeID: response.GetConnectorTypeId(), - // IsDeprecated: response.GetIsDeprecated(), - // IsMissingSecrets: response.GetIsMissingSecrets(), - // IsPreconfigured: response.GetIsPreconfigured(), - // ConfigJSON: string(config), - // } - // return &connector, nil - - // case *connectors.ConnectorResponsePropertiesXmatters: - // config, err := json.Marshal(response.GetConfig()) - // if err != nil { - // return nil, fmt.Errorf("failed to parse [config] in ConnectorResponsePropertiesCasesWebhook - [%w]", err) - // } - // // return responseToConnector(response, config, spaceID), nil - // connector := models.KibanaActionConnector{ - // ConnectorID: response.GetId(), - // SpaceID: spaceID, - // Name: response.GetName(), - // ConnectorTypeID: response.GetConnectorTypeId(), - // IsDeprecated: response.GetIsDeprecated(), - // IsMissingSecrets: response.GetIsMissingSecrets(), - // IsPreconfigured: response.GetIsPreconfigured(), - // ConfigJSON: string(config), - // } - // return &connector, nil + return connectorResponseToModelIndex(discriminator, spaceID, properties) + + case connectors.ConnectorTypesDotJira: + return connectorResponseToModelJira(discriminator, spaceID, properties) + + case connectors.ConnectorTypesDotOpsgenie: + return connectorResponseToModelOpsgenie(discriminator, spaceID, properties) + + case connectors.ConnectorTypesDotPagerduty: + return connectorResponseToModelPagerduty(discriminator, spaceID, properties) + + case connectors.ConnectorTypesDotResilient: + return connectorResponseToModelResilient(discriminator, spaceID, properties) + + case connectors.ConnectorTypesDotServerLog: + return connectorResponseToModelServerlog(discriminator, spaceID, properties) + + case connectors.ConnectorTypesDotServicenow: + return connectorResponseToModelServicenow(discriminator, spaceID, properties) + + case connectors.ConnectorTypesDotServicenowItom: + return connectorResponseToModelServicenowItom(discriminator, spaceID, properties) + + case connectors.ConnectorTypesDotServicenowSir: + return connectorResponseToModelServicenowSir(discriminator, spaceID, properties) + + case connectors.ConnectorTypesDotSlack: + return connectorResponseToModelSlack(discriminator, spaceID, properties) + + case connectors.ConnectorTypesDotSwimlane: + return connectorResponseToModelSwimlane(discriminator, spaceID, properties) + + case connectors.ConnectorTypesDotTeams: + return connectorResponseToModelTeams(discriminator, spaceID, properties) + + case connectors.ConnectorTypesDotTines: + return connectorResponseToModelTines(discriminator, spaceID, properties) + + case connectors.ConnectorTypesDotWebhook: + return connectorResponseToModelWebhook(discriminator, spaceID, properties) + + case connectors.ConnectorTypesDotXmatters: + return connectorResponseToModelXmatters(discriminator, spaceID, properties) } return nil, fmt.Errorf("unknown connector type [%s]", discriminator) } -// func responseToConnector[T responseType](response T, config []byte, spaceID string) *models.KibanaActionConnector { -// return &models.KibanaActionConnector{ -// ConnectorID: response.GetId(), -// SpaceID: spaceID, -// Name: response.GetName(), -// ConnectorTypeID: response.GetConnectorTypeId(), -// IsDeprecated: response.GetIsDeprecated(), -// IsMissingSecrets: response.GetIsMissingSecrets(), -// IsPreconfigured: response.GetIsPreconfigured(), -// ConfigJSON: string(config), -// } -// } - -// type responseType interface { -// *connectors.ConnectorResponsePropertiesCasesWebhook | *connectors.ConnectorResponsePropertiesEmail | -// *connectors.ConnectorResponsePropertiesIndex -// GetId() string -// GetName() string -// GetConnectorTypeId() string -// GetIsDeprecated() bool -// GetIsMissingSecrets() bool -// GetIsPreconfigured() bool -// } +func connectorResponseToModelCasesWebhook(discriminator, spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + resp, err := properties.AsConnectorResponsePropertiesCasesWebhook() + if err != nil { + return nil, err + } + + config, err := json.Marshal(resp.Config) + if err != nil { + return nil, fmt.Errorf("unable to marshal config: %w", err) + } + + isDeprecated := false + isMissingSecrets := false + + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets + } + + connector := models.KibanaActionConnector{ + ConnectorID: resp.Id, + SpaceID: spaceID, + Name: resp.Name, + ConnectorTypeID: discriminator, + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, + IsPreconfigured: bool(resp.IsPreconfigured), + ConfigJSON: string(config), + } + + return &connector, nil +} + +func connectorResponseToModelEmail(discriminator, spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + resp, err := properties.AsConnectorResponsePropertiesEmail() + if err != nil { + return nil, err + } + + config, err := json.Marshal(resp.Config) + if err != nil { + return nil, fmt.Errorf("unable to marshal config: %w", err) + } + + isDeprecated := false + isMissingSecrets := false + + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets + } + + connector := models.KibanaActionConnector{ + ConnectorID: resp.Id, + SpaceID: spaceID, + Name: resp.Name, + ConnectorTypeID: discriminator, + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, + IsPreconfigured: bool(resp.IsPreconfigured), + ConfigJSON: string(config), + } + + return &connector, nil +} + +func connectorResponseToModelIndex(discriminator, spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + resp, err := properties.AsConnectorResponsePropertiesIndex() + if err != nil { + return nil, err + } + + config, err := json.Marshal(resp.Config) + if err != nil { + return nil, fmt.Errorf("unable to marshal config: %w", err) + } + + isDeprecated := false + isMissingSecrets := false + + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets + } + + connector := models.KibanaActionConnector{ + ConnectorID: resp.Id, + SpaceID: spaceID, + Name: resp.Name, + ConnectorTypeID: discriminator, + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, + IsPreconfigured: bool(resp.IsPreconfigured), + ConfigJSON: string(config), + } + + return &connector, nil +} + +func connectorResponseToModelJira(discriminator, spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + resp, err := properties.AsConnectorResponsePropertiesJira() + if err != nil { + return nil, err + } + + config, err := json.Marshal(resp.Config) + if err != nil { + return nil, fmt.Errorf("unable to marshal config: %w", err) + } + + isDeprecated := false + isMissingSecrets := false + + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets + } + + connector := models.KibanaActionConnector{ + ConnectorID: resp.Id, + SpaceID: spaceID, + Name: resp.Name, + ConnectorTypeID: discriminator, + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, + IsPreconfigured: bool(resp.IsPreconfigured), + ConfigJSON: string(config), + } + + return &connector, nil +} + +func connectorResponseToModelOpsgenie(discriminator, spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + resp, err := properties.AsConnectorResponsePropertiesOpsgenie() + if err != nil { + return nil, err + } + + config, err := json.Marshal(resp.Config) + if err != nil { + return nil, fmt.Errorf("unable to marshal config: %w", err) + } + + isDeprecated := false + isMissingSecrets := false + + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets + } + + connector := models.KibanaActionConnector{ + ConnectorID: resp.Id, + SpaceID: spaceID, + Name: resp.Name, + ConnectorTypeID: discriminator, + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, + IsPreconfigured: bool(resp.IsPreconfigured), + ConfigJSON: string(config), + } + + return &connector, nil +} + +func connectorResponseToModelPagerduty(discriminator, spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + resp, err := properties.AsConnectorResponsePropertiesPagerduty() + if err != nil { + return nil, err + } + + config, err := json.Marshal(resp.Config) + if err != nil { + return nil, fmt.Errorf("unable to marshal config: %w", err) + } + + isDeprecated := false + isMissingSecrets := false + + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets + } + + connector := models.KibanaActionConnector{ + ConnectorID: resp.Id, + SpaceID: spaceID, + Name: resp.Name, + ConnectorTypeID: discriminator, + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, + IsPreconfigured: bool(resp.IsPreconfigured), + ConfigJSON: string(config), + } + + return &connector, nil +} + +func connectorResponseToModelResilient(discriminator, spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + resp, err := properties.AsConnectorResponsePropertiesResilient() + if err != nil { + return nil, err + } + + config, err := json.Marshal(resp.Config) + if err != nil { + return nil, fmt.Errorf("unable to marshal config: %w", err) + } + + isDeprecated := false + isMissingSecrets := false + + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets + } + + connector := models.KibanaActionConnector{ + ConnectorID: resp.Id, + SpaceID: spaceID, + Name: resp.Name, + ConnectorTypeID: discriminator, + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, + IsPreconfigured: bool(resp.IsPreconfigured), + ConfigJSON: string(config), + } + + return &connector, nil +} + +func connectorResponseToModelServerlog(discriminator, spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + resp, err := properties.AsConnectorResponsePropertiesServerlog() + if err != nil { + return nil, err + } + + config, err := json.Marshal(resp.Config) + if err != nil { + return nil, fmt.Errorf("unable to marshal config: %w", err) + } + + isDeprecated := false + isMissingSecrets := false + + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets + } + + connector := models.KibanaActionConnector{ + ConnectorID: resp.Id, + SpaceID: spaceID, + Name: resp.Name, + ConnectorTypeID: discriminator, + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, + IsPreconfigured: bool(resp.IsPreconfigured), + ConfigJSON: string(config), + } + + return &connector, nil +} + +func connectorResponseToModelServicenow(discriminator, spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + resp, err := properties.AsConnectorResponsePropertiesServicenow() + if err != nil { + return nil, err + } + + config, err := json.Marshal(resp.Config) + if err != nil { + return nil, fmt.Errorf("unable to marshal config: %w", err) + } + + isDeprecated := false + isMissingSecrets := false + + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets + } + + connector := models.KibanaActionConnector{ + ConnectorID: resp.Id, + SpaceID: spaceID, + Name: resp.Name, + ConnectorTypeID: discriminator, + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, + IsPreconfigured: bool(resp.IsPreconfigured), + ConfigJSON: string(config), + } + + return &connector, nil +} + +func connectorResponseToModelServicenowItom(discriminator, spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + resp, err := properties.AsConnectorResponsePropertiesServicenowItom() + if err != nil { + return nil, err + } + + config, err := json.Marshal(resp.Config) + if err != nil { + return nil, fmt.Errorf("unable to marshal config: %w", err) + } + + isDeprecated := false + isMissingSecrets := false + + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets + } + + connector := models.KibanaActionConnector{ + ConnectorID: resp.Id, + SpaceID: spaceID, + Name: resp.Name, + ConnectorTypeID: discriminator, + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, + IsPreconfigured: bool(resp.IsPreconfigured), + ConfigJSON: string(config), + } + + return &connector, nil +} + +func connectorResponseToModelServicenowSir(discriminator, spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + resp, err := properties.AsConnectorResponsePropertiesServicenowSir() + if err != nil { + return nil, err + } + + config, err := json.Marshal(resp.Config) + if err != nil { + return nil, fmt.Errorf("unable to marshal config: %w", err) + } + + isDeprecated := false + isMissingSecrets := false + + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets + } + + connector := models.KibanaActionConnector{ + ConnectorID: resp.Id, + SpaceID: spaceID, + Name: resp.Name, + ConnectorTypeID: discriminator, + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, + IsPreconfigured: bool(resp.IsPreconfigured), + ConfigJSON: string(config), + } + + return &connector, nil +} + +func connectorResponseToModelSlack(discriminator, spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + resp, err := properties.AsConnectorResponsePropertiesSlack() + if err != nil { + return nil, err + } + + isDeprecated := false + isMissingSecrets := false + + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets + } + + connector := models.KibanaActionConnector{ + ConnectorID: resp.Id, + SpaceID: spaceID, + Name: resp.Name, + ConnectorTypeID: discriminator, + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, + IsPreconfigured: bool(resp.IsPreconfigured), + } + + return &connector, nil +} + +func connectorResponseToModelSwimlane(discriminator, spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + resp, err := properties.AsConnectorResponsePropertiesSwimlane() + if err != nil { + return nil, err + } + + config, err := json.Marshal(resp.Config) + if err != nil { + return nil, fmt.Errorf("unable to marshal config: %w", err) + } + + isDeprecated := false + isMissingSecrets := false + + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets + } + + connector := models.KibanaActionConnector{ + ConnectorID: resp.Id, + SpaceID: spaceID, + Name: resp.Name, + ConnectorTypeID: discriminator, + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, + IsPreconfigured: bool(resp.IsPreconfigured), + ConfigJSON: string(config), + } + + return &connector, nil +} + +func connectorResponseToModelTeams(discriminator, spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + resp, err := properties.AsConnectorResponsePropertiesTeams() + if err != nil { + return nil, err + } + + isDeprecated := false + isMissingSecrets := false + + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets + } + + connector := models.KibanaActionConnector{ + ConnectorID: resp.Id, + SpaceID: spaceID, + Name: resp.Name, + ConnectorTypeID: discriminator, + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, + IsPreconfigured: bool(resp.IsPreconfigured), + } + + return &connector, nil +} + +func connectorResponseToModelTines(discriminator, spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + resp, err := properties.AsConnectorResponsePropertiesTines() + if err != nil { + return nil, err + } + + config, err := json.Marshal(resp.Config) + if err != nil { + return nil, fmt.Errorf("unable to marshal config: %w", err) + } + + isDeprecated := false + isMissingSecrets := false + + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets + } + + connector := models.KibanaActionConnector{ + ConnectorID: resp.Id, + SpaceID: spaceID, + Name: resp.Name, + ConnectorTypeID: discriminator, + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, + IsPreconfigured: bool(resp.IsPreconfigured), + ConfigJSON: string(config), + } + + return &connector, nil +} + +func connectorResponseToModelWebhook(discriminator, spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + resp, err := properties.AsConnectorResponsePropertiesTines() + if err != nil { + return nil, err + } + + config, err := json.Marshal(resp.Config) + if err != nil { + return nil, fmt.Errorf("unable to marshal config: %w", err) + } + + isDeprecated := false + isMissingSecrets := false + + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets + } + + connector := models.KibanaActionConnector{ + ConnectorID: resp.Id, + SpaceID: spaceID, + Name: resp.Name, + ConnectorTypeID: discriminator, + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, + IsPreconfigured: bool(resp.IsPreconfigured), + ConfigJSON: string(config), + } + + return &connector, nil +} + +func connectorResponseToModelXmatters(discriminator, spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { + resp, err := properties.AsConnectorResponsePropertiesTines() + if err != nil { + return nil, err + } + + config, err := json.Marshal(resp.Config) + if err != nil { + return nil, fmt.Errorf("unable to marshal config: %w", err) + } + + isDeprecated := false + isMissingSecrets := false + + if resp.IsDeprecated != nil { + isDeprecated = *resp.IsDeprecated + } + + if resp.IsMissingSecrets != nil { + isMissingSecrets = *resp.IsMissingSecrets + } + + connector := models.KibanaActionConnector{ + ConnectorID: resp.Id, + SpaceID: spaceID, + Name: resp.Name, + ConnectorTypeID: discriminator, + IsDeprecated: isDeprecated, + IsMissingSecrets: isMissingSecrets, + IsPreconfigured: bool(resp.IsPreconfigured), + ConfigJSON: string(config), + } + + return &connector, nil +} From 29039acabd80965d2fa5a6060a4177b748971079 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Wed, 10 May 2023 19:10:28 +0200 Subject: [PATCH 25/59] default configs --- Makefile | 2 +- generated/connectors/bundled.yaml | 44 +++++- generated/connectors/connectors.gen.go | 207 ++++++++++++++----------- internal/clients/kibana/connector.go | 82 +++++----- 4 files changed, 196 insertions(+), 139 deletions(-) diff --git a/Makefile b/Makefile index e7516c94f..0526bf3b7 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ SWAGGER_VERSION ?= 8.7 GOVERSION ?= 1.19 -STACK_VERSION ?= 8.0.0 +STACK_VERSION ?= 8.7.0 ELASTICSEARCH_NAME ?= terraform-elasticstack-es ELASTICSEARCH_ENDPOINTS ?= http://$(ELASTICSEARCH_NAME):9200 diff --git a/generated/connectors/bundled.yaml b/generated/connectors/bundled.yaml index ba40300f9..3fca7adc8 100644 --- a/generated/connectors/bundled.yaml +++ b/generated/connectors/bundled.yaml @@ -1114,12 +1114,19 @@ components: title: Connector request properties for a PagerDuty connector description: Defines properties for connectors when type is `.pagerduty`. type: object - additionalProperties: true + properties: + apiUrl: + type: string + nullable: true secrets_properties_pagerduty: title: Connector secrets properties for a PagerDuty connector description: Defines secrets for connectors when type is `.pagerduty`. type: object - additionalProperties: true + required: + - routingKey + properties: + routingKey: + type: string create_connector_request_pagerduty: title: Create PagerDuty connector request description: | @@ -1418,6 +1425,8 @@ components: - alerts - cases mappings: + $ref: '#/components/schemas/config_properties_swimlane_mappings' + config_properties_swimlane_mappings: title: Connector mappings properties for a Swimlane connector description: The field mapping. type: object @@ -1638,12 +1647,20 @@ components: title: Connector request properties for a Tines connector description: Defines properties for connectors when type is `.tines`. type: object - additionalProperties: true + required: + - url + properties: + url: + type: string secrets_properties_tines: title: Connector secrets properties for a Tines connector description: Defines secrets for connectors when type is `.tines`. type: object - additionalProperties: true + properties: + email: + type: string + token: + type: string create_connector_request_tines: title: Create Tines connector request description: | @@ -1673,7 +1690,24 @@ components: title: Connector request properties for a Webhook connector description: Defines properties for connectors when type is `.webhook`. type: object - additionalProperties: true + required: + - url + properties: + url: + type: string + method: + type: string + default: post + enum: + - patch + - post + - put + headers: + type: object + additionalProperties: true + hasAuth: + type: boolean + default: true secrets_properties_webhook: title: Connector secrets properties for a Webhook connector description: Defines secrets for connectors when type is `.webhook`. diff --git a/generated/connectors/connectors.gen.go b/generated/connectors/connectors.gen.go index 938c7ef8c..9b63ac12b 100644 --- a/generated/connectors/connectors.gen.go +++ b/generated/connectors/connectors.gen.go @@ -58,9 +58,9 @@ const ( // Defines values for ConfigPropertiesCasesWebhookUpdateIncidentMethod. const ( - Patch ConfigPropertiesCasesWebhookUpdateIncidentMethod = "patch" - Post ConfigPropertiesCasesWebhookUpdateIncidentMethod = "post" - Put ConfigPropertiesCasesWebhookUpdateIncidentMethod = "put" + ConfigPropertiesCasesWebhookUpdateIncidentMethodPatch ConfigPropertiesCasesWebhookUpdateIncidentMethod = "patch" + ConfigPropertiesCasesWebhookUpdateIncidentMethodPost ConfigPropertiesCasesWebhookUpdateIncidentMethod = "post" + ConfigPropertiesCasesWebhookUpdateIncidentMethodPut ConfigPropertiesCasesWebhookUpdateIncidentMethod = "put" ) // Defines values for ConfigPropertiesSwimlaneConnectorType. @@ -70,6 +70,13 @@ const ( ConfigPropertiesSwimlaneConnectorTypeCases ConfigPropertiesSwimlaneConnectorType = "cases" ) +// Defines values for ConfigPropertiesWebhookMethod. +const ( + ConfigPropertiesWebhookMethodPatch ConfigPropertiesWebhookMethod = "patch" + ConfigPropertiesWebhookMethodPost ConfigPropertiesWebhookMethod = "post" + ConfigPropertiesWebhookMethodPut ConfigPropertiesWebhookMethod = "put" +) + // Defines values for ConnectorResponsePropertiesCasesWebhookConnectorTypeId. const ( ConnectorResponsePropertiesCasesWebhookConnectorTypeIdDotCasesWebhook ConnectorResponsePropertiesCasesWebhookConnectorTypeId = ".cases-webhook" @@ -514,7 +521,9 @@ type ConfigPropertiesOpsgenie struct { } // ConfigPropertiesPagerduty Defines properties for connectors when type is `.pagerduty`. -type ConfigPropertiesPagerduty map[string]interface{} +type ConfigPropertiesPagerduty struct { + ApiUrl *string `json:"apiUrl"` +} // ConfigPropertiesResilient Defines properties for connectors when type is `.resilient`. type ConfigPropertiesResilient struct { @@ -576,122 +585,135 @@ type ConfigPropertiesSwimlane struct { ConnectorType ConfigPropertiesSwimlaneConnectorType `json:"connectorType"` // Mappings The field mapping. - Mappings *struct { - // AlertIdConfig Mapping for the alert ID. - AlertIdConfig *struct { - // FieldType The type of field in Swimlane. - FieldType string `json:"fieldType"` + Mappings *ConfigPropertiesSwimlaneMappings `json:"mappings,omitempty"` +} - // Id The identifier for the field in Swimlane. - Id string `json:"id"` +// ConfigPropertiesSwimlaneConnectorType The type of connector. Valid values are `all`, `alerts`, and `cases`. +type ConfigPropertiesSwimlaneConnectorType string - // Key The key for the field in Swimlane. - Key string `json:"key"` +// ConfigPropertiesSwimlaneMappings The field mapping. +type ConfigPropertiesSwimlaneMappings struct { + // AlertIdConfig Mapping for the alert ID. + AlertIdConfig *struct { + // FieldType The type of field in Swimlane. + FieldType string `json:"fieldType"` - // Name The name of the field in Swimlane. - Name string `json:"name"` - } `json:"alertIdConfig,omitempty"` + // Id The identifier for the field in Swimlane. + Id string `json:"id"` - // CaseIdConfig Mapping for the case ID. - CaseIdConfig *struct { - // FieldType The type of field in Swimlane. - FieldType string `json:"fieldType"` + // Key The key for the field in Swimlane. + Key string `json:"key"` - // Id The identifier for the field in Swimlane. - Id string `json:"id"` + // Name The name of the field in Swimlane. + Name string `json:"name"` + } `json:"alertIdConfig,omitempty"` - // Key The key for the field in Swimlane. - Key string `json:"key"` + // CaseIdConfig Mapping for the case ID. + CaseIdConfig *struct { + // FieldType The type of field in Swimlane. + FieldType string `json:"fieldType"` - // Name The name of the field in Swimlane. - Name string `json:"name"` - } `json:"caseIdConfig,omitempty"` + // Id The identifier for the field in Swimlane. + Id string `json:"id"` - // CaseNameConfig Mapping for the case name. - CaseNameConfig *struct { - // FieldType The type of field in Swimlane. - FieldType string `json:"fieldType"` + // Key The key for the field in Swimlane. + Key string `json:"key"` - // Id The identifier for the field in Swimlane. - Id string `json:"id"` + // Name The name of the field in Swimlane. + Name string `json:"name"` + } `json:"caseIdConfig,omitempty"` - // Key The key for the field in Swimlane. - Key string `json:"key"` + // CaseNameConfig Mapping for the case name. + CaseNameConfig *struct { + // FieldType The type of field in Swimlane. + FieldType string `json:"fieldType"` - // Name The name of the field in Swimlane. - Name string `json:"name"` - } `json:"caseNameConfig,omitempty"` + // Id The identifier for the field in Swimlane. + Id string `json:"id"` - // CommentsConfig Mapping for the case comments. - CommentsConfig *struct { - // FieldType The type of field in Swimlane. - FieldType string `json:"fieldType"` + // Key The key for the field in Swimlane. + Key string `json:"key"` - // Id The identifier for the field in Swimlane. - Id string `json:"id"` + // Name The name of the field in Swimlane. + Name string `json:"name"` + } `json:"caseNameConfig,omitempty"` - // Key The key for the field in Swimlane. - Key string `json:"key"` + // CommentsConfig Mapping for the case comments. + CommentsConfig *struct { + // FieldType The type of field in Swimlane. + FieldType string `json:"fieldType"` - // Name The name of the field in Swimlane. - Name string `json:"name"` - } `json:"commentsConfig,omitempty"` + // Id The identifier for the field in Swimlane. + Id string `json:"id"` - // DescriptionConfig Mapping for the case description. - DescriptionConfig *struct { - // FieldType The type of field in Swimlane. - FieldType string `json:"fieldType"` + // Key The key for the field in Swimlane. + Key string `json:"key"` - // Id The identifier for the field in Swimlane. - Id string `json:"id"` + // Name The name of the field in Swimlane. + Name string `json:"name"` + } `json:"commentsConfig,omitempty"` - // Key The key for the field in Swimlane. - Key string `json:"key"` + // DescriptionConfig Mapping for the case description. + DescriptionConfig *struct { + // FieldType The type of field in Swimlane. + FieldType string `json:"fieldType"` - // Name The name of the field in Swimlane. - Name string `json:"name"` - } `json:"descriptionConfig,omitempty"` + // Id The identifier for the field in Swimlane. + Id string `json:"id"` - // RuleNameConfig Mapping for the name of the alert's rule. - RuleNameConfig *struct { - // FieldType The type of field in Swimlane. - FieldType string `json:"fieldType"` + // Key The key for the field in Swimlane. + Key string `json:"key"` - // Id The identifier for the field in Swimlane. - Id string `json:"id"` + // Name The name of the field in Swimlane. + Name string `json:"name"` + } `json:"descriptionConfig,omitempty"` - // Key The key for the field in Swimlane. - Key string `json:"key"` + // RuleNameConfig Mapping for the name of the alert's rule. + RuleNameConfig *struct { + // FieldType The type of field in Swimlane. + FieldType string `json:"fieldType"` - // Name The name of the field in Swimlane. - Name string `json:"name"` - } `json:"ruleNameConfig,omitempty"` + // Id The identifier for the field in Swimlane. + Id string `json:"id"` - // SeverityConfig Mapping for the severity. - SeverityConfig *struct { - // FieldType The type of field in Swimlane. - FieldType string `json:"fieldType"` + // Key The key for the field in Swimlane. + Key string `json:"key"` - // Id The identifier for the field in Swimlane. - Id string `json:"id"` + // Name The name of the field in Swimlane. + Name string `json:"name"` + } `json:"ruleNameConfig,omitempty"` - // Key The key for the field in Swimlane. - Key string `json:"key"` + // SeverityConfig Mapping for the severity. + SeverityConfig *struct { + // FieldType The type of field in Swimlane. + FieldType string `json:"fieldType"` - // Name The name of the field in Swimlane. - Name string `json:"name"` - } `json:"severityConfig,omitempty"` - } `json:"mappings,omitempty"` -} + // Id The identifier for the field in Swimlane. + Id string `json:"id"` -// ConfigPropertiesSwimlaneConnectorType The type of connector. Valid values are `all`, `alerts`, and `cases`. -type ConfigPropertiesSwimlaneConnectorType string + // Key The key for the field in Swimlane. + Key string `json:"key"` + + // Name The name of the field in Swimlane. + Name string `json:"name"` + } `json:"severityConfig,omitempty"` +} // ConfigPropertiesTines Defines properties for connectors when type is `.tines`. -type ConfigPropertiesTines map[string]interface{} +type ConfigPropertiesTines struct { + Url string `json:"url"` +} // ConfigPropertiesWebhook Defines properties for connectors when type is `.webhook`. -type ConfigPropertiesWebhook map[string]interface{} +type ConfigPropertiesWebhook struct { + HasAuth *bool `json:"hasAuth,omitempty"` + Headers *map[string]interface{} `json:"headers,omitempty"` + Method *ConfigPropertiesWebhookMethod `json:"method,omitempty"` + Url string `json:"url"` +} + +// ConfigPropertiesWebhookMethod defines model for ConfigPropertiesWebhook.Method. +type ConfigPropertiesWebhookMethod string // ConfigPropertiesXmatters Defines properties for connectors when type is `.xmatters`. type ConfigPropertiesXmatters map[string]interface{} @@ -1923,7 +1945,9 @@ type SecretsPropertiesOpsgenie struct { } // SecretsPropertiesPagerduty Defines secrets for connectors when type is `.pagerduty`. -type SecretsPropertiesPagerduty map[string]interface{} +type SecretsPropertiesPagerduty struct { + RoutingKey string `json:"routingKey"` +} // SecretsPropertiesResilient Defines secrets for connectors when type is `.resilient`. type SecretsPropertiesResilient struct { @@ -1965,7 +1989,10 @@ type SecretsPropertiesSwimlane struct { type SecretsPropertiesTeams map[string]interface{} // SecretsPropertiesTines Defines secrets for connectors when type is `.tines`. -type SecretsPropertiesTines map[string]interface{} +type SecretsPropertiesTines struct { + Email *string `json:"email,omitempty"` + Token *string `json:"token,omitempty"` +} // SecretsPropertiesWebhook Defines secrets for connectors when type is `.webhook`. type SecretsPropertiesWebhook map[string]interface{} diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index 939b88f1e..eab982ee9 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -209,18 +209,9 @@ func ConnectorConfigWithDefaults(connectorTypeID, plan, backend, state string) ( case connectors.ConnectorTypesDotServicenowSir: return connectorConfigWithDefaultsServicenowSir(plan) - case connectors.ConnectorTypesDotServerLog: - return connectorConfigWithDefaultsServerLog(plan) - - case connectors.ConnectorTypesDotSlack: - return connectorConfigWithDefaultsSlack(plan) - case connectors.ConnectorTypesDotSwimlane: return connectorConfigWithDefaultsSwimlane(plan) - case connectors.ConnectorTypesDotTeams: - return connectorConfigWithDefaultsTeams(plan) - case connectors.ConnectorTypesDotTines: return connectorConfigWithDefaultsTines(plan) @@ -233,15 +224,27 @@ func ConnectorConfigWithDefaults(connectorTypeID, plan, backend, state string) ( return plan, nil } +// User can omit optonal fields in config JSON. +// The func adds empty optional fields to the diff. +// Otherwise plan command shows omitted fields as the diff, +// because backend returns all fields. +func connectorConfigWithDefaults[T any](plan string) (string, error) { + var config T + if err := json.Unmarshal([]byte(plan), &config); err != nil { + return "", err + } + customJSON, err := json.Marshal(config) + if err != nil { + return "", err + } + return string(customJSON), nil +} + func connectorConfigWithDefaultsCasesWebhook(plan string) (string, error) { var custom connectors.ConfigPropertiesCasesWebhook if err := json.Unmarshal([]byte(plan), &custom); err != nil { return "", err } - if custom.CreateCommentMethod == nil { - custom.CreateCommentMethod = new(connectors.ConfigPropertiesCasesWebhookCreateCommentMethod) - *custom.CreateCommentMethod = connectors.ConfigPropertiesCasesWebhookCreateCommentMethodPut - } if custom.CreateIncidentMethod == nil { custom.CreateIncidentMethod = new(connectors.ConfigPropertiesCasesWebhookCreateIncidentMethod) *custom.CreateIncidentMethod = connectors.ConfigPropertiesCasesWebhookCreateIncidentMethodPost @@ -252,7 +255,7 @@ func connectorConfigWithDefaultsCasesWebhook(plan string) (string, error) { } if custom.UpdateIncidentMethod == nil { custom.UpdateIncidentMethod = new(connectors.ConfigPropertiesCasesWebhookUpdateIncidentMethod) - *custom.UpdateIncidentMethod = connectors.Put + *custom.UpdateIncidentMethod = connectors.ConfigPropertiesCasesWebhookUpdateIncidentMethodPut } customJSON, err := json.Marshal(custom) if err != nil { @@ -298,16 +301,15 @@ func connectorConfigWithDefaultsIndex(plan string) (string, error) { } func connectorConfigWithDefaultsJira(plan string) (string, error) { - return plan, nil + return connectorConfigWithDefaults[connectors.ConfigPropertiesJira](plan) } func connectorConfigWithDefaultsOpsgenie(plan string) (string, error) { return plan, nil } -// TODO: implement config properties - it's `aditionalProperties: true` now func connectorConfigWithDefaultsPagerduty(plan string) (string, error) { - return plan, nil + return connectorConfigWithDefaults[connectors.ConfigPropertiesPagerduty](plan) } func connectorConfigWithDefaultsResilient(plan string) (string, error) { @@ -354,39 +356,29 @@ func connectorConfigWithDefaultsServicenowSir(plan string) (string, error) { return connectorConfigWithDefaultsServicenow(plan) } -// TODO: check -// there is no config -func connectorConfigWithDefaultsServerLog(plan string) (string, error) { - return plan, nil -} - -// TODO: check -// there is no config -func connectorConfigWithDefaultsSlack(plan string) (string, error) { - return plan, nil -} - func connectorConfigWithDefaultsSwimlane(plan string) (string, error) { - return plan, nil -} - -// TODO: check -// there is no config -func connectorConfigWithDefaultsTeams(plan string) (string, error) { - return plan, nil + var custom connectors.ConfigPropertiesSwimlane + if err := json.Unmarshal([]byte(plan), &custom); err != nil { + return "", err + } + if custom.Mappings == nil { + custom.Mappings = &connectors.ConfigPropertiesSwimlaneMappings{} + } + customJSON, err := json.Marshal(custom) + if err != nil { + return "", err + } + return string(customJSON), nil } -// TODO: implement config properties - it's `aditionalProperties: true` now func connectorConfigWithDefaultsTines(plan string) (string, error) { return plan, nil } -// TODO: implement config properties - it's `aditionalProperties: true` now func connectorConfigWithDefaultsWebhook(plan string) (string, error) { return plan, nil } -// TODO: implement config properties - it's `aditionalProperties: true` now func connectorConfigWithDefaultsXmatters(plan string) (string, error) { return plan, nil } @@ -631,12 +623,16 @@ func createConnectorRequestPagerduty(connector models.KibanaActionConnector) (io Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + if len(connector.ConfigJSON) > 0 { + if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) + } } - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + if len(connector.SecretsJSON) > 0 { + if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { + return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + } } bt, err := json.Marshal(request) From 90f923d6533d04e9b9f8d653ca40ab64e3be8dac Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Wed, 10 May 2023 19:27:34 +0200 Subject: [PATCH 26/59] update test --- internal/kibana/connector_test.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index e98cec7ef..d1824893a 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) -func TestAccResourceActionConnector(t *testing.T) { +func TestAccResourceKibanaConnectorIndex(t *testing.T) { connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) resource.Test(t, resource.TestCase{ @@ -26,22 +26,22 @@ func TestAccResourceActionConnector(t *testing.T) { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), Config: testAccResourceActionConnectorCreate(connectorName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "name", connectorName), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "connector_type_id", ".index"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "is_deprecated", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "is_missing_secrets", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "is_preconfigured", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "name", connectorName), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "connector_type_id", ".index"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "is_preconfigured", "false"), ), }, { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), Config: testAccResourceActionConnectorUpdate(connectorName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "name", fmt.Sprintf("Updated %s", connectorName)), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "connector_type_id", ".index"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "is_deprecated", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "is_missing_secrets", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test_connector", "is_preconfigured", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "name", fmt.Sprintf("Updated %s", connectorName)), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "connector_type_id", ".index"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "is_preconfigured", "false"), ), }, }, @@ -55,7 +55,7 @@ provider "elasticstack" { kibana {} } -resource "elasticstack_kibana_action_connector" "test_connector" { +resource "elasticstack_kibana_action_connector" "index" { name = "%s" config = jsonencode({ index = ".kibana" @@ -73,7 +73,7 @@ provider "elasticstack" { kibana {} } -resource "elasticstack_kibana_action_connector" "test_connector" { +resource "elasticstack_kibana_action_connector" "index" { name = "Updated %s" config = jsonencode({ index = ".kibana" From f4f398547fa4ef90cc000565efd9fa0609dd85a7 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Wed, 10 May 2023 19:38:58 +0200 Subject: [PATCH 27/59] renaming --- internal/kibana/connector_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index d1824893a..c3ecfe43f 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -19,12 +19,12 @@ func TestAccResourceKibanaConnectorIndex(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(t) }, - CheckDestroy: checkResourceActionConnectorDestroy, + CheckDestroy: checkResourceKibanaConnectorDestroyIndex, ProtoV5ProviderFactories: acctest.Providers, Steps: []resource.TestStep{ { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), - Config: testAccResourceActionConnectorCreate(connectorName), + Config: testAccResourceKibanaConnectorCreateIndex(connectorName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "name", connectorName), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "connector_type_id", ".index"), @@ -35,7 +35,7 @@ func TestAccResourceKibanaConnectorIndex(t *testing.T) { }, { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), - Config: testAccResourceActionConnectorUpdate(connectorName), + Config: testAccResourceKibanaConnectorUpdateIndex(connectorName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "name", fmt.Sprintf("Updated %s", connectorName)), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "connector_type_id", ".index"), @@ -48,7 +48,7 @@ func TestAccResourceKibanaConnectorIndex(t *testing.T) { }) } -func testAccResourceActionConnectorCreate(name string) string { +func testAccResourceKibanaConnectorCreateIndex(name string) string { return fmt.Sprintf(` provider "elasticstack" { elasticsearch {} @@ -66,7 +66,7 @@ resource "elasticstack_kibana_action_connector" "index" { `, name) } -func testAccResourceActionConnectorUpdate(name string) string { +func testAccResourceKibanaConnectorUpdateIndex(name string) string { return fmt.Sprintf(` provider "elasticstack" { elasticsearch {} @@ -84,7 +84,7 @@ resource "elasticstack_kibana_action_connector" "index" { `, name) } -func checkResourceActionConnectorDestroy(s *terraform.State) error { +func checkResourceKibanaConnectorDestroyIndex(s *terraform.State) error { client, err := clients.NewAcceptanceTestingClient() if err != nil { return err From d90f5fe69778844ac66f4b48de396633bb110ab9 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Wed, 10 May 2023 22:59:00 +0200 Subject: [PATCH 28/59] refactoring --- internal/clients/kibana/connector.go | 557 +++------------------------ 1 file changed, 52 insertions(+), 505 deletions(-) diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index eab982ee9..2ac6368cb 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -499,767 +499,314 @@ func updateConnectorRequestBody(connector models.KibanaActionConnector) (io.Read return nil, fmt.Errorf("unknown connector type [%s]", connector.ConnectorTypeID) } -func createConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create CasesWebhook connector request" - - request := connectors.CreateConnectorRequestCasesWebhook{ - ConnectorTypeId: connectors.DotCasesWebhook, - Name: connector.Name, - } - - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) +func marshalConnectorRequest[C, S, R any](connector models.KibanaActionConnector, config *C, secrets *S, request *R) (io.Reader, error) { + if config != nil && len(connector.ConfigJSON) > 0 { + if err := json.Unmarshal([]byte(connector.ConfigJSON), config); err != nil { + return nil, fmt.Errorf("failed to unmarshal [config] attribute: %w", err) + } } - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) + if secrets != nil && len(connector.SecretsJSON) > 0 { + if err := json.Unmarshal([]byte(connector.SecretsJSON), secrets); err != nil { + return nil, fmt.Errorf("failed to unmarshal [secrets] attribute: %w", err) + } } bt, err := json.Marshal(request) if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) + return nil, fmt.Errorf("failed to marshal request: %w", err) } return bytes.NewReader(bt), nil } -func createConnectorRequestEmail(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Email connector request" - - request := connectors.CreateConnectorRequestEmail{ - ConnectorTypeId: connectors.CreateConnectorRequestEmailConnectorTypeIdDotEmail, +func createConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (io.Reader, error) { + request := connectors.CreateConnectorRequestCasesWebhook{ + ConnectorTypeId: connectors.DotCasesWebhook, Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) +} - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) +func createConnectorRequestEmail(connector models.KibanaActionConnector) (io.Reader, error) { + request := connectors.CreateConnectorRequestEmail{ + ConnectorTypeId: connectors.CreateConnectorRequestEmailConnectorTypeIdDotEmail, + Name: connector.Name, } - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func createConnectorRequestIndex(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Index connector request" - request := connectors.CreateConnectorRequestIndex{ ConnectorTypeId: connectors.CreateConnectorRequestIndexConnectorTypeIdDotIndex, Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest[connectors.ConfigPropertiesIndex, any](connector, &request.Config, nil, &request) } func createConnectorRequestJira(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Jira connector request" - request := connectors.CreateConnectorRequestJira{ ConnectorTypeId: connectors.CreateConnectorRequestJiraConnectorTypeIdDotJira, Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func createConnectorRequestOpsgenie(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Opsgenie connector request" - request := connectors.CreateConnectorRequestOpsgenie{ ConnectorTypeId: connectors.CreateConnectorRequestOpsgenieConnectorTypeIdDotOpsgenie, Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func createConnectorRequestPagerduty(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Pagerduty connector request" - request := connectors.CreateConnectorRequestPagerduty{ ConnectorTypeId: connectors.CreateConnectorRequestPagerdutyConnectorTypeIdDotPagerduty, Name: connector.Name, } - if len(connector.ConfigJSON) > 0 { - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - } - - if len(connector.SecretsJSON) > 0 { - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func createConnectorRequestResilient(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Resilient connector request" - request := connectors.CreateConnectorRequestResilient{ ConnectorTypeId: connectors.CreateConnectorRequestResilientConnectorTypeIdDotResilient, Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func createConnectorRequestServicenow(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Servicenow connector request" - request := connectors.CreateConnectorRequestServicenow{ ConnectorTypeId: connectors.CreateConnectorRequestServicenowConnectorTypeIdDotServicenow, Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func createConnectorRequestServicenowItom(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create ServicenowItom connector request" - request := connectors.CreateConnectorRequestServicenowItom{ ConnectorTypeId: connectors.CreateConnectorRequestServicenowItomConnectorTypeIdDotServicenowItom, Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func createConnectorRequestServicenowSir(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create ServicenowSir connector request" - request := connectors.CreateConnectorRequestServicenowSir{ ConnectorTypeId: connectors.CreateConnectorRequestServicenowSirConnectorTypeIdDotServicenowSir, Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func createConnectorRequestServerLog(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Serverlog connector request" - request := connectors.CreateConnectorRequestServerlog{ ConnectorTypeId: connectors.CreateConnectorRequestServerlogConnectorTypeIdDotServerLog, Name: connector.Name, } - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest[any, any](connector, nil, nil, &request) } func createConnectorRequestSlack(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Slack connector request" - request := connectors.CreateConnectorRequestSlack{ ConnectorTypeId: connectors.CreateConnectorRequestSlackConnectorTypeIdDotSlack, Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest[any](connector, nil, &request.Secrets, &request) } func createConnectorRequestSwimlane(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Swimlane connector request" - request := connectors.CreateConnectorRequestSwimlane{ ConnectorTypeId: connectors.CreateConnectorRequestSwimlaneConnectorTypeIdDotSwimlane, Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func createConnectorRequestTeams(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Teams connector request" - request := connectors.CreateConnectorRequestTeams{ ConnectorTypeId: connectors.CreateConnectorRequestTeamsConnectorTypeIdDotTeams, Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest[any](connector, nil, &request.Secrets, &request) } func createConnectorRequestTines(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Tines connector request" - request := connectors.CreateConnectorRequestTines{ ConnectorTypeId: connectors.CreateConnectorRequestTinesConnectorTypeIdDotTines, Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func createConnectorRequestWebhook(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Webhook connector request" - request := connectors.CreateConnectorRequestWebhook{ ConnectorTypeId: connectors.CreateConnectorRequestWebhookConnectorTypeIdDotWebhook, Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func createConnectorRequestXmatters(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Xmatters connector request" - request := connectors.CreateConnectorRequestXmatters{ ConnectorTypeId: connectors.CreateConnectorRequestXmattersConnectorTypeIdDotXmatters, Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func updateConnectorRequestCasesWebhook(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create CasesWebhook connector request" - request := connectors.UpdateConnectorRequestCasesWebhook{ Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func updateConnectorRequestEmail(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Email connector request" - request := connectors.UpdateConnectorRequestEmail{ Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func updateConnectorRequestIndex(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Index connector request" - request := connectors.UpdateConnectorRequestIndex{ Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [CreateConnectorRequestIndex.Config]: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal [CreateConnectorRequestIndex]: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest[connectors.ConfigPropertiesIndex, any](connector, &request.Config, nil, &request) } func updateConnectorRequestJira(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Jira connector request" - request := connectors.UpdateConnectorRequestJira{ Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func updateConnectorRequestOpsgenie(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Opsgenie connector request" - request := connectors.UpdateConnectorRequestOpsgenie{ Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func updateConnectorRequestPagerduty(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Pagerduty connector request" - request := connectors.UpdateConnectorRequestPagerduty{ Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func updateConnectorRequestResilient(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Resilient connector request" - request := connectors.UpdateConnectorRequestResilient{ Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func updateConnectorRequestServicenow(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Servicenow connector request" - request := connectors.UpdateConnectorRequestServicenow{ Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func updateConnectorRequestServicenowItom(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create ServicenowItom connector request" - request := connectors.UpdateConnectorRequestServicenowItom{ Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func updateConnectorRequestServicenowSir(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create ServicenowSir connector request" - request := connectors.UpdateConnectorRequestServicenowSir{ Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func updateConnectorRequestServerlog(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Serverlog connector request" - request := connectors.UpdateConnectorRequestServerlog{ Name: connector.Name, } - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest[any, any](connector, nil, nil, &request) } func updateConnectorRequestSlack(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Slack connector request" - request := connectors.UpdateConnectorRequestSlack{ Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest[any](connector, nil, &request.Secrets, &request) } func updateConnectorRequestSwimlane(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Swimlane connector request" - request := connectors.UpdateConnectorRequestSwimlane{ Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func updateConnectorRequestTeams(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Teams connector request" - request := connectors.UpdateConnectorRequestTeams{ Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest[any](connector, nil, &request.Secrets, &request) } func updateConnectorRequestTines(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Tines connector request" - request := connectors.UpdateConnectorRequestTines{ Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func updateConnectorRequestWebhook(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Webhook connector request" - request := connectors.UpdateConnectorRequestWebhook{ Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func updateConnectorRequestXmatters(connector models.KibanaActionConnector) (io.Reader, error) { - prefixError := "failed to create Xmatters connector request" - request := connectors.UpdateConnectorRequestXmatters{ Name: connector.Name, } - if err := json.Unmarshal([]byte(connector.ConfigJSON), &request.Config); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [config] attribute: %w", prefixError, err) - } - - if err := json.Unmarshal([]byte(connector.SecretsJSON), &request.Secrets); err != nil { - return nil, fmt.Errorf("%s: failed to unmarshal [secrets] attribute: %w", prefixError, err) - } - - bt, err := json.Marshal(request) - if err != nil { - return nil, fmt.Errorf("%s: failed to marshal request: %w", prefixError, err) - } - - return bytes.NewReader(bt), nil + return marshalConnectorRequest(connector, &request.Config, &request.Secrets, &request) } func connectorResponseToModel(spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { From c21091bdbd22e47f42196a85bd92e882281a8356 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 11 May 2023 12:23:06 +0200 Subject: [PATCH 29/59] acc test for cases-webhook --- internal/clients/kibana/connector.go | 2 +- internal/kibana/connector.go | 7 +- internal/kibana/connector_test.go | 148 ++++++++++++++++++++++----- 3 files changed, 122 insertions(+), 35 deletions(-) diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index 2ac6368cb..05d67a5a4 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -103,7 +103,7 @@ func UpdateConnector(ctx context.Context, apiClient *clients.ApiClient, connecto return connectorNew.ConnectorID, nil } -func GetConnector(ctx context.Context, apiClient *clients.ApiClient, connectorID, spaceID string, connectorTypeID string) (*models.KibanaActionConnector, diag.Diagnostics) { +func GetConnector(ctx context.Context, apiClient *clients.ApiClient, connectorID, spaceID string) (*models.KibanaActionConnector, diag.Diagnostics) { client, err := apiClient.GetKibanaConnectorsClient(ctx) if err != nil { return nil, diag.FromErr(err) diff --git a/internal/kibana/connector.go b/internal/kibana/connector.go index a151b461c..5b3dee5af 100644 --- a/internal/kibana/connector.go +++ b/internal/kibana/connector.go @@ -181,17 +181,12 @@ func resourceConnectorRead(ctx context.Context, d *schema.ResourceData, meta int return diags } - connectorOld, diags := expandActionConnector(d) - if diags.HasError() { - return diags - } - compositeID, diags := clients.CompositeIdFromStr(d.Id()) if diags.HasError() { return diags } - connector, diags := kibana.GetConnector(ctx, client, compositeID.ResourceId, compositeID.ClusterId, connectorOld.ConnectorTypeID) + connector, diags := kibana.GetConnector(ctx, client, compositeID.ResourceId, compositeID.ClusterId) if connector == nil && diags == nil { d.SetId("") return diags diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index c3ecfe43f..f320d2793 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -9,82 +9,104 @@ import ( "github.com/elastic/terraform-provider-elasticstack/internal/clients" "github.com/elastic/terraform-provider-elasticstack/internal/clients/kibana" "github.com/elastic/terraform-provider-elasticstack/internal/versionutils" + "github.com/hashicorp/go-version" sdkacctest "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) -func TestAccResourceKibanaConnectorIndex(t *testing.T) { +func TestAccResourceKibanaConnectorCasesWebhook(t *testing.T) { connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) resource.Test(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(t) }, - CheckDestroy: checkResourceKibanaConnectorDestroyIndex, + CheckDestroy: checkResourceKibanaConnectorDestroy, ProtoV5ProviderFactories: acctest.Providers, Steps: []resource.TestStep{ { - SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), - Config: testAccResourceKibanaConnectorCreateIndex(connectorName), + SkipFunc: versionutils.CheckIfVersionIsUnsupported(version.Must(version.NewSemver("8.1.0"))), + Config: testAccResourceKibanaConnectorCreateCasesWebhook(connectorName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "name", connectorName), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "connector_type_id", ".index"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "is_deprecated", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "is_missing_secrets", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "is_preconfigured", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".cases-webhook"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), ), }, { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), - Config: testAccResourceKibanaConnectorUpdateIndex(connectorName), + Config: testAccResourceKibanaConnectorUpdateCasesWebhook(connectorName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "name", fmt.Sprintf("Updated %s", connectorName)), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "connector_type_id", ".index"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "is_deprecated", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "is_missing_secrets", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.index", "is_preconfigured", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".cases-webhook"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), ), }, }, }) } -func testAccResourceKibanaConnectorCreateIndex(name string) string { +func testAccResourceKibanaConnectorCreateCasesWebhook(name string) string { return fmt.Sprintf(` provider "elasticstack" { elasticsearch {} kibana {} } -resource "elasticstack_kibana_action_connector" "index" { +resource "elasticstack_kibana_action_connector" "test" { name = "%s" config = jsonencode({ - index = ".kibana" - refresh = true + createIncidentJson = "{}" + createIncidentResponseKey = "key" + createIncidentUrl = "https://www.elastic.co/" + getIncidentResponseExternalTitleKey = "title" + getIncidentUrl = "https://www.elastic.co/" + updateIncidentJson = "{}" + updateIncidentUrl = "https://www.elastic.co/" + viewIncidentUrl = "https://www.elastic.co/" }) - connector_type_id = ".index" + secrets = jsonencode({ + user = "test" + password = "test" + }) + connector_type_id = ".cases-webhook" } `, name) } -func testAccResourceKibanaConnectorUpdateIndex(name string) string { +func testAccResourceKibanaConnectorUpdateCasesWebhook(name string) string { return fmt.Sprintf(` provider "elasticstack" { elasticsearch {} kibana {} } -resource "elasticstack_kibana_action_connector" "index" { +resource "elasticstack_kibana_action_connector" "test" { name = "Updated %s" - config = jsonencode({ - index = ".kibana" - refresh = false + config = jsonencode({ + createIncidentJson = "{}" + createIncidentResponseKey = "key" + createIncidentUrl = "https://www.elastic.co/" + getIncidentResponseExternalTitleKey = "title" + getIncidentUrl = "https://www.elastic.co/" + updateIncidentJson = "{}" + updateIncidentUrl = "https://www.elastic.co/" + viewIncidentUrl = "https://www.elastic.co/" + createIncidentMethod = "put" }) - connector_type_id = ".index" + secrets = jsonencode({ + user = "test" + password = "test" + }) + connector_type_id = ".cases-webhook" } `, name) } -func checkResourceKibanaConnectorDestroyIndex(s *terraform.State) error { +func checkResourceKibanaConnectorDestroy(s *terraform.State) error { client, err := clients.NewAcceptanceTestingClient() if err != nil { return err @@ -96,7 +118,7 @@ func checkResourceKibanaConnectorDestroyIndex(s *terraform.State) error { } compId, _ := clients.CompositeIdFromStr(rs.Primary.ID) - connector, diags := kibana.GetConnector(context.Background(), client, compId.ResourceId, compId.ClusterId, ".index") + connector, diags := kibana.GetConnector(context.Background(), client, compId.ResourceId, compId.ClusterId) if diags.HasError() { return fmt.Errorf("Failed to get connector: %v", diags) } @@ -107,3 +129,73 @@ func checkResourceKibanaConnectorDestroyIndex(s *terraform.State) error { } return nil } + +func TestAccResourceKibanaConnectorIndex(t *testing.T) { + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(t) }, + CheckDestroy: checkResourceKibanaConnectorDestroy, + ProtoV5ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(version.Must(version.NewSemver("7.14.0"))), + Config: testAccResourceKibanaConnectorCreateIndex(connectorName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".index"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + ), + }, + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: testAccResourceKibanaConnectorUpdateIndex(connectorName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".index"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + ), + }, + }, + }) +} + +func testAccResourceKibanaConnectorCreateIndex(name string) string { + return fmt.Sprintf(` +provider "elasticstack" { + elasticsearch {} + kibana {} +} + +resource "elasticstack_kibana_action_connector" "test" { + name = "%s" + config = jsonencode({ + index = ".kibana" + refresh = true + }) + connector_type_id = ".index" +} + `, name) +} + +func testAccResourceKibanaConnectorUpdateIndex(name string) string { + return fmt.Sprintf(` +provider "elasticstack" { + elasticsearch {} + kibana {} +} + +resource "elasticstack_kibana_action_connector" "test" { + name = "Updated %s" + config = jsonencode({ + index = ".kibana" + refresh = false + }) + connector_type_id = ".index" +} + `, name) +} From 858af1ef153cf3caad82039957b56e4c14fa8f57 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 11 May 2023 12:54:55 +0200 Subject: [PATCH 30/59] acc test for email --- internal/kibana/alerting_test.go | 4 +- internal/kibana/connector_test.go | 301 +++++++++++++++++++----------- 2 files changed, 194 insertions(+), 111 deletions(-) diff --git a/internal/kibana/alerting_test.go b/internal/kibana/alerting_test.go index 73ad31b2a..12f2e790e 100644 --- a/internal/kibana/alerting_test.go +++ b/internal/kibana/alerting_test.go @@ -15,9 +15,9 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) -var minSupportedVersion = version.Must(version.NewSemver("7.14.0")) - func TestAccResourceAlertingRule(t *testing.T) { + minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + ruleName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) resource.Test(t, resource.TestCase{ diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index f320d2793..f83e89fe0 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -16,16 +16,75 @@ import ( ) func TestAccResourceKibanaConnectorCasesWebhook(t *testing.T) { + minSupportedVersion := version.Must(version.NewSemver("8.4.0")) + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) + create := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "%s" + config = jsonencode({ + createIncidentJson = "{}" + createIncidentResponseKey = "key" + createIncidentUrl = "https://www.elastic.co/" + getIncidentResponseExternalTitleKey = "title" + getIncidentUrl = "https://www.elastic.co/" + updateIncidentJson = "{}" + updateIncidentUrl = "https://www.elastic.co/" + viewIncidentUrl = "https://www.elastic.co/" + }) + secrets = jsonencode({ + user = "test" + password = "test" + }) + connector_type_id = ".cases-webhook" + }`, + name) + } + + update := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "Updated %s" + config = jsonencode({ + createIncidentJson = "{}" + createIncidentResponseKey = "key" + createIncidentUrl = "https://www.elastic.co/" + getIncidentResponseExternalTitleKey = "title" + getIncidentUrl = "https://www.elastic.co/" + updateIncidentJson = "{}" + updateIncidentUrl = "https://www.elastic.co/" + viewIncidentUrl = "https://www.elastic.co/" + createIncidentMethod = "put" + }) + secrets = jsonencode({ + user = "test" + password = "test" + }) + connector_type_id = ".cases-webhook" + }`, + name) + } + resource.Test(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(t) }, CheckDestroy: checkResourceKibanaConnectorDestroy, ProtoV5ProviderFactories: acctest.Providers, Steps: []resource.TestStep{ { - SkipFunc: versionutils.CheckIfVersionIsUnsupported(version.Must(version.NewSemver("8.1.0"))), - Config: testAccResourceKibanaConnectorCreateCasesWebhook(connectorName), + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: create(connectorName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".cases-webhook"), @@ -36,7 +95,7 @@ func TestAccResourceKibanaConnectorCasesWebhook(t *testing.T) { }, { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), - Config: testAccResourceKibanaConnectorUpdateCasesWebhook(connectorName), + Config: update(connectorName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".cases-webhook"), @@ -49,98 +108,134 @@ func TestAccResourceKibanaConnectorCasesWebhook(t *testing.T) { }) } -func testAccResourceKibanaConnectorCreateCasesWebhook(name string) string { - return fmt.Sprintf(` -provider "elasticstack" { - elasticsearch {} - kibana {} -} +func TestAccResourceKibanaConnectorEmail(t *testing.T) { + minSupportedVersion := version.Must(version.NewSemver("7.14.0")) -resource "elasticstack_kibana_action_connector" "test" { - name = "%s" - config = jsonencode({ - createIncidentJson = "{}" - createIncidentResponseKey = "key" - createIncidentUrl = "https://www.elastic.co/" - getIncidentResponseExternalTitleKey = "title" - getIncidentUrl = "https://www.elastic.co/" - updateIncidentJson = "{}" - updateIncidentUrl = "https://www.elastic.co/" - viewIncidentUrl = "https://www.elastic.co/" - }) - secrets = jsonencode({ - user = "test" - password = "test" - }) - connector_type_id = ".cases-webhook" -} - `, name) -} - -func testAccResourceKibanaConnectorUpdateCasesWebhook(name string) string { - return fmt.Sprintf(` -provider "elasticstack" { - elasticsearch {} - kibana {} -} - -resource "elasticstack_kibana_action_connector" "test" { - name = "Updated %s" - config = jsonencode({ - createIncidentJson = "{}" - createIncidentResponseKey = "key" - createIncidentUrl = "https://www.elastic.co/" - getIncidentResponseExternalTitleKey = "title" - getIncidentUrl = "https://www.elastic.co/" - updateIncidentJson = "{}" - updateIncidentUrl = "https://www.elastic.co/" - viewIncidentUrl = "https://www.elastic.co/" - createIncidentMethod = "put" - }) - secrets = jsonencode({ - user = "test" - password = "test" - }) - connector_type_id = ".cases-webhook" -} - `, name) -} + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) -func checkResourceKibanaConnectorDestroy(s *terraform.State) error { - client, err := clients.NewAcceptanceTestingClient() - if err != nil { - return err + create := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} } - for _, rs := range s.RootModule().Resources { - if rs.Type != "elasticstack_kibana_action_connector" { - continue - } - compId, _ := clients.CompositeIdFromStr(rs.Primary.ID) + resource "elasticstack_kibana_action_connector" "test" { + name = "%s" + config = jsonencode({ + from = "test@elastic.co" + port = 111 + host = "localhost" + }) + secrets = jsonencode({}) + connector_type_id = ".email" + }`, + name) + } - connector, diags := kibana.GetConnector(context.Background(), client, compId.ResourceId, compId.ClusterId) - if diags.HasError() { - return fmt.Errorf("Failed to get connector: %v", diags) - } + update := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } - if connector != nil { - return fmt.Errorf("Action connector (%s) still exists", compId.ResourceId) - } + resource "elasticstack_kibana_action_connector" "test" { + name = "Updated %s" + config = jsonencode({ + from = "test2@elastic.co" + port = 222 + host = "127.0.0.1" + }) + secrets = jsonencode({ + user = "user" + password = "password" + }) + connector_type_id = ".email" + }`, + name) } - return nil + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(t) }, + CheckDestroy: checkResourceKibanaConnectorDestroy, + ProtoV5ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: create(connectorName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".email"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + ), + }, + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: update(connectorName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".email"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + ), + }, + }, + }) } func TestAccResourceKibanaConnectorIndex(t *testing.T) { + minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) + create := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "%s" + config = jsonencode({ + index = ".kibana" + refresh = true + }) + connector_type_id = ".index" + }`, + name) + } + + update := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "Updated %s" + config = jsonencode({ + index = ".kibana" + refresh = false + }) + connector_type_id = ".index" + }`, + name) + } + resource.Test(t, resource.TestCase{ PreCheck: func() { acctest.PreCheck(t) }, CheckDestroy: checkResourceKibanaConnectorDestroy, ProtoV5ProviderFactories: acctest.Providers, Steps: []resource.TestStep{ { - SkipFunc: versionutils.CheckIfVersionIsUnsupported(version.Must(version.NewSemver("7.14.0"))), - Config: testAccResourceKibanaConnectorCreateIndex(connectorName), + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: create(connectorName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".index"), @@ -151,7 +246,7 @@ func TestAccResourceKibanaConnectorIndex(t *testing.T) { }, { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), - Config: testAccResourceKibanaConnectorUpdateIndex(connectorName), + Config: update(connectorName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".index"), @@ -164,38 +259,26 @@ func TestAccResourceKibanaConnectorIndex(t *testing.T) { }) } -func testAccResourceKibanaConnectorCreateIndex(name string) string { - return fmt.Sprintf(` -provider "elasticstack" { - elasticsearch {} - kibana {} -} +func checkResourceKibanaConnectorDestroy(s *terraform.State) error { + client, err := clients.NewAcceptanceTestingClient() + if err != nil { + return err + } -resource "elasticstack_kibana_action_connector" "test" { - name = "%s" - config = jsonencode({ - index = ".kibana" - refresh = true - }) - connector_type_id = ".index" -} - `, name) -} + for _, rs := range s.RootModule().Resources { + if rs.Type != "elasticstack_kibana_action_connector" { + continue + } + compId, _ := clients.CompositeIdFromStr(rs.Primary.ID) -func testAccResourceKibanaConnectorUpdateIndex(name string) string { - return fmt.Sprintf(` -provider "elasticstack" { - elasticsearch {} - kibana {} -} + connector, diags := kibana.GetConnector(context.Background(), client, compId.ResourceId, compId.ClusterId) + if diags.HasError() { + return fmt.Errorf("Failed to get connector: %v", diags) + } -resource "elasticstack_kibana_action_connector" "test" { - name = "Updated %s" - config = jsonencode({ - index = ".kibana" - refresh = false - }) - connector_type_id = ".index" -} - `, name) + if connector != nil { + return fmt.Errorf("Action connector (%s) still exists", compId.ResourceId) + } + } + return nil } From 5d5ec6db1b400cad26a0187edb86762ea5f8fba4 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 11 May 2023 13:46:37 +0200 Subject: [PATCH 31/59] improve acc test for cases-webhook --- internal/kibana/connector_test.go | 38 +++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index f83e89fe0..99c01edf6 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -3,6 +3,7 @@ package kibana_test import ( "context" "fmt" + "regexp" "testing" "github.com/elastic/terraform-provider-elasticstack/internal/acctest" @@ -40,8 +41,8 @@ func TestAccResourceKibanaConnectorCasesWebhook(t *testing.T) { viewIncidentUrl = "https://www.elastic.co/" }) secrets = jsonencode({ - user = "test" - password = "test" + user = "user1" + password = "password1" }) connector_type_id = ".cases-webhook" }`, @@ -64,13 +65,13 @@ func TestAccResourceKibanaConnectorCasesWebhook(t *testing.T) { getIncidentResponseExternalTitleKey = "title" getIncidentUrl = "https://www.elastic.co/" updateIncidentJson = "{}" - updateIncidentUrl = "https://www.elastic.co/" + updateIncidentUrl = "https://elasticsearch.com/" viewIncidentUrl = "https://www.elastic.co/" createIncidentMethod = "put" }) secrets = jsonencode({ - user = "test" - password = "test" + user = "user2" + password = "password2" }) connector_type_id = ".cases-webhook" }`, @@ -91,6 +92,20 @@ func TestAccResourceKibanaConnectorCasesWebhook(t *testing.T) { resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"createIncidentJson\":\"{}\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"createIncidentResponseKey\":\"key\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"createIncidentUrl\":\"https://www.elastic.co/\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"getIncidentResponseExternalTitleKey\":\"title\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"getIncidentUrl\":\"https://www.elastic.co/\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"updateIncidentJson\":\"{}\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"updateIncidentUrl\":\"https://www.elastic.co/\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"viewIncidentUrl\":\"https://www.elastic.co/\"`)), + // `post` is the default value that is returned by backend + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`"createIncidentMethod\":\"post\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"user\":\"user1\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"password\":\"password1\"`)), ), }, { @@ -102,6 +117,19 @@ func TestAccResourceKibanaConnectorCasesWebhook(t *testing.T) { resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"createIncidentJson\":\"{}\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"createIncidentResponseKey\":\"key\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"createIncidentUrl\":\"https://www.elastic.co/\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"getIncidentResponseExternalTitleKey\":\"title\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"getIncidentUrl\":\"https://www.elastic.co/\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"updateIncidentJson\":\"{}\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"updateIncidentUrl\":\"https://elasticsearch.com/\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"viewIncidentUrl\":\"https://www.elastic.co/\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`createIncidentMethod\":\"put\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"user\":\"user2\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"password\":\"password2\"`)), ), }, }, From 0bbbe6d9b7e97817db74776bfd5c100606afa0da Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 11 May 2023 14:13:03 +0200 Subject: [PATCH 32/59] improve acc tests --- internal/kibana/connector_test.go | 39 ++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index 99c01edf6..e1106a1ea 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -95,12 +95,12 @@ func TestAccResourceKibanaConnectorCasesWebhook(t *testing.T) { resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"createIncidentJson\":\"{}\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"createIncidentResponseKey\":\"key\"`)), - resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"createIncidentUrl\":\"https://www.elastic.co/\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"createIncidentUrl\":\"https://www\.elastic\.co/\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"getIncidentResponseExternalTitleKey\":\"title\"`)), - resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"getIncidentUrl\":\"https://www.elastic.co/\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"getIncidentUrl\":\"https://www\.elastic\.co/\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"updateIncidentJson\":\"{}\"`)), - resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"updateIncidentUrl\":\"https://www.elastic.co/\"`)), - resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"viewIncidentUrl\":\"https://www.elastic.co/\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"updateIncidentUrl\":\"https://www.elastic\.co/\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"viewIncidentUrl\":\"https://www\.elastic\.co/\"`)), // `post` is the default value that is returned by backend resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`"createIncidentMethod\":\"post\"`)), @@ -120,12 +120,12 @@ func TestAccResourceKibanaConnectorCasesWebhook(t *testing.T) { resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"createIncidentJson\":\"{}\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"createIncidentResponseKey\":\"key\"`)), - resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"createIncidentUrl\":\"https://www.elastic.co/\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"createIncidentUrl\":\"https://www\.elastic\.co/\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"getIncidentResponseExternalTitleKey\":\"title\"`)), - resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"getIncidentUrl\":\"https://www.elastic.co/\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"getIncidentUrl\":\"https://www\.elastic\.co/\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"updateIncidentJson\":\"{}\"`)), - resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"updateIncidentUrl\":\"https://elasticsearch.com/\"`)), - resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"viewIncidentUrl\":\"https://www.elastic.co/\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"updateIncidentUrl\":\"https://elasticsearch\.com/\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"viewIncidentUrl\":\"https://www\.elastic\.co/\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`createIncidentMethod\":\"put\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"user\":\"user2\"`)), @@ -173,11 +173,11 @@ func TestAccResourceKibanaConnectorEmail(t *testing.T) { config = jsonencode({ from = "test2@elastic.co" port = 222 - host = "127.0.0.1" + host = "localhost" }) secrets = jsonencode({ - user = "user" - password = "password" + user = "user1" + password = "password1" }) connector_type_id = ".email" }`, @@ -198,6 +198,10 @@ func TestAccResourceKibanaConnectorEmail(t *testing.T) { resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"from\":\"test@elastic\.co\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"port\":111`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"host\":\"localhost\"`)), ), }, { @@ -209,6 +213,13 @@ func TestAccResourceKibanaConnectorEmail(t *testing.T) { resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"from\":\"test2@elastic\.co\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"port\":222`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"host\":\"localhost\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"user\":\"user1\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"password\":\"password1\"`)), ), }, }, @@ -270,6 +281,9 @@ func TestAccResourceKibanaConnectorIndex(t *testing.T) { resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"index\":\".kibana\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"refresh\":true`)), ), }, { @@ -281,6 +295,9 @@ func TestAccResourceKibanaConnectorIndex(t *testing.T) { resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"index\":\".kibana\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"refresh\":false`)), ), }, }, From 9a44455202acf9ccc77e3104e927c430d6502683 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 11 May 2023 14:27:00 +0200 Subject: [PATCH 33/59] acc test for jira --- internal/kibana/connector_test.go | 96 ++++++++++++++++++++++++++++++- 1 file changed, 94 insertions(+), 2 deletions(-) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index e1106a1ea..5e8dc15d3 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -282,7 +282,7 @@ func TestAccResourceKibanaConnectorIndex(t *testing.T) { resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), - resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"index\":\".kibana\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"index\":\"\.kibana\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"refresh\":true`)), ), }, @@ -296,7 +296,7 @@ func TestAccResourceKibanaConnectorIndex(t *testing.T) { resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), - resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"index\":\".kibana\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"index\":\"\.kibana\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"refresh\":false`)), ), }, @@ -304,6 +304,98 @@ func TestAccResourceKibanaConnectorIndex(t *testing.T) { }) } +func TestAccResourceKibanaConnectorJira(t *testing.T) { + minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) + + create := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "%s" + config = jsonencode({ + apiUrl = "url1" + projectKey = "project1" + }) + secrets = jsonencode({ + apiToken = "secret1" + email = "email1" + }) + connector_type_id = ".jira" + }`, + name) + } + + update := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "Updated %s" + config = jsonencode({ + apiUrl = "url2" + projectKey = "project2" + }) + secrets = jsonencode({ + apiToken = "secret2" + email = "email2" + }) + connector_type_id = ".jira" + }`, + name) + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(t) }, + CheckDestroy: checkResourceKibanaConnectorDestroy, + ProtoV5ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: create(connectorName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".jira"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"url1\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"projectKey\":\"project1\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"apiToken\":\"secret1\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"email\":\"email1\"`)), + ), + }, + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: update(connectorName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".jira"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"url2\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"projectKey\":\"project2\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"apiToken\":\"secret2\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"email\":\"email2\"`)), + ), + }, + }, + }) +} + func checkResourceKibanaConnectorDestroy(s *terraform.State) error { client, err := clients.NewAcceptanceTestingClient() if err != nil { From bbbe7136dd76b958572fb9e87ff058943f531b55 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 11 May 2023 17:01:45 +0200 Subject: [PATCH 34/59] acc tests for opsgenie and pagerduty --- generated/connectors/bundled.yaml | 12 +- generated/connectors/connectors.gen.go | 9 +- go.mod | 13 ++ go.sum | 36 ++++++ internal/kibana/connector_test.go | 162 +++++++++++++++++++++++++ 5 files changed, 215 insertions(+), 17 deletions(-) diff --git a/generated/connectors/bundled.yaml b/generated/connectors/bundled.yaml index 3fca7adc8..6d443cb9f 100644 --- a/generated/connectors/bundled.yaml +++ b/generated/connectors/bundled.yaml @@ -1122,11 +1122,7 @@ components: title: Connector secrets properties for a PagerDuty connector description: Defines secrets for connectors when type is `.pagerduty`. type: object - required: - - routingKey - properties: - routingKey: - type: string + additionalProperties: true create_connector_request_pagerduty: title: Create PagerDuty connector request description: | @@ -1656,11 +1652,7 @@ components: title: Connector secrets properties for a Tines connector description: Defines secrets for connectors when type is `.tines`. type: object - properties: - email: - type: string - token: - type: string + additionalProperties: true create_connector_request_tines: title: Create Tines connector request description: | diff --git a/generated/connectors/connectors.gen.go b/generated/connectors/connectors.gen.go index 9b63ac12b..5ebfc9acd 100644 --- a/generated/connectors/connectors.gen.go +++ b/generated/connectors/connectors.gen.go @@ -1945,9 +1945,7 @@ type SecretsPropertiesOpsgenie struct { } // SecretsPropertiesPagerduty Defines secrets for connectors when type is `.pagerduty`. -type SecretsPropertiesPagerduty struct { - RoutingKey string `json:"routingKey"` -} +type SecretsPropertiesPagerduty map[string]interface{} // SecretsPropertiesResilient Defines secrets for connectors when type is `.resilient`. type SecretsPropertiesResilient struct { @@ -1989,10 +1987,7 @@ type SecretsPropertiesSwimlane struct { type SecretsPropertiesTeams map[string]interface{} // SecretsPropertiesTines Defines secrets for connectors when type is `.tines`. -type SecretsPropertiesTines struct { - Email *string `json:"email,omitempty"` - Token *string `json:"token,omitempty"` -} +type SecretsPropertiesTines map[string]interface{} // SecretsPropertiesWebhook Defines secrets for connectors when type is `.webhook`. type SecretsPropertiesWebhook map[string]interface{} diff --git a/go.mod b/go.mod index ff14bf605..0d10a5fe7 100644 --- a/go.mod +++ b/go.mod @@ -21,6 +21,9 @@ require ( github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/color v1.15.0 // indirect + github.com/getkin/kin-openapi v0.107.0 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/swag v0.21.1 // indirect github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/go-cmp v0.5.9 // indirect @@ -40,7 +43,12 @@ require ( github.com/hashicorp/terraform-registry-address v0.2.0 // indirect github.com/hashicorp/terraform-svchost v0.0.1 // indirect github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect + github.com/invopop/yaml v0.1.0 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/kr/pretty v0.3.0 // indirect + github.com/labstack/echo/v4 v4.9.1 // indirect + github.com/labstack/gommon v0.4.0 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.18 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect @@ -48,10 +56,13 @@ require ( github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/oklog/run v1.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect + github.com/valyala/bytebufferpool v1.0.0 // indirect + github.com/valyala/fasttemplate v1.2.2 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect @@ -61,9 +72,11 @@ require ( golang.org/x/net v0.9.0 // indirect golang.org/x/sys v0.7.0 // indirect golang.org/x/text v0.9.0 // indirect + golang.org/x/tools v0.6.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect google.golang.org/grpc v1.54.0 // indirect google.golang.org/protobuf v1.30.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index e3bacdb43..d6831983d 100644 --- a/go.sum +++ b/go.sum @@ -38,6 +38,8 @@ github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYF github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/getkin/kin-openapi v0.107.0 h1:bxhL6QArW7BXQj8NjXfIJQy680NsMKd25nwhvpCXchg= +github.com/getkin/kin-openapi v0.107.0/go.mod h1:9Dhr+FasATJZjS4iOLvB0hkaxgYdulrNYm2e9epLWOo= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= @@ -47,6 +49,11 @@ github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= +github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= @@ -64,6 +71,7 @@ github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -115,10 +123,14 @@ github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/invopop/yaml v0.1.0 h1:YW3WGUoJEXYfzWBjn00zIlrw7brGVD0fUKRYDPAPhrc= +github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= @@ -132,9 +144,19 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/labstack/echo/v4 v4.9.1 h1:GliPYSpzGKlyOhqIbG8nmHBo3i1saKWFOgh41AN3b+Y= +github.com/labstack/echo/v4 v4.9.1/go.mod h1:Pop5HLc+xoc4qhTZ1ip6C0RtP7Z+4VzRLWZZFKqbbjo= +github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= +github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= @@ -160,6 +182,8 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= @@ -195,6 +219,11 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= +github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -251,6 +280,7 @@ golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -275,6 +305,8 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -300,7 +332,11 @@ gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index 5e8dc15d3..85bd088bb 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -396,6 +396,168 @@ func TestAccResourceKibanaConnectorJira(t *testing.T) { }) } +func TestAccResourceKibanaConnectorOpsgenie(t *testing.T) { + minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) + + create := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "%s" + config = jsonencode({ + apiUrl = "https://elastic.co" + }) + secrets = jsonencode({ + apiKey = "key1" + }) + connector_type_id = ".opsgenie" + }`, + name) + } + + update := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "Updated %s" + config = jsonencode({ + apiUrl = "https://elasticsearch.com" + }) + secrets = jsonencode({ + apiKey = "key2" + }) + connector_type_id = ".opsgenie" + }`, + name) + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(t) }, + CheckDestroy: checkResourceKibanaConnectorDestroy, + ProtoV5ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: create(connectorName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".opsgenie"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"https://elastic\.co\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"apiKey\":\"key1\"`)), + ), + }, + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: update(connectorName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".opsgenie"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"https://elasticsearch\.com\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"apiKey\":\"key2\"`)), + ), + }, + }, + }) +} + +func TestAccResourceKibanaConnectorPagerduty(t *testing.T) { + minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) + + create := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "%s" + config = jsonencode({ + }) + secrets = jsonencode({ + routingKey = "test1" + }) + connector_type_id = ".pagerduty" + }`, + name) + } + + update := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "Updated %s" + config = jsonencode({ + }) + secrets = jsonencode({ + routingKey = "test2" + }) + connector_type_id = ".pagerduty" + }`, + name) + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(t) }, + CheckDestroy: checkResourceKibanaConnectorDestroy, + ProtoV5ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: create(connectorName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".pagerduty"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"routingKey\":\"test1\"`)), + ), + }, + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: update(connectorName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".pagerduty"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"routingKey\":\"test2\"`)), + ), + }, + }, + }) +} + func checkResourceKibanaConnectorDestroy(s *terraform.State) error { client, err := clients.NewAcceptanceTestingClient() if err != nil { From 4940790e92fcb9b5ac2c00fba597bdfc87289d3e Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 11 May 2023 17:10:41 +0200 Subject: [PATCH 35/59] acc test for resilient --- internal/kibana/connector_test.go | 92 +++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index 85bd088bb..83b14ce31 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -558,6 +558,98 @@ func TestAccResourceKibanaConnectorPagerduty(t *testing.T) { }) } +func TestAccResourceKibanaConnectorResilient(t *testing.T) { + minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) + + create := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "%s" + config = jsonencode({ + apiUrl = "https://elastic.co" + orgId = "id1" + }) + secrets = jsonencode({ + apiKeyId = "key1" + apiKeySecret = "secret1" + }) + connector_type_id = ".resilient" + }`, + name) + } + + update := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "Updated %s" + config = jsonencode({ + apiUrl = "https://elasticsearch.com" + orgId = "id2" + }) + secrets = jsonencode({ + apiKeyId = "key2" + apiKeySecret = "secret2" + }) + connector_type_id = ".resilient" + }`, + name) + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(t) }, + CheckDestroy: checkResourceKibanaConnectorDestroy, + ProtoV5ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: create(connectorName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".resilient"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"https://elastic\.co\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"orgId\":\"id1\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"apiKeyId\":\"key1\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"apiKeySecret\":\"secret1\"`)), + ), + }, + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: update(connectorName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".resilient"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"https://elasticsearch\.com\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"orgId\":\"id2\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"apiKeyId\":\"key2\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"apiKeySecret\":\"secret2\"`)), + ), + }, + }, + }) +} + func checkResourceKibanaConnectorDestroy(s *terraform.State) error { client, err := clients.NewAcceptanceTestingClient() if err != nil { From db32a5d4ba25980bdbd898c33dfabc31e5cceaea Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 11 May 2023 17:11:33 +0200 Subject: [PATCH 36/59] increase minimum supported version for opsgenie --- internal/kibana/connector_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index 83b14ce31..80e2433ad 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -397,7 +397,7 @@ func TestAccResourceKibanaConnectorJira(t *testing.T) { } func TestAccResourceKibanaConnectorOpsgenie(t *testing.T) { - minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + minSupportedVersion := version.Must(version.NewSemver("8.6.0")) connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) From 41415e7d76010bbf14cdf2153f754ffc5896e49f Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 11 May 2023 17:29:48 +0200 Subject: [PATCH 37/59] acc tests refactoring --- internal/kibana/connector_test.go | 94 ++++++++----------------------- 1 file changed, 24 insertions(+), 70 deletions(-) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index 80e2433ad..bb1dfee22 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -87,11 +87,7 @@ func TestAccResourceKibanaConnectorCasesWebhook(t *testing.T) { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), Config: create(connectorName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".cases-webhook"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + testCommonAttributes(connectorName, ".cases-webhook"), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"createIncidentJson\":\"{}\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"createIncidentResponseKey\":\"key\"`)), @@ -112,11 +108,7 @@ func TestAccResourceKibanaConnectorCasesWebhook(t *testing.T) { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), Config: update(connectorName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".cases-webhook"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + testCommonAttributes(fmt.Sprintf("Updated %s", connectorName), ".cases-webhook"), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"createIncidentJson\":\"{}\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"createIncidentResponseKey\":\"key\"`)), @@ -193,11 +185,7 @@ func TestAccResourceKibanaConnectorEmail(t *testing.T) { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), Config: create(connectorName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".email"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + testCommonAttributes(connectorName, ".email"), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"from\":\"test@elastic\.co\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"port\":111`)), @@ -208,11 +196,7 @@ func TestAccResourceKibanaConnectorEmail(t *testing.T) { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), Config: update(connectorName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".email"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + testCommonAttributes(fmt.Sprintf("Updated %s", connectorName), ".email"), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"from\":\"test2@elastic\.co\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"port\":222`)), @@ -276,11 +260,7 @@ func TestAccResourceKibanaConnectorIndex(t *testing.T) { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), Config: create(connectorName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".index"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + testCommonAttributes(connectorName, ".index"), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"index\":\"\.kibana\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"refresh\":true`)), @@ -290,11 +270,7 @@ func TestAccResourceKibanaConnectorIndex(t *testing.T) { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), Config: update(connectorName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".index"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + testCommonAttributes(fmt.Sprintf("Updated %s", connectorName), ".index"), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"index\":\"\.kibana\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"refresh\":false`)), @@ -362,11 +338,7 @@ func TestAccResourceKibanaConnectorJira(t *testing.T) { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), Config: create(connectorName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".jira"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + testCommonAttributes(connectorName, ".jira"), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"url1\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"projectKey\":\"project1\"`)), @@ -379,11 +351,7 @@ func TestAccResourceKibanaConnectorJira(t *testing.T) { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), Config: update(connectorName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".jira"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + testCommonAttributes(fmt.Sprintf("Updated %s", connectorName), ".jira"), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"url2\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"projectKey\":\"project2\"`)), @@ -450,11 +418,7 @@ func TestAccResourceKibanaConnectorOpsgenie(t *testing.T) { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), Config: create(connectorName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".opsgenie"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + testCommonAttributes(connectorName, ".opsgenie"), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"https://elastic\.co\"`)), @@ -465,11 +429,7 @@ func TestAccResourceKibanaConnectorOpsgenie(t *testing.T) { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), Config: update(connectorName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".opsgenie"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + testCommonAttributes(fmt.Sprintf("Updated %s", connectorName), ".opsgenie"), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"https://elasticsearch\.com\"`)), @@ -532,11 +492,7 @@ func TestAccResourceKibanaConnectorPagerduty(t *testing.T) { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), Config: create(connectorName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".pagerduty"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + testCommonAttributes(connectorName, ".pagerduty"), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"routingKey\":\"test1\"`)), ), @@ -545,11 +501,7 @@ func TestAccResourceKibanaConnectorPagerduty(t *testing.T) { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), Config: update(connectorName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".pagerduty"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + testCommonAttributes(fmt.Sprintf("Updated %s", connectorName), ".pagerduty"), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"routingKey\":\"test2\"`)), ), @@ -616,11 +568,7 @@ func TestAccResourceKibanaConnectorResilient(t *testing.T) { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), Config: create(connectorName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".resilient"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + testCommonAttributes(connectorName, ".resilient"), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"https://elastic\.co\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"orgId\":\"id1\"`)), @@ -633,11 +581,7 @@ func TestAccResourceKibanaConnectorResilient(t *testing.T) { SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), Config: update(connectorName), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".resilient"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + testCommonAttributes(fmt.Sprintf("Updated %s", connectorName), ".resilient"), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"https://elasticsearch\.com\"`)), resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"orgId\":\"id2\"`)), @@ -650,6 +594,16 @@ func TestAccResourceKibanaConnectorResilient(t *testing.T) { }) } +func testCommonAttributes(connectorName, connectorTypeID string) resource.TestCheckFunc { + return resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", connectorTypeID), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + ) +} + func checkResourceKibanaConnectorDestroy(s *terraform.State) error { client, err := clients.NewAcceptanceTestingClient() if err != nil { From 0b4127f07ffc6ce2c729f1c55077b7287d7d8b3d Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 11 May 2023 19:15:45 +0200 Subject: [PATCH 38/59] acc test for server-log --- internal/kibana/connector_test.go | 57 +++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index bb1dfee22..8bca1813f 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -594,6 +594,63 @@ func TestAccResourceKibanaConnectorResilient(t *testing.T) { }) } +func TestAccResourceKibanaConnectorServerLog(t *testing.T) { + minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) + + create := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "%s" + connector_type_id = ".server-log" + }`, + name) + } + + update := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "Updated %s" + connector_type_id = ".server-log" + }`, + name) + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(t) }, + CheckDestroy: checkResourceKibanaConnectorDestroy, + ProtoV5ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: create(connectorName), + Check: resource.ComposeTestCheckFunc( + testCommonAttributes(connectorName, ".server-log"), + ), + }, + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: update(connectorName), + Check: resource.ComposeTestCheckFunc( + testCommonAttributes(fmt.Sprintf("Updated %s", connectorName), ".server-log"), + ), + }, + }, + }) +} + + func testCommonAttributes(connectorName, connectorTypeID string) resource.TestCheckFunc { return resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), From 3acaa4a5d042ad2636313d16ceb377cecd61196a Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 11 May 2023 19:28:17 +0200 Subject: [PATCH 39/59] acc test for servicenow --- internal/kibana/connector_test.go | 89 +++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index 8bca1813f..6256a3ff9 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -650,6 +650,95 @@ func TestAccResourceKibanaConnectorServerLog(t *testing.T) { }) } +func TestAccResourceKibanaConnectorServicenow(t *testing.T) { + minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) + + create := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "%s" + config = jsonencode({ + apiUrl = "https://elastic.co" + + }) + secrets = jsonencode({ + username = "user1" + password = "password1" + }) + connector_type_id = ".servicenow" + }`, + name) + } + + update := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "Updated %s" + config = jsonencode({ + apiUrl = "https://elasticsearch.com" + + }) + secrets = jsonencode({ + username = "user2" + password = "password2" + }) + connector_type_id = ".servicenow" + }`, + name) + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(t) }, + CheckDestroy: checkResourceKibanaConnectorDestroy, + ProtoV5ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: create(connectorName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".servicenow"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "true"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"https://elastic\.co\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"username\":\"user1\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"password\":\"password1\"`)), + ), + }, + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: update(connectorName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".servicenow"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "true"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"https://elasticsearch\.com\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"username\":\"user2\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"password\":\"password2\"`)), + ), + }, + }, + }) +} func testCommonAttributes(connectorName, connectorTypeID string) resource.TestCheckFunc { return resource.ComposeTestCheckFunc( From 85404132525044aa61a367fb15fb2bfd15b30dd0 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 11 May 2023 19:34:09 +0200 Subject: [PATCH 40/59] acc test for servicenow-itom --- internal/kibana/connector_test.go | 82 +++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index 6256a3ff9..4a5b9f64f 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -740,6 +740,88 @@ func TestAccResourceKibanaConnectorServicenow(t *testing.T) { }) } +func TestAccResourceKibanaConnectorServicenowItom(t *testing.T) { + minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) + + create := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "%s" + config = jsonencode({ + apiUrl = "https://elastic.co" + + }) + secrets = jsonencode({ + username = "user1" + password = "password1" + }) + connector_type_id = ".servicenow-itom" + }`, + name) + } + + update := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "Updated %s" + config = jsonencode({ + apiUrl = "https://elasticsearch.com" + + }) + secrets = jsonencode({ + username = "user2" + password = "password2" + }) + connector_type_id = ".servicenow-itom" + }`, + name) + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(t) }, + CheckDestroy: checkResourceKibanaConnectorDestroy, + ProtoV5ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: create(connectorName), + Check: resource.ComposeTestCheckFunc( + testCommonAttributes(connectorName, ".servicenow-itom"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"https://elastic\.co\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"username\":\"user1\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"password\":\"password1\"`)), + ), + }, + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: update(connectorName), + Check: resource.ComposeTestCheckFunc( + testCommonAttributes(fmt.Sprintf("Updated %s", connectorName), ".servicenow-itom"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"https://elasticsearch\.com\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"username\":\"user2\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"password\":\"password2\"`)), + ), + }, + }, + }) +} + func testCommonAttributes(connectorName, connectorTypeID string) resource.TestCheckFunc { return resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), From 731f21638b4224ef06e8e3471154a47f94eee49c Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 11 May 2023 21:18:10 +0200 Subject: [PATCH 41/59] fix acc test --- internal/kibana/connector_test.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index 4a5b9f64f..82ba4df6e 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -666,7 +666,6 @@ func TestAccResourceKibanaConnectorServicenow(t *testing.T) { name = "%s" config = jsonencode({ apiUrl = "https://elastic.co" - }) secrets = jsonencode({ username = "user1" @@ -710,7 +709,6 @@ func TestAccResourceKibanaConnectorServicenow(t *testing.T) { Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".servicenow"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "true"), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), @@ -726,7 +724,6 @@ func TestAccResourceKibanaConnectorServicenow(t *testing.T) { Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".servicenow"), - resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_deprecated", "true"), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), @@ -741,7 +738,7 @@ func TestAccResourceKibanaConnectorServicenow(t *testing.T) { } func TestAccResourceKibanaConnectorServicenowItom(t *testing.T) { - minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + minSupportedVersion := version.Must(version.NewSemver("8.3.0")) connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) From e78c67d61de616ab22a4fbf3bdd8c2c3e29f143b Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 11 May 2023 21:31:20 +0200 Subject: [PATCH 42/59] fix acc test --- internal/clients/kibana/connector.go | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index 05d67a5a4..91131b985 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -201,7 +201,7 @@ func ConnectorConfigWithDefaults(connectorTypeID, plan, backend, state string) ( return connectorConfigWithDefaultsResilient(plan) case connectors.ConnectorTypesDotServicenow: - return connectorConfigWithDefaultsServicenow(plan) + return connectorConfigWithDefaultsServicenow(plan, backend) case connectors.ConnectorTypesDotServicenowItom: return connectorConfigWithDefaultsServicenowItom(plan) @@ -316,20 +316,24 @@ func connectorConfigWithDefaultsResilient(plan string) (string, error) { return plan, nil } -func connectorConfigWithDefaultsServicenow(plan string) (string, error) { - var custom connectors.ConfigPropertiesServicenow - if err := json.Unmarshal([]byte(plan), &custom); err != nil { +func connectorConfigWithDefaultsServicenow(plan, backend string) (string, error) { + var planConfig connectors.ConfigPropertiesServicenow + if err := json.Unmarshal([]byte(plan), &planConfig); err != nil { return "", err } - if custom.IsOAuth == nil { - custom.IsOAuth = new(bool) - *custom.IsOAuth = false + var backendConfig connectors.ConfigPropertiesServicenow + if err := json.Unmarshal([]byte(plan), &backendConfig); err != nil { + return "", err } - if custom.UsesTableApi == nil { - custom.UsesTableApi = new(bool) - *custom.UsesTableApi = true + if planConfig.IsOAuth == nil && backendConfig.IsOAuth != nil && *backendConfig.IsOAuth == false { + planConfig.IsOAuth = new(bool) + *planConfig.IsOAuth = false } - customJSON, err := json.Marshal(custom) + if planConfig.UsesTableApi == nil { + planConfig.UsesTableApi = new(bool) + *planConfig.UsesTableApi = true + } + customJSON, err := json.Marshal(planConfig) if err != nil { return "", err } From 90ee63a25f9dca96dda5ef89aae103f61abab779 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 11 May 2023 21:35:00 +0200 Subject: [PATCH 43/59] fix acc test --- internal/clients/kibana/connector.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index 91131b985..d01186ffc 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -207,7 +207,7 @@ func ConnectorConfigWithDefaults(connectorTypeID, plan, backend, state string) ( return connectorConfigWithDefaultsServicenowItom(plan) case connectors.ConnectorTypesDotServicenowSir: - return connectorConfigWithDefaultsServicenowSir(plan) + return connectorConfigWithDefaultsServicenowSir(plan, backend) case connectors.ConnectorTypesDotSwimlane: return connectorConfigWithDefaultsSwimlane(plan) @@ -322,10 +322,10 @@ func connectorConfigWithDefaultsServicenow(plan, backend string) (string, error) return "", err } var backendConfig connectors.ConfigPropertiesServicenow - if err := json.Unmarshal([]byte(plan), &backendConfig); err != nil { + if err := json.Unmarshal([]byte(backend), &backendConfig); err != nil { return "", err } - if planConfig.IsOAuth == nil && backendConfig.IsOAuth != nil && *backendConfig.IsOAuth == false { + if planConfig.IsOAuth == nil && backendConfig.IsOAuth != nil && !*backendConfig.IsOAuth { planConfig.IsOAuth = new(bool) *planConfig.IsOAuth = false } @@ -356,8 +356,8 @@ func connectorConfigWithDefaultsServicenowItom(plan string) (string, error) { return string(customJSON), nil } -func connectorConfigWithDefaultsServicenowSir(plan string) (string, error) { - return connectorConfigWithDefaultsServicenow(plan) +func connectorConfigWithDefaultsServicenowSir(plan, backend string) (string, error) { + return connectorConfigWithDefaultsServicenow(plan, backend) } func connectorConfigWithDefaultsSwimlane(plan string) (string, error) { From dff0e60388fc96c07e188f03a93a96a1604b3774 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 11 May 2023 22:03:37 +0200 Subject: [PATCH 44/59] acc test for servicenow-sir --- internal/kibana/connector_test.go | 88 ++++++++++++++++++++++++++++++- 1 file changed, 86 insertions(+), 2 deletions(-) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index 82ba4df6e..927ab940b 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -753,7 +753,6 @@ func TestAccResourceKibanaConnectorServicenowItom(t *testing.T) { name = "%s" config = jsonencode({ apiUrl = "https://elastic.co" - }) secrets = jsonencode({ username = "user1" @@ -775,7 +774,6 @@ func TestAccResourceKibanaConnectorServicenowItom(t *testing.T) { name = "Updated %s" config = jsonencode({ apiUrl = "https://elasticsearch.com" - }) secrets = jsonencode({ username = "user2" @@ -819,6 +817,92 @@ func TestAccResourceKibanaConnectorServicenowItom(t *testing.T) { }) } +func TestAccResourceKibanaConnectorServicenowSir(t *testing.T) { + minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) + + create := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "%s" + config = jsonencode({ + apiUrl = "https://elastic.co" + }) + secrets = jsonencode({ + username = "user1" + password = "password1" + }) + connector_type_id = ".servicenow-sir" + }`, + name) + } + + update := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "Updated %s" + config = jsonencode({ + apiUrl = "https://elasticsearch.com" + }) + secrets = jsonencode({ + username = "user2" + password = "password2" + }) + connector_type_id = ".servicenow-sir" + }`, + name) + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(t) }, + CheckDestroy: checkResourceKibanaConnectorDestroy, + ProtoV5ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: create(connectorName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".servicenow-sir"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"https://elastic\.co\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"username\":\"user1\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"password\":\"password1\"`)), + ), + }, + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: update(connectorName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", fmt.Sprintf("Updated %s", connectorName)), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "connector_type_id", ".servicenow-sir"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_missing_secrets", "false"), + resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "is_preconfigured", "false"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"https://elasticsearch\.com\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"username\":\"user2\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"password\":\"password2\"`)), + ), + }, + }, + }) +} + func testCommonAttributes(connectorName, connectorTypeID string) resource.TestCheckFunc { return resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), From 60c7dfca19d9e9c0bd234ac6b580d237a570431f Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Thu, 11 May 2023 22:36:56 +0200 Subject: [PATCH 45/59] acc test for slack --- internal/kibana/connector_test.go | 66 +++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index 927ab940b..4defaa700 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -903,6 +903,72 @@ func TestAccResourceKibanaConnectorServicenowSir(t *testing.T) { }) } +func TestAccResourceKibanaConnectorSlack(t *testing.T) { + minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) + + create := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "%s" + secrets = jsonencode({ + webhookUrl = "https://elastic.co" + }) + connector_type_id = ".slack" + }`, + name) + } + + update := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "Updated %s" + secrets = jsonencode({ + webhookUrl = "https://elasticsearch.com" + }) + connector_type_id = ".slack" + }`, + name) + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(t) }, + CheckDestroy: checkResourceKibanaConnectorDestroy, + ProtoV5ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: create(connectorName), + Check: resource.ComposeTestCheckFunc( + testCommonAttributes(connectorName, ".slack"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"webhookUrl\":\"https://elastic\.co\"`)), + ), + }, + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: update(connectorName), + Check: resource.ComposeTestCheckFunc( + testCommonAttributes(fmt.Sprintf("Updated %s", connectorName), ".slack"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"webhookUrl\":\"https://elasticsearch\.com\"`)), + ), + }, + }, + }) +} + func testCommonAttributes(connectorName, connectorTypeID string) resource.TestCheckFunc { return resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), From 91d81bb471fc29ce0671c1a90e498a884f839111 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Fri, 12 May 2023 17:12:00 +0200 Subject: [PATCH 46/59] acc test for swimlane --- internal/kibana/connector_test.go | 108 ++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index 4defaa700..cc56037b5 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -969,6 +969,114 @@ func TestAccResourceKibanaConnectorSlack(t *testing.T) { }) } +func TestAccResourceKibanaConnectorSwimlane(t *testing.T) { + minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) + + create := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "%s" + config = jsonencode({ + apiUrl = "https://elastic.co" + appId = "test1" + connectorType = "all" + mappings = { + alertIdConfig = { + fieldType = "type1" + id = "id1" + key = "key1" + name = "name1" + } + } + }) + secrets = jsonencode({ + apiToken = "token1" + }) + connector_type_id = ".swimlane" + }`, + name) + } + + update := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "Updated %s" + config = jsonencode({ + apiUrl = "https://elasticsearch.com" + appId = "test2" + connectorType = "all" + mappings = { + alertIdConfig = { + fieldType = "type2" + id = "id2" + key = "key2" + name = "name2" + } + } + }) + secrets = jsonencode({ + apiToken = "token2" + }) + connector_type_id = ".swimlane" + }`, + name) + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(t) }, + CheckDestroy: checkResourceKibanaConnectorDestroy, + ProtoV5ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: create(connectorName), + Check: resource.ComposeTestCheckFunc( + testCommonAttributes(connectorName, ".swimlane"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"https://elastic\.co\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"appId\":\"test1\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"connectorType\":\"all\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"fieldType\":\"type1\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"id\":\"id1\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"key\":\"key1\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"name\":\"name1\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"apiToken\":\"token1\"`)), + ), + }, + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: update(connectorName), + Check: resource.ComposeTestCheckFunc( + testCommonAttributes(fmt.Sprintf("Updated %s", connectorName), ".swimlane"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"apiUrl\":\"https://elasticsearch\.com\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"appId\":\"test2\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"connectorType\":\"all\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"fieldType\":\"type2\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"id\":\"id2\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"key\":\"key2\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"name\":\"name2\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"apiToken\":\"token2\"`)), + ), + }, + }, + }) +} + func testCommonAttributes(connectorName, connectorTypeID string) resource.TestCheckFunc { return resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), From b758fd8e07704eb24612b5a68385345de1029174 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Fri, 12 May 2023 17:26:10 +0200 Subject: [PATCH 47/59] acc test for teams --- internal/kibana/connector_test.go | 66 +++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index cc56037b5..17309c442 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -1077,6 +1077,72 @@ func TestAccResourceKibanaConnectorSwimlane(t *testing.T) { }) } +func TestAccResourceKibanaConnectorTeams(t *testing.T) { + minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) + + create := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "%s" + secrets = jsonencode({ + webhookUrl = "https://elastic.co" + }) + connector_type_id = ".teams" + }`, + name) + } + + update := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "Updated %s" + secrets = jsonencode({ + webhookUrl = "https://elasticsearch.com" + }) + connector_type_id = ".teams" + }`, + name) + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(t) }, + CheckDestroy: checkResourceKibanaConnectorDestroy, + ProtoV5ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: create(connectorName), + Check: resource.ComposeTestCheckFunc( + testCommonAttributes(connectorName, ".teams"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"webhookUrl\":\"https://elastic\.co\"`)), + ), + }, + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: update(connectorName), + Check: resource.ComposeTestCheckFunc( + testCommonAttributes(fmt.Sprintf("Updated %s", connectorName), ".teams"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"webhookUrl\":\"https://elasticsearch\.com\"`)), + ), + }, + }, + }) +} + func testCommonAttributes(connectorName, connectorTypeID string) resource.TestCheckFunc { return resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), From 130c95cb5e94edf36096f4ae80205b09e0e8b34f Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Fri, 12 May 2023 17:34:31 +0200 Subject: [PATCH 48/59] acc test for tines --- internal/kibana/connector_test.go | 80 +++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index 17309c442..dcee650f5 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -1143,6 +1143,86 @@ func TestAccResourceKibanaConnectorTeams(t *testing.T) { }) } +func TestAccResourceKibanaConnectorTines(t *testing.T) { + minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) + + create := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "%s" + config = jsonencode({ + url = "https://elastic.co" + }) + secrets = jsonencode({ + email = "test@elastic.co" + token = "token1" + }) + connector_type_id = ".tines" + }`, + name) + } + + update := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "Updated %s" + config = jsonencode({ + url = "https://elasticsearch.com" + }) + secrets = jsonencode({ + email = "test@elasticsearch.com" + token = "token2" + }) + connector_type_id = ".tines" + }`, + name) + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(t) }, + CheckDestroy: checkResourceKibanaConnectorDestroy, + ProtoV5ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: create(connectorName), + Check: resource.ComposeTestCheckFunc( + testCommonAttributes(connectorName, ".tines"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"url\":\"https://elastic\.co\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"email\":\"test@elastic\.co\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"token\":\"token1"`)), + ), + }, + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: update(connectorName), + Check: resource.ComposeTestCheckFunc( + testCommonAttributes(fmt.Sprintf("Updated %s", connectorName), ".tines"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"url\":\"https://elasticsearch\.com\"`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"email\":\"test@elasticsearch\.com\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"token\":\"token2"`)), + ), + }, + }, + }) +} + func testCommonAttributes(connectorName, connectorTypeID string) resource.TestCheckFunc { return resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), From 6241ddde7e0ccc8541236f4706986300c3074372 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Fri, 12 May 2023 17:39:09 +0200 Subject: [PATCH 49/59] acc test for webhook --- internal/kibana/connector_test.go | 68 +++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index dcee650f5..05f2aeed6 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -1223,6 +1223,74 @@ func TestAccResourceKibanaConnectorTines(t *testing.T) { }) } +func TestAccResourceKibanaConnectorWebhook(t *testing.T) { + minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) + + create := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "%s" + config = jsonencode({ + url = "https://elastic.co" + }) + secrets = jsonencode({}) + connector_type_id = ".webhook" + }`, + name) + } + + update := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "Updated %s" + config = jsonencode({ + url = "https://elasticsearch.com" + }) + secrets = jsonencode({}) + connector_type_id = ".webhook" + }`, + name) + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(t) }, + CheckDestroy: checkResourceKibanaConnectorDestroy, + ProtoV5ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: create(connectorName), + Check: resource.ComposeTestCheckFunc( + testCommonAttributes(connectorName, ".webhook"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"url\":\"https://elastic\.co\"`)), + ), + }, + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: update(connectorName), + Check: resource.ComposeTestCheckFunc( + testCommonAttributes(fmt.Sprintf("Updated %s", connectorName), ".webhook"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"url\":\"https://elasticsearch\.com\"`)), + ), + }, + }, + }) +} + func testCommonAttributes(connectorName, connectorTypeID string) resource.TestCheckFunc { return resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), From 938172c29634e6ce00e270df1f81d31e86e10232 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Fri, 12 May 2023 18:05:20 +0200 Subject: [PATCH 50/59] acc test for xmatters plus fix of minimum support version for tines --- generated/connectors/bundled.yaml | 8 ++- generated/connectors/connectors.gen.go | 5 +- internal/clients/kibana/connector.go | 16 ++++- internal/kibana/connector_test.go | 82 +++++++++++++++++++++++++- 4 files changed, 106 insertions(+), 5 deletions(-) diff --git a/generated/connectors/bundled.yaml b/generated/connectors/bundled.yaml index 6d443cb9f..c5ec5a3bb 100644 --- a/generated/connectors/bundled.yaml +++ b/generated/connectors/bundled.yaml @@ -1734,7 +1734,13 @@ components: title: Connector request properties for a xMatters connector description: Defines properties for connectors when type is `.xmatters`. type: object - additionalProperties: true + properties: + configUrl: + type: string + nullable: true + usesBasic: + type: boolean + default: true secrets_properties_xmatters: title: Connector secrets properties for an xMatters connector description: Defines secrets for connectors when type is `.xmatters`. diff --git a/generated/connectors/connectors.gen.go b/generated/connectors/connectors.gen.go index 5ebfc9acd..5e81e8c35 100644 --- a/generated/connectors/connectors.gen.go +++ b/generated/connectors/connectors.gen.go @@ -716,7 +716,10 @@ type ConfigPropertiesWebhook struct { type ConfigPropertiesWebhookMethod string // ConfigPropertiesXmatters Defines properties for connectors when type is `.xmatters`. -type ConfigPropertiesXmatters map[string]interface{} +type ConfigPropertiesXmatters struct { + ConfigUrl *string `json:"configUrl"` + UsesBasic *bool `json:"usesBasic,omitempty"` +} // ConnectorResponseProperties The properties vary depending on the connector type. type ConnectorResponseProperties struct { diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index d01186ffc..c4fcf725d 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -384,7 +384,19 @@ func connectorConfigWithDefaultsWebhook(plan string) (string, error) { } func connectorConfigWithDefaultsXmatters(plan string) (string, error) { - return plan, nil + var custom connectors.ConfigPropertiesXmatters + if err := json.Unmarshal([]byte(plan), &custom); err != nil { + return "", err + } + if custom.UsesBasic == nil { + custom.UsesBasic = new(bool) + *custom.UsesBasic = true + } + customJSON, err := json.Marshal(custom) + if err != nil { + return "", err + } + return string(customJSON), nil } func createConnectorRequestBody(connector models.KibanaActionConnector) (io.Reader, error) { @@ -1441,7 +1453,7 @@ func connectorResponseToModelWebhook(discriminator, spaceID string, properties c } func connectorResponseToModelXmatters(discriminator, spaceID string, properties connectors.ConnectorResponseProperties) (*models.KibanaActionConnector, error) { - resp, err := properties.AsConnectorResponsePropertiesTines() + resp, err := properties.AsConnectorResponsePropertiesXmatters() if err != nil { return nil, err } diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index 05f2aeed6..e2bb768aa 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -1144,7 +1144,7 @@ func TestAccResourceKibanaConnectorTeams(t *testing.T) { } func TestAccResourceKibanaConnectorTines(t *testing.T) { - minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + minSupportedVersion := version.Must(version.NewSemver("8.6.0")) connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) @@ -1291,6 +1291,86 @@ func TestAccResourceKibanaConnectorWebhook(t *testing.T) { }) } +func TestAccResourceKibanaConnectorXmatters(t *testing.T) { + minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + + connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) + + create := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "%s" + config = jsonencode({ + configUrl = "https://elastic.co" + usesBasic = true + }) + secrets = jsonencode({ + user = "user1" + password = "password1" + }) + connector_type_id = ".xmatters" + }`, + name) + } + + update := func(name string) string { + return fmt.Sprintf(` + provider "elasticstack" { + elasticsearch {} + kibana {} + } + + resource "elasticstack_kibana_action_connector" "test" { + name = "Updated %s" + config = jsonencode({ + usesBasic = false + }) + secrets = jsonencode({ + secretsUrl = "https://elasticsearch.com" + }) + connector_type_id = ".xmatters" + }`, + name) + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(t) }, + CheckDestroy: checkResourceKibanaConnectorDestroy, + ProtoV5ProviderFactories: acctest.Providers, + Steps: []resource.TestStep{ + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: create(connectorName), + Check: resource.ComposeTestCheckFunc( + testCommonAttributes(connectorName, ".xmatters"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"configUrl\":\"https://elastic\.co\"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"usesBasic\":true`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"user\":\"user1"`)), + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"password\":\"password1"`)), + ), + }, + { + SkipFunc: versionutils.CheckIfVersionIsUnsupported(minSupportedVersion), + Config: update(connectorName), + Check: resource.ComposeTestCheckFunc( + testCommonAttributes(fmt.Sprintf("Updated %s", connectorName), ".xmatters"), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "config", regexp.MustCompile(`\"usesBasic\":false`)), + + resource.TestMatchResourceAttr("elasticstack_kibana_action_connector.test", "secrets", regexp.MustCompile(`\"secretsUrl\":\"https://elasticsearch\.com\"`)), + ), + }, + }, + }) +} + func testCommonAttributes(connectorName, connectorTypeID string) resource.TestCheckFunc { return resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("elasticstack_kibana_action_connector.test", "name", connectorName), From 175bc134351df9c6a2503e92e3b859a86f798cdb Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Fri, 12 May 2023 23:12:48 +0200 Subject: [PATCH 51/59] fix matrix acc test --- internal/kibana/connector_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/kibana/connector_test.go b/internal/kibana/connector_test.go index e2bb768aa..140d17357 100644 --- a/internal/kibana/connector_test.go +++ b/internal/kibana/connector_test.go @@ -1292,7 +1292,7 @@ func TestAccResourceKibanaConnectorWebhook(t *testing.T) { } func TestAccResourceKibanaConnectorXmatters(t *testing.T) { - minSupportedVersion := version.Must(version.NewSemver("7.14.0")) + minSupportedVersion := version.Must(version.NewSemver("8.2.0")) connectorName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum) From 7cbc45ddbb003382108c50c57a4bb008edb97271 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Tue, 16 May 2023 17:24:39 +0200 Subject: [PATCH 52/59] unit test for connectorResponseToModel --- Makefile | 6 - internal/clients/kibana/alerting_test.go | 4 +- internal/clients/kibana/connector.go | 2 - internal/clients/kibana/connector_test.go | 210 +++++++++++----------- 4 files changed, 108 insertions(+), 114 deletions(-) diff --git a/Makefile b/Makefile index 48e266c43..331d6982b 100644 --- a/Makefile +++ b/Makefile @@ -127,12 +127,6 @@ docker-network: ## Create a dedicated network for ES and test runs set-kibana-password: ## Sets the ES KIBANA_SYSTEM_USERNAME's password to KIBANA_SYSTEM_PASSWORD. This expects Elasticsearch to be available at localhost:9200 @ $(call retry, 10, curl -X POST -u $(ELASTICSEARCH_USERNAME):$(ELASTICSEARCH_PASSWORD) -H "Content-Type: application/json" http://localhost:9200/_security/user/$(KIBANA_SYSTEM_USERNAME)/_password -d "{\"password\":\"$(KIBANA_SYSTEM_PASSWORD)\"}" | grep -q "^{}") -## TODO -# .PHONY: create-kibana-role -# ## {"elasticsearch":{"cluster":["all"],"indices":[],"run_as":["elastic"]},"kibana":[{"spaces":["*"],"base":[],"feature":{"actions":["all"]}}]} -# create-kibana-role: ## create role for testing kibana action connectors -# @ $(call retry, 10, curl -X PUT -u $(ELASTICSEARCH_USERNAME):$(ELASTICSEARCH_PASSWORD) -H "Content-Type: application/json" http://localhost:5601/api/security/role/test-connectors -d "{\"password\":\"$(KIBANA_SYSTEM_PASSWORD)\"}" | grep -q "^{}") - .PHONY: docker-clean docker-clean: ## Try to remove provisioned nodes and assigned network @ docker rm -f $(ELASTICSEARCH_NAME) $(KIBANA_NAME) || true diff --git a/internal/clients/kibana/alerting_test.go b/internal/clients/kibana/alerting_test.go index df64a9f0d..707ccaff8 100644 --- a/internal/clients/kibana/alerting_test.go +++ b/internal/clients/kibana/alerting_test.go @@ -103,12 +103,12 @@ func Test_ruleResponseToModel(t *testing.T) { Status: makePtr("firing"), }, Actions: []models.AlertingRuleAction{ - models.AlertingRuleAction{ + { Group: "group-1", ID: "id", Params: map[string]interface{}{}, }, - models.AlertingRuleAction{ + { Group: "group-2", ID: "id", Params: map[string]interface{}{}, diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index c4fcf725d..72f743df6 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -7,8 +7,6 @@ import ( "fmt" "io" - // "github.com/google/go-cmp/cmp" - "github.com/elastic/terraform-provider-elasticstack/generated/connectors" "github.com/elastic/terraform-provider-elasticstack/internal/clients" "github.com/elastic/terraform-provider-elasticstack/internal/models" diff --git a/internal/clients/kibana/connector_test.go b/internal/clients/kibana/connector_test.go index a801ef002..3be85481b 100644 --- a/internal/clients/kibana/connector_test.go +++ b/internal/clients/kibana/connector_test.go @@ -1,127 +1,129 @@ package kibana -/* import ( + "encoding/json" + "fmt" "testing" - "time" - "github.com/elastic/terraform-provider-elasticstack/generated/alerting" - "github.com/elastic/terraform-provider-elasticstack/generated/kibanaactions" + "github.com/elastic/terraform-provider-elasticstack/generated/connectors" "github.com/elastic/terraform-provider-elasticstack/internal/models" "github.com/stretchr/testify/require" ) -func Test_actionConnectorToModel(t *testing.T) { - now := time.Now() - tests := []struct { +func Test_connectorResponseToModel(t *testing.T) { + type testCase struct { name string spaceId string - connectorResponse *connectors.ConnectorResponseProperties + response connectors.ConnectorResponseProperties expectedModel *models.KibanaActionConnector - }{ - { - name: "nil response should return a nil model", - spaceId: "space-id", - connectorResponse: nil, - expectedModel: nil, - }, - { - name: "nil optional fields should not blow up the transform", - spaceId: "space-id", - connectorResponse: &connectors.ConnectorResponseProperties{ - Id: "id", - Name: "name", - Consumer: "consumer", - Params: map[string]interface{}{}, - RuleTypeId: "rule-type-id", - Enabled: true, - Tags: []string{"hello"}, - }, - expectedModel: &models.AlertingRule{ - ID: "id", - SpaceID: "space-id", - Name: "name", - Consumer: "consumer", - Params: map[string]interface{}{}, - RuleTypeID: "rule-type-id", - Enabled: makePtr(true), - Tags: []string{"hello"}, - Actions: []models.AlertingRuleAction{}, + expectedError error + } + + generator := func(connectorTypeID string, config any, propertiesGenerator func(*connectors.ConnectorResponseProperties) error) testCase { + return testCase{ + name: fmt.Sprintf("it should parse empty [%s] connector", connectorTypeID), + spaceId: "test", + response: func() connectors.ConnectorResponseProperties { + var properties connectors.ConnectorResponseProperties + err := propertiesGenerator(&properties) + require.Nil(t, err) + return properties + }(), + expectedModel: &models.KibanaActionConnector{ + SpaceID: "test", + ConnectorTypeID: connectorTypeID, + ConfigJSON: func() string { + if config == nil { + return "" + } + byt, err := json.Marshal(config) + require.Nil(t, err) + return string(byt) + }(), }, - }, + } + } + tests := []testCase{ { - name: "a full response should be successfully transformed", - spaceId: "space-id", - connectorResponse: &alerting.RuleResponseProperties{ - Id: "id", - Name: "name", - Consumer: "consumer", - Params: map[string]interface{}{}, - RuleTypeId: "rule-type-id", - Enabled: true, - Tags: []string{"hello"}, - NotifyWhen: makePtr(alerting.NotifyWhen("broken")), - Actions: []alerting.ActionsInner{ - { - Group: makePtr("group-1"), - Id: makePtr("id"), - Params: map[string]interface{}{}, - }, - { - Group: makePtr("group-2"), - Id: makePtr("id"), - Params: map[string]interface{}{}, - }, - }, - ExecutionStatus: alerting.RuleResponsePropertiesExecutionStatus{ - Status: makePtr("firing"), - LastExecutionDate: &now, - }, - ScheduledTaskId: makePtr("scheduled-task-id"), - Schedule: alerting.Schedule{ - Interval: makePtr("1m"), - }, - Throttle: *alerting.NewNullableString(makePtr("throttle")), - }, - expectedModel: &models.AlertingRule{ - ID: "id", - SpaceID: "space-id", - Name: "name", - Consumer: "consumer", - Params: map[string]interface{}{}, - RuleTypeID: "rule-type-id", - Enabled: makePtr(true), - Tags: []string{"hello"}, - NotifyWhen: "broken", - Schedule: models.AlertingRuleSchedule{Interval: "1m"}, - Throttle: makePtr("throttle"), - ScheduledTaskID: makePtr("scheduled-task-id"), - ExecutionStatus: models.AlertingRuleExecutionStatus{ - LastExecutionDate: &now, - Status: makePtr("firing"), - }, - Actions: []models.AlertingRuleAction{ - models.AlertingRuleAction{ - Group: "group-1", - ID: "id", - Params: map[string]interface{}{}, - }, - models.AlertingRuleAction{ - Group: "group-2", - ID: "id", - Params: map[string]interface{}{}, - }, - }, - }, + name: "it should fail if discriminator is unknown", + response: func() connectors.ConnectorResponseProperties { + discriminator := struct { + Discriminator string `json:"connector_type_id"` + }{"unknown-value"} + byt, err := json.Marshal(discriminator) + require.Nil(t, err) + var resp connectors.ConnectorResponseProperties + err = resp.UnmarshalJSON(byt) + require.Nil(t, err) + return resp + }(), + expectedError: func() error { return fmt.Errorf("unknown connector type [unknown-value]") }(), }, + generator(".cases-webhook", connectors.ConfigPropertiesCasesWebhook{}, func(props *connectors.ConnectorResponseProperties) error { + return props.FromConnectorResponsePropertiesCasesWebhook(connectors.ConnectorResponsePropertiesCasesWebhook{}) + }), + generator(".email", connectors.ConfigPropertiesEmail{}, func(props *connectors.ConnectorResponseProperties) error { + return props.FromConnectorResponsePropertiesEmail(connectors.ConnectorResponsePropertiesEmail{}) + }), + generator(".index", connectors.ConfigPropertiesIndex{}, func(props *connectors.ConnectorResponseProperties) error { + return props.FromConnectorResponsePropertiesIndex(connectors.ConnectorResponsePropertiesIndex{}) + }), + generator(".jira", connectors.ConfigPropertiesJira{}, func(props *connectors.ConnectorResponseProperties) error { + return props.FromConnectorResponsePropertiesJira(connectors.ConnectorResponsePropertiesJira{}) + }), + generator(".opsgenie", connectors.ConfigPropertiesOpsgenie{}, func(props *connectors.ConnectorResponseProperties) error { + return props.FromConnectorResponsePropertiesOpsgenie(connectors.ConnectorResponsePropertiesOpsgenie{}) + }), + generator(".pagerduty", connectors.ConfigPropertiesPagerduty{}, func(props *connectors.ConnectorResponseProperties) error { + return props.FromConnectorResponsePropertiesPagerduty(connectors.ConnectorResponsePropertiesPagerduty{}) + }), + generator(".resilient", connectors.ConfigPropertiesResilient{}, func(props *connectors.ConnectorResponseProperties) error { + return props.FromConnectorResponsePropertiesResilient(connectors.ConnectorResponsePropertiesResilient{}) + }), + generator(".server-log", map[string]interface{}{}, func(props *connectors.ConnectorResponseProperties) error { + return props.FromConnectorResponsePropertiesServerlog(connectors.ConnectorResponsePropertiesServerlog{ + Config: &map[string]interface{}{}, + }) + }), + generator(".servicenow", connectors.ConfigPropertiesServicenow{}, func(props *connectors.ConnectorResponseProperties) error { + return props.FromConnectorResponsePropertiesServicenow(connectors.ConnectorResponsePropertiesServicenow{}) + }), + generator(".servicenow-itom", connectors.ConfigPropertiesServicenowItom{}, func(props *connectors.ConnectorResponseProperties) error { + return props.FromConnectorResponsePropertiesServicenowItom(connectors.ConnectorResponsePropertiesServicenowItom{}) + }), + generator(".servicenow-sir", connectors.ConfigPropertiesServicenow{}, func(props *connectors.ConnectorResponseProperties) error { + return props.FromConnectorResponsePropertiesServicenowSir(connectors.ConnectorResponsePropertiesServicenowSir{}) + }), + generator(".slack", nil, func(props *connectors.ConnectorResponseProperties) error { + return props.FromConnectorResponsePropertiesSlack(connectors.ConnectorResponsePropertiesSlack{}) + }), + generator(".swimlane", connectors.ConfigPropertiesSwimlane{}, func(props *connectors.ConnectorResponseProperties) error { + return props.FromConnectorResponsePropertiesSwimlane(connectors.ConnectorResponsePropertiesSwimlane{}) + }), + generator(".teams", nil, func(props *connectors.ConnectorResponseProperties) error { + return props.FromConnectorResponsePropertiesTeams(connectors.ConnectorResponsePropertiesTeams{}) + }), + generator(".tines", connectors.ConfigPropertiesTines{}, func(props *connectors.ConnectorResponseProperties) error { + return props.FromConnectorResponsePropertiesTines(connectors.ConnectorResponsePropertiesTines{}) + }), + generator(".webhook", connectors.ConfigPropertiesWebhook{}, func(props *connectors.ConnectorResponseProperties) error { + return props.FromConnectorResponsePropertiesWebhook(connectors.ConnectorResponsePropertiesWebhook{}) + }), + generator(".xmatters", connectors.ConfigPropertiesXmatters{}, func(props *connectors.ConnectorResponseProperties) error { + return props.FromConnectorResponsePropertiesXmatters(connectors.ConnectorResponsePropertiesXmatters{}) + }), } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - model := ruleResponseToModel(tt.spaceId, tt.connectorResponse) + model, err := connectorResponseToModel(tt.spaceId, tt.response) - require.Equal(t, tt.expectedModel, model) + if tt.expectedError == nil { + require.Nil(t, err) + require.Equal(t, tt.expectedModel, model) + } else { + require.Equal(t, tt.expectedError, err) + } }) } } -*/ From 58eac4c56fc7dee61edc44370418f621003f44b3 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Tue, 16 May 2023 17:32:35 +0200 Subject: [PATCH 53/59] update go.mod --- go.mod | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/go.mod b/go.mod index 0d10a5fe7..ff14bf605 100644 --- a/go.mod +++ b/go.mod @@ -21,9 +21,6 @@ require ( github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/getkin/kin-openapi v0.107.0 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/swag v0.21.1 // indirect github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/go-cmp v0.5.9 // indirect @@ -43,12 +40,7 @@ require ( github.com/hashicorp/terraform-registry-address v0.2.0 // indirect github.com/hashicorp/terraform-svchost v0.0.1 // indirect github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect - github.com/invopop/yaml v0.1.0 // indirect - github.com/josharian/intern v1.0.0 // indirect github.com/kr/pretty v0.3.0 // indirect - github.com/labstack/echo/v4 v4.9.1 // indirect - github.com/labstack/gommon v0.4.0 // indirect - github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.18 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect @@ -56,13 +48,10 @@ require ( github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/oklog/run v1.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect - github.com/valyala/bytebufferpool v1.0.0 // indirect - github.com/valyala/fasttemplate v1.2.2 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect @@ -72,11 +61,9 @@ require ( golang.org/x/net v0.9.0 // indirect golang.org/x/sys v0.7.0 // indirect golang.org/x/text v0.9.0 // indirect - golang.org/x/tools v0.6.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect google.golang.org/grpc v1.54.0 // indirect google.golang.org/protobuf v1.30.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) From fa073709fd8298fe34b6416a213174c35d0eda99 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Mon, 22 May 2023 17:45:11 +0200 Subject: [PATCH 54/59] address PR review --- Makefile | 5 ++--- internal/clients/kibana/connector.go | 22 ++++++++-------------- internal/utils/utils.go | 4 ++++ 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index a4da4e752..a5dece017 100644 --- a/Makefile +++ b/Makefile @@ -161,6 +161,7 @@ tools: $(GOBIN) ## Install useful tools for linting, docs generation and develop @ cd tools && go install github.com/golangci/golangci-lint/cmd/golangci-lint @ cd tools && go install github.com/goreleaser/goreleaser @ cd tools && go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen + @ cd tools && go install github.com/deepmap/oapi-codegen .PHONY: misspell @@ -253,12 +254,10 @@ generate-alerting-client: ## generate Kibana alerting client @ go fmt ./generated/alerting/... .PHONY: generate-connectors-client -generate-connectors-client: ## generate Kibana connectors client - @ go get github.com/deepmap/oapi-codegen/pkg/codegen@v1.12.4 +generate-connectors-client: tools ## generate Kibana connectors client @ go generate @ go fmt ./generated/connectors/... - .PHONY: generate-slo-client generate-slo-client: ## generate Kibana slo client @ docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \ diff --git a/internal/clients/kibana/connector.go b/internal/clients/kibana/connector.go index 72f743df6..25e5b8e2f 100644 --- a/internal/clients/kibana/connector.go +++ b/internal/clients/kibana/connector.go @@ -10,6 +10,7 @@ import ( "github.com/elastic/terraform-provider-elasticstack/generated/connectors" "github.com/elastic/terraform-provider-elasticstack/internal/clients" "github.com/elastic/terraform-provider-elasticstack/internal/models" + "github.com/elastic/terraform-provider-elasticstack/internal/utils" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" ) @@ -248,8 +249,7 @@ func connectorConfigWithDefaultsCasesWebhook(plan string) (string, error) { *custom.CreateIncidentMethod = connectors.ConfigPropertiesCasesWebhookCreateIncidentMethodPost } if custom.HasAuth == nil { - custom.HasAuth = new(bool) - *custom.HasAuth = true + custom.HasAuth = utils.Pointer(true) } if custom.UpdateIncidentMethod == nil { custom.UpdateIncidentMethod = new(connectors.ConfigPropertiesCasesWebhookUpdateIncidentMethod) @@ -268,8 +268,7 @@ func connectorConfigWithDefaultsEmail(plan string) (string, error) { return "", err } if custom.HasAuth == nil { - custom.HasAuth = new(bool) - *custom.HasAuth = true + custom.HasAuth = utils.Pointer(true) } if custom.Service == nil { custom.Service = new(string) @@ -288,8 +287,7 @@ func connectorConfigWithDefaultsIndex(plan string) (string, error) { return "", err } if custom.Refresh == nil { - custom.Refresh = new(bool) - *custom.Refresh = false + custom.Refresh = utils.Pointer(false) } customJSON, err := json.Marshal(custom) if err != nil { @@ -324,12 +322,10 @@ func connectorConfigWithDefaultsServicenow(plan, backend string) (string, error) return "", err } if planConfig.IsOAuth == nil && backendConfig.IsOAuth != nil && !*backendConfig.IsOAuth { - planConfig.IsOAuth = new(bool) - *planConfig.IsOAuth = false + planConfig.IsOAuth = utils.Pointer(false) } if planConfig.UsesTableApi == nil { - planConfig.UsesTableApi = new(bool) - *planConfig.UsesTableApi = true + planConfig.UsesTableApi = utils.Pointer(true) } customJSON, err := json.Marshal(planConfig) if err != nil { @@ -344,8 +340,7 @@ func connectorConfigWithDefaultsServicenowItom(plan string) (string, error) { return "", err } if custom.IsOAuth == nil { - custom.IsOAuth = new(bool) - *custom.IsOAuth = false + custom.IsOAuth = utils.Pointer(false) } customJSON, err := json.Marshal(custom) if err != nil { @@ -387,8 +382,7 @@ func connectorConfigWithDefaultsXmatters(plan string) (string, error) { return "", err } if custom.UsesBasic == nil { - custom.UsesBasic = new(bool) - *custom.UsesBasic = true + custom.UsesBasic = utils.Pointer(true) } customJSON, err := json.Marshal(custom) if err != nil { diff --git a/internal/utils/utils.go b/internal/utils/utils.go index b3e8351f4..90949b655 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -184,3 +184,7 @@ func ExpandIndividuallyDefinedSettings(ctx context.Context, d *schema.ResourceDa func ConvertSettingsKeyToTFFieldKey(settingKey string) string { return strings.Replace(settingKey, ".", "_", -1) } + +func Pointer[T any](value T) *T { + return &value +} From d12e73f7d3543b4f6108e24319acfb0c0a511282 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Mon, 22 May 2023 19:02:25 +0200 Subject: [PATCH 55/59] readme for modified specs --- generated/connectors/README.md | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 generated/connectors/README.md diff --git a/generated/connectors/README.md b/generated/connectors/README.md new file mode 100644 index 000000000..f17d53e42 --- /dev/null +++ b/generated/connectors/README.md @@ -0,0 +1,39 @@ +[OpenAPI specs](./bundled.yaml) is copied from [Kibana repo](https://raw.githubusercontent.com/elastic/kibana/8.7/x-pack/plugins/actions/docs/openapi/bundled.yaml) with some modifications: + +- added mapping section for discriminator field in `POST` `/s/{spaceId}/api/actions/connector`; +- added explicit object definitions for `400`, `401` and `404` errors (`oapi-codegen` doesn't generate proper code for embedded anonymous objects in some cases) - `bad_request_error`, `authorization_error` and `object_not_found_error`; +- added missing `oneOf` types in `requestBody` for `PUT` `/s/{spaceId}/api/actions/connector/{connectorId}` - the original `bundled.yaml` misses some connector types in the `PUT` `requestBody` defintion: + - `update_connector_request_email`; + - `update_connector_request_pagerduty`; + - `update_connector_request_servicenow_sir`; + - `update_connector_request_slack`; + - `update_connector_request_teams`; + - `update_connector_request_tines`; + - `update_connector_request_webhook`; + - `update_connector_request_xmatters`. +- response definitions of `/s/{spaceId}/api/actions/connector/{connectorId}/_execute` and `/s/{spaceId}/api/actions/action/{actionId}/_execute` are modified from embedded object definitions to named ones `run_connector_general_response` and `legacy_run_connector_general_response`; +- specified properties for following types. The original `bundled.yaml` defines them as dynamic objects (`additionalProperties: true`): + - `config_propeties_email`; + - `config_properties_pagerduty`; + - `config_properties_tines`; + - `config_properties_webhook`; + - `config_properties_xmatters`; +- `is_deprecated` is marked as optional field (it's required field in the vanilla `bundled.yaml`) in the following objects (Kibana responses may omit it): + - `connector_response_properties_cases_webhook`; + - `connector_response_properties_email`; + - `connector_response_properties_index`; + - `connector_response_properties_jira`; + - `connector_response_properties_opsgenie`; + - `connector_response_properties_pagerduty`; + - `connector_response_properties_resilient`; + - `connector_response_properties_serverlog`; + - `connector_response_properties_servicenow`; + - `connector_response_properties_servicenow_itom`; + - `connector_response_properties_servicenow_sir`; + - `connector_response_properties_slack`; + - `connector_response_properties_swimlane`; + - `connector_response_properties_teams`; + - `connector_response_properties_tines`; + - `connector_response_properties_webhook`; + - `connector_response_properties_xmatters`. +- added mapping section for discriminator field in `connector_response_properties`. From baec3cc766e8d37f345b84f7cc8fc4bd990738ba Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Mon, 22 May 2023 19:02:44 +0200 Subject: [PATCH 56/59] readme for the modified specs --- README.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/README.md b/README.md index 515f34d86..2bbe97e53 100644 --- a/README.md +++ b/README.md @@ -134,13 +134,3 @@ Then commit the changes to `go.mod` and `go.sum`. Kibana clients for some APIs are generated based on Kibana OpenAPI specs. Please see [Makefile](./Makefile) tasks for more details. - -#### Known issues -OpenAPI generator produces incorrect code for `RunConnector200ResponseData` struct -in [model_run_connector_200_response_data.go](./generated/kibanaactions/model_run_connector_200_response_data.go). -It doesn't strip curly braces from the struct field names. - -[There is a fix for the issue](https://github.com/OpenAPITools/openapi-generator/pull/13167) but it's not yet merged. -Currently the file is fixed manually. - -Also the specs don't include models for some connector types, e.g. they miss models for update requests for few connector types like `Slack`, `Webhook`, etc. From 5e9f87f4d247291433629259ac92451e4b667135 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Mon, 22 May 2023 19:18:47 +0200 Subject: [PATCH 57/59] fix Makefile --- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index a5dece017..c02b89f9b 100644 --- a/Makefile +++ b/Makefile @@ -161,8 +161,7 @@ tools: $(GOBIN) ## Install useful tools for linting, docs generation and develop @ cd tools && go install github.com/golangci/golangci-lint/cmd/golangci-lint @ cd tools && go install github.com/goreleaser/goreleaser @ cd tools && go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen - @ cd tools && go install github.com/deepmap/oapi-codegen - + @ go get github.com/deepmap/oapi-codegen/pkg/codegen@v1.12.4 .PHONY: misspell misspell: @@ -259,7 +258,7 @@ generate-connectors-client: tools ## generate Kibana connectors client @ go fmt ./generated/connectors/... .PHONY: generate-slo-client -generate-slo-client: ## generate Kibana slo client +generate-slo-client: tools ## generate Kibana slo client @ docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \ -i https://raw.githubusercontent.com/elastic/kibana/master/x-pack/plugins/observability/docs/openapi/slo/bundled.yaml \ --skip-validate-spec \ @@ -274,4 +273,4 @@ generate-slo-client: ## generate Kibana slo client @ go fmt ./generated/... .PHONY: generate-clients -generate-clients: generate-alerting-client generate-slo-client ## generate all clients +generate-clients: generate-alerting-client generate-slo-client generate-connectors-client ## generate all clients From 9a1c1dcaa514546a370751731821e7db4b08ad4b Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Mon, 22 May 2023 22:38:54 +0200 Subject: [PATCH 58/59] move connectors client generation to tools --- Makefile | 3 +-- connectors_gen.go | 3 --- tools/connectors_gen.go | 3 +++ 3 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 connectors_gen.go create mode 100644 tools/connectors_gen.go diff --git a/Makefile b/Makefile index c02b89f9b..9cfa5db2f 100644 --- a/Makefile +++ b/Makefile @@ -161,7 +161,6 @@ tools: $(GOBIN) ## Install useful tools for linting, docs generation and develop @ cd tools && go install github.com/golangci/golangci-lint/cmd/golangci-lint @ cd tools && go install github.com/goreleaser/goreleaser @ cd tools && go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen - @ go get github.com/deepmap/oapi-codegen/pkg/codegen@v1.12.4 .PHONY: misspell misspell: @@ -254,7 +253,7 @@ generate-alerting-client: ## generate Kibana alerting client .PHONY: generate-connectors-client generate-connectors-client: tools ## generate Kibana connectors client - @ go generate + @ cd tools && go generate @ go fmt ./generated/connectors/... .PHONY: generate-slo-client diff --git a/connectors_gen.go b/connectors_gen.go deleted file mode 100644 index dada56086..000000000 --- a/connectors_gen.go +++ /dev/null @@ -1,3 +0,0 @@ -//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen -package connectors -o ./generated/connectors/connectors.gen.go -generate "types,client" ./generated/connectors/bundled.yaml - -package main diff --git a/tools/connectors_gen.go b/tools/connectors_gen.go new file mode 100644 index 000000000..3f2b610e6 --- /dev/null +++ b/tools/connectors_gen.go @@ -0,0 +1,3 @@ +//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen -package connectors -o ../generated/connectors/connectors.gen.go -generate "types,client" ../generated/connectors/bundled.yaml + +package tools From c076b83c423f12db4106f69acb694a8dc9e582c7 Mon Sep 17 00:00:00 2001 From: Dmytro Onishchenko Date: Mon, 22 May 2023 22:39:57 +0200 Subject: [PATCH 59/59] formatting --- internal/utils/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/utils/utils.go b/internal/utils/utils.go index 90949b655..57c86912d 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -186,5 +186,5 @@ func ConvertSettingsKeyToTFFieldKey(settingKey string) string { } func Pointer[T any](value T) *T { - return &value + return &value }